October 2016
Beginner to intermediate
650 pages
14h 43m
English
Some websites restrict access or display different content-based on the browser or device you're using to view it. For example, a web site may show a mobile-oriented theme for users browsing from an iPhone or display a warning to users with an old and vulnerable version of Internet Explorer. This can be a good place to find vulnerabilities because these might have been tested less rigorously or even forgotten about by the developers.
In this recipe, we will show you how to spoof your user agent, so you appear to the website as if you're using a different device in an attempt to uncover alternative content:
import requests import hashlib user_agents = { 'Chrome on Windows 8.1' : 'Mozilla/5.0 ...Read now
Unlock full access