nsonaniya2010 / SubDomainizer

A tool to find subdomains and interesting things hidden inside, external Javascript files of page, folder, and Github.
MIT License
1.71k stars 233 forks source link

Check for existence of content-type header before accessing its value #32

Closed gr3atest closed 2 years ago

gr3atest commented 2 years ago

content-type header is not always returned. Check before attempting to access the header

nsonaniya2010 commented 2 years ago

Thanks for Creating PR. how about changing

if 'text/html' in req.headers.get('content-type'):

to

if 'text/html' in req.headers.get('content-type', 'None'):
gr3atest commented 2 years ago

Great suggestion, updated code to reflect your suggestion :)

nsonaniya2010 commented 2 years ago

Merged. Thanks