Commit 2658748f authored by Nong Hoang Tu's avatar Nong Hoang Tu
Browse files

- Add set cookie

- Value of proxy now is address only instead of dict
- Value of user-agent (ua) now is value only instead of dict
parent c4379f63
...@@ -3,7 +3,7 @@ from vjyscan.cli.prints import * ...@@ -3,7 +3,7 @@ from vjyscan.cli.prints import *
class VJScan: class VJScan:
def __init__(self, ua, proxy, verbose): def __init__(self, ua, proxy, cookie, verbose):
self.print_vulnerable = print_vulnerable self.print_vulnerable = print_vulnerable
self.print_found = print_found self.print_found = print_found
if verbose: if verbose:
...@@ -15,6 +15,8 @@ class VJScan: ...@@ -15,6 +15,8 @@ class VJScan:
self.print_not_vulnerable = dummy self.print_not_vulnerable = dummy
self.print_not_found = dummy self.print_not_found = dummy
self.http_client = requests.Session() self.http_client = requests.Session()
self.http_client.headers.update(ua) self.http_client.headers.update({'User-Agent': ua})
if proxy: if proxy:
self.http_client.proxies.update(proxy) self.http_client.proxies.update({'http': proxy}) # must check https proxies
if cookie:
self.http_client.cookies.set_cookie(cookie)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment