Perl Version Webshell Survival detection

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.