You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Your cookie support works fine! However the documentation you provide in your documentation is wrong. If one follows your documenation they will run into an error with the json parser.
To Reproduce
If i run python3 -u myhost.com --cookie {'ID':'1094200543'}
you will run into the following error:
Traceback (most recent call last):
File "/home/kali/Desktop/MasterTools/PwnXSS/pwnxss.py", line 73, in <module>
start()
File "/home/kali/Desktop/MasterTools/PwnXSS/pwnxss.py", line 52, in start
core.main(getopt.u,getopt.proxy,getopt.user_agent,check(getopt),getopt.cookie,getopt.method)
File "/home/kali/Desktop/MasterTools/PwnXSS/lib/core.py", line 163, in main
self.session=session(proxy,headers,cookie)
File "/home/kali/Desktop/MasterTools/PwnXSS/lib/helper/helper.py", line 26, in session
r.cookies.update(json.loads(cookie))
File "/usr/lib/python3.9/json/__init__.py", line 346, in loads
return _default_decoder.decode(s)
File "/usr/lib/python3.9/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/python3.9/json/decoder.py", line 353, in raw_decode
obj, end = self.scan_once(s, idx)
json.decoder.JSONDecodeError: Expecting property name enclosed in double quotes: line 1 column 2 (char 1)
which is completely fine since the Json parser requires properties in double quotes. Single quotes are not valid. Furthermore the json parser requires a string to be passed. Your documentation guides the user into providing the json object itself which is off.
When changing the request to actually take the functionallity of the parser into account the request works. python3 pwnxss.py -u myhost.com --cookie "{\"ID\":\"1094200543\"}" Expected behavior
There are two possibilities how you could fix this.
Correct your documentation
Actually allow to pass the json object and stringify it correctly
The text was updated successfully, but these errors were encountered:
Your cookie support works fine! However the documentation you provide in your documentation is wrong. If one follows your documenation they will run into an error with the json parser.
To Reproduce
If i run
python3 -u myhost.com --cookie {'ID':'1094200543'}
you will run into the following error:
which is completely fine since the Json parser requires properties in double quotes. Single quotes are not valid. Furthermore the json parser requires a string to be passed. Your documentation guides the user into providing the json object itself which is off.
When changing the request to actually take the functionallity of the parser into account the request works.
python3 pwnxss.py -u myhost.com --cookie "{\"ID\":\"1094200543\"}"
Expected behavior
There are two possibilities how you could fix this.
The text was updated successfully, but these errors were encountered: