Repository navigation
Expand file tree
/
Copy pathadmin_fix.php
More file actions
41 lines (35 loc) · 1.59 KB
/
Copy pathadmin_fix.php
File metadata and controls
41 lines (35 loc) · 1.59 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<?php
/**
* Admin Password Fixer / Initializer
* This script will reset the admin user credentials to your custom requirements.
*/
require_once 'includes/db.php';
$username = 'ExploitInject_Official';
$password = 'tanim@20112018$hacker#007';
$hashed_password = password_hash($password, PASSWORD_DEFAULT);
$email = 'support@exploitinject.dev';
try {
// Check if admin exists
$stmt = $pdo->prepare("SELECT id FROM admins WHERE username = ?");
$stmt->execute([$username]);
$admin = $stmt->fetch();
if ($admin) {
// Update existing admin
$stmt = $pdo->prepare("UPDATE admins SET password = ?, email = ? WHERE username = ?");
$stmt->execute([$hashed_password, $email, $username]);
echo "<h2 style='color: #00f2ff;'>Admin credentials updated successfully!</h2>";
} else {
// Insert new admin
$stmt = $pdo->prepare("INSERT INTO admins (username, password, email) VALUES (?, ?, ?)");
$stmt->execute([$username, $hashed_password, $email]);
echo "<h2 style='color: #00f2ff;'>New Admin user created successfully!</h2>";
}
echo "<p style='color: #e0e0e0;'>Username: <strong>$username</strong></p>";
echo "<p style='color: #e0e0e0;'>Password: <strong>$password</strong></p>";
echo "<hr>";
echo "<p style='color: #ff0055; font-weight: bold;'>IMPORTANT: Delete this file (admin_fix.php) from your server immediately for security!</p>";
echo "<a href='admin/login.php' style='color: #00f2ff;'>Go to Admin Login</a>";
} catch (PDOException $e) {
die("<h2 style='color: #ff0055;'>Error: " . $e->getMessage() . "</h2>");
}
?>