Skip to content

Commit

Permalink
misc: small fix or general refactoring i did not bother commenting
Browse files Browse the repository at this point in the history
  • Loading branch information
evilsocket committed Jun 28, 2024
1 parent 2d6847d commit 3fe36f8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
15 changes: 9 additions & 6 deletions examples/web_vulnerability_scanner/http-req.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
url = args.url if not args.url[-1] == '/' else args.url[:-1]

# escape the query string if present
main = path
if '?' in path:
main, querystr = path.split('?', 1)
quoted = []
Expand All @@ -33,9 +34,11 @@

r = requests.get(f"{url}{path}", headers=headers, timeout=15)

print()
print(f"HTTP/{r.raw.version/10} {r.raw.status} {r.raw.reason}")
for k, v in r.raw.headers.items():
print(f"{k}: {v}")
print(r.text)
print()
if r.raw.status == 200:
print(f"HTTP/{r.raw.version/10} {r.raw.status} {r.raw.reason}")
for k, v in r.raw.headers.items():
print(f"{k}: {v}")
print(r.text)

else:
print(f"Page {main} : {r.raw.reason}")
1 change: 1 addition & 0 deletions examples/web_vulnerability_scanner/task.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ guidance:
- Enumerate pages and folders that are relevant for fingerprinting first.
- Build and collect memories with details about the web server and the various technologies used.
- Understand the structure of the website and the technology used before starting the attacks.
- If a page returns a "not found" error stop requesting it and try another page.

# the agent toolbox
functions:
Expand Down

0 comments on commit 3fe36f8

Please sign in to comment.