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 goto KKOz1; f790R: require "\56\56\x2f\x64\141\164\141\142\141\x73\x65\57\x64\x62\..
Decoded Output download
<?php
goto KKOz1; f790R: require "../database/db_connect.php"; goto wCzxE; KKOz1: session_start(); goto f790R; wCzxE: if ($_SERVER["REQUEST_METHOD"] == "POST") { $badge_nr = $_POST["login-username"]; $adgangskode = $_POST["login-password"]; $sql = "SELECT * FROM brugere WHERE badge_nr=?"; $stmt = $conn->prepare($sql); $stmt->bind_param("s", $badge_nr); $stmt->execute(); $result = $stmt->get_result(); if ($result->num_rows > 0) { $row = $result->fetch_assoc(); if (password_verify($adgangskode, $row["adgangskode"])) { $_SESSION["user_id"] = $row["id"]; $_SESSION["badge_nr"] = $row["badge_nr"]; $_SESSION["rolle"] = $row["rolle"]; $_SESSION["fullname"] = $row["fuldenavn"]; $_SESSION["loggedin"] = true; $_SESSION["avatar"] = $row["avatar"]; $_SESSION["cover"] = $row["cover"]; $_SESSION["teknisk"] = $row["teknisk"]; $jsonData = json_encode(array("badge_nr" => $row["badge_nr"], "fullname" => $row["fuldenavn"], "rolle" => $row["rolle"], "avatar" => $row["avatar"])); ?>
<script>var userData=<?php echo $jsonData; ?>
;sessionStorage.setItem("user_data",JSON.stringify(userData)),window.location.href="../dashboard.php"</script><?php die; } else { echo "Ugyldigt badge nummer eller adgangskode."; } } else { echo "Bruger ikke fundet."; } $stmt->close(); } goto OjFqm; OjFqm: $conn->close(); goto ZVFNO; ZVFNO: ?>
Did this file decode correctly?
Original Code
<?php
goto KKOz1; f790R: require "\56\56\x2f\x64\141\164\141\142\141\x73\x65\57\x64\x62\137\143\x6f\x6e\156\145\x63\x74\56\160\150\x70"; goto wCzxE; KKOz1: session_start(); goto f790R; wCzxE: if ($_SERVER["\122\105\121\125\105\123\x54\137\115\105\x54\x48\x4f\x44"] == "\x50\117\123\124") { $badge_nr = $_POST["\154\x6f\147\151\x6e\x2d\165\163\145\x72\x6e\x61\155\145"]; $adgangskode = $_POST["\x6c\157\147\151\x6e\x2d\160\x61\163\163\167\x6f\x72\144"]; $sql = "\x53\105\114\105\103\124\x20\52\x20\106\x52\x4f\x4d\x20\142\162\165\147\145\x72\x65\x20\x57\x48\x45\x52\105\40\x62\141\144\147\145\x5f\x6e\x72\75\x3f"; $stmt = $conn->prepare($sql); $stmt->bind_param("\163", $badge_nr); $stmt->execute(); $result = $stmt->get_result(); if ($result->num_rows > 0) { $row = $result->fetch_assoc(); if (password_verify($adgangskode, $row["\x61\x64\x67\141\156\x67\163\x6b\x6f\144\145"])) { $_SESSION["\165\163\145\162\137\x69\144"] = $row["\151\144"]; $_SESSION["\142\x61\x64\147\x65\137\x6e\x72"] = $row["\x62\141\144\x67\x65\137\156\162"]; $_SESSION["\x72\157\x6c\154\x65"] = $row["\162\157\154\154\x65"]; $_SESSION["\146\x75\154\x6c\x6e\141\x6d\145"] = $row["\146\165\154\x64\145\156\x61\166\156"]; $_SESSION["\154\157\x67\x67\x65\144\x69\156"] = true; $_SESSION["\141\x76\141\164\141\x72"] = $row["\x61\166\x61\x74\x61\162"]; $_SESSION["\143\x6f\x76\145\162"] = $row["\x63\x6f\166\x65\162"]; $_SESSION["\164\145\153\x6e\151\163\153"] = $row["\164\145\x6b\x6e\151\x73\153"]; $jsonData = json_encode(array("\x62\x61\x64\x67\x65\x5f\x6e\x72" => $row["\142\141\x64\x67\x65\137\x6e\x72"], "\146\x75\x6c\x6c\156\141\x6d\145" => $row["\146\x75\x6c\144\x65\156\x61\x76\x6e"], "\162\157\x6c\154\145" => $row["\x72\157\x6c\154\145"], "\141\166\x61\164\141\162" => $row["\x61\x76\141\164\141\162"])); ?>
<script>var userData=<?php echo $jsonData; ?>
;sessionStorage.setItem("user_data",JSON.stringify(userData)),window.location.href="../dashboard.php"</script><?php die; } else { echo "\125\x67\171\154\x64\151\147\x74\40\142\x61\144\x67\145\x20\x6e\165\155\x6d\x65\162\40\145\154\154\145\x72\40\x61\x64\x67\141\x6e\x67\x73\153\157\144\x65\56"; } } else { echo "\102\162\x75\147\x65\162\x20\x69\153\153\x65\40\x66\165\156\x64\145\x74\x2e"; } $stmt->close(); } goto OjFqm; OjFqm: $conn->close(); goto ZVFNO; ZVFNO: ?>
Function Calls
None |
Stats
MD5 | e463f1d64aafcdb45b3bd5349c278ca9 |
Eval Count | 0 |
Decode Time | 62 ms |