T
T
TODO•SEC
Search…
HttpEnum-Client.py
HTTP Method enumeration script via OPTIONS HTTP method from Python section of PTSv4 (eLearnSecurity)
1
import http.client
2
3
print('** Lists methods available via OPTIONS/HTTP **\n')
4
5
host = input('Insert the host/DST IP: ')
6
port = input('Insert the DST PORT:(default:80) ')
7
8
if(port == ''):
9
port = 80
10
11
try:
12
connection = http.client.HTTPConnection(host, port)
13
connection.request('OPTIONS', '/')
14
response = connection.getresponse()
15
print('Enabled methods on webserver are: ', response.getheader('allow'))
16
connection.close()
17
except ConnectionRefusedError:
18
print('Connection Failed')
Copied!
Last modified 8d ago
Copy link