@Ghazascanner
_2019runbot
Ghazascanner File Manager
server :Linux adweb87 2.6.32-754.el6.x86_64 #1 SMP Tue Jun 19 21:26:04 UTC 2018 x86_64
Current Path :
/
home
/
sanchung
/
public_html
/
board
/
Path :
Upload File :
New :
File
Dir
/home/sanchung/public_html/board/contact_mail.php
<? include"$_SERVER[DOCUMENT_ROOT]/admin/_setup.php"; function socketmail($Tomail, $subject, $Mailbody, $Frommail, $Fromname, $File){ $Mailbody = str_replace(chr(13).chr(10),chr(10),$Mailbody); $Mailbody = str_replace(chr(13),chr(10),$Mailbody); $Mailbody = str_replace(chr(10),$CARRAGE_RETURN,$Mailbody); $message_body = "$content$CARRAGE_RETURN$Mailbody$CARRAGE_RETURN$CARRAGE_RETURN"; $message_body_stand=$message_body; $message_body_stand=str_replace("\'","'",$message_body_stand); $message_body_stand=str_replace(chr(92).chr(34),chr(34),$message_body_stand); $message_body_stand=str_replace(chr(92).chr(92).chr(34),chr(34),$message_body_stand); $CARRAGE_RETURN = chr(13).chr(10); $SMTP_SERVER = "localhost"; $connect = fsockopen($SMTP_SERVER, 25, &$errno, &$errstr, 30) or die("Could not talk to the sendmail server!"); if(!$connect) echo "ERROR"; set_socket_blocking($connect, 1); $Mesg .= fgets($connect, 255); fputs($connect, "HELO PSK-Mailer$CARRAGE_RETURN"); $Mesg .= fgets($connect, 255); fputs($connect, "MAIL from: $Frommail$CARRAGE_RETURN"); $Mesg .= fgets($connect, 255); fputs($connect, "RCPT to: $Tomail$CARRAGE_RETURN"); $Mesg .= fgets($connect, 255); fputs($connect, "DATA$CARRAGE_RETURN"); $Mesg .= fgets($connect, 1024); fputs($connect, "From: $Fromname < $Frommail > $CARRAGE_RETURN"); fputs($connect, "Return-Path: $Frommail$CARRAGE_RETURN"); fputs($connect, "Subject: $subject$CARRAGE_RETURN"); fputs($connect, "X-Originating-IP: [$REMOTE_ADDR]$CARRAGE_RETURN"); fputs($connect, "X-Priority: $CARRAGE_RETURN X-MSMail-Priority: Normal$CARRAGE_RETURN"); fputs($connect, "X-mailer: [ver PSK-Mail 1.0] http://www.phpnara.com/ $CARRAGE_RETURN"); ## ADDFILE ## if($File[body] && $File[size] > 0){ $attach_body = fread(fopen($File[body], "r"), $File[size]); $attach_name = $File[name]; $attach_type = $File[type]; $boundary = "----=_PSK-Mailer_".uniqid(""); fputs($connect, "Content-Type: multipart/mixed;$CARRAGE_RETURN"); fputs($connect, " boundary=\"----=$boundary\"$CARRAGE_RETURN"); fputs($connect, "$CARRAGE_RETURN"); fputs($connect, "This is a multi-part message in MIME format.$CARRAGE_RETURN"); fputs($connect, "$CARRAGE_RETURN"); fputs($connect, "------=$boundary$CARRAGE_RETURN"); //fputs($connect, "Content-Type: text/plain;$CARRAGE_RETURN\tcharset=$charset_send$CARRAGE_RETURN"); fputs($connect, "Content-Type: text/html;$CARRAGE_RETURN\t charset=EUC-KR $CARRAGE_RETURN"); fputs($connect, "$CARRAGE_RETURN"); fputs($connect, $message_body_stand); fputs($connect, "$CARRAGE_RETURN"); if(empty($attach_type)) $attach_type = "application/octet-stream"; fputs($connect,"------=$boundary$CARRAGE_RETURN"); fputs($connect, "Content-Type: $attach_type; $CARRAGE_RETURN"); fputs($connect, " name=\"$attach_name\"$CARRAGE_RETURN"); fputs($connect, "Content-Transfer-Encoding: base64$CARRAGE_RETURN"); fputs($connect, "Content-Disposition: attachment; $CARRAGE_RETURN"); fputs($connect, " filename=\"$attach_name\"$CARRAGE_RETURN"); fputs($connect, "$CARRAGE_RETURN"); $attach_body = chunk_split(base64_encode($attach_body)); fputs($connect, $attach_body); fputs($connect, "$CARRAGE_RETURN"); //fputs($connect, "------=$boundary"."$CARRAGE_RETURN"); } else { ## NORMAL MAIL ## fputs($connect, "Content-Type: text/html;$CARRAGE_RETURN\t charset=$charset_send$CARRAGE_RETURN"); fputs($connect, "Content-Transfer-Encoding: 8bit$CARRAGE_RETURN"); fputs($connect, "$CARRAGE_RETURN"); fputs($connect, "$CARRAGE_RETURN"); fputs($connect, $message_body_stand); fputs($connect, "$CARRAGE_RETURN"); ## NORMAL MAIL ## } ## DEFAULT ## fputs($connect, "$CARRAGE_RETURN.$CARRAGE_RETURN"); $Mesg .= fgets($connect, 1024); fputs($connect, "QUIT$CARRAGE_RETURN"); $Mesg .= fgets($connect, 1024); // echo $Mesg; fclose($connect); } //include"./admin/mailreply.php"; $body = nl2br($content); $To = "$temail1@$temail2"; $Frommail = "$femail1@$femail2"; $Fromname = $fname; $File = array("body"=>$addfile, "name"=>$addfile_name, "size"=>$addfile_size, "type"=>$addfile_type); $res = socketmail($To, $subject, $body, $Frommail, $Fromname, $File); echo"<script> alert('¸ÞÀÏÀÌ Á¤»óÀûÀ¸·Î ¹ß¼Û µÇ¾ú½À´Ï´Ù.'); self.close(); </script>"; ?>