Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
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
Replies are listed 'Best First'.
Re: WWW::Mechanize and cisco.com
by marto (Bishop) on Dec 07, 2012 at 13:44 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
Re: WWW::Mechanize and cisco.com
by Anonymous Monk on Dec 08, 2012 at 03:48 UTC

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 lurking in the Monastery: (15)
As of 2015-07-28 15:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (257 votes), past polls