Files
Corsy/core/requester.py
Somdev Sangwan f8e57478fe 1.0-beta
- Bug fixes
- Scan URLs from file
- JSON output to file
- Custom HTTP header support
- Switch to ignore helpful messages
2020-01-17 02:44:46 +05:30

13 lines
384 B
Python

import urllib3
import requests
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
def requester(url, scheme, headers, origin):
headers['Origin'] = scheme + origin
response = requests.get(url, headers=headers, verify=False).headers
for key, value in response.items():
if key.lower() == 'access-control-allow-origin':
return response