Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Helping The_Worst

  • Loading branch information...
commit 78dc3042af6f09c9d8b1c6fda40adaffce2af6f9 1 parent 82ceca7
@jhannah authored
Showing with 30 additions and 0 deletions.
  1. +30 −0 The_Worst/search.pl
View
30 The_Worst/search.pl
@@ -0,0 +1,30 @@
+use strict;
+use diagnostics;
+use warnings;
+use IPC::System::Simple qw(run system capture EXIT_ANY);
+use WWW::Search;
+
+$SIG{ALRM} = sub { die "timeout" };
+
+my $random_word = random_dictionary_word();
+my $oSearch = new WWW::Search('MSN');
+my $sQuery = WWW::Search::escape_query("Shopping $random_word");
+$oSearch->native_query($sQuery);
+
+while (my $oResult = $oSearch->next_result()) {
+ my $border = $oResult->url;
+ print $oResult->url, "\n";
+ system( [0..255], "php.exe scan.php $border");
+}
+
+
+sub random_dictionary_word {
+ srand;
+ open my $in, "<", "mydictionary.txt" or die "Can't open mydictionary.txt";
+ my $it;
+ while (<$in>) {
+ rand($.) < 1 && ($it = $_);
+ }
+ return $it;
+}
+
Please sign in to comment.
Something went wrong with that request. Please try again.