how can i use curl to login into non digest login sites?

0

the router login page

enter image description here

i have tried

curl http://admin:admin@...*/

but it doesn't work

mina nageh

Posted 2019-04-10T15:54:38.913

Reputation: 141

i found it but still doesn't work ! https://ghostbin.com/paste/a2p4v

– mina nageh – 2019-04-11T17:35:25.950

Answers

0

open the network tap using ctrl+shift+I

enter image description here then reload the page

enter image description here

type the password and the username then click submit/login

in the network tap you will find router ip enter image description here

right click on it and click copy the command as curl (cmd) enter image description here

then remove all the ^ from the command then past it in cmd and you are done

so the command just looks like this

curl "http://192.168.1.1/" --data "frashnum=&action=login&Frm_Logintoken=24&Username=admin&Password=ZAQXSWCDEVFR"  -v

and don't forget to update the Frm_Logintoken

the Frm_Logintoken is a token generated by the router and it basically increment by one on each successful login!

you will find it in the router page html code in the elements tap or view page source code ctrl + U then ctrl + F and type token then press enter and look for the value !

mina nageh

Posted 2019-04-10T15:54:38.913

Reputation: 141