URL rewriting support

This commit is contained in:
Somdev Sangwan
2018-11-22 13:43:25 +05:30
committed by GitHub
parent 263ee2d887
commit 1aa9f56571
5 changed files with 36 additions and 22 deletions

View File

@@ -5,14 +5,17 @@ import warnings
import core.config
from core.config import globalVariables
from core.utils import jsonize
from core.utils import converter
warnings.filterwarnings('ignore') # Disable SSL related warnings
def requester(url, data, headers, GET, delay, timeout):
if core.config.globalVariables['jsonData']:
data = jsonize(data)
data = converter(data)
elif core.config.globalVariables['path']:
url = converter(data, url)
data = []
time.sleep(delay)
user_agents = ['Mozilla/5.0 (X11; Linux i686; rv:60.0) Gecko/20100101 Firefox/60.0',
'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36'