FW300R路由器自动断线换IP-创新互联
////// FW300R路由器自动断线换IP /// public static void Disconnect() { //断线请求 string uri = "http://192.168.1.1/userRpm/PPPoECfgRpm.htm?wan=0&wantype=2&acc=07720090868&psw=Hello123World&confirm=Hello123World&specialDial=100&SecType=0&sta_ip=0.0.0.0&sta_mask=0.0.0.0&linktype=2&Disconnect=%B6%CF+%CF%DF"; string sUser = "admin"; string sPwd = "admin"; string sDomain = ""; NetworkCredential oCredential; HttpWebRequest oRequest = (HttpWebRequest)WebRequest.Create(uri); if (oRequest != null) { oRequest.ProtocolVersion = HttpVersion.Version11;// send request oRequest.Method = "GET"; oRequest.ContentType = "application/x-www-form-urlencoded"; oRequest.UserAgent = "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.124 Safari/537.36"; oRequest.Referer = "http://192.168.1.1"; oRequest.Headers.Add("Authorization", "Basic YWRtaW46NDY2NjYyNzc="); oRequest.KeepAlive = true; oRequest.Accept = "text/html,application/xhtml+xml,application/xml;q=0.9,p_w_picpath/webp,*/*;q=0.8"; if (sUser != String.Empty) { oCredential = new NetworkCredential(sUser, sPwd, sDomain); oRequest.Credentials = oCredential.GetCredential(new Uri(uri), String.Empty); } else { oRequest.Credentials = CredentialCache.DefaultCredentials; } StreamReader sr = new StreamReader(oRequest.GetResponse().GetResponseStream(), System.Text.Encoding.Default); string line = sr.ReadToEnd(); sr.Close(); if (line.IndexOf("WAN口设置") > -1)//登录成功 { Console.WriteLine("断开登录成功"); } else { Console.WriteLine("断开登录失败"); } } }
创新互联www.cdcxhl.cn,专业提供香港、美国云服务器,动态BGP最优骨干路由自动选择,持续稳定高效的网络助力业务部署。公司持有工信部办法的idc、isp许可证, 机房独有T级流量清洗系统配攻击溯源,准确进行流量调度,确保服务器高可用性。佳节活动现已开启,新人活动云服务器买多久送多久。
10年积累的成都网站制作、做网站、外贸营销网站建设经验,可以快速应对客户对网站的新想法和需求。提供各种问题对应的解决方案。让选择我们的客户得到更好、更有力的网络服务。我虽然不认识你,你也不认识我。但先网站设计后付款的网站建设流程,更有合肥免费网站建设让你可以放心的选择与我们合作。名称栏目:FW300R路由器自动断线换IP-创新互联
转载来源:http://myzitong.com/article/esgei.html