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

Resolve Parameter extractor when finding ./ #279

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions core/arjun.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ def arjun(url, GET, headers, delay, timeout):
green, foundParam, end))
if foundParam not in blindParams:
blindParams.insert(0, foundParam)
paraNames[foundParam] = "null"
threadpool = concurrent.futures.ThreadPoolExecutor(max_workers=threadCount)
futures = (threadpool.submit(checky, param, paraNames, url,
headers, GET, delay, timeout) for param in blindParams)
Expand Down
11 changes: 5 additions & 6 deletions core/requester.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import random
import requests
import time
from urllib3.exceptions import ProtocolError
import warnings

import requests
from urllib3.exceptions import ProtocolError

import core.config
from core.utils import converter, getVar
from core.log import setup_logger
from core.utils import converter, getVar

logger = setup_logger(__name__)

Expand All @@ -24,9 +25,7 @@ def requester(url, data, headers, GET, delay, timeout):
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'
'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36 OPR/43.0.2442.991']
if 'User-Agent' not in headers:
headers['User-Agent'] = random.choice(user_agents)
elif headers['User-Agent'] == '$':
if ('User-Agent' not in headers) or (headers['User-Agent'] == '$'):
headers['User-Agent'] = random.choice(user_agents)
logger.debug('Requester url: {}'.format(url))
logger.debug('Requester GET: {}'.format(GET))
Expand Down
3 changes: 2 additions & 1 deletion modes/scan.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ def scan(target, paramData, encoding, headers, delay, timeout, skipDOM, find, sk
params = getParams(target, paramData, GET)
logger.debug_json('Scan parameters:', params)
if find:
params = arjun(url, GET, headers, delay, timeout)
parameter_findes = arjun(url, GET, headers, delay, timeout)
params.update(parameter_findes)
if not params:
logger.error('No parameters to test.')
quit()
Expand Down