Skip to content
This repository has been archived by the owner on Dec 1, 2018. It is now read-only.

Commit

Permalink
secdec#1 add chrome user agent string
Browse files Browse the repository at this point in the history
  • Loading branch information
gingeleski committed Mar 14, 2018
1 parent 7a9f998 commit 1d17273
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion renderers/chrome_render.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,15 @@ def render_page():
body = get_string_from_base64(req_data['body'])
print_debug('body = ' + str(body))

headers = None
headers = {}
if 'headers' in req_data:
headers = json.loads(get_string_from_base64(req_data['headers']))
print_debug('Headers = ' + str(headers))

# Set close-enough user agent string
headers['User-Agent'] = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36\
(KHTML, like Gecko) Chrome/60.0.3112.78 Safari/537.36'

# TODO right now we assume this is a dict, but better to use the Requests CookieJar
cookies = None
if 'cookies' in req_data:
Expand Down

0 comments on commit 1d17273

Please sign in to comment.