I am trying to login website using mechanize perl module
That particular website using csrf token.
I am fetching that token and passing parameter to form_token variable.
There is no success. In previous same scenario working ,In that csrf token list websites i can't able to login.
Please help to my code.Last two days i am trying
Below my code is shown
use WWW::Mechanize::GZip; my $mech = WWW::Mechanize::GZip->new( ssl_opts => { SSL_verify_mode => + 'SSL_VERIFY_NONE',verify_hostname => 0 } ); $url = 'https://test.com/signin'; $mech->get($url); my ($csr_input) = $mech->find_all_inputs(name => 'form_token'); my $token = $csr_input->value(); $mech->form_number(1); $mech->field('email',$username); $mech->field('password',$password); $mech->field('signin',''); $mech->field('form_id','signin'); $mech->field('form_token',$token); $mech->field('button_clicked',''); $mech->submit();
In reply to Auto login using mechanize module in perl ? by vasanthgk91
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |