Home User CP Donate Chat Register Today!  
  Get New posts Faq / Help?
   


Go Back   Hackint0sh > Projects and Hacks > iPhone > Applications & Development > Free Toolchain Software

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 03-11-2008, 12:55 AM
Willmaster
Status: Offline
Member
 
Join Date: Feb 2008
Posts: 45
Rep Power: 0
Willmaster is on a distinguished road
Wink [MobileSafari] How to change User Agent ?

hey there

on many sites i am Surfing the browser of the iPhone displays the ''mobile'' version of the Page and i cant switch to the Normal version because the Safari identifies as:

Code:
Mozilla/5.0 (iPhone; U; CPU like Mac OS X; de-de) AppleWebKit/420.1 (KHTML, like Gecko) Version/3.0
now i want to Change to:

Code:
Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.8.1.12) Gecko/20080201 Firefox/2.0.0.12
os something similar like Safari on OSX:

Code:
Mozilla/5.0 (Macintosh; U; Intel Mac OS X; de-de) AppleWebKit/523.15.1 (KHTML, like Gecko) Version/3
can somebody help?

i have opened the mobilesafari in Winhex but i find nothing usable
__________________
US Iphone 8gb PWNED!,2.0 (beta "d")

PC: Mac Pro,Dual QX9650,32Gb DDR3 Ram,8800GTX
in near Future SLI Chips from Skulltrail and then Tripple 8800GTX
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #2 (permalink)  
Old 03-11-2008, 01:11 AM
aaaaaa
Status: Offline
Guest
 
Join Date: Feb 2008
Posts: 41
Rep Power: 0
aaaaaa is on a distinguished road
Default

You have to use a webproxy like anonymouse.org
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3 (permalink)  
Old 05-07-2008, 03:57 AM
TwistyValhalla's Avatar
TwistyValhalla
Status: Offline
Respected Member
 
Join Date: Sep 2007
Posts: 645
Rep Power: 37
TwistyValhalla will become famous soon enough
Question [Advice] How to stop safari from going iphone specific site instead of regular site

Hey guys, I'm trying to open jajah.com but safari is redirected to iphone.jajah.com. How can I reach the regular site instead of the iphone site?

Appreciate your help.
__________________

iPhone (OTB 1.1.1 / Currently 3.1)
Unlock, activation, jailbreak: PwnageTool 3.1
City Fido, Vancouver
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Remove advertisements
Advertisement
Advertisement Sponsored links

  #4 (permalink)  
Old 05-07-2008, 04:17 AM
Former Bender's Avatar
Former Bender
Status: Offline
Guest
 
Join Date: Nov 1970
Posts: 3,501
Rep Power: 0
Former Bender has much to be proud ofFormer Bender has much to be proud ofFormer Bender has much to be proud ofFormer Bender has much to be proud ofFormer Bender has much to be proud ofFormer Bender has much to be proud ofFormer Bender has much to be proud ofFormer Bender has much to be proud ofFormer Bender has much to be proud ofFormer Bender has much to be proud of
Default

You must find where MobileSafari's user agent is stored and modify it to fit Mac OS X Safari version
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #5 (permalink)  
Old 05-07-2008, 04:31 AM
TwistyValhalla's Avatar
TwistyValhalla
Status: Offline
Respected Member
 
Join Date: Sep 2007
Posts: 645
Rep Power: 37
TwistyValhalla will become famous soon enough
Default

Wish there was a safari plugin like user agent switcher for firefox. Anybody know where the user agent settings are stored on the iphone?
__________________

iPhone (OTB 1.1.1 / Currently 3.1)
Unlock, activation, jailbreak: PwnageTool 3.1
City Fido, Vancouver

Last edited by TwistyValhalla; 05-07-2008 at 04:35 AM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #6 (permalink)  
Old 08-21-2008, 02:20 AM
wzad
Status: Offline
Junior Member
 
Join Date: Jun 2008
Location: Turkey
Posts: 20
Rep Power: 0
wzad is on a distinguished road
Default

does anyone know of a way of switching the user agent on the iPhone yet?

im on 1.1.4 and i've looked everywhere but no luck
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Sponsored links Remove advertisements
Advertisement
Advertisement

  #7 (permalink)  
Old 08-22-2008, 02:14 PM
pegasus21
Status: Offline
Junior Member
 
Join Date: Jul 2008
Posts: 5
Rep Power: 0
pegasus21 is on a distinguished road
Default

I've seen the string in /System/Library/PrivateFrameworks/WebKit.framework/WebKit

There are 2 lines. The difference is the %@ at the end of the line.

Mozilla/5.0 (%@; U; CPU iPhone OS %@ like Mac OS X; %@) AppleWebKit/%@ (KHTML, like Gecko) %@

Each %@ is filled at runtime with whatever variables that is given to it... much like a printf statement in c.

I foresee that modifying it isn't going to be as simple as changing the string to what you want since it'll change the addresses in the file. Good luck.

Oh and this was taken from iPhone 3G 2.0.2 5C1.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #8 (permalink)  
Old 09-20-2008, 10:43 PM
wzad
Status: Offline
Junior Member
 
Join Date: Jun 2008
Location: Turkey
Posts: 20
Rep Power: 0
wzad is on a distinguished road
Default

How to change user agent posted below

Last edited by wzad; 09-27-2008 at 10:02 PM. Reason: i think i found a solution
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #9 (permalink)  
Old 09-22-2008, 09:44 PM
wzad
Status: Offline
Junior Member
 
Join Date: Jun 2008
Location: Turkey
Posts: 20
Rep Power: 0
wzad is on a distinguished road
Default

ok... heres how I changed my user agent on 1.1.4.

I have not yet tested it on 2.x (although I presume it can be done). If you wish to attempt this on 2.x, you will need to pseudosign the hacked file (/System/Library/Private Frameworks/Webkit.framework/Webkit) BEFORE you restart your phone, otherwise you will be locked out and need to do a restore.

If you're going to try this, obviously im not responsible in the event of damage or loss. This worked for me on 1.1.4 though, and I hope it can help out others too.


Step 1 - SFTP or SSH into iPhone and Grab the following files:

[on 1.x]:
/System/Library/Frameworks/Webkit.framework/Webkit
/System/Library/Frameworks/Webkit.framework/Info.plist


Step 2 - Open the 'Webkit' file in a hex editor (I used 0xED on my Mac)
You need to find this line:
Code:
Mozilla/5.0 (%@; U; CPU iPhone OS %@ like Mac OS X; %@) AppleWebKit/%@ (KHTML, like Gecko) %@
and change it to:
Code:
%*0.*0@
(Obviously the new text is much shorter than what was in there, so you need to fill the rest in with spaces. see screenshot)



Step 3 - You need to convert the Info.plist into standard XML format. If you have a Mac you can do this in the terminal using the following command (make sure to change your file path to wherever you have the file saved):
Code:
plutil -convert xml1 /Users/username/Desktop/Info.plist
If you aren't on a Mac you will need to install the Perl Framework to run the plutil script in command prompt (available here: http://scw.us/iPhone/plutil). This script has a slightly different syntax but obviously the goal is to convert this file to plain xml so you can edit it.

Step 4 - Now open the converted Info.plist
Look for these lines:
Code:
<key>CFBundleVersion</key>
<string>420.1</string>
And simply change the string value to whatever user agent you want. Mine Looks like this:
Code:
<key>CFBundleVersion</key>
<string>Mozilla/5.0 (SymbianOS/9.2; U; Series60/3.1 NokiaN95/21.0.016; Profile/MIDP-2.0 Configuration/CLD(-1.1) AppleWebKit/413 (KHTML, like Gecko) Safari/413</string>
Step 5 - Convert Info.plist back to binary with this command in your terminal (OSX) (again, make sure to change your file path to wherever you have the file saved):
Code:
plutil -convert binary1 /Users/username/Desktop/Info.plist
Step 6 - Upload the two modified files back onto your phone into the same directory you found them.

Step 7 - Reset your phone and test out your new user agent by going to something like useragent.org


Last edited by wzad; 10-07-2008 at 03:54 AM. Reason: adding tutorial
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Sponsored links Remove advertisements
Advertisement
Advertisement

  #10 (permalink)  
Old 09-27-2008, 10:32 PM
wzad
Status: Offline
Junior Member
 
Join Date: Jun 2008
Location: Turkey
Posts: 20
Rep Power: 0
wzad is on a distinguished road
Default

I think I figured it out...

If somebody who knows anything about programming can review the tutorial (see my last post) and make sure I'm not doing anything that might f** stuff up.

Otherwise, my phone seems to work fine and my user agent is changed, so thats a good thing
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +2. The time now is 08:16 AM.



Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.2 Ad Management by RedTyger
follow us on Twitter!

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105