!C99Shell v. 1.0 pre-release build #16!

Software: Apache/2.0.54 (Fedora). PHP/5.0.4 

uname -a: Linux mina-info.me 2.6.17-1.2142_FC4smp #1 SMP Tue Jul 11 22:57:02 EDT 2006 i686 

uid=48(apache) gid=48(apache) groups=48(apache)
context=system_u:system_r:httpd_sys_script_t
 

Safe-mode: OFF (not secure)

/home/mnnews/public_html/cgi-bin/mail/   drwxr-xr-x
Free 3.96 GB of 27.03 GB (14.64%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     send.pl (4.27 KB)      -rwxr-xr-x
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
#!/usr/bin/perl
###########################################################################
# send.pl - Let the user send a message
###########################################################################
require "common.pl";
use Socket;
use POSIX qw(strftime);

###########################################################################
# Print the header
###########################################################################
if ($button eq $cancel_button) {
&cancel;
} elsif ($remip ne $fromip) {
&diffip;
}
&print_header;

if ($button eq $send_button) {
$display_message = $message;
$message =~ s/\&gt\;/>/g;
$message =~ s/\&lt\;/</g;
$message =~ s/\&quot\;/"/g;

###########################################################################
# Open socket to SMTP server
###########################################################################
$proto = getprotobyname('tcp');
socket(SOCK, AF_INET, SOCK_STREAM, $proto);
$iaddr = gethostbyname($smtpserver);
$port = getservbyname('smtp', 'tcp');
$sin = sockaddr_in($port, $iaddr);
connect(SOCK, $sin);

@to = split (/,\s/, $to);
@cc = split (/,\s/, $cc);
@bcc = split (/,\s/, $bcc);
$message =~ s/\n\.[\r|\n]/\n. $1/g;
$date = strftime("%a, %d %b %Y %T %z (%Z)", localtime);

###########################################################################
# Send message
###########################################################################
$bad = "No";
send SOCK, "HELO $domain\r\n", 0;
recv SOCK, $junk, 512, 0;
if ($junk =~ /^5/) {
$bad = "Yes";
}
send SOCK, "MAIL From:<$from>\r\n", 0;
recv SOCK, $junk, 512, 0;
if ($junk =~ /^5/) {
$bad = "Yes";
}
foreach $line (@to) {
send SOCK, "RCPT To:<$line>\r\n", 0;
}
foreach $line (@cc) {
send SOCK, "RCPT To:<$line>\r\n", 0;
}
foreach $line (@bcc) {
send SOCK, "RCPT To:<$line>\r\n", 0;
}
recv SOCK, $junk, 512, 0;
if ($junk =~ /^5/) {
$bad = "Yes";
}
send SOCK, "DATA\r\n", 0;
recv SOCK, $junk, 512, 0;
if ($junk =~ /^5/) {
$bad = "Yes";
}
if ($resent) {
send SOCK, "Resent-From: $resent\r\n", 0;
}
send SOCK, "Date: $date\r\n", 0;
send SOCK, "To: $to\r\n", 0;
if ($cc) {
send SOCK, "Cc: $cc\r\n", 0;
}
if (!($resent)) {
send SOCK, "Subject: $subject\r\n", 0;
send SOCK, "X-Mailer: $version\r\n", 0;
send SOCK, "X-URL: $x_url\r\n", 0;
}
if ($attachment) {
$type = $query->uploadInfo($attachment)->{"Content-Type"};
$boundary = "-ATDOT-ATTACH-BOUNDARY-" . time . "---";
@filename = split(/\/|\\|:/, $attachment);
send SOCK, "MIME-Version: 1.0\r\n", 0;
send SOCK, "Content-Type: multipart/mixed; ", 0;
send SOCK, "boundary=\"$boundary\"\r\n", 0;
send SOCK, "\r\n--$boundary\r\n", 0;
send SOCK, "Content-type: text/plain\r\n\r\n", 0;
send SOCK, "$message\r\n", 0;
send SOCK, "\r\n--$boundary\r\n", 0;
send SOCK, "Content-Type: $type; name=\"$filename[-1]\"\r\n", 0;
send SOCK, "Content-Transfer-Encoding: BASE64\r\n", 0;
send SOCK, "Content-Description:\r\n\r\n", 0;
while (<$attachment>) { $temp .= $_; }
send SOCK, encode_base64($temp), 0;
send SOCK, "--$boundary--", 0;
send SOCK, "\r\n.\r\n", 0;
} else {
send SOCK, "\r\n$message\r\n.\r\n", 0;
}
recv SOCK, $junk, 512, 0;
if ($junk =~ /^5/) {
$bad = "Yes";
}
send SOCK, "QUIT\r\n", 0;
recv SOCK, $junk, 512, 0;
if ($junk =~ /^5/) {
$bad = "Yes";
}
close SOCK;

###########################################################################
# Show the user what was sent
###########################################################################
if ($bad eq "No"){
if ($btns eq 'top' || $btns eq 'both' ) { &print_options; }
print $message_sent_info;
print "<PRE>$from_input $from\n";
print "$to_input $to\n";
if ($cc) {
  print "$cc_input $cc\n";
}
if ($bcc) {
  print "$bcc_input $bcc\n";
}
if ($attachment) {
  print "$attach_input $filename[-1]\n";
}
print "$subj_input $subject\n";
if ($resent) {
  print "$resent_input $resent\n";
} else {
  print "\n";
}
print "$message</PRE>";
} else {
print $no_send_info;
&send_form;
}
}

###########################################################################
# Done
###########################################################################
if (($btns eq 'bottom' || $btns eq 'both') && ($bad eq 'No')) { &print_options; }
&update_sess;
&print_footer;

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 1.0 pre-release build #16 powered by Captain Crunch Security Team | http://ccteam.ru | Generation time: 0.0042 ]--