Skip to content

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

Closed
@mastercho

Description

@mastercho

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):

  • OS: Windows
  • Ghauri version which is causing the error (should be latest) 1.3.6

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions