+ Reply to Thread
Results 1 to 2 of 2

Thread: HTTP Post

  1. #1
    Junior Member
    Join Date
    Jan 2012
    Posts
    13

    HTTP Post

    I have data to POST using HTTP but i don't know how.
    Actually i have a website and i am trying to create a bot that creates accounts on my website.
    So , what are the steps for doing that?
    Last edited by lostcode; 11-11-2012 at 09:38 AM.

  2. #2
    Junior Member
    Join Date
    Jun 2012
    Posts
    28
    Firstly you need a tool called : HTTPFOX , that`s actually a firefox plugin that will monitor HTTP Requests like GET and POST
    Secondly we will look at the generated HTTP POST and try to make up another one and send to server.

    Steps :
    1) go to cashu signup page for example using firefox
    2) turn on httpfox by holding (SHIFT + F2)
    3) click Start
    4) fill the signup form [i used Username : ccexpert , Email : itshouldwork@mail.com , Country : Egypt(20) , Mobile : 115113705 , Security Question : Your mother`s maiden name , Answer : name]
    5) Click I agree and create account

    Here is a snippet of the POST Value :
    Code:
    lang=en&maktt=ac71e0079799a57cc6616312cbbbaf84&source=&arabiclabel=&englishlabel=&pageurl=&virtual=&blackUserId=&termsValue=off&userName=ccexpert&emailAddress=itshouldwork%40mail.com&mobileCountryCode=20&mobileNumber=115113705&question=1&securityAnswer=name&promotionalCode=&turningImage=5663
    Read it and you will see that the information i entered are all send as a POST Request.
    And that POST data are sent to server VIA link :
    Code:
    https://www.cashu.com/CLogin/registerFormNext
    Now can i manipulate the POST data to create accounts using a simple application right?
    Yes , you can , but it could only work for poor insecure websites , i mean in encrypted web pages , the POST data are sent with an generated check code and if you tried to make up one , you will fail , actually i have not tried that , but i am giving you the concept.

    Okay , so how can i do that in C# ?

    Code:
                // this is what we are sending
                string post_data = "lang=en&maktt=ac71e0079799a57cc6616312cbbbaf84&source=&arabiclabel=&englishlabel=&pageurl=&virtual=&blackUserId=&termsValue=off&userName=ccexpert&emailAddress=itshouldwork%40mail.com&mobileCountryCode=20&mobileNumber=115113705&question=1&securityAnswer=name&promotionalCode=&turningImage=5663";
    
                // this is where we will send it
                string uri = "https://www.cashu.com/CLogin/registerFormNext";
    
                // create a request
                HttpWebRequest request = (HttpWebRequest)
                WebRequest.Create(uri); request.KeepAlive = false;
                request.ProtocolVersion = HttpVersion.Version10;
                request.Method = "POST";
    
                // turn our request string into a byte stream
                byte[] postBytes = Encoding.ASCII.GetBytes(post_data);
    
                // this is important - make sure you specify type this way
                request.ContentType = "application/x-www-form-urlencoded";
                request.ContentLength = postBytes.Length;
                Stream requestStream = request.GetRequestStream();
    
                // now send it
                requestStream.Write(postBytes, 0, postBytes.Length);
                requestStream.Close();

+ Reply to Thread

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts