Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/perl -w
- ##################################################################
- ## ##
- ## Toolstore Simple Date-Checker by Bloodman @ 2o12 ##
- ## ##
- ##################################################################
- use LWP::Simple;
- use Term::ANSIColor;
- open(OUTPUT, ">>result.txt"); ## In dieser Datei werden die Results gespeichert ##
- open(INPUT_SRV, "<server.txt"); ## In dieser Datei werden die Server die gechecked werden sollen eingetragen ##
- open(INPUT_CHK, "<check.txt"); ## DONT-CHANGE ##
- system $^O eq 'MSWin32' ? 'cls' : 'clear';
- my $start = time();
- my(@urls) = <INPUT_SRV>;
- @urls = sort(@urls);
- my($url);
- my(@files) = <INPUT_CHK>;
- @files = sort(@files);
- my($file);
- print <<ABOUT;
- ##################################################################
- ## ##
- ## Toolstore Simple Date-Checker by Bloodman @ 2o12 ##
- ## ##
- ##################################################################
- \n\n
- ABOUT
- foreach $url (@urls)
- {
- foreach $file (@files)
- {
- chomp($url);
- $full_url = join "/", $url, $file;
- $content = get($full_url);
- if ($content)
- {
- print color("green"), "Exists - $full_url", color("reset");
- print OUTPUT $full_url;
- }
- else
- {
- print color("red"), "Failed - $full_url", color("reset");
- }
- }
- }
- my $finish = time();
- print "\n\nCheck takes: ", $finish-$start, " seconds\n";
- close(INPUT_SRV);
- close(INPUT_CHK);
- close(OUTPUT);
Advertisement
Add Comment
Please, Sign In to add comment