diff --git a/test/netgear.py b/test/netgear.py new file mode 100644 index 0000000..a22a11e --- /dev/null +++ b/test/netgear.py @@ -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)