fixed 4 minor bugs

This commit is contained in:
Somdev Sangwan
2024-04-01 08:51:42 +05:30
parent a2a628f323
commit b9b6237e79
4 changed files with 6 additions and 5 deletions

View File

@@ -1 +1 @@
__version__ = '2.2.2'
__version__ = '2.2.5'

View File

@@ -162,7 +162,7 @@ def initialize(request, wordlist, single_url=False):
if len(param_groups) > prev_chunk_count:
response_3 = requester(request, {zzuf[:-1]: zzuf[::-1][:-1]})
if compare(response_3, factors, {zzuf[:-1]: zzuf[::-1][:-1]})[0] != '':
print('%s Target is misbehaving. Try the --stable switch.' % bad)
print('%s Webpage is returning different content on each request. Try the --stable switch.' % bad)
return []
if mem.var['kill']:
return 'skipped'
@@ -210,6 +210,7 @@ def main():
count += 1
url = each['url']
mem.var['kill'] = False
mem.var['bad_req_count'] = 0
print('%s Scanning %d/%d: %s' % (run, count, len(request), url))
these_params = initialize(each, list(wordlist))
if these_params == 'skipped':

View File

@@ -85,12 +85,12 @@ def compare(response, factors, params):
for param in params.keys():
if len(param) < 5:
continue
if param not in factors['param_missing'] and re.search(r'[\'"\s]%s[\'"\s]' % param, response.text):
if param not in factors['param_missing'] and re.search(r'[\'"\s]%s[\'"\s]' % re.escape(param), response.text):
return ('param name reflection', params, 'param_missing')
if factors['value_missing']:
for value in params.values():
if type(value) != str or len(value) != 6:
continue
if value in response.text and re.search(r'[\'"\s]%s[\'"\s]' % value, response.text):
if value in response.text and re.search(r'[\'"\s]%s[\'"\s]' % re.escape(value), response.text):
return ('param value reflection', params, 'value_missing')
return ('', [], '')

View File

@@ -18,7 +18,7 @@ def requester(request, payload={}):
central function for making http requests
returns str on error otherwise response object of requests library
"""
if len(request.get('include', '')) != 0:
if request.get('include') and len(request.get('include', '')) != 0:
payload.update(request['include'])
if mem.var['stable']:
mem.var['delay'] = random.choice(range(3, 10))