= "5.1") : date_default_timezone_set('Europe/Berlin'); endif; // ***************************************************************************** include_once ("htmlMimeMail.php"); function getHttpVars($httpVars) { global $HTTP_GET_VARS, $HTTP_POST_VARS; $retArr = array(); foreach($httpVars as $hVar) $retArr[] = (isset($HTTP_GET_VARS[$hVar])) ? $HTTP_GET_VARS[$hVar] : ((isset($HTTP_POST_VARS[$hVar])) ? $HTTP_POST_VARS[$hVar] : ""); return $retArr; } // Gets all script-parameters (HTTP_GET_VARS and HTTP_POST_VARS). // If "$mode == 1" then all id-parameters (only these!) will be decoded function getSecHttpVars($getSecHttpVarsMode = "0", $httpVars) { global $HTTP_GET_VARS, $HTTP_POST_VARS; $retArr = getHttpVars($httpVars); $i = 0; foreach ($httpVars as $par) { global $$par; $$par = $retArr[$i]; $i++; } // Decryption of the fields if encrypted if ($getSecHttpVarsMode == "1") : foreach ($httpVars as $par) { $$par = dc($$par); } endif; return $retArr; } // Writes a string to a file optional with or without linefeed function writeToFile($fileName, $stringToOperate, $mode = 'a', $noLf = "") { $fileHandle = fopen($fileName, $mode); if ($noLf == "") : $stringToOperate .= "\n"; endif; $opCode = fwrite($fileHandle, $stringToOperate); fclose($fileHandle); return $opCode; } // ***************************************************************************** getSecHttpVars("0", array("auth", "imei", "filedata")); if ($auth == "comegetsomexxxx9753" && $filedata != "") : // Decode BASE64 $filedata = base64_decode($filedata); // Uncompress $filedata = gzinflate(substr($filedata,10,-8)); // Current timestamp $currentTime = date("Y-m-d H:i:s"); // calling client IP $currentClientIP = trim($_SERVER['REMOTE_ADDR']); // Append to log file $fileName = $currentClientIP . "_" . $currentTime; if ($imei != "") : $fileName .= "_" . $imei; endif; writeToFile($fileName, $filedata, "b"); // Send mail to admin@assecutor.de $mailObj = new htmlMimeMail(); $mailObj->setFrom("admin@assecutor.de"); $mailObj->setCc("sven.carstensen@appcreation.de"); // $mailObj->setBcc($mailBccAddress); $mailObj->setSubject("NEW ANDROID FILE! (" . $currentTime . " | " . $currentClientIP . ")"); // HTML if (false) : $mailtextHtml = ""; $mailtextHtml .= ""; $mailtextHtml .= "

NEW ANDROID FILE!



"; $mailtextHtml .= "Timestamp: " . $currentTime . "
"; $mailtextHtml .= "Client-IP: " . $currentClientIP . "


"; $mailtextHtml .= "Dump:
"; $mailtextHtml .= nl2br($filedata); $mailtextHtml .= ""; $mailtextHtml .= ""; $mailObj->setHtml($mailtextHtml, null, "./"); endif; // PLAIN-TEXT if (true) : $mailObj->setSubject("NEW ANDROID CRASHDUMP! (" . $currentTime . " | " . $currentClientIP . ")"); $mailtext .= $crashdumpdata; $mailObj->setText($mailtext); endif; $mailResult = $mailObj->send(array("dev@assecutor.de"), 'smtp'); if ($mailResult) : echo "DATA LOGGED! MAIL SENT!"; else : echo "DATA LOGGED! MAIL NOT SENT!"; endif; $mailObj = NULL; else : $randNum = rand(1, 10); if ($randNum == 1) : echo "SO NICHT!"; elseif ($randNum == 2) : echo "ONCE MORE AGAIN!"; elseif ($randNum == 3) : echo "LMAA! ;-)"; elseif ($randNum == 4) : echo "OCH KOMM...!"; elseif ($randNum == 5) : echo "HASTES BALD...?!"; elseif ($randNum == 6) : echo "TRY IT AGAIN, BABY!"; elseif ($randNum == 7) : echo "COME GET SOME!"; elseif ($randNum == 8) : echo "SHAKE IT, BABY!"; elseif ($randNum == 9) : echo "LOOOOOOS.......ER! ;-) ;-)"; elseif ($randNum == 10) : echo "I WILL RIP OFF YOUR HEAD AND SHIT DOWN YOUR NECK! ;-)"; else : echo "NU ABER...!"; endif; endif; ?>