473,405 Members | 2,262 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Autofilling a webform of other domain

25
Hi all,

Is it possible to write a perl program that do autofilling of the login webform(username, password) of other domain (say hotmail.com). Assume domain name, username, password are passed as arguments to the perl program.

Thanks
DNK2007
Feb 18 '08 #1
3 1555
rajiv07
141 100+
Try WWW::Mechanize module.You can search in CPAN

Hope it help

Regards
Rajiv
Feb 18 '08 #2
numberwhun
3,509 Expert Mod 2GB
Try WWW::Mechanize module.You can search in CPAN

Hope it help

Regards
Rajiv
I agree with Rajiv. The Mechanize module is exactly what you want to use. In fact, on the Mechanize examples page, there is an example for using login/pwd.

Regards,

Jeff
Feb 18 '08 #3
DNK2007
25
Hi all

I tried with a simple program and I stuck up with some error. The code goes like this
Expand|Select|Wrap|Line Numbers
  1.     #!/usr/bin/perl
  2.  
  3.     # turn on perl's safety features
  4.     use strict;
  5.     use warnings;
  6.  
  7.     # work out the name of the module we're looking for
  8.     my $module_name = $ARGV[0]
  9.       or die "Must specify module name on command line";
  10.  
  11.     # create a new browser
  12.     use WWW::Mechanize;
  13.     my $browser = WWW::Mechanize->new();
  14.  
  15.     # tell it to get the main page
  16.     $browser->get("http://search.cpan.org/");
  17.  
  18.     # okay, fill in the box with the name of the
  19.     # module we want to look up
  20.     $browser->submit_form(
  21.                            form_number => 1,
  22.                            fields      => { query => $module_name},
  23.                          );
  24.     $browser->click();
  25.  
  26.     # click on the link that matches the module name
  27.     $browser->follow_link( text_regex => qr{$module_name} );
  28.  
  29.     my $url = $browser->uri;
  30.  
  31.     # launch a browser...
  32.     system('Mac Safari', $url);
  33.  
  34.     exit(0);
  35.  
and the error is (program name is temp.pl)

There is no form numbered 1 at temp.pl line 20
Died at /Library/Perl/5.8.6/WWW/Mechanize.pm line 1724.

what might be the problem?


Thanks
DNK2007
Feb 19 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

11
by: Vic Spainhower | last post by:
Hello, I just purchased a new domain name and I've set it up as a redirect to a folder on my main site. What is happening is the index.php page checks a session variable to see if the user is...
3
by: Terry Olsen | last post by:
I have administrator access on 2 different domains on the network at my job. I wrote a program to query the registry key on remote PC's and return the results to an excel spreadsheet. However, the...
3
by: jan | last post by:
I know Window.opener.refresh() does not work if two windows are from a different domain. Anyone a (javascript)-solution for this problem ? tks Jan/
1
shrek123
by: shrek123 | last post by:
I want to kill some process on remote machine which is on some other domain. I am using Win32::OLE GetObject to do that. But I am getting following error Error1: When my remote machine is on...
5
by: =?Utf-8?B?YzY3NjIyOA==?= | last post by:
Hi all, Is there an easier way to handle that? I used Javascript to handle this when our two domains are hosted on two different servers(on different networks) and our search engine marketing...
16
by: Stevo | last post by:
I'm guessing this is a laughably obvious answer to many here, but it's not to me (and I don't have a server or any knowledge of PHP to be able to try it). It's not strictly a PHP question, but...
0
by: Uli Netzer | last post by:
Hi all, I'm trying to add a user from another domain (domain trust and rights are there) to a group in our domain. It's a domain local security group. I get the following errors: The server...
3
by: perhapscwk | last post by:
Hi, Is it possible to "include" or "request" a file which it stored in other domain? For example, we are in domain_a.com now.... I want to "include(http://domain_b.com/aaa.php"... how can...
0
by: asad1605 | last post by:
and then get result in my asp.net page(response). I have tried the way in which HTTPWebRequest and HTTPWebResponse objects were used, but no success. For more clarity, i want to send a container...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...
0
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,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.