Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
<?php /*---------------------------------------------------------\ | aEWD..
Decoded Output download
<?php
/*---------------------------------------------------------\
| aEWDMU SCRIPT |
|----------------------------------------------------------|
| Copyright 2009, EWD Studio |
|----------------------------------------------------------|
| http://www.ewd-studio.net |
\---------------------------------------------------------*/
session_start();
include("requ.php");
include("include/internal.php");
include("include/config.php");
if (isset($_POST['contactus'])) {
$error = "";
$email = stripslashes($_POST['EmailAddress']);
$sender = clean_variable($_POST['name']);
$subject = stripslashes($_POST['subject']);
$message = stripslashes($_POST['message']);
$captcha = md5($_POST['captcha1']);
$ipi = getenv("REMOTE_ADDR");
$data = date('d.m.Y H:i');
$result = mssql_query("SELECT top 1 c_date FROM EWDContact WHERE ip='$ipi' order by cid desc");
while ($row = mssql_fetch_array($result)) {
$data_check = $row["c_date"];
}
$maxtime = date('d.m.Y H:i', strtotime("-$contime $conhours"));
$ctime = strtotime($data_check) - strtotime($maxtime);
if ($ctime > 0) {
print "<div class='error'>Your IP already sent a contact form today... Try again later.</div>";
$error = 1;
} elseif (empty($email) || empty($subject) || empty($message) || empty($captcha)) {
print "<div class='error'>Fields marked with (*) are required. Please correct and try again.</div>";
$error = 1;
} elseif (!eregi("^[a-z0-9]+([_\.-][a-z0-9]+)*" . "@([a-z0-9]+([\.-][a-z0-9]+))*$", $email)) {
print "<div class='error'>Invalid email address.</div>";
$error = 1;
} elseif (strlen($subject) < 6) {
print "<div class='error'>Subject must have min 6 characters.</div>";
$error = 1;
} elseif (strlen($message) < 20) {
print "<div class='error'>Message must have min 20 characters.</div>";
$error = 1;
} elseif (strlen($message) > 250) {
print "<div class='error'>Message must have max 250 characters.</div>";
$error = 1;
} elseif ($_SESSION['chkvalue'] != $captcha) {
print "<div class='error'>Invalid verification image code.</div>";
$error = 1;
}
if ($error != 1) {
print "<div class='success'>You have been successfully send Contact form</div>";
$msquery1 = mssql_query("SET IDENTITY_INSERT EWDContact OFF");
$msquery2 = mssql_query("INSERT INTO EWDContact (account,sender_email,subject,message,c_date,ip) VALUES ('$sender','$email','$subject','$message','$data','$ipi')");
}
}
?>
Did this file decode correctly?
Original Code
<?php
/*---------------------------------------------------------\
| aEWDMU SCRIPT |
|----------------------------------------------------------|
| Copyright 2009, EWD Studio |
|----------------------------------------------------------|
| http://www.ewd-studio.net |
\---------------------------------------------------------*/
session_start();
include("r\145\x71\x75\x2e\x70h\160");
include("\x69n\x63l\165\144\x65/\x69\156te\162\x6e\141l.\160hp");
include("\x69\x6e\143\154\x75\144e/c\157\x6e\x66i\x67.\x70\x68p");
if (isset($_POST['contactus'])) {
$error = "";
$email = stripslashes($_POST['EmailAddress']);
$sender = clean_variable($_POST['name']);
$subject = stripslashes($_POST['subject']);
$message = stripslashes($_POST['message']);
$captcha = md5($_POST['captcha1']);
$ipi = getenv("\x52E\115O\124\105_\101\104D\x52");
$data = date('d.m.Y H:i');
$result = mssql_query("S\105L\105C\124\040t\x6f\x70 1 \x63\137\x64\141\164\x65\040F\122\x4fM\x20E\127\x44\x43\157\156\x74\141\143t\x20\x57\x48\105\x52E\x20ip\x3d'$ipi'\x20\x6f\162\x64\145r \x62y\040\x63\x69\x64\040d\145\x73c");
while ($row = mssql_fetch_array($result)) {
$data_check = $row["\143_\144\141\x74e"];
}
$maxtime = date('d.m.Y H:i', strtotime("\055$contime $conhours"));
$ctime = strtotime($data_check) - strtotime($maxtime);
if ($ctime > 0) {
print "\074\144\151v \143l\x61\163\163\x3d'\x65\x72\x72\x6f\162'\x3eY\x6fu\x72\040\111\120\x20\x61\x6c\x72ea\144y\040\163\145\156\x74 a \143\x6f\x6e\x74\141c\x74\040form\040\164\x6fd\141y..\x2e\x20T\162y\040\141\147\141\x69n\x20l\x61te\x72\056<\057\144i\166\x3e";
$error = 1;
} elseif (empty($email) || empty($subject) || empty($message) || empty($captcha)) {
print "\074d\x69v\x20cl\x61\163\x73='\x65\x72\x72\x6f\x72'\076F\x69\x65\154\144s\x20\155a\162ke\x64\040\x77i\x74\x68\x20\050\x2a) \x61r\145\040\x72e\x71\x75\151\x72\x65d.\040\120\x6c\145a\163\145\x20c\157\x72\162\x65\x63t\x20\141\x6e\x64 \x74\x72y a\147\x61\x69\156\x2e\x3c\x2f\x64\151v\076";
$error = 1;
} elseif (!eregi("\136\133a\x2dz0-\x39\x5d\053\x28[\x5f\\\056\055\x5d[\141-\x7a0\0559\135+\x29\052" . "\100\050[a-\172\x30\x2d\071\135\053\x28[\.\x2d]\133a\x2d\172\060\055\071\135+\051\x29\052$", $email)) {
print "\x3c\144\151\x76 \143\x6c\141\163\163='e\162r\x6f\162'\076\x49\156v\x61\x6ci\144\x20\x65m\x61\x69\x6c \x61\x64\x64\x72es\163.<\057di\166\x3e";
$error = 1;
} elseif (strlen($subject) < 6) {
print "<\144i\166\040\143la\x73s\x3d'\145\x72\162\x6fr'>\x53\x75b\x6ae\x63\164 \155\165\163t\040h\141ve\x20\155\151\x6e\x206\x20\143\x68\141\162\x61cte\x72\163\056\x3c\x2f\144iv\x3e";
$error = 1;
} elseif (strlen($message) < 20) {
print "\074d\151v\x20\x63\154\x61ss\075'e\162\162\157\x72'>M\145\163s\x61\147\145\040mus\x74 \x68ave \x6din\x20\062\060\040c\x68\x61ra\143t\145r\163.\x3c\x2fd\x69\x76\x3e";
$error = 1;
} elseif (strlen($message) > 250) {
print "\074d\x69v\040clas\x73='\145\162\x72\157\x72'\x3e\115\x65s\163\141\x67\x65\040\x6du\x73\164 \x68\141\166\x65\040ma\170 \x32\x35\x30\040\x63\x68\x61\162\x61\x63t\x65\162\x73\056\074\x2f\x64i\166\x3e";
$error = 1;
} elseif ($_SESSION['chkvalue'] != $captcha) {
print "\074d\x69v\040\143\x6c\x61\163\x73='\x65rror'\076\111\x6eval\x69d \166\145\x72if\x69c\x61\164\151o\x6e\040ima\147\145\x20c\157d\x65\056\x3c\057\x64\x69v>";
$error = 1;
}
if ($error != 1) {
print "\x3c\144\x69v\040\x63\x6cas\163\x3d'\x73\x75\143\x63\145\x73s'\076\131\157\x75\040h\x61v\x65\040\x62\x65e\x6e\x20s\165c\x63e\163s\x66\x75lly s\x65\x6e\144\x20\x43\x6f\x6e\164\x61\143\164\040fo\x72\155\x3c/d\151v\x3e";
$msquery1 = mssql_query("\x53\x45\124 I\104E\116\x54I\x54\x59\137IN\x53E\x52\124\040\105\127\x44\103\157\x6e\x74\x61\x63\164\040OFF");
$msquery2 = mssql_query("\111\116\123\105\122\x54\040\111\x4eTO E\127DCo\156\164act \x28\x61\x63\143\x6f\x75\156\164,\x73\145n\144\x65\x72_\x65m\x61i\154\x2c\x73u\142\152e\x63\164\x2c\x6des\x73a\x67\145\054c_\144\141t\145,i\160) \x56AL\x55\105S \x28'$sender'\054'$email'\x2c'$subject','$message'\054'$data','$ipi'\x29");
}
}
Function Calls
session_start | 1 |
Stats
MD5 | 8e4341a20267b5722c22a5a529592ca5 |
Eval Count | 0 |
Decode Time | 53 ms |