Log in

View Full Version : TUTORIAL: Change the User Agent your Pocket PC browser uses!


Menneisyys
05-11-2006, 11:37 AM
TUTORIAL: Change the User Agent your Pocket PC browser uses to make Web servers think you’re a fully-fledged desktop browser!

Pocket PC Web browsers send out a so-called ‘User-Agent’ (U-A for short) header different from the U-A sent out by desktop Web browsers to identify themselves to Web servers.

It’s almost exclusively based on this information that Web servers decide what content to offer to the Web client. For example, if the U-A doesn’t contain ‘MSIE 6.0’ anywhere, some Web servers (which optimize their stuff for the, currently, most widely available desktop Windows browser, Internet Explorer 6.0, to which MSIE 6.0 is referring to) consider the client to be not a mainstream desktop Web browser and may even choose not to let the client receive anything. In these cases, “spoofing” the U-A information (disguising the client’s real identity) may be handy.

In this article, I explain how this can be done with all the current Web browsers. (Except for Minimo – it’s changing so often that I didn’t want to lose much time on collecting/providing information that may get outdated really fast.)

Pocket Internet Explorer (a.k.a. Internet Explorer Mobile from WM5)

In pre-WM5 operating systems, you can use the built-in U-A changer functionality of both MultiIE and PIEPlus, the excellent IE plug-ins (see the Browser Bible for more information on them) to change this information. The well-known utility Tweaks2k2 (http://www.tweaks2k2.com/) is also able to do the trick. Also see this article (http://www.pocketpcmag.com/blogs/index.php?blog=3&title=how_do_i_change_the_user_agent_informati&more=1) on what needs to be known on all this, as far as the Registry is concerned.

In WM5, the situation is not that good as neither PIEPlus nor MultiIE (currently) support this OS and Spb Pocket Plus (still) doesn’t support changing the U-A. However, there’re ways of changing it: with Tweaks2k2 or using the CAB file available here (http://www.modernnomads.info/wiki/index.php?page=Change+the+internet+explorer+user+agent). Also, you may want to read this article (http://www.pocketpcmag.com/blogs/index.php?blog=3&p=648&more=1&c=1&tb=1&pb=1) on what is done and how the changes must be made in the Registry.

Opera Mobile

Please read this article (http://www.pocketpcmag.com/blogs/index.php?blog=3&p=777&more=1&c=1&tb=1&pb=1) on spoofing the U-A in the current Opera Mobile version (8.5 beta2).

NetFront 3.3

Go to (Edit/)Tools/Browser Setting/Misc; choose --- from the drop-down list in the User-Agent section (http://www.winmobiletech.com/052006UASpoof/NF33Rewrite-1.bmp.png) and click Edit to the right.

In the following dialog, just change the contents of the User-Agent: textarea (the other three textfields don’t need to be modified) from the default Mozilla/4.08 (PDA; NF33PPC3AR/1.0) NetFront/3.3 (http://www.winmobiletech.com/052006UASpoof/NF33Default.bmp.png) to the standard IE6 U-A string ("Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1))") as can be seen in here (http://www.winmobiletech.com/052006UASpoof/NF33NewuserAgentTA.bmp.png) . Also, you can give this setting a unique name (http://www.winmobiletech.com/052006UASpoof/NF33NewuserAgentNamedTitle.bmp.png) (by filling in the Title: field) so that you can easily find it in the drop-down list on the previous page, instead of --- . Then, as can also be seen in this screenshot (http://www.winmobiletech.com/052006UASpoof/NF33NewuserAgentNamedTitle-2.bmp.png), you’ll always be able to see which user-defined setting you’re using. (Note that the screenshot shows the trial version of NF 3.3; this is why there’re only two items in the list. With the commercial version of NF 3.2 (the commercial version of 3.3 will be similar to it), there're several list entries in there.)

Now, after a refresh, the new, right U-A header will be sent out as can be seen in here (http://www.winmobiletech.com/052006UASpoof/NF33Rewrite-2.bmp.png). A quick for example AximSite test indeed shows the server considers the client to be a desktop IE browser (screenshot here (http://www.winmobiletech.com/052006UASpoof/NF33Rewrite-3.bmp.png)).

Incidentally, this info is stored in the Registry. I’ve elaborated on both version 3.2 and 3.3 here (http://www.pocketpcthoughts.com/forums/viewtopic.php?p=365208).

Thunderhawk

As Thunderhawk supports U-a spoofing by default, it’s very easy to switch between predefined U-A strings (after going to Options/Advanced); from the default ( Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:0.9.5) Gecko/20011018 ) you can switch to IE ( Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)), Mozilla (Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.3) Gecko/20030312) and Netscape (Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax)) by just clicking one of the three buttons at the button. In addition, you can also freely edit the contents of the U-A field as can be seen in here (http://www.winmobiletech.com/052006UASpoof/Thunderhawk-UA.bmp.png).

(Here are (http://www.winmobiletech.com/052006UASpoof/THheadersScreenshot.bmp.png) the headers sent out.)

Warning

In cases, it’s preferable to NOT spoof the U-A. That’s the case, for example, with most Pocket PC sites, which automatically switch to a much more PDA-friendly (much faster to download, much better formatted for small screens, requiring much less bandwidth) version. With them, it’s better to switch back to the original version.

Recommended Reading

Roundup of Web Browsers (http://www.pocketpcthoughts.com/index.php?action=expand,42026) (alternatives: MobilitySite (http://www.ipaqhq.com/forums/showthread.php?p=102643), AximSite (http://www.aximsite.com/boards/showthread.php?p=780770), FirstLoox (http://www.firstloox.org/forums/showthread.php?p=35739), PPC Magazine (http://pocketpcmag.com/forum/topic.asp?TOPIC_ID=17343), BrightHand (http://discussion.brighthand.com/showthread.php?t=215606))

The Web Browsers category (http://www.pocketpcmag.com/blogs/index.php?blog=3&cat=61) in my Smartphone & Pocket PC Magazine Expert Blog (http://www.pocketpcmag.com/blogs/index.php?blog=3).

In this article (http://www.pocketpcmag.com/blogs/index.php?blog=3&p=482&more=1&c=1&tb=1&pb=1), I’ve also shown all the headers (along with the U-A header) sent out by IEM, NetFront 3.3 and Opera Mobile b.8 b1.