Principle:
Detects the return status of the URL
Source:
1 #!c:\\perl\\bin\\perl.exe2 Usewarnings;3 UseStrict;4 UseLWP::useragent;5$| =1;6 Print "---------------------------------------------------------\ n";7 Print "| Webshell Online Check v1.0 |\n";8 Print "---------------------------------------------------------\ n";9 Print "| |\n";Ten Print '| Power by: [Email protected] |'."\ n"; One Print "| Bbs:www.script-toolf.info |\n"; A Print "| |\n"; - Print "---------------------------------------------------------\ n"; - my $ua= lwp::useragent->new (); the $ua->timeout (5); - my $ok='OK'; - my $false='False'; - while(1){ + Print "---------------------------------------------------------\ n"; - OpenFILE,"<","Webshell.txt"Or die "Webshell File Open error:$!\n"; + foreach(<FILE>){ A Chomp; at if($_!~ m#^http#i) {$_ = ' http://'. $_;} - my $req= Http::request->new (GET = ="$_"); - my $rep=$ua->request ($req); - if($rep->status_line =~/ $/){ - Print "Yes --$_\n"; -}Else{ in Print "No ---$_\n"; - } to } + CloseFILE; - Print "---------------------------------------------------------\ n"; the Print "Ctrl + C to exit\nthe Next Check after 30sec waite.....\n"; * Sleep( -); $ system('CLS');Panax Notoginseng #system (' clear '); - } the + Print "Press any key to continue"; A getc();
#等有时间优化一下
#注意, this is for the win version, because the beginning of the #! path, there is the system (' CLS ') for win, if it is Linux
#请修改system (' CLS ') is System (' clear ')
#再把开头的 #!c:\\perl\\bin\\perl.exe modified to the corresponding Perl path
#
#
Perl Version Webshell Survival detection