Polycomvalidation在发布数据时失败

我正在从事一个项目,我想从c#中更改Polycomconfiguration。 这是我使用burpsuite捕获的Post请求,它更改了Polycom中的用户名。

这是POST请求

POST /form-submit HTTP/1.1 Accept: */* Authorization: Basic UG9seWNvbTo0NTY= Content-Type: application/x-www-form-urlencoded Referer: https://192.168.88.5/index.htm Accept-Language: en-US,en;q=0.5 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; Trident/7.0; rv:11.0) like Gecko Host: 192.168.88.5 Content-Length: 32 DNT: 1 Connection: close Cache-Control: no-cache Cookie: Authorization=Basic UG9seWNvbTo0NTY= 15=XYZ 

当我使用中继器发送BurpSuite时,此请求正常工作。 但在C#代码它会引发身份validation错误。

  System.Net.ServicePointManager.ServerCertificateValidationCallback = delegate { return true; }; ServicePointManager.ServerCertificateValidationCallback = new System.Net.Security.RemoteCertificateValidationCallback(AcceptAllCertifications); ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12; var requ = (HttpWebRequest)WebRequest.Create("https://192.168.88.5/form-submit"); requ.Method = "POST"; requ.Credentials = new NetworkCredential("Polycom", "456"); requ.SetRawHeader("Accept", "*/*"); requ.ServicePoint.Expect100Continue = false; requ.Headers.Add("Authorization", "Basic " + "UG9seWNvbTo0NTY="); requ.ContentType = "application/x-www-form-urlencoded"; requ.Referer = "https://192.168.88.5/index.htm"; requ.SetRawHeader("Accept-Language", "en-US,en;q=0.5"); requ.UserAgent = " Mozilla/5.0 (Windows NT 6.3; WOW64; Trident/7.0; rv:11.0) like Gecko"; requ.SetRawHeader("Host", "192.168.88.5"); requ.SetRawHeader("Content-Length", "6"); // String encoded = System.Convert.ToBase64String(System.Text.Encoding.GetEncoding("ISO-8859-1").GetBytes("Basic=" + ":" + "UG9seWNvbTo0NTY=")); requ.SetRawHeader("DNT", "1"); requ.Headers.Add("Cache-Control", "no - cache"); requ.SetRawHeader("Cookie", "Authorization = Basic UG9seWNvbTo0NTY="); ASCIIEncoding encoding = new ASCIIEncoding(); byte[] byte1 = encoding.GetBytes("15=ZOMBIE"); // Set the content type of the data being posted. requ.ContentType = "application/x-www-form-urlencoded"; // Set the content length of the string being posted. requ.ContentLength = byte1.Length; using (StreamWriter writer = new StreamWriter(requ.GetRequestStream())) { writer.Write("15=ZOMBIE"); } var resp = (HttpWebResponse)requ.GetResponse(); // Create a request using a URL that can receive a post.