473,756 Members | 1,861 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

send username/password via perl script instead of using browser

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.valu e.length == 0) {
f.Usuario.focus ();
return false;
} else if (f.Pasw.value.l ength == 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="resetea r();">
<br>
<center>
<font COLOR="#000080" size="+1"><b>AC CESO USUARIOS
REGISTRADOS</b></font>
<hr WIDTH="60%" SIZE=3 COLOR=#CCCC00>
</center>

<p>&nbsp;</p>
<form NAME="form1" METHOD="post" ACTION="index.p hp">
<center>
<table BORDER=3 WIDTH="50%" BORDERCOLORDARK =#003399
BORDERCOLORLIGH T=#3399CC RULES="groups" cellpadding=4 bgcolor=#A0A0FF >
<tr><td COLSPAN=2>&nbsp ;</td></tr>
<tr>
<td ALIGN="right">< font SIZE=4 COLOR="black">U suario:</font></td>
<td ALIGN="left"><i nput TYPE="text" NAME="Usuario" SIZE=14
MAXLENGTH=14></td>
</tr>
<tr>
<td ALIGN="right">< font SIZE=4
COLOR="black">C ontrase&ntilde; a:</font></td>
<td ALIGN="left"><i nput TYPE="password" NAME="Pasw" SIZE=14
MAXLENGTH=14></td>
</tr>
<tr align=center><t d COLSPAN=2><br>
<input TYPE="submit" VALUE="Entrar" onCLICK="return
validar(this.fo rm);">
&nbsp;
<input TYPE="reset" VALUE="Borrar">
</td>
</tr>
<tr><td COLSPAN=2>&nbsp ;</td></tr>
</table>
</center>
</form>
<br><br>
<br>
</body>
</html>
Jul 19 '05 #1
2 18581
Not sure if it helps, but when I need to do this in a link on a
webpage (that is presenter the user name and password), I use the
following URL:

http://<username>:<pas sword>@<address >

simply replace <address> with the URL of the page, <username> with the
user name and <password> with the password.

On 29 Jul 2004 04:09:03 -0700, cg*******@hotma il.com (john brown)
wrote:
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.


Jul 19 '05 #2
john brown wrote:
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

If you login with a perl/lwp script, your login info (such as the cookie
that the site will likely set) will be set to your lwp cookies, not your
browser, so you won't be logged in when you go back to the site in your
browser anyway. I suppose this would work if the site is checking logins
based on IP, but that's dumb and they shouldn't be doing it...
Jul 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
37738
by: deko | last post by:
I want to use htaccess for authentication on my php site since I only have a few users who need access to secure areas. So, I created a new directory off public_html (secretDocs) and in that directory there is a .htaccess file that looks like this: AuthType Basic AuthName "someuser" AuthUserFile "/home/mydirectory/.htpasswds/secretDocs/passwd" require valid-user
11
12089
by: Google Mike | last post by:
I've got RH9 Linux with default PHP. Is there a way to send email on Linux to an Exchange Server from PHP and/or other tools when there is *NOT* SMTP access? Has anyone figured out a way to use PHP to get inside an OWA (Microsoft Outlook Web Access) website to send email that way? The reason I ask is because my corporate office is going to do away with our rogue SMTP server access and force everything through Exchange
40
11893
by: ian | last post by:
Hi, I'm a newbie (oh no I can here you say.... another one...) How can I get Python to send emails using the default windows email client (eg outlook express)? I thought I could just do the following import win32com.client
2
7905
by: john brown | last post by:
I'm using the following code to retrieve a web page. It seems that I'm able to pass the username and password to the web page, but it does nothing. Looking at the source code of the web page it asks for an "OnClick", which I figure refers to the "enter" button, (there's also a reset button after the "enter" button.) I do I go about send the information and finalizing it with the "OnClick" or "enter" button in the page. Here's the...
7
2823
by: NewbieJon | last post by:
I am attempting to send the variable "sComputerName" from my ActiveX script to "GetInfo.asp" using javascript. (Having been advised this is the way to get my ActiveX variable into my ASP script) My code is below. I am getting the following error "MyForm.oNetwork.Value is Null or is not an object". I'm struggling to diagnose what to do next. I'd very much appreciate some help Many thanks <HTML><BODY><FORM NAME="MyForm"...
6
3056
by: JK | last post by:
Can anyone provide me with an ASP 2.0 example of how to call the geocoder service. They provide the following perl example for XML-RPC : #!/usr/bin/perl use XMLRPC::Lite; use Data::Dumper; use strict; use warnings;
14
2549
by: Brent Burkart | last post by:
I am trying to capture the Windows Authenticated username, but I want to be able to capture the login name that exists in IIS, not Windows. In order to enter my company's intranet through the internet, they have to login. I want to be able to capture that login versus their Windows login because I need to know who they are from any computer rather than only their computer. Any ideas? Thanks
0
1708
by: geekneo | last post by:
Guys, I need to send the username and paasword to a website using the perl script so that it automatically logs in the person.Can anybody guide me Regards neo
11
22373
by: fdu.xiaojf | last post by:
Hi, I just want to send a very simple email from within python. I think the standard module of smtpd in python can do this, but I haven't found documents about how to use it after googleing. Are there any examples of using smtpd ? I'm not an expert,so I need some examples to learn how to use it. Or maybe there is a better way to to this?
0
9431
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9844
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9819
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9689
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8688
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6514
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5289
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3780
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3326
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.