s0md3v/XSStrike

--json 报错

zhangxp12 opened this issue · 1 comments

使用 --json 报错
python xsstrike.py -u http://127.0.0.1:8201/post1 --data '{"q":"query"}' --json
报错内容:

Traceback (most recent call last):
File "xsstrike.py", line 143, in
paramData = converter(paramData)
File "D:\project\XSStrike\core\utils.py", line 19, in converter
return json.loads(data)
File "D:\Users\PC\AppData\Local\Programs\Python\Python37\lib\json_init_.py", line 348, in loads
return _default_decoder.decode(s)
File "D:\Users\PC\AppData\Local\Programs\Python\Python37\lib\json\decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "D:\Users\PC\AppData\Local\Programs\Python\Python37\lib\json\decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

JoJenH commented

代码bug,用args从命令行参数取的值,没有双引号导致json解析不了