send username/password via perl script instead of using browser

From: john brown (cglobal25_at_hotmail.com)
Date: 07/29/04

  • Next message: nobull_at_mail.com: "Re: net::smtp"
    Date: 29 Jul 2004 04:09:03 -0700
    
    

    There is a web page that I access frequently and would like to
    automate the authentication of the username and password. I would
    like to user a perl script but I'm not really sure about the steps.
    If someone could point me in the right direction. I don't know if
    it's this simple but wouldn't it just be a matter of using the LWP
    module. Calling the webpage and passing in the parameters? Any help
    would be appreciated.

    <html>
    <title>Acceso</title>
    <head>
    <script>
    function resetear() {
       //document.form1.Usuario.value="";
       //document.form1.Pasw.value="";
       document.form1.Usuario.focus();
    }
    function validar(f) {
            if (f.Usuario.value.length == 0) {
                    f.Usuario.focus();
                    return false;
            } else if (f.Pasw.value.length == 0) {
                    f.Pasw.focus();
                    return false;
            }
            return true;
    }
    </script>
    <meta NAME="Author" CONTENT="">
    <meta HTTP-EQUIV="Content-Type" CONTENT="text/html;
    charset=iso-8859-1">
    </head>
    <body onLoad="resetear();">
    <br>
    <center>
    <font COLOR="#000080" size="+1"><b>ACCESO USUARIOS
    REGISTRADOS</b></font>
    <hr WIDTH="60%" SIZE=3 COLOR=#CCCC00>
    </center>

    <p>&nbsp;</p>
    <form NAME="form1" METHOD="post" ACTION="index.php">
    <center>
    <table BORDER=3 WIDTH="50%" BORDERCOLORDARK=#003399
    BORDERCOLORLIGHT=#3399CC RULES="groups" cellpadding=4 bgcolor=#A0A0FF>
    <tr><td COLSPAN=2>&nbsp;</td></tr>
    <tr>
    <td ALIGN="right"><font SIZE=4 COLOR="black">Usuario:</font></td>
    <td ALIGN="left"><input TYPE="text" NAME="Usuario" SIZE=14
    MAXLENGTH=14></td>
    </tr>
    <tr>
    <td ALIGN="right"><font SIZE=4
    COLOR="black">Contrase&ntilde;a:</font></td>
    <td ALIGN="left"><input TYPE="password" NAME="Pasw" SIZE=14
    MAXLENGTH=14></td>
    </tr>
    <tr align=center><td COLSPAN=2><br>
    <input TYPE="submit" VALUE="Entrar" onCLICK="return
    validar(this.form);">
    &nbsp;
    <input TYPE="reset" VALUE="Borrar">
    </td>
    </tr>
    <tr><td COLSPAN=2>&nbsp;</td></tr>
    </table>
    </center>
    </form>
    <br><br>
    <br>
    </body>
    </html>


  • Next message: nobull_at_mail.com: "Re: net::smtp"

    Relevant Pages

    • Perl & Sessions?
      ... I would like to make a perl script that lets the user log in and checks if ... the username and password are correct. ... After authentication, I want to ...
      (comp.lang.perl.misc)
    • Re: .htaccess from perl script?
      ... > I am trying to send a username and password from a perl script in ... > username and password entered correctly but the user has to click ok ... > password window showing. ... Note that passwords usually secure the whole site, so you may need to pass userid/password everytime you use get. ...
      (comp.lang.perl.misc)
    • .htaccess from perl script?
      ... I am trying to send a username and password from a perl script in ... order to access documents in a directory secured by a .htaccess file. ... username and password entered correctly but the user has to click ok ... password window showing. ...
      (comp.lang.perl.misc)
    • Re: NNTP Server responses from a perl script?
      ... I'm working on my second ever perl script for a school ... > Authentication Required" ... > However, in Perl, when I open a socket connection to a news server ... > response, everything hangs. ...
      (perl.beginners)
    • NNTP Server responses from a perl script?
      ... I'm working on my second ever perl script for a school assignment ... requires authentication, issue a command, and wait for a response, ... everything hangs. ...
      (perl.beginners)