Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p><del>Are you sure they should be POST requests? The URLs seem to have all of the fields in the query-string, which suggests they should be GET requests instead.</del></p> <p>Based on the Fiddler screen-shot, you need to make a POST request with the fields in the body, not the query-string:</p> <pre><code>var cookies = new CookieContainer(); // Request 1 : Login var request = (HttpWebRequest)WebRequest.Create("https://www.ftpsite.net/./panel/index.php"); request.Method = "POST"; request.ContentType = "application/x-www-form-urlencoded"; request.CookieContainer = cookies; string postData = "txvUsername=myaccount&amp;txvPassword=myPassword&amp;submitButton=Login"; byte[] postBytes = Encoding.Default.GetBytes(postData); request.ContentLength = postBytes.Length; using (Stream bod = request.GetRequestStream()) { body.Write(postBytes, 0, postBytes.Length); } WebResponse response = request.GetResponse(); string referer = response.ResponseUri.AbsoluteUri; // Request 2 : Create user request = (HttpWebRequest)WebRequest.Create("https://www.ftpSite.net/panel/ftpsites/updatelogin"); request.Method = "POST"; request.ContentType = "application/x-www-form-urlencoded"; request.CookieContainer = cookies; postData = "login_id=&amp;login=toto123&amp;realname=realnametoto&amp;homedir=root&amp;passwd=superpassword11&amp;expdate=01-01-2100&amp;neverExpire=on&amp;quota_value=0&amp;quota_unit=GB&amp;group_id=0&amp;status=on&amp;ftp=on&amp;filelist=on&amp;ftp_download=on&amp;http=on&amp;web_filelist=on&amp;web_download=on&amp;email="; postBytes = Encoding.Default.GetBytes(postData); request.ContentLength = postBytes.Length; using (Stream bod = request.GetRequestStream()) { body.Write(postBytes, 0, postBytes.Length); } response = request.GetResponse(); requestStream = response.GetResponseStream(); streamReader = new StreamReader(requestStream); webBrowser.DocumentText = streamReader.ReadToEnd(); response.Close(); </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload