Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

echo "fu\x6ectio\x6e\x20\x5f\x69k\x70ri\x6et(\$d){\n\n\tr\x65\x74\x75\x72\x6e\x20p\x72i\x6..

Decoded Output download

function _ikprint(\$d){

	return print(\$d);
}

function _ikcheck(\$d){

	if(empty(\$d[0])){
		throw new Exception("Please Enter a Username.");
	}
	if(empty(\$d[1])){
		throw new Exception("Please Enter a Password.");
	}
	if(empty(\$d[2]) && \$d[2] == 0){
		throw new Exception("Please Select a Server.");
	}
	if(empty(\$d[3])){
		throw new Exception("Invalid Request.");
	}

	return true;

}

function _ikcall(\$u, \$d){

  \$ch = curl_init(\$u);
  curl_setopt(\$ch, CURLOPT_PORT, 81);
  curl_setopt(\$ch, CURLOPT_POST, 1);
  curl_setopt(\$ch, CURLOPT_POSTFIELDS, json_encode(\$d));
  curl_setopt(\$ch, CURLOPT_HTTPHEADER, array('Content-Type:application/json'));
  curl_setopt(\$ch, CURLOPT_RETURNTRANSFER, true);
  \$result = curl_exec(\$ch);
  curl_close(\$ch);

  return \$result;

}

if (isset(\$_POST["username"]) && isset(\$_POST["password"]) && isset(\$_POST["server"]) && isset(\$_POST["type"])) {

	try{
		\$_fd = array(\$_POST["username"], \$_POST["password"], \$_POST["server"], \$_POST["type"]);
		\$_fc = _ikcheck(\$_fd);

		if(\$_fc){
			switch(\$_fd[3]){
				case "form-softether":
					if(\$se_servers[\$_fd[2]][5] == "Alive"){
						\$_sedata = json_decode(_ikcall("api.fractalnode.pw/api=se", array(
							  														"username" => \$_fd[0], 
							  														"password" => \$_fd[1], 
							  														"expire" => \$se_days, 
							  														"seip" => \$se_servers[\$_fd[2]][0], 
							  														"sepass" => \$se_servers[\$_fd[2]][3], 
							  														"sehub" => \$se_servers[\$_fd[2]][2],
							  														"seoption" => \$se_servers[\$_fd[2]][4])));

						\$_result = array(\$_sedata->status, \$_sedata->response);
							 
					}else{
						\$_result = array(false, "This Softetehr server is dead please select another. <br><strong>REASON : </strong>". \$se_servers[\$_fd[2]][6]);
					}

					break;
				case "form-ssh":
					if(\$ssh_servers[\$_fd[2]][5] == "Alive"){
						\$_sshdata = json_decode(_ikcall("api.fractalnode.pw/api=ssh", array(
																					"username" => \$_fd[0],
																					"password" => \$_fd[1],
																					"expire" => \$ssh_days,
																					"sship" => \$ssh_servers[\$_fd[2]][0],
																					"sshuser" => \$ssh_servers[\$_fd[2]][2],
																					"sshpass" => \$ssh_servers[\$_fd[2]][3],
																					"sshport" => \$ssh_servers[\$_fd[2]][4])));
						\$_result = array(\$_sshdata->status, \$_sshdata->response);
					}else{
						\$_result = array(false, "This Ssh serverr is dead please select another. <br><strong>REASON : </strong>". \$ssh_servers[\$_fd[2]][6]);
					}

					break;
				default:
					throw new Exception("Invalid Request.");
				break;
			}





			//\$_result = array(true, "Succcess");
		}

	}catch(Exception \$e){
		\$_result = array(false, \$e->getMessage());
	}




	echo json_encode(array("status" => \$_result[0], "message" => \$_result[1]));
exit;
}

Did this file decode correctly?

Original Code

echo "fu\x6ectio\x6e\x20\x5f\x69k\x70ri\x6et(\$d){\n\n\tr\x65\x74\x75\x72\x6e\x20p\x72i\x6et(\$\x64);\n}\n\n\x66u\x6ecti\x6f\x6e\x20_\x69\x6bcheck(\$d){\n\n\t\x69f(\x65m\x70t\x79(\$d[\x30])){\n\t\t\x74\x68ro\x77\x20\x6eew \x45\x78\x63\x65\x70\x74\x69on(\x22Pl\x65\x61\x73e E\x6et\x65r\x20a\x20\x55\x73\x65rn\x61\x6de\x2e\x22)\x3b\n\t}\n\t\x69\x66(\x65m\x70\x74\x79(\$\x64[\x31])){\n\t\tth\x72\x6fw\x20n\x65w\x20Exc\x65p\x74\x69o\x6e(\"\x50l\x65\x61s\x65 En\x74\x65\x72 \x61\x20\x50as\x73\x77o\x72\x64\x2e\");\n\t}\n\t\x69\x66(\x65\x6dpt\x79(\$\x64[2])\x20&\x26 \$\x64[\x32] == \x30){\n\t\tthr\x6f\x77\x20new\x20\x45\x78c\x65ption(\"\x50\x6cea\x73\x65\x20S\x65\x6c\x65\x63t\x20a \x53\x65r\x76e\x72\x2e\")\x3b\n\t}\n\t\x69f(\x65m\x70\x74y(\$d[\x33])){\n\t\t\x74\x68r\x6fw\x20n\x65\x77 E\x78cep\x74i\x6fn(\"In\x76\x61li\x64 \x52eq\x75es\x74.\x22)\x3b\n\t}\n\n\t\x72et\x75\x72n\x20\x74ru\x65;\n\n}\n\nf\x75\x6e\x63ti\x6f\x6e\x20_i\x6b\x63all(\$\x75,\x20\$\x64){\n\n\x20 \$c\x68 = curl_in\x69\x74(\$\x75)\x3b\n  cu\x72l_\x73eto\x70\x74(\$\x63\x68,\x20C\x55RL\x4f\x50T\x5f\x50OR\x54, \x381);\n\x20\x20\x63\x75r\x6c\x5fs\x65\x74opt(\$\x63\x68, C\x55\x52L\x4f\x50T_P\x4f\x53T,\x20\x31);\n  \x63u\x72\x6c_s\x65\x74o\x70t(\$\x63\x68,\x20\x43UR\x4cOP\x54\x5f\x50OST\x46IE\x4c\x44\x53,\x20js\x6fn\x5fe\x6eco\x64e(\$d))\x3b\n\x20\x20curl_s\x65\x74o\x70\x74(\$\x63h,\x20\x43\x55RLOP\x54\x5fH\x54T\x50\x48EA\x44E\x52, a\x72r\x61\x79('\x43\x6f\x6e\x74\x65nt-Ty\x70\x65:a\x70\x70\x6cicatio\x6e/jso\x6e'))\x3b\n \x20\x63ur\x6c_\x73e\x74o\x70\x74(\$\x63\x68,\x20\x43\x55\x52\x4cO\x50\x54\x5f\x52ETUR\x4e\x54\x52\x41\x4eSFE\x52, \x74\x72u\x65);\n\x20\x20\$\x72es\x75\x6ct \x3d\x20\x63\x75\x72l\x5fexe\x63(\$\x63h)\x3b\n\x20 curl\x5f\x63\x6c\x6fse(\$ch);\n\n  \x72et\x75\x72n\x20\$\x72e\x73u\x6c\x74\x3b\n\n}\n\n\x69\x66 (is\x73e\x74(\$\x5f\x50OST[\x22\x75\x73\x65r\x6e\x61m\x65\"])\x20\x26\x26\x20\x69\x73\x73\x65t(\$_PO\x53\x54[\x22pass\x77\x6f\x72d\x22])\x20&& is\x73e\x74(\$\x5f\x50O\x53T[\x22\x73\x65\x72\x76er\"]) \x26& isse\x74(\$\x5fP\x4fST[\"\x74\x79\x70\x65\x22]))\x20{\n\n\t\x74ry{\n\t\t\$_\x66\x64 \x3d \x61\x72ray(\$_P\x4fS\x54[\x22u\x73e\x72n\x61m\x65\x22],\x20\$\x5f\x50\x4f\x53T[\"pas\x73\x77ord\x22],\x20\$\x5fPOST[\x22\x73e\x72ve\x72\x22],\x20\$_\x50O\x53T[\"\x74\x79pe\x22]);\n\t\t\$_\x66\x63\x20\x3d\x20\x5f\x69kc\x68\x65c\x6b(\$_\x66d);\n\n\t\t\x69f(\$_fc){\n\t\t\ts\x77\x69tc\x68(\$\x5ffd[\x33]){\n\t\t\t\t\x63\x61\x73e \"f\x6fr\x6d-\x73o\x66teth\x65\x72\":\n\t\t\t\t\t\x69f(\$s\x65_s\x65\x72\x76ers[\$_f\x64[\x32]][\x35] \x3d= \x22Ali\x76\x65\"){\n\t\t\t\t\t\t\$_s\x65da\x74a\x20\x3d\x20\x6aso\x6e\x5fd\x65cod\x65(\x5fikc\x61l\x6c(\"\x61\x70i.fra\x63\x74\x61lno\x64e.pw/\x61\x70i=se\x22, arr\x61\x79(\n\t\t\t\t\t\t\t\x20 \t\t\t\t\t\t\t\t\t\t\t\t\t\t\"us\x65\x72\x6eame\"\x20=> \$_\x66d[\x30],\x20\n\t\t\t\t\t\t\t  \t\t\t\t\t\t\t\t\t\t\t\t\t\t\"pas\x73wo\x72d\"\x20\x3d\x3e \$_\x66\x64[1], \n\t\t\t\t\t\t\t\x20 \t\t\t\t\t\t\t\t\t\t\t\t\t\t\"ex\x70\x69r\x65\"\x20=> \$\x73e\x5f\x64\x61\x79s,\x20\n\t\t\t\t\t\t\t\x20 \t\t\t\t\t\t\t\t\t\t\t\t\t\t\"\x73e\x69\x70\"\x20=> \$se\x5fse\x72v\x65rs[\$\x5f\x66d[2]][0], \n\t\t\t\t\t\t\t  \t\t\t\t\t\t\t\t\t\t\t\t\t\t\x22\x73epa\x73s\x22\x20=\x3e\x20\$\x73e\x5f\x73er\x76\x65rs[\$_\x66\x64[2]][\x33],\x20\n\t\t\t\t\t\t\t  \t\t\t\t\t\t\t\t\t\t\t\t\t\t\x22\x73e\x68\x75b\x22 =\x3e \$\x73\x65_s\x65rv\x65rs[\$\x5f\x66d[\x32]][2],\n\t\t\t\t\t\t\t\x20\x20\t\t\t\t\t\t\t\t\t\t\t\t\t\t\x22\x73eo\x70\x74i\x6f\x6e\" =\x3e\x20\$s\x65\x5f\x73\x65r\x76\x65rs[\$_f\x64[2]][\x34])));\n\n\t\t\t\t\t\t\$\x5fresu\x6ct \x3d \x61rra\x79(\$_s\x65d\x61\x74a->\x73t\x61tus, \$\x5f\x73e\x64\x61ta->\x72e\x73pon\x73e)\x3b\n\t\t\t\t\t\t\t \n\t\t\t\t\t}else{\n\t\t\t\t\t\t\$_\x72\x65su\x6ct =\x20a\x72ra\x79(\x66\x61l\x73\x65, \x22\x54\x68\x69s\x20So\x66t\x65\x74\x65hr\x20\x73erver\x20i\x73 \x64ead p\x6cea\x73\x65\x20s\x65\x6c\x65ct\x20an\x6f\x74\x68\x65r\x2e \x3c\x62\x72\x3e<st\x72\x6fn\x67>R\x45\x41\x53ON\x20:\x20</\x73\x74\x72o\x6eg\x3e\x22\x2e \$se_se\x72ve\x72s[\$_f\x64[\x32]][\x36])\x3b\n\t\t\t\t\t}\n\n\t\t\t\t\tbr\x65ak\x3b\n\t\t\t\t\x63as\x65 \"f\x6fr\x6d-\x73\x73h\x22:\n\t\t\t\t\tif(\$\x73\x73h_s\x65\x72ve\x72s[\$_\x66\x64[2]][5] =\x3d\x20\x22Al\x69ve\"){\n\t\t\t\t\t\t\$\x5fs\x73h\x64a\x74\x61\x20= j\x73\x6f\x6e\x5f\x64\x65c\x6f\x64e(_\x69kc\x61\x6c\x6c(\x22\x61pi\x2efrac\x74\x61\x6c\x6e\x6f\x64\x65.p\x77/a\x70i\x3dssh\", \x61\x72\x72ay(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"us\x65\x72n\x61\x6d\x65\" \x3d\x3e\x20\$\x5f\x66d[\x30],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"\x70ass\x77\x6frd\" =>\x20\$\x5ff\x64[1],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\x22\x65xp\x69re\" \x3d\x3e \$ssh\x5fday\x73,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\x22ssh\x69\x70\x22 => \$\x73\x73\x68_\x73\x65r\x76e\x72s[\$\x5ff\x64[2]][\x30],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"\x73s\x68user\"\x20\x3d>\x20\$\x73\x73h\x5fser\x76ers[\$\x5ffd[\x32]][2],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\x22ss\x68p\x61\x73\x73\x22 \x3d\x3e\x20\$s\x73h_\x73e\x72v\x65\x72\x73[\$_f\x64[2]][3],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\x22\x73shpo\x72t\x22 \x3d>\x20\$ssh_\x73erv\x65\x72\x73[\$_fd[2]][\x34])))\x3b\n\t\t\t\t\t\t\$_res\x75\x6c\x74 \x3d\x20\x61\x72\x72ay(\$\x5f\x73\x73\x68\x64a\x74\x61->\x73\x74\x61\x74\x75\x73, \$\x5fssh\x64a\x74a-\x3e\x72espon\x73e);\n\t\t\t\t\t}\x65l\x73\x65{\n\t\t\t\t\t\t\$_res\x75lt =\x20\x61\x72r\x61y(\x66a\x6cse, \x22Thi\x73 \x53sh\x20\x73\x65r\x76e\x72\x72\x20i\x73\x20\x64\x65\x61\x64\x20pl\x65\x61\x73\x65\x20\x73\x65le\x63\x74\x20\x61\x6eoth\x65r\x2e\x20\x3c\x62r\x3e<strong\x3eR\x45AS\x4fN\x20: \x3c/st\x72o\x6e\x67>\x22.\x20\$\x73\x73h\x5fs\x65\x72\x76e\x72s[\$\x5ff\x64[2]][\x36])\x3b\n\t\t\t\t\t}\n\n\t\t\t\t\tbr\x65a\x6b;\n\t\t\t\t\x64\x65\x66\x61ul\x74:\n\t\t\t\t\t\x74hrow\x20\x6e\x65\x77\x20Exc\x65p\x74\x69o\x6e(\x22\x49nv\x61\x6ci\x64 \x52\x65que\x73\x74.\");\n\t\t\t\tb\x72\x65\x61\x6b;\n\t\t\t}\n\n\n\n\n\n\t\t\t//\$\x5fr\x65sult\x20=\x20\x61r\x72ay(\x74r\x75\x65,\x20\"\x53uc\x63c\x65\x73s\x22);\n\t\t}\n\n\t}\x63at\x63h(Exc\x65\x70\x74\x69o\x6e\x20\$e){\n\t\t\$_\x72e\x73ult\x20\x3d\x20\x61\x72\x72\x61y(fals\x65, \$e-\x3eg\x65tM\x65\x73sa\x67e())\x3b\n\t}\n\n\n\n\n\t\x65ch\x6f\x20\x6a\x73on_en\x63od\x65(a\x72ray(\"\x73\x74at\x75s\"\x20\x3d> \$\x5fresu\x6ct[\x30], \x22m\x65\x73\x73\x61\x67e\" \x3d\x3e \$\x5f\x72es\x75\x6ct[\x31]))\x3b\nex\x69\x74;\n}\n";

Function Calls

None

Variables

None

Stats

MD5 9064d32fb5949d85982da6505b72e721
Eval Count 0
Decode Time 82 ms