1.電腦端安裝和破解charles
打開charles-proxy-4.0.1-win64.msi幕侠,傻瓜式安裝
安裝完成后刪除原lib目錄下的charles.jar般贼,將文件夾中的charles.jar放到Charles安裝目錄的lib目錄下
2.charles亂碼解決參考:https://www.cnblogs.com/itcqx/p/6529439.html
3.手機(jī)端抓包http
1)手機(jī)和電腦連接在同一wifi下邪铲,在charles中Proxy-->Proxy Setting--》Proxies中查看或者設(shè)置charles代理的端口;
2)Win+R輸入cmd打開控制臺,輸入ipconfig,查看當(dāng)前電腦的ip地址:
3)手機(jī)和電腦連接同一wifi扒秸,在手機(jī)上設(shè)置代理:
4)手機(jī)配置好代理后播演,電腦端charles彈框選擇Allow,即可實現(xiàn)抓取手機(jī)端http
4.手機(jī)端抓包https
1)在charles中打開Help--》SSL Poxying-->Install Charles? ?Root Certificate伴奥,在電腦上安裝證書并信任證書写烤;
2).在charles中打開Help--》SSL Poxying-->Install Charles? ?Root Certificate on a Mobile,根據(jù)彈出框的提示拾徙,在手機(jī)瀏覽器中打開(chls.pro/ssl)并安裝證書
3)蘋果手機(jī)通用--》關(guān)于本機(jī)--》--》證書信任設(shè)置? 中設(shè)置信任證書
4)Charles中 Proxy-->SSL Proxying Settings中設(shè)置端口443
5)安裝抓包http洲炊,配置手機(jī)代理即可抓取手機(jī)端http;
6)解決https抓包返回亂碼的問題:
1.配置charles.ini文件尼啡,在文件中添加 加粗的兩行:
working.directory=.
classpath.1=lib/charles.jar
main.class=com.xk72.charles.gui.MainWithClassLoader
vm.version.min=1.8
vm.location=jre\bin\server\jvm.dll
vmarg.1=-Dsun.java2d.d3d=false
vmarg.2=-Djava.net.preferIPv4Stack=false
vmarg.3=-Djava.net.preferIPv6Addresses=true
vmarg.4=-Djava.library.path=lib
vmarg.5=-Xbootclasspath/p:lib/boot/alpn-boot-8.1.9.v20160720.charles.jar;lib/boot/charles-patch-1.0.jar
vmarg.5=-Dfile.encoding=UTF-8
vmarg.6=-Dfile.encoding=UTF-8
dde.enabled=true
dde.class=com.xk72.charles.win32.Win32DDEManager
dde.server.name=Charles
dde.topic=System
single.instance=dde
[ErrorMessages]
java.not.found=A suitable Java installation was not found. Please visit http://java.com/ to install Java.
java.failed=The Java installation is broken. Please uninstall and reinstall Java from http://java.com/
7)若上述方式無法解決亂碼問題:
勾選Tools-->Rewrite 暂衡,在Rewrite Settings中添加