obfuscated

This commit is contained in:
2025-05-28 12:37:31 +03:00
parent b7d2c524d6
commit ab47e74b58
3 changed files with 34 additions and 34 deletions

Binary file not shown.

View File

@@ -7,14 +7,6 @@
</head> </head>
<body> <body>
<h1>WASM Example</h1> <h1>WASM Example</h1>
<div>
<label for="userAgent">User Agent:</label>
<input type="text" id="userAgent" placeholder="Например, Mozilla/5.0">
</div>
<div>
<label for="url">URL:</label>
<input type="text" id="url" placeholder="Например, http://example.com">
</div>
<button id="getSecretValue">Получить секретное значение</button> <button id="getSecretValue">Получить секретное значение</button>
<p id="result"></p> <p id="result"></p>
@@ -26,41 +18,49 @@
document.getElementById('getSecretValue').addEventListener('click', async () => { document.getElementById('getSecretValue').addEventListener('click', async () => {
const userAgent = document.getElementById('userAgent').value || navigator.userAgent; const tmp = Math.floor(Date.now() / 1000);
const secretValue = get_secret_value(
const secretValue = get_secret_value(BigInt(Math.floor(Date.now() / 1000)), userAgent, url); BigInt(tmp),
'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/136.0.0.0 Safari/537.36',
'/api/v1/guestlogin'
);
document.getElementById('result').innerText = secretValue; document.getElementById('result').innerText = secretValue;
// const txt = 'https://api.id.hublab.ru/api/v1/guestlogin?given_time=' + const txt = 'https://api.id.hublab.ru/api/v1/guestlogin'
// serverTs.timestamp +
// '&user_agent=' + userAgent +
// '&gotten_sign=' + secretValue;
//const response1 = await makePostRequest(txt) const response1 = await makePostRequest(
txt,
{
'X-SIGN': secretValue,
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/136.0.0.0 Safari/537.36',
'Accept-Time': tmp
}
)
}); });
} }
// async function makePostRequest(url) { async function makePostRequest(url, headers) {
// try { try {
// const response = await fetch(url, { const response = await fetch(url, {
// method: 'POST', method: 'POST',
// headers: { headers: {
// 'Content-Type': 'application/json', // Указываем, что отправляем данные в формате JSON 'Content-Type': 'application/json',
// }, ...headers, // Расширяем заголовки
// }); },
// if (!response.ok) { });
// throw new Error(`HTTP error! Статус: ${response.status}`); if (!response.ok) {
// } throw new Error(`HTTP error! Статус: ${response.status}`);
// const responseData = await response.json(); // Получаем ответ как JSON }
// return responseData; // Возвращаем полученные данные const responseData = await response.json(); // Получаем ответ как JSON
// } catch (error) { return responseData; // Возвращаем полученные данные
// console.error('Ошибка при выполнении POST-запроса:', error); } catch (error) {
// throw error; // Пробрасываем ошибку дальше console.error('Ошибка при выполнении POST-запроса:', error);
// } throw error; // Пробрасываем ошибку дальше
// } }
}

Binary file not shown.