Page 1 of 3 123 LastLast
Results 1 to 10 of 27
Discuss [MobileSafari] How to change User Agent ? at the Free Toolchain Software (Cydia App's) - Hackint0sh.org; hey there on many sites i am Surfing the browser of the iPhone displays the ...
  1. #1
    Advanced Array

    Join Date
    Feb 2008
    Posts
    45
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    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



  2. #2
    Guest Array

    Join Date
    Jan 2008
    Posts
    41
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Default

    You have to use a webproxy like anonymouse.org

  3. #3
    Respected Professional Array TwistyValhalla's Avatar

    Join Date
    Sep 2007
    Posts
    645
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    41

    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

  4. #4
    Former Bender
    Guest

    Default

    You must find where MobileSafari's user agent is stored and modify it to fit Mac OS X Safari version

  5. #5
    Respected Professional Array TwistyValhalla's Avatar

    Join Date
    Sep 2007
    Posts
    645
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    41

    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?
    Last edited by TwistyValhalla; 05-07-2008 at 04:35 AM.

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


  6. #6
    Rookie Array

    Join Date
    Jun 2008
    Location
    Turkey
    Posts
    20
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    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

  7. #7
    Newbie Array

    Join Date
    Jul 2008
    Posts
    5
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    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.

  8. #8
    Rookie Array

    Join Date
    Jun 2008
    Location
    Turkey
    Posts
    20
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    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

  9. #9
    Rookie Array

    Join Date
    Jun 2008
    Location
    Turkey
    Posts
    20
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    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

  10. #10
    Rookie Array

    Join Date
    Jun 2008
    Location
    Turkey
    Posts
    20
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    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


 

 
Page 1 of 3 123 LastLast

Similar Threads

  1. How to change Safari's user agent string?
    By Asbjørn in forum General
    Replies: 3
    Last Post: 06-07-2010, 09:36 AM
  2. MMS User Agent Prof in 3.0 -- Anyone Successful yet?
    By Toaster in forum iOS 3.x (iPhone OS 3.x)
    Replies: 4
    Last Post: 06-26-2009, 03:18 AM
  3. modify safari user agent
    By mrigor in forum General
    Replies: 2
    Last Post: 10-10-2008, 06:06 PM
  4. User-Agent and browser alternatives
    By techloop in forum General
    Replies: 6
    Last Post: 01-15-2008, 02:54 PM
  5. Changing iPhone User Agent (MobileSafari
    By shocktroop75 in forum General
    Replies: 2
    Last Post: 11-02-2007, 10:19 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Powered by vBulletin®
Copyright © 2014 vBulletin Solutions, Inc. All rights reserved.
Search Engine Friendly URLs by vBSEO
(c) 2006-2012 Hackint0sh.org
All times are GMT +2. The time now is 09:00 PM.
twitter, follow us!