iOS WebKit Debug Proxy项目实现了这一点.
要开始,请使用brew 软件安装:
brew install ios-webkit-debug-proxy
运行模拟器(如果运行模拟器):
SIM_DIR=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer
"$SIM_DIR/Applications/iPhone Simulator.app/Contents/MacOS/iPhone Simulator" \
-SimulateApplication \
$SIM_DIR/SDKs/iPhoneSimulator6.1.sdk/Applications/MobileSafari.app/MobileSafari
运行代理:
ios_webkit_debug_proxy
判断错误
查看设备上的错误消息:
无法连接到锁定.正在退出.:没有这样的文件或目录.无法附加判断器IOS_WebKIT_DEBUG_PROXY
然后判断设备是否有提示like this(iOS 7示例:)
是否信任当前连接的计算机?
Select "信任",然后try 重新运行代理:
ios_webkit_debug_proxy
打开默认的devtools
然后打开http://localhost:9221
默认情况下,DevTool是较旧的版本(从Chrome18到2012年3月左右).
试试现代的DevTools
由于protocol个更改,现代DevTools前端的部件可能无法完全工作.您可以通过打开
chrome-devtools://devtools/bundled/inspector.html?ws=localhost:9222/devtools/page/2
其中,port
和page
值是您从http://localhost:9221
看到的值.再说一次,这可能确实是有缺陷的.
在ios-webkit-debug-proxy project page阅读更多文档.
Update:这个iOS7 as well就行了.Update:通过patrick添加了全新的DevTools前端说明.Update:将devtools.html更改为spector.html for Chrome 45,并通过Scheintod进行了新的ws
攻击.