赞
踩
场景:使用Chrome远程调试Chromium。当能够控制目标主机执行命令之后,可以在该主机上建立全局代理,然后在自己这一边开启浏览器监听,接着在目标机器上执行 chrome.exe --remote-debugging-port=xxxx 这样的命令,在对方浏览网页的同时,自己这边也能获取到浏览网页所对应的 Cookie、Local Storage 等信息。
Process process = new System.Diagnostics.Process();
process.StartInfo.FileName = config.PathChromeExe;
StringBuilder sbArgument = new StringBuilder();
sbArgument.Append("--remote-debugging-port=11010");
process.StartInfo.Arguments = sbArgument.ToString();
process.StartInfo.UseShellExecute = false;
process.StartInfo.RedirectStandardInput = false;
process.StartInfo.RedirectStandardOutput = false;
process.StartInfo.RedirectStandardError = false;
process.StartInfo.CreateNoWindow = true;
//开启进程
process.Start();
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。