Skip to content

Commit

Permalink
Test detection of netgear DGN command injection
Browse files Browse the repository at this point in the history
  • Loading branch information
mepley1 committed Jan 5, 2025
1 parent 1664027 commit ab6e098
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions test/netgear.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/usr/bin/env python3
# Test detection of Netgear DGN command injection

import requests

url = 'http://localhost:5000/setup.cgi?next_file=netgear.cfg&todo=syscmd&cmd=cat+/www/.htpasswd&curpath=/&currentsetting.htm=1'
url_short = 'http://localhost:5000/setup.cgi?currentsetting.htm=1'

# Both requests should be reported.
x = requests.get(url)
y = requests.get(url_short)
print(x.status_code)
print(y.status_code)

0 comments on commit ab6e098

Please sign in to comment.