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 /* */$OOO000000=urldecode('%66%67%36%73%62%65%68%70%72%61%34%63%6f%5f%74%6e%64');$O..

Decoded Output download


session_start();
require '../../db_connection.php';
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
$newUserName = $_POST['newUserName'];
$newUserPassword = $_POST['newUserPassword'];
$newUserAdminRights = $_POST['newUserAdminRights'];
if (empty($newUserName) ||empty($newUserPassword)) {
$_SESSION['error_message'] = "Benutzername und Passwort drfen nicht leer sein.";
header("Location: ".($phpenable === 'true'?$siteurl .$admin_directory .$users_url_admin .'.php': $siteurl .$admin_directory .$users_url_admin));
exit;
}
if (preg_match('/^\d/',$newUserName) ||strpos($newUserName,' ') !== false) {
$_SESSION['error_message'] = "Benutzername darf keine Zahlen am Anfang und keine Leerzeichen enthalten.";
header("Location: ".($phpenable === 'true'?$siteurl .$admin_directory .$users_url_admin .'.php': $siteurl .$admin_directory .$users_url_admin));
exit;
}
$checkUsernameQuery = "SELECT id FROM benutzer WHERE name = ?";
$checkUsernameStmt = $conn->prepare($checkUsernameQuery);
$checkUsernameStmt->bind_param("s",$newUserName);
$checkUsernameStmt->execute();
$checkUsernameResult = $checkUsernameStmt->get_result();
if ($checkUsernameResult->num_rows >0) {
$_SESSION['error_message'] = "Benutzername ist bereits vergeben. Bitte whle einen anderen.";
header("Location: ".($phpenable === 'true'?$siteurl .$admin_directory .$users_url_admin .'.php': $siteurl .$admin_directory .$users_url_admin));
exit;
}
$generatedAccountNumber = generateUniqueAccountNumber();
$hashedPassword = password_hash($newUserPassword,PASSWORD_DEFAULT);
$insertUserQuery = "INSERT INTO benutzer (kontonummer, name, password, admin, gesperrt) VALUES (?, ?, ?, ?, 0)";
$insertUserStmt = $conn->prepare($insertUserQuery);
$insertUserStmt->bind_param("issi",$generatedAccountNumber,$newUserName,$hashedPassword,$newUserAdminRights);
if ($insertUserStmt->execute()) {
$roleLabel = ($newUserAdminRights == 1) ?'Admin': 'Mitglied';
$infoMessage = "Benutzername: $newUserName, Rolle: $roleLabel, Kontonummer: $generatedAccountNumber";
$_SESSION['info_message'] = $infoMessage;
$_SESSION['success_message'] = "Benutzer erfolgreich hinzugefgt.";
}else {
$_SESSION['error_message'] = "Fehler beim Hinzufgen des Benutzers: ".$insertUserStmt->error;
}
$checkUsernameStmt->close();
$insertUserStmt->close();
$conn->close();
header("Location: ".($phpenable === 'true'?$siteurl .$admin_directory .$users_url_admin .'.php': $siteurl .$admin_directory .$users_url_admin));
exit;
}else {
header("Location: ".($phpenable === 'true'?$siteurl .$admin_directory .$users_url_admin .'.php': $siteurl .$admin_directory .$users_url_admin));
exit;
}
function generateUniqueAccountNumber()
{
global $conn;
do {
$generatedAccountNumber = mt_rand(1000000,9999999);
$checkAccountNumberQuery = "SELECT id FROM benutzer WHERE kontonummer = ?";
$checkAccountNumberStmt = $conn->prepare($checkAccountNumberQuery);
$checkAccountNumberStmt->bind_param("i",$generatedAccountNumber);
$checkAccountNumberStmt->execute();
$checkAccountNumberResult = $checkAccountNumberStmt->get_result();
}while ($checkAccountNumberResult->num_rows >0);
return $generatedAccountNumber;
}
;

Did this file decode correctly?

Original Code

<?php /*  */$OOO000000=urldecode('%66%67%36%73%62%65%68%70%72%61%34%63%6f%5f%74%6e%64');$OOO0000O0=$OOO000000{4}.$OOO000000{9}.$OOO000000{3}.$OOO000000{5};$OOO0000O0.=$OOO000000{2}.$OOO000000{10}.$OOO000000{13}.$OOO000000{16};$OOO0000O0.=$OOO0000O0{3}.$OOO000000{11}.$OOO000000{12}.$OOO0000O0{7}.$OOO000000{5};$OOO000O00=$OOO000000{0}.$OOO000000{12}.$OOO000000{7}.$OOO000000{5}.$OOO000000{15};$O0O000O00=$OOO000000{0}.$OOO000000{1}.$OOO000000{5}.$OOO000000{14};$O0O000O0O=$O0O000O00.$OOO000000{11};$O0O000O00=$O0O000O00.$OOO000000{3};$O0O00OO00=$OOO000000{0}.$OOO000000{8}.$OO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MjaAfqFwGU7SFq1/eq+weA4dB5yhGqN/GpEIu+FIGcjzfApdB5ywec+b7cEweA4ekoyzG+KdB57R7YvbBbrdBq1/eq+weA4dB5yhGqN/GpEIu+FIGcjzfApdB5ywec+b7cEweA4ekoyzG+KgxyWBVn5/esWB7jgI7nKhfqJzk5aIknKIeAmwunnzV+TwGnYhkcHwGpjM7nNhVnFgBygCLJ7zu6PhGLaAucHzV5WBVqHdO4gAuw+zVnFheq+I2oDhk68z7q3wG8PIedaSxYNwo6FhGpygt2L0tlL0tl43Myp3Myp3xyWBPqD/unD/joDhk68z7q3wG8PIeAqwGnFCxl6dBAMqUTos8sa/Gsaq+ASMxYPIGp8wOJ+bPYex2nxqxY9zkpjzkp8zG8+bPl6dtiP3Lvyhkm+hkNYhkcHwGpjM7nNhVnFUfqNwBl6dBqDzkpKRMpLbVnLheA+gBqD/unD/joDhk68z7q3wG8PIeAqwGnFCxyWBPqD/unD/joDhk68z7q3wG8PIeAMwu8jRMpP/GpyefYmbVoNgBAJdPLyIknKIeAmwunysGcDzfnKw2p8zGA+bPyWBPqD/unD/joDhk68z7q3wG8PIeAMwu8jRMp+CunDweq+gByWBPqD/unD/joDhk68z7q3wG8PIeAxIec8zOsaSxlyhkm+hkNYhkcHwGpjM7nNhVnFUfqNwBjQIknjefA+bfn4wBaJ3LJ6wkmJzuUagBqD/unD/joDhk68z7q3wG8PIeAxIec8zOsNSVp8zn6Fzfw1dt5LgM4gbVnjweAKdBq7IGp+bVojIGqYhkcHwGpjM7nNhVnF3LJ6BD4=VfH\drCPZWBQakN

Function Calls

time 2
fopen 1
fread 3
strtr 2
fclose 1
urldecode 1
str_replace 1
base64_decode 3

Variables

$O000O0O00 True
$O0O000O00 fgets
$O0O000O0O fgetc
$O0O00OO00 fread
$OO00O0000 4152
$OO00O00O0 session_start(); require '../../db_connection.php'; if ($_S..
$OOO000000 fg6sbehpra4co_tnd
$OOO00000O strtr
$OOO0000O0 base64_decode
$OOO000O00 fopen
$OOO0O0O00 index.php

Stats

MD5 c208f78480de2833dcc4ea38d79480c0
Eval Count 3
Decode Time 120 ms