-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #31 from mepley1/refactor-iot-rules-regex
Refactor a few rules to use regex
- Loading branch information
Showing
2 changed files
with
51 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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=/¤tsetting.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) |