Spoof Your Own Mac OS X 10.8 User Agent
Disappointed that Mac OS X 10.8 users aren’t showing up in your web logs? Spoof your own visits! In the spirit of pranking and Halloween, here’s how you can mimic a Mac OS X 10.8 user agent yourself:
- Launch the Terminal
- Enter the following command, replacing “http://url.com” no the end with the web address you want to give the user agent to:
curl -A "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8) AppleWebKit/535.6.2 (KHTML, like Gecko) Version/5.2 Safari/535.6.2" http://url.com
You won’t see anything returned from the command line, but if you look in your web logs, you’ll see an appearance of a 10.8 user agent.
This is based on a past tip on changing user agents for web development purposes. If you don’t like the command line, you can also do limited user agent changes in Safari’s Developer menu or by using third party plugins for Chrome and Firefox.
Spoofing the OS X 10.8 User Agent through Safari
An easier command line-free way of doing this is through Safari’s Develop menu, pull down to User Agent and choose “Other” then paste in this:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8) AppleWebKit/535.6.2 (KHTML, like Gecko) Version/5.2 Safari/535.6.2
Thanks to @polislix for the reminder and WP for the screenshot
Better:
Mozilla/5.0 (Macintosh; Intel Mac OS X 11_0) AppleWebKit/535.6.2 (KHTML, like Gecko) Version/5.2 Safari/535.6.2
if it’s this easy to spoof, doesn’t that mean all those other entries in weblogs could be spoofs too?
LOL, why not right?