Jump to content
UBot Underground

Http Post How To Scrape And Post At The Exact Same Time

Recommended Posts

I am trying to log into this site using http post


Here is the code I have



set(#freeglobalget, $plugin function("HTTP post.dll", "$http get", "http://www.freeglobalclassifiedads.com/user/login", "Mozilla", "http://www.freeglobalclassifiedads.com/user/login", "", ""), "Global")
load html(#freeglobalget)
set(#CSRFName, $find regular expression(#freeglobalget, "(?<=CSRFName\\\'\\ value\\=\\\').*(?=\\\'\\ \\/\\>)"), "Global")
set(#CSRFToken, $find regular expression(#freeglobalget, "(?<=name\\=\\\'CSRFToken\\\'\\ value\\=\\\').*(?=\\\'\\ \\/\\>)"), "Global")
load html($plugin function("HTTP post.dll", "$http post", "http://www.freeglobalclassifiedads.com", "CSRFName={#CSRFName}&CSRFToken={#CSRFToken}&page=login&action=login_post&email=info%40mydomain.com&password=mypassword", "", "", "", ""))
navigate("http://www.freeglobalclassifiedads.com", "Wait")



I am successfully scrapting the CSRFNAME and CSRFToken however whenever I run the

post I get Invalid CSRFToken


This is because this token is dynamically changed every time

a page is loaded or there is a post.


I need a way to scrape the CSRFname and CSRFToken at the

exact same time as I run the post.


Does anybody have any ideas?



Edited by quickregister
Link to post
Share on other sites



Try something more like this...

set(#UA,"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:57.0) Gecko/20100101 Firefox/57.0","Global")
set(#freeglobalget,$plugin function("HTTP post.dll", "$http get", "http://www.freeglobalclassifiedads.com/user/login", #UA, "http://www.freeglobalclassifiedads.com/user/login", "", ""),"Global")
set(#CSRFName,$find regular expression(#freeglobalget,"(?<=CSRFName\\\'\\ value\\=\\\').*(?=\\\'\\ \\/\\>)"),"Global")
set(#CSRFToken,$find regular expression(#freeglobalget,"(?<=name\\=\\\'CSRFToken\\\'\\ value\\=\\\').*(?=\\\'\\ \\/\\>)"),"Global")
set(#url encode EMAIL,$plugin function("HTTP post.dll", "$http text encoder", "url decode", "emai@gmail.com"),"Global")
set(#url encode PW,$plugin function("HTTP post.dll", "$http text encoder", "url decode", "your password"),"Global")
load html($plugin function("HTTP post.dll", "$http post", "http://www.freeglobalclassifiedads.com", "CSRFName={#CSRFName}&CSRFToken={#CSRFToken}&page=login&action=login_post&email={#url encode EMAIL}&password={#url encode PW}", #UA, "", "", ""))

Hope this helps,


Link to post
Share on other sites

Wow that worked to get by the CSRF token error messaage. I did not know the encode email function I will have to read up on that. I am now getting another error message "too many automatic redirections were attempted" which is a completely separate issue. But your method worked to get by the issue I was having. Thank you!

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.

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.

  • Create New...