Jump to content

How To Get Submit Input Element Value In Curl (Bash Or Php)


Recommended Posts

Christian,the code is written in Bash Scripting Language.

The only way that I see to do this, is to substitute a html form with javascript giving it a name attribute to the submit element.

Edited by jazzman1

In fact, after few days research on the web, I've got nothing about this issue.

I've solved that quite accidentally. I must share my code with you!

When there is no name embed to submit element the default name is "Submit" with capital "S"

 

@Christian, take a look at bash, if you want it.

 


#!/bin/bash

NAME='jazzman'
PASS='password'
TIME=136765423
SUBMIT='%20%20%20Вход%20%20%20'

curl --cookie-jar cjar --output /dev/null http://www.djtacho.com/member/plugins/protect/new_rewrite/login.php?v=-any&url=/members/

curl --cookie cjar --cookie-jar cjar --data 'amember_login='$NAME --data 'amember_pass='$PASS --data 'login_attempt_id='$TIME --data 'Submit='$SUBMIT --location http://www.djtacho.com/member/plugins/protect/new_rewrite/login.php?v=-any&url=/members/

curl --cookie cjar --output ~/newFile.html http://www.djtacho.com/members/

O, Jesus, I've got a wrong logic since the very begining.

That's one it's correct!

Solved:

 

#!/bin/bash

NAME='jazzman'
PASS='password'
HIDDEN=`date '+%s'`

curl --cookie-jar cjar --output /dev/null 'http://www.djtacho.com/member/plugins/protect/new_rewrite/login.php?v=-any&url=/members/'

curl --cookie cjar --cookie-jar cjar --data 'amember_login='${NAME} --data 'amember_pass='${PASS} --data 'login_attempt_id='${HIDDEN} --location \
'http://www.djtacho.com/member/plugins/protect/new_rewrite/login.php?v=-any&url=/members/'

curl --cookie cjar --output ~/newFile.htm http://www.djtacho.com/members/center.htm

This thread is more than a year old. Please don't revive it unless you have something important to add.

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

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

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.