Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/perl
- #SpaceInvaderTurbo.pl
- #Revised version of SpaceInvader2.pl with 1000* more Wget.
- #This will create a separate Wget process for every line in your Hotlist at the expense of CPU.
- #Keep an eye on your computer and make sure you don't break it. This comes with NO warranty.
- use strict;
- use warnings;
- use threads;
- die("Usage: SpaceInvader2.pl \"HOTLIST\"\n") unless ($ARGV[0]);
- open(HOTLIST, "<$ARGV[0]");
- while (<HOTLIST>)
- {
- my $pid;
- next if $pid = fork;
- die "fork failed: $!" unless defined $pid;
- &archiveSpace($_, 0);
- exit;
- }
- close(HOTLIST);
- sub archiveSpace()
- {
- exec("wget --mirror --page-requisites --continue --convert-links --user-agent=\"Googlebot/2.1 (+ http://www.googlebot.com/bot.html)\" -e robots=off --timestamping --wait $_[1] $_[0]");
- }
- 1 while (wait() != -1);
- print("\n");
- print("$ARGV[0] done.\n");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement