萬盛學電腦網

您现在的位置: 萬盛學電腦網 >> 網路安全 >  >> 網路應用技術 >> 應用程式教學

電腦瀏覽器偽裝 User-Agent 訪問 WAP/手機版網站教學

修改瀏覽器的 User-Agent (UA) 字串,即可讓網站伺服器誤判您為行動裝置,從而顯示手機版 (WAP) 網頁。無需安裝專用瀏覽器。

各瀏覽器修改方法

Firefox (推薦安裝 User-Agent Switcher 套件)

  • 網址列輸入 about:config,搜尋 general.useragent.override,修改為自訂 UA 字串。

Chrome

  • 捷徑屬性「目標」欄末尾加入啟動參數: --user-agent="自訂 UA 字串"

Safari

  • 「編輯」→「偏好設定」→「進階」→勾選「在選單列顯示開發選單」。
  • 「開發」→「User Agent」→選擇或輸入自訂 UA。

Maxthon (遨遊)

  • 「工具」→「遨遊設定中心」→「高級選項」→「自訂 UA 字串」。

Opera

  • 網址列輸入 opera:config,搜尋 User Agent,設定 Custom ID (0~5 對應不同預設身分)。

iPhone (需越獄)

  • 替換 /System/Library/Frameworks/WebKit.framework/WebKit 中的 Mozilla/5.0 字串。

Internet Explorer (需修改登錄檔)

  • 路徑:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\User Agent\Post Platform
  • 新增字串值,名稱為欲加入的 UA 片段 (如 motorolarokre2),數值留空。
  • 重啟 IE 生效。

常見 UA 字串範例 (IE8)

  • IE8 on Vista (相容模式):Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; Trident/4.0)
  • IE8 on Vista:Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0)
  • IE8 on Win7:Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0)
  • 64-bit IE on Win7:Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Win64; x64; Trident/4.0)

透過修改 UA,亦可偽裝作業系統、搜尋引擎爬蟲、郵件用戶端等身分。

copyright © 萬盛學電腦網 all rights reserved