diff --git a/examples/SQLI_blind_testphp.vulnweb.com b/examples/SQLI_blind_testphp.vulnweb.com.yml similarity index 100% rename from examples/SQLI_blind_testphp.vulnweb.com rename to examples/SQLI_blind_testphp.vulnweb.com.yml diff --git a/explo/connection.py b/explo/connection.py index d014b06..0fb7505 100644 --- a/explo/connection.py +++ b/explo/connection.py @@ -40,8 +40,10 @@ def http_request(block, scope): if cookies_path != '': try: - cookie_module = cookies_path.split('.', 1)[0] - cookies = scope[cookie_module]['response']['cookies'] + for cookie_module_path in cookies_path.split(',', -1): + cookie_module = cookie_module_path.split('.', 1)[0] + for k, v in scope[cookie_module]['response']['cookies'].items(): + cookies[k] = v except KeyError: Message.log( level='warning', @@ -59,6 +61,9 @@ def http_request(block, scope): for key, val in headers.items(): headers[key] = pystache.render(str(val), scope) + opts['url'] = pystache.render(str(opts['url']), scope) + opts['method'] = pystache.render(str(opts['method']), scope) + req = requests.Request(opts['method'], opts['url'], headers=headers, data=data, cookies=cookies) request = req.prepare() diff --git a/explo/modules/http.py b/explo/modules/http.py index 5612c17..98a1097 100644 --- a/explo/modules/http.py +++ b/explo/modules/http.py @@ -52,7 +52,8 @@ def execute(block, scope): message="==> Found in HEADERS: '%s'" % color.cyan(keyword)) if 'extract' in opts: - scope[name]['extracted'] = extract(response.text, opts['extract']) + headers = '\r\n'.join([a+":"+b for a, b in response.headers.items()]) + scope[name]['extracted'] = extract(headers+"\r\n\r\n"+response.text, opts['extract']) if 'find' in opts: keyword = opts['find']