Skip to content

Commit

Permalink
Merge pull request #211 from duolaAOA/master
Browse files Browse the repository at this point in the history
Post type Url auto-identification
  • Loading branch information
s0md3v authored Mar 15, 2019
2 parents 20dfc7f + 5abe0c3 commit fc432e5
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions modes/scan.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,20 @@ def scan(target, paramData, encoding, headers, delay, timeout, skipDOM, find, sk
target = 'http://' + target
logger.debug('Scan target: {}'.format(target))
response = requester(target, {}, headers, GET, delay, timeout).text


foundMethod = 'GET'
find_post_method = re.findall(
r'<form.*?method=\'(.*?)\'.*?>|<form.*?method="(.*?)".*?>', response)
for method in find_post_method:
try:
foundMethod = method[1]
except UnboundLocalError:
pass

if foundMethod.upper() == 'POST':
GET, POST = (False, True)

if not skipDOM:
logger.run('Checking for DOM vulnerabilities')
highlighted = dom(response)
Expand Down

0 comments on commit fc432e5

Please sign in to comment.