1 |
hwoarang 10/10/27 20:54:28 |
2 |
|
3 |
Added: use_simplejson_instead_of_jsonpy.patch w3af_console |
4 |
w3af_gui |
5 |
Log: |
6 |
Multiple QA fixes. Thanks to Anton Bolshakov and montjoie for the fixes and patches. Bug #272200 |
7 |
|
8 |
(Portage version: 2.2.0_alpha1/cvs/Linux x86_64) |
9 |
|
10 |
Revision Changes Path |
11 |
1.1 net-analyzer/w3af/files/use_simplejson_instead_of_jsonpy.patch |
12 |
|
13 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/w3af/files/use_simplejson_instead_of_jsonpy.patch?rev=1.1&view=markup |
14 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/w3af/files/use_simplejson_instead_of_jsonpy.patch?rev=1.1&content-type=text/plain |
15 |
|
16 |
Index: use_simplejson_instead_of_jsonpy.patch |
17 |
=================================================================== |
18 |
--- ./core/controllers/misc/dependencyCheck.py.old 2010-10-19 09:58:19.000000000 +0200 |
19 |
+++ ./core/controllers/misc/dependencyCheck.py 2010-10-19 09:58:32.000000000 +0200 |
20 |
@@ -95,15 +95,6 @@ |
21 |
except: |
22 |
print 'You have to install pyPdf lib. Debian based distributions: apt-get install python-pypdf' |
23 |
sys.exit( 1 ) |
24 |
- |
25 |
- try: |
26 |
- from extlib.jsonpy import json as json |
27 |
- except: |
28 |
- try: |
29 |
- import json |
30 |
- except: |
31 |
- print 'You have to install python-json lib. Debian based distributions: apt-get install python-json' |
32 |
- sys.exit( 1 ) |
33 |
|
34 |
try: |
35 |
from OpenSSL import SSL |
36 |
--- core/data/fuzzer/fuzzer.py.old 2010-10-19 10:00:59.000000000 +0200 |
37 |
+++ core/data/fuzzer/fuzzer.py 2010-10-19 10:02:14.000000000 +0200 |
38 |
@@ -38,9 +38,9 @@ |
39 |
from core.data.dc.cookie import cookie as cookie |
40 |
from core.data.dc.dataContainer import dataContainer as dc |
41 |
try: |
42 |
- from extlib.jsonpy import json as json |
43 |
+ import extlib.simplejson as json |
44 |
except: |
45 |
- import json |
46 |
+ import simplejson as json |
47 |
from core.data.request.httpPostDataRequest import httpPostDataRequest |
48 |
from core.data.request.httpQsRequest import httpQsRequest |
49 |
|
50 |
@@ -210,7 +210,7 @@ |
51 |
|
52 |
# Now, fuzz the parsed JSON data... |
53 |
postdata = freq.getData() |
54 |
- jsonPostData = json.read( postdata ) |
55 |
+ jsonPostData = json.loads( postdata ) |
56 |
return _makeMutants( freq, mutantClass, mutant_str_list, fuzzableParamList , append, jsonPostData ) |
57 |
|
58 |
def isJSON( freq ): |
59 |
@@ -222,7 +222,7 @@ |
60 |
# We have something that's not URL encoded in the postdata, it could be something |
61 |
# like JSON, XML, or multipart encoding. Let's try with JSON |
62 |
try: |
63 |
- jsonPostData = json.read( postdata ) |
64 |
+ jsonPostData = json.loads( postdata ) |
65 |
except: |
66 |
# It's not json, maybe XML or multipart, I don't really care ( at least not in this section of the code ) |
67 |
return False |
68 |
--- core/data/request/frFactory.py.old 2010-10-19 10:03:50.000000000 +0200 |
69 |
+++ core/data/request/frFactory.py 2010-10-19 10:04:38.000000000 +0200 |
70 |
@@ -37,9 +37,9 @@ |
71 |
|
72 |
# for json |
73 |
try: |
74 |
- from extlib.jsonpy import json as json |
75 |
+ import extlib.simplejson as json |
76 |
except: |
77 |
- import json |
78 |
+ import simplejson as json |
79 |
|
80 |
from core.controllers.w3afException import w3afException |
81 |
import core.controllers.outputManager as om |
82 |
@@ -200,7 +200,7 @@ |
83 |
# Case #2, JSON request |
84 |
# |
85 |
try: |
86 |
- dc = json.read( postData ) |
87 |
+ dc = json.loads( postData ) |
88 |
except: |
89 |
pass |
90 |
else: |
91 |
--- core/data/request/jsonPostDataRequest.py.old 2010-10-19 10:12:22.000000000 +0200 |
92 |
+++ core/data/request/jsonPostDataRequest.py 2010-10-19 10:15:05.000000000 +0200 |
93 |
@@ -25,9 +25,9 @@ |
94 |
from core.data.request.httpPostDataRequest import httpPostDataRequest |
95 |
import core.data.dc.dataContainer as dc |
96 |
try: |
97 |
- from extlib.jsonpy import json as json |
98 |
+ import extlib.simplejson as json |
99 |
except: |
100 |
- import json |
101 |
+ import simplejson |
102 |
|
103 |
class jsonPostDataRequest(httpPostDataRequest): |
104 |
''' |
105 |
@@ -43,7 +43,7 @@ |
106 |
''' |
107 |
@return: A string that represents the JSON data saved in the dc. |
108 |
''' |
109 |
- res = json.write(self._dc) |
110 |
+ res = json.dumps(self._dc) |
111 |
return res |
112 |
|
113 |
def __str__( self ): |
114 |
@@ -54,7 +54,7 @@ |
115 |
strRes += self._url |
116 |
strRes += ' | Method: ' + self._method |
117 |
strRes += ' | JSON: (' |
118 |
- strRes += json.write(self._dc) |
119 |
+ strRes += json.dumps(self._dc) |
120 |
strRes += ')' |
121 |
return strRes |
122 |
|
123 |
|
124 |
|
125 |
|
126 |
1.1 net-analyzer/w3af/files/w3af_console |
127 |
|
128 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/w3af/files/w3af_console?rev=1.1&view=markup |
129 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/w3af/files/w3af_console?rev=1.1&content-type=text/plain |
130 |
|
131 |
Index: w3af_console |
132 |
=================================================================== |
133 |
#!/bin/sh |
134 |
cd /usr/lib/w3af |
135 |
./w3af_console $* |
136 |
|
137 |
|
138 |
|
139 |
1.1 net-analyzer/w3af/files/w3af_gui |
140 |
|
141 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/w3af/files/w3af_gui?rev=1.1&view=markup |
142 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/w3af/files/w3af_gui?rev=1.1&content-type=text/plain |
143 |
|
144 |
Index: w3af_gui |
145 |
=================================================================== |
146 |
#!/bin/sh |
147 |
cd /usr/lib/w3af |
148 |
./w3af_gui $* |