XSSCon
XSSCon copied to clipboard
Cookies not working :: json.decoder.JSONDecodeError
python3 xsscon.py -u http://172.17.244.102/reflected.php --cookie "{'PHPSESSID':'njv5bi4en9dfs2fkbtcslggkmm'}"
Traceback (most recent call last):
File "xsscon.py", line 73, in
start()
File "xsscon.py", line 52, in start
core.main(getopt.u,getopt.proxy,getopt.user_agent,check(getopt),getopt.cookie,getopt.method)
File "/home/pentester/XSSCon/lib/core.py", line 148, in main
self.session=session(proxy,headers,cookie)
File "/home/pentester/XSSCon/lib/helper/helper.py", line 26, in session
r.cookies.update(json.loads(cookie))
File "/usr/lib/python3.8/json/init.py", line 357, in loads
return _default_decoder.decode(s)
File "/usr/lib/python3.8/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/python3.8/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)
You need to wrap the dict in single quotes.
Example:
python .\xsscon.py -u https://www.test.com/ --cookie '{"token";"GiOTI5OCIsiIwODRhNWQ4NC0yNTAwLTNhY2Q1OTk}'