r0oth3x49 / ghauri

An advanced cross-platform tool that automates the process of detecting and exploiting SQL injection security flaws
MIT License
3.11k stars 310 forks source link

AttributeError: 'HTTPRequest' object has no attribute 'headers' in 1.3.6 #172

Closed mastercho closed 2 months ago

mastercho commented 2 months ago

Describe the bug

Traceback (most recent call last):
  File "C:\Program Files\Python310\Scripts\ghauri-script.py", line 33, in <module>
    sys.exit(load_entry_point('ghauri==1.3.6', 'console_scripts', 'ghauri')())
  File "C:\Program Files\Python310\lib\site-packages\ghauri-1.3.6-py3.10.egg\ghauri\scripts\ghauri.py", line 464, in main
    resp = ghauri.perform_injection(
  File "C:\Program Files\Python310\lib\site-packages\ghauri-1.3.6-py3.10.egg\ghauri\ghauri.py", line 176, in perform_injection
    url = req.url
  File "C:\Program Files\Python310\lib\site-packages\ghauri-1.3.6-py3.10.egg\ghauri\common\utils.py", line 147, in url
    url = f"{self.protocol}://{self.host}"
  File "C:\Program Files\Python310\lib\site-packages\ghauri-1.3.6-py3.10.egg\ghauri\common\utils.py", line 180, in protocol
    referer = self.headers.get("Referer")
AttributeError: 'HTTPRequest' object has no attribute 'headers'

To Reproduce Steps to reproduce the behavior:

  1. clone the latest version
  2. ghauri -r rerun3.txt --level=3 --dbs -p cid
POST /nl/module/productsalert/AjaxProcess HTTP/1.1
X-Requested-With: XMLHttpRequest
Referer: https://site.com/
Content-Type: application/x-www-form-urlencoded
Accept: */*
Content-Length: 104
Accept-Encoding: gzip,deflate,br
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36
Host: site.com
Connection: Keep-alive

cid=0&idl=1&option=0&paemail=testing%40example.com&pid=561

It works on 1.3.5!

Expected behavior To work as intended

Desktop (please complete the following information):

crpse7777 commented 2 months ago

confirming... win+ghauri 1.3.6

1.3.5 working