03 Jan, 2011
User agent mechanize
Articles related to user agent mechanize
http://digitalpbk.blogspot.com/2007/05/my-first-useful-perl-program.html
My First useful PERL program
#!/usr/bin/perl -w$username = $ARGV[0];$username = "s28arunpbk" if(!$username); ## Get the username from the first command line argument# If null assign my
user id.#use LWP;use LWP::
UserAgent;## Initialize objects#$ua =
LWP::UserAgent->new;$ua->agent("Checkmap/1.0");my $req=HTTP::Request->new(GET => "http://sitemeter.com/?a=stats&s;=$username&r;=0");my $res = $ua->request($req);## Send a request and grab ...
Published 5 years ago
http://digitalpbk.blogspot.com/2009/07/perl-update-code-500-architecture.html
upgrade while we are running...CPAN: LWP::
UserAgent loaded okFetching with LWP: ftp://ftp.jaist.ac.jp/pub/CPAN/modules/03modlist.data.gzLWP failed with code[500] message[Errno architecture (i386-linux-thread-multi-2.6.18-53.1.14.el5pae) does not match executable architecture (i386-linux-thread-multi-2.6.18-53.el5) at /usr/lib/perl5/site_perl/5.8.8/Errno.pm line 11.Compilation failed in require at /usr/lib/perl5/5.8.8/i386-linux-thread-multi/IO/Socket.pm line 17.BEGIN failed--compilation aborted ...
Published 2 years, 10 months ago
http://digitalpbk.blogspot.com/2008/06/free-dataone-account-usage-checker-perl.html
Dataone Account Usage Checker in PERL
The following Script in PERL is a Dataone account usage checker.#!/usr/bin/perl# http://digitalpbk.blogspot.com/2008/06/free-dataone-account-usage-checker-perl.htmluse WWW::
Mechanize;use HTTP::Cookies;use HTTP::Request::Common;my $verbose = 0;my $username;my $password;my $url="http://10.240.64.195/weblogin.jsp";for(my $i=0;$i{ if($ARGV[$i] eq "-v" or $ARGV[$i] eq "--verbose"){ $verbose = 1; } elsif($ARGV[$i] eq "-u" ...
Published 3 years, 10 months ago
http://digitalpbk.com/perl/wwwmechanize-error-geting-premature-do-not-exit-resume
Make WWW::
Mechanize do not exit on GET Errors
When using PERL and WWW::
Mechanize, your script can stop if there is some error in GETing a URL (such as 404 Not Found, 403 Permission Denied). Instead of resuming, the script terminates. If you want the script to continue resuming, you have to pass autocheck => 0 in the
Mechanize class constructor as shown below
my $mech =
WWW::Mechanize->new(autocheck => 0);
This makes sure that the
mechanize library does not check for errors ...
Published 2 years, 2 months ago
http://digitalpbk.blogspot.com/2008/06/perl-download-manager.html
STDOUT; $| = 1; my ($inx,$url,$localfile,$blockstart,$blockend) = @_; my $length = $blockend - $blockstart + 1; my $stbit = 0; if(-f $localfile) { open HND, $localfile or die $!; binmode HND; seek HND,0,2; $stbit = tell HND; close HND; $tdl += $stbit; } else { open HND,">$localfile" or die $!; print HND ""; close HND; } my $ua =
LWP::UserAgent->new; my $pcksize = 1024*64; my $enbit = $stbit+$pcksize-1; my $parts = int($length / $pcksize)+1 ...
Published 3 years, 11 months ago
http://digitalpbk.com/perl/script-fetch-pnr-status-reservation-train-indian-railways
the code below.
Requires: WWW::
Mechanize module and PERL.
Usage: ./pnr.pl <PNR NUMBER>
EDIT: The Railways have changed their interface, so the script also have changed.
New Script
#!/usr/bin/perl
use WWW::
Mechanize;
my $mech =
WWW::Mechanize->new();
$pnr = $ARGV[0];
$mech->get("http://www.indianrail.gov.in/pnr_Enq.html");
$part1 = substr($pnr,0,3);
$part2 = substr($pnr,3);
print " Fetching for PNR $part1-$part2 \n\n";
$mech->submit_form( ...
Published 2 years, 3 months ago
http://digitalpbk.blogspot.com/2006/12/drag-n-drop-files-from-explorer-to-vb.html
Drag 'n Drop Files from explorer to VB
IntroductionThis piece of code allows to make programs in Visual Basic 6, to have a drag and drop support of files directly from the folders. This is an alternative to the old File Open
mechanism. This is way cooler...Code tested on Windows XP and on Visual Basic 6. Any information about other versions of windows or vb? Leave a comment...DownloadDownload the code from planet source code.The CodeThe main part of the code is the module, here ...
Published 5 years, 5 months ago
http://digitalpbk.blogspot.com/2007/06/orkut-mass-scrapper-scrap-all-friends.html
Orkut Perl Script - Login, Scrapper and more
IntroThis is a PERL script that logs you into Orkut and allows you to scrap yiur friends. Following is the program and beneath it lies the manual to use the program. I assume that you already have PERL installed on your system with the required modules:LWPWWW::
MechanizeProgram#! /usr/bin/perl -wuse WWW::
Mechanize;use HTTP::Cookies;use HTTP::Request::Common;use subs qw(print_c login logout home grab proces scrap);#autoflush STDOUT 1;printf ...
Published 4 years, 11 months ago
http://digitalpbk.blogspot.com/2009/06/hacking-sql-injection-tutorial.html
. Warning: The following methods may be illegal, given for illustration purpose only. Most dynamic websites use a database server such as SQL Server from Microsoft, MySQL, etc. To demonstrate what SQL injection is, let us see a piece of code that is used as a login script. Most ASP websites use a code like this:
user =
Request.Form("user")pass = Request.Form("pass")SQL = "SELECT * FROM
users WHERE username='" &
user & _ "' AND password='" ...
Published 2 years, 10 months ago
http://digitalpbk.com/django/django-social-auth-fix-google-open-id-email
Django SocialAuth Fix Google Email Open id attribute exchange
Django Social auth is a package that enables login to your django website with Facebook, Google, Yahoo and Twitter. Allowing authentication from 3rd party websites which supports open authentication helps
users easy to register to your website without filling too much details. Easier signup makes more registrations and helps you cover your django web hosting charges :D . The package is managed at github here, but it does not have ...
Published 2 years ago
Related help topics for user agent mechanize
More keywords like user agent mechanize
More pages for user agent mechanize