Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated oralyzer.py #20

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 13 additions & 5 deletions oralyzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
from core.crlf import crlfScan
from core.others import good,bad,info,requester,multitest,urlparse
from bs4 import BeautifulSoup
import collections
collections.Callable = collections.abc.Callable
warnings.filterwarnings('ignore')
ssl._create_default_https_context = ssl._create_unverified_context
#----------------------------------------------------------------------------------#
Expand Down Expand Up @@ -62,18 +64,23 @@ def analyze(url):
break
#--------------------------------------------------------#
def request(URI,params=''):
page = ''
try:
page = requester(URI,args.proxy,params)
except requests.exceptions.Timeout:
print("[\033[91mTimeout\033[00m] %s" % url)
return True

except requests.exceptions.ConnectionError:
print("%s Connection Error" % bad)
return True

funcBreak = check(page, page.request.url)
if page:
funcBreak = check(page, page.request.url)
else:
return

if funcBreak:
return True
return True

#--------------------------------------------------------------------#
def check(respOBJ,finalURL):
payload = "|".join([re.escape(i) for i in file])
Expand Down Expand Up @@ -238,7 +245,8 @@ def check(respOBJ,finalURL):
elif "http-equiv=\"refresh\"" in str(respOBJ.text) and not metaTagSearch:
print("%s The page is only getting refreshed" % bad)
return True

else:
print("%s No redirect" % bad)
#-------------------------------------------------------------------------------------#
elif respOBJ.status_code in errorCodes:
print("%s %s [\033[91m%s\033[00m]" % (bad,finalURL,respOBJ.status_code))
Expand Down