Jump to content

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


jazzman1

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.

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

Archived

This topic is now archived and is closed to further replies.

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