Jump to content
UBot Underground

Need Help To Construct An Http Post Request


Recommended Posts

I recently purchased the Socket Code Generator and the HTTP POST plugin from Aymen.  Now I am trying to use those tools to create my first HTTP Post code.  I haven't been able to get it working yet, and I would be very happy to pay someone to help me with this.  

 

If you are up for the challenge, I can share with you a short bot that I created which does the following:


  • navigates to target site,
  • login with username and password,
  • loop 3 times and,
    • type a 9-digit &number into specified element, 
    • scrape the #count from the specified element using regex, and
    • alert the #count to the screen. 

  • logout

Instead of scraping the #count off the page with regex, I want to construct an HTTP POST request which will return the data in JSON format.  This is what I need help with. When I use Fiddler to look at the POST request, this is how it looks 

 


POST https:// www.reports.targetsite.com/services/GetMultiCount/66d1b776-1897-4ec6-88ec-87d5499f72b2 HTTP/1.1

Host: www.reports.targetsite.com

Connection: keep-alive

Content-Length: 8

Accept: application/json, text/javascript, */*; q=0.01

Origin: https:// www.reports.targetsite.com

User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.112 Safari/537.36

Content-Type: application/json; charset=UTF-8

Referer: https:// www.reports.targetsite.com/Multi/Multi/?Session=66d1b776-1897-4ec6-88ec-87d5499f72b2

Accept-Encoding: gzip, deflate

Accept-Language: en-US,en;q=0.8,fr;q=0.6

Cookie: _ga=GA1.2.1103497711.1456286349; _gat=1; Session=66d1b776-1897-4ec6-88ec-87d5499f72b2; SessionV2=66d1b776-1897-4ec6-88ec-87d5499f72b2

 

19081020


 

I can't seem to figure out how to convert these headers to proper HTTP Post code.  Rather than scrape the #count using regex, I would like to use HTTP POST inside the loop to retrieve the JSON.  

 

Hoping to find someone able to help with this.  Thanks.

Edited by APTS
Link to post
Share on other sites

Problem solved!  The great and amazing deliter has solved this problem for me.  For anyone who is interested, this is what I was looking for:

 

plugin command("HTTP post.dll", "http keep alive", "Yes")
set(#myNum,"190410165|190810201|191902222","Global")
plugin command("HTTP post.dll", "http set headers", "Accept", "application/json, text/javascript, */*; q=0.01")
plugin command("HTTP post.dll", "http set headers", "Accept-Language", "en-GB,en;q=0.5")
plugin command("HTTP post.dll", "http settings headers", "Accept-Encoding", "gzip, deflate, br")
plugin command("HTTP post.dll", "http settings headers", "Content Type", "application/json; charset=utf-8")
plugin command("HTTP post.dll", "http settings headers", "Content Length", $text length(#myNum))
plugin command("HTTP post.dll", "http cookies string", #myCookie)
set(#post,$plugin function("HTTP post.dll", "$http post", "https://www.reports.mysite.com/services/GetMultiArnInfo/{#sessionID}", #myNum, "Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Firefox/45.0", "", "", ""),"Global")

Edited by APTS
  • Like 1
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...