Jump to content
UBot Underground

[Help] Getting Csrfmiddlewaretoken


Recommended Posts

Yesterday I was able to get some session ID's using the xpath parser from Aymen.

I tried to get it with a csrfmiddlewaretoken but couldn't seem to return anything.

 

This is the token i'm trying to get

 

 

action='/auth/login/?next=/accounts/register/'>   <input type='hidden' name='csrfmiddlewaretoken' value='IjAh8whMMaZX76NzIekohGQ2wlZmBty6' />   <label for="id_username">Username:</label>   <input id="id_username" maxlength="254" name="username" type="text" />   <label for="id_password">Password:</label>   <input id="id_password" name="password" type="password" />   <label for="id_rememberme">Keep me logged in:</label> <input id="id_rememberme" name="rememberme" type="checkbox" />   <input type='submit' value='login' class="button"/>   <input type='hidden' name='next' value='/accounts/register/'>   </form>

 

How would I go about getting this with xpath? or any of Aymens functions?

 

 

Thanks for any help!

Sean

Link to post
Share on other sites

Here you go, you can change the input of course to be the sites source code

set(#input,"action=\'/auth/login/?next=/accounts/register/\'>   <input type=\'hidden\' name=\'csrfmiddlewaretoken\' value=\'IjAh8whMMaZX76NzIekohGQ2wlZmBty6\' />   <label for=\"id_username\">Username:</label>   <input id=\"id_username\" maxlength=\"254\" name=\"username\" type=\"text\" />   <label for=\"id_password\">Password:</label>   <input id=\"id_password\" name=\"password\" type=\"password\" />   <label for=\"id_rememberme\">Keep me logged in:</label> <input id=\"id_rememberme\" name=\"rememberme\" type=\"checkbox\" />   <input type=\'submit\' value=\'login\' class=\"button\"/>   <input type=\'hidden\' name=\'next\' value=\'/accounts/register/\'>   </form>","Global")
set(#csrftoken,$plugin function("HTTP post.dll", "$xpath parser", #input, "//input[@name=\'csrfmiddlewaretoken\']", "value", "HTML"),"Global")

Link to post
Share on other sites

Hey HelloInsomnia,

 

Thank you again for the help...small problem though. It's on the page twice and I deleted duplicates when I added it to my list but it's still there. Any solution for this?

Here pis a picture in the debug, http://imgur.com/zab4o9Z .

 

 

Thank you again for your assistance :).

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...