Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

WWW::Mechanize and cisco.com

by Anonymous Monk
on Dec 07, 2012 at 13:40 UTC ( #1007738=perlquestion: print w/ replies, xml ) Need Help??
Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Hi, i tried to login into the cisco.com page with the usual WWW::Mechanize methods:
#!/usr/bin/perl use strict; use warnings; use Data::Dumper; use WWW::Mechanize; use HTTP::Cookies; my $url = 'https://sso.cisco.com/autho/forms/CDClogin.html'; my $mech = WWW::Mechanize->new( cookie_jar => HTTP::Cookies->new( file + => 'cookies.txt') ); $mech->get($url); $mech->form_name('login_form'); $mech->field(userInput => 'user'); $mech->field(passwordInput => 'password'); $mech->click(); my $content = $mech->content(); print Dumper($content);
Unfortunately $content does not contain the correct response. Is there a way to get a correct logon to the cisco.com page ? Thanks!

Comment on WWW::Mechanize and cisco.com
Download Code
Re: WWW::Mechanize and cisco.com
by marto (Chancellor) on Dec 07, 2012 at 13:44 UTC
Re: WWW::Mechanize and cisco.com
by Anonymous Monk on Dec 08, 2012 at 03:48 UTC
Re: WWW::Mechanize and cisco.com
by Anonymous Monk on Dec 08, 2012 at 03:58 UTC

    This url https://sso.cisco.com/autho/forms/CDClogin.html tells me you have money to hire a programmer to write this program for you :)

    This url http://developer.cisco.com/web/webex-developer/sso-reference tells me there is probably a better alternative to scraping cdclogin.html

    Maybe it involves Net::SAML/Net::SAML2 ... that first URL had a FAQ/Help links, if you have an account, ask about easier ways to automate authentication , they'll probably help you :)

      Thanks for pointing me to that interesting links. IŽll give Http::Recorder a try. Paying someone else for a solution was not what i had in mind ;). My intention was to access Ciscos Error Message Decoder Tool. Something which has been done before by that guy: http://inetpro.org/wiki/Cisco_Error_Lookup_Tool_Scraper

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1007738]
Approved by mbethke
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (6)
As of 2014-07-26 11:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (176 votes), past polls