比如队长的端口是9222可以请求http://127.0.0.1:9222/json拿到ws连接,然后直接去连接这个ws,等ws断开,或者是http请求不到这个json信息就是断开了
[JavaScript] 纯文本查看 复制代码 PS C:\Users\Administrator> & "C:\Program Files\Google\Chrome\Application\chrome.exe" --remote-debugging-port=9222 --user-data-dir="C:\tmp\chrome-profile"
PS C:\Users\Administrator> curl http://127.0.0.1:9222/json
StatusCode : 200
StatusDescription : OK
Content : [ {
"description": "",
"devtoolsFrontendUrl": "https://chrome-devtools-frontend.appspot.com/serve_rev/@36aa3351631d175e
e5346a1aaf74ef5d49abe308/inspector.html?ws=127.0.0.1:9222/devtools/page/B...
RawContent : HTTP/1.1 200 OK
Content-Security-Policy: frame-ancestors 'none'
Content-Length: 2141
Content-Type: application/json; charset=UTF-8
[ {
"description": "",
"devtoolsFrontendUrl": "https://...
Forms : {}
Headers : {[Content-Security-Policy, frame-ancestors 'none'], [Content-Length, 2141], [Content-Type, applicat
ion/json; charset=UTF-8]}
Images : {}
InputFields : {}
Links : {}
ParsedHtml : System.__ComObject
RawContentLength : 2141 |