- Клиентская часть Vue 3 + Vite - Серверная часть Node.js + WebSocket - Система авторизации и смен - Управление игровыми портами - Поддержка тем (светлая/темная) - Адаптивный дизайн 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
61 lines
2.1 KiB
JavaScript
61 lines
2.1 KiB
JavaScript
const crypto = require('crypto');
|
||
|
||
// Проверяем какие пароли соответствуют хешам
|
||
const passwords = ['12345', '123456', 'admin', 'password', '1234567890', 'qwerty'];
|
||
const hashes = {
|
||
'79026527096': 'f6802e51311da804da52cbe7581e6126',
|
||
'79616613126': '4db53c0698d4b6266eab1b6010854758'
|
||
};
|
||
|
||
console.log('=== ПРОВЕРКА ПАРОЛЕЙ ===\n');
|
||
|
||
// Функция MD5 хеширования
|
||
function md5(text) {
|
||
return crypto.createHash('md5').update(text).digest('hex');
|
||
}
|
||
|
||
// Функция хеширования паролей как в системе
|
||
function hashPassword(password) {
|
||
// Шаг 1: MD5 от пароля
|
||
const firstHash = crypto.createHash('md5').update(password).digest('hex');
|
||
// Шаг 2: MD5 от (первый_хэш + "pult2024")
|
||
const finalHash = crypto.createHash('md5').update(firstHash + "pult2024").digest('hex');
|
||
return finalHash;
|
||
}
|
||
|
||
// Проверяем каждый пароль
|
||
for (const [phone, hash] of Object.entries(hashes)) {
|
||
console.log(`Пользователь ${phone} (хеш: ${hash}):`);
|
||
|
||
for (const password of passwords) {
|
||
const testHash = hashPassword(password);
|
||
if (testHash === hash) {
|
||
console.log(`✅ Пароль найден: ${password}`);
|
||
break;
|
||
}
|
||
}
|
||
|
||
// Также проверим комбинации с номером телефона
|
||
const phonePasswords = [
|
||
phone,
|
||
phone.slice(-4),
|
||
phone.slice(-6),
|
||
'123' + phone.slice(-4)
|
||
];
|
||
|
||
for (const password of phonePasswords) {
|
||
const testHash = hashPassword(password);
|
||
if (testHash === hash) {
|
||
console.log(`✅ Пароль найден (на основе телефона): ${password}`);
|
||
break;
|
||
}
|
||
}
|
||
|
||
console.log('');
|
||
}
|
||
|
||
// Проверяем что дает хеширование
|
||
console.log('\nДля справки:');
|
||
console.log('hashPassword("12345") =', hashPassword('12345'));
|
||
console.log('hashPassword("123456") =', hashPassword('123456'));
|
||
console.log('hashPassword("1234567890") =', hashPassword('1234567890')); |