Spiga

user agent spoofing / how to change user agent in IE, firefox, opera, google chrome and safari

orkut in iphone image


Well, I wrote this article on request of one of my "good" friend abhishek (shetty) who need this to change user agents in popular browsers IE, Mozilla Firefox, Opera, Google chrome and Safari.

So I thought of writing this article to all my readers.
You all might find user agent switching (spoofing) useful for various purposes.


So let's see how can we do user agent spoofing.......




What is user agent ???

Whenever we visit a web site, our browser sends information about the application from which we are browsing, operating system installed, and version of the application, etc to the server.

Hence server can make use of this information for various purposes to provide better browsing or special services with respect to browser.

--------------------------------------------


How to change user agent in our browsers ???


(In above all changes we will use user agent of google bot [
Googlebot/2.1" "Compatible"="+http://www.googlebot.com/bot.html]
I will explain advantages of Google bot later)
--------------------------------------------


1] In Mozilla Firefox :
-
Open firefox >> goto address bar >> type about:config >> now right click anywhere in white portion >> select new >> string >> type general.useragent.override >> ok >> now enter value of user agent string you like.

Example: we will write Googlebot/2.1"
"Compatible"="+http://www.googlebot.com/bot.html in place of value for google bot.
----------------------------------



2] Internet Explorer :
-
For Internet Explorer you need a registry tweak. Copy below code and paste in notepad. Then save it as anything.reg. After saving the file double click it and merge in registry.


Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\5.0\User Agent]
@="Googlebot/2.1"
"Compatible"="+http://www.googlebot.com/bot.html"


to revert back to default user agent use this registry.


Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\5.0\User Agent] @="Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)"


Or download this file >> extract it and merge into registry as required.
download link: http://www.ziddu.com/download/6392955/googleuseragent.rar.html
-----------------------------------------------------------


3] In opera :
In opera this setting is personalized for the site you visit.
just type site name in address bar.
Now goto Tools >> quick preferences >> edit site preferences >> network >> browser identification >> change to browser you like.

------------------------------------------------



4] In Google Chrome :
In Google chrome there are two methods to change user agent.

(i) appending shortcut of chrome with a string.

- This is the most easiest way to change user agent in chrome.
just create a shortcut of chrome.exe >> goto properties of that shortcut
>> in the target path write
>>
--user-agent="Googlebot/2.1 (+http://www.googlebot.com/bot.html)"
>> now click OK >> and start using chrome with this shortcut

(NOTE: remember to put a after "space" followed by two hyphens " -- "
so that it will look like
"C:\Documents and Settings\\Local Settings\Application Data\Google\Chrome\Application\chrome.exe" --user-agent="Mozilla/5.0 (iPhone; U; CPU like Mac OS X; en) AppleWebKit/420+ (KHTML, like Gecko) Version/3.0 Mobile/1A543 Safari/419.3")




(ii) Modifying chrome.dll file and patching it with desired user agent.

- This method is relatively difficult method to change user agent and i don't recommend it.
In this method we have to edit chrome.dll file with any hex editor and modify user agent.
Then replace the original file with the patched one.
It is nicely explained in Digital Inspiration (read it here).

---------------------------------------------------------



5] In safari :
- Well... Safari itself have these settings in their browser.
just goto >>
edit >> preferences >> advanced >> Tick the "show develop menu in menu bar" >> now the develop menu will be visible on menu bar >> goto develop >> user agent >> enjoy with your favorite user agent.
-------------------------------------------------



Advantages of changing user agents...

1] Some sites or forums requires registration to view their content but they are open to Google bot.
Now changing our browsers user agent to Google bot makes those sites think that Google bot is indexing their pages or something like that. Hence you can browse those restricted site too.


2] Now comes most useful and cool feature of changing user agent. Change your browser user agent to that of iphone browser and you will be able to read popular magazines ( like zinio.com) which are specially made for iphone.


3] Changing user agent to iphone's, you can enjoy famous sites like orkut and facebook etc in iphone style. Looks great, loads great.

4] and lastly, some mobile network providers makes use of user agents to detect that the relatively cheap WAP service made for mobile phone browsing is not wrongly used on PCs.
By changing user agent to any mobile browser's agent can make you browse web using WAP service on PC's .
--------------------------------------------------------------------------------


Useful links :

www.useragentstring.com : get your user string checked and see various user agents of other browsers and crawlers.

Digital Inspiration : article on chrome.dll modification.



---------------------------------------------------------------

If you liked this article, you might like reading below article too !



Widget by Hoctro | Jack Book

0 comments: