1. 程式人生 > >Charles抓包工具破解和https抓包問題解決:中文亂碼,Android抓包https亂碼

Charles抓包工具破解和https抓包問題解決:中文亂碼,Android抓包https亂碼

Charles 破解: 4.0.2 (Mac:/Application/Charles.app/Contents/Java)替換就破解了。 其實看這裡就夠了,下面總結下:
1.檢視電腦端ip.手機端編輯WiFi 繫結代理 手動 ip+埠。(手機wifi和電腦端網路一定在同一個域,不然白搭) 就可以抓到http了。 Response中文亂碼:在info.plist 中 的vmoption 新增-Dfile.encoding=UTF-8 (mac:開啟Finder--->應用程式--->找到charles app,右鍵點選顯示包內容 Charles 可以抓https協議的網路包

2.電腦端安裝證書 help->>-SSL Proxying->>-install Charles Root Centificate。全部信任                              
3.手機端安裝證書     
手機瀏覽器訪問chls.pro/ssl 下載pem檔案。也可以電腦端下載了拷貝到手機,有些人也說郵件發到手機。殊途同歸。 (pem就是一段文字(密文)-----BEGIN CERTIFICATE----- .....-----END CERTIFICATE-----) 這裡重點寫下android比較麻煩: Android手機需要找到手機的
安全--允許安裝位置來源的頁面,點選從儲存器安裝/從SD卡安裝 安裝後的受信任的證書-使用者裡可以看到。
          
高版本7.0的手機抓到https請求和返回還有可能是亂碼:You may need to configure your browser or application to trust the Charles Centificate.需要App信任證書              
具體可以檢視charles官方文件Add a file res/xml/network_security_config.xml to your app: <network-security-config>
<debug-overrides> <trust-anchors> <!-- Trust user added CAs while debuggable only --> <certificates src="user" /> </trust-anchors> </debug-overrides> </network-security-config> Then add a reference to this file in your app's manifes, as follows: <?xml version="1.0" encoding="utf-8"?> <manifest ... > <applicationandroid:networkSecurityConfig="@xml/network_security_config" ... > ... </application> </manifest> 4.電腦端Enable SSL代理,就可以看到https的請求和返回了