- Bug fixes
- Scan URLs from file
- JSON output to file
- Custom HTTP header support
- Switch to ignore helpful messages
This commit is contained in:
Somdev Sangwan
2020-01-17 02:44:46 +05:30
committed by GitHub
parent 2e145e699c
commit f8e57478fe
5 changed files with 263 additions and 129 deletions

View File

@@ -3,18 +3,10 @@ import requests
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
headers = {
'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64; rv:70.0) Gecko/20100101 Firefox/70.0',
'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
'Accept-Language': 'en-US,en;q=0.5',
'Accept-Encoding': 'gzip',
'DNT': '1',
'Connection': 'close',
}
def requester(url, scheme, origin):
def requester(url, scheme, headers, origin):
headers['Origin'] = scheme + origin
response = requests.get(url, headers=headers, verify=False).headers
return response.get('Access-Control-Allow-Origin', None)
for key, value in response.items():
if key.lower() == 'access-control-allow-origin':
return response