Hello i tried run the run.py but i got an error message!
Run.py
from modules import HTTPHeaders
site = "https://google.com"
HTTPHeaders(site, _verbose=True)
HTTPHeaders.py
import dns
import dns.resolver
def HTTPHeaders(site, _verbose=None):
if _verbose != None:
try:
r = http.request('GET', "http://"+site)
except:
pass
if (r.status == 200):
print("HTTP/1.1 200 OK")
else:
print(r.status)
try:
print("Content-Type : "+r.headers['Content-Type'])
except:
pass
try:
print("Server : "+r.headers['Server'])
except:
pass
try:
print("Set-Cookie : "+r.headers['Set-Cookie'])
except:
pass
My error :
TypeError: 'module' object is not callable
How can i fix this error ? Thank you :)
Try this:
from modules import HTTPHeaders
HTTPHeaders.HTTPHeaders(...)
You imported the module itself, so you have to access the function using the dot notation.
Alternatively import the function like this:
from modules.HTTPHeaders import HTTPHeaders
HTTPHeaders(...)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With