-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
96 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,4 +21,4 @@ npm start | |
``` | ||
|
||
|
||
![alt text](images/1.png) | ||
![alt text](images/1.jpg) |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,83 +1,114 @@ | ||
import axios from "axios"; | ||
// @BTC_USDT | ||
|
||
const Authorization = "<YOUR_HEADER_VALUE>"; | ||
|
||
const Sleep = (ms) => new Promise((res) => setTimeout(res, ms)); | ||
const Authorizations = [ | ||
{ | ||
name: "me", | ||
auth: "Bearer AAAAAAAAAAAAAAAAAAAAAAA", | ||
requests: 0, | ||
errors: 0, | ||
lastTimestamp: 0, | ||
nextTimestamp: 0, | ||
lastTap: 0, | ||
balance: 0, | ||
}, | ||
]; | ||
|
||
const Sleep = (s) => new Promise((res) => setTimeout(res, s * 1000)); | ||
let data = { | ||
count: 10, | ||
availableTaps: 1000, | ||
timestamp: 0, | ||
}; | ||
|
||
function getRandomInt(min = 10, max = 20) { | ||
function genTimestamp(waiter, init) { | ||
return (init && Date.now()) + waiter * 1000; | ||
} | ||
|
||
function getRandomInt(min, max) { | ||
min = Math.ceil(min); | ||
max = Math.floor(max); | ||
return Math.floor(Math.random() * (max - min + 1)) + min; | ||
} | ||
|
||
let counter = 0, | ||
temp; | ||
function banner() { | ||
let authorizationsCloned = structuredClone(Authorizations); | ||
authorizationsCloned.forEach((user) => { | ||
delete user.auth; | ||
delete user.lastTimestamp; | ||
delete user.nextTimestamp; | ||
}); | ||
console.clear(); | ||
console.table(authorizationsCloned); | ||
} | ||
|
||
setInterval(banner, 3_000); | ||
|
||
let temp, Authorization, user; | ||
console.log("\n[+]running...\n\n"); | ||
await Sleep(getRandomInt(3, 15) * 1000); | ||
while (true) { | ||
temp = Date.now(); | ||
data.timestamp = temp; | ||
data.count = getRandomInt(); | ||
// data.availableTaps = data.count * 2 + 1; | ||
temp = await axios | ||
.post("https://api.hamsterkombat.io/clicker/tap", data, { | ||
headers: { | ||
"Content-Type": "application/json", | ||
Authorization, | ||
Accept: "application/json", | ||
"Sec-Ch-Ua": '"Not_A Brand";v="8", "Chromium";v="120"', | ||
"Sec-Ch-Ua-Mobile": "?0", | ||
"User-Agent": | ||
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.6099.199 Safari/537.36", | ||
"Sec-Ch-Ua-Platform": '"Linux"', | ||
Origin: "https://hamsterkombat.io", | ||
"Sec-Fetch-Site": "same-site", | ||
"Sec-Fetch-Mode": "cors", | ||
"Sec-Fetch-Dest": "empty", | ||
Referer: "https://hamsterkombat.io/", | ||
"Accept-Encoding": "gzip, deflate, br", | ||
"Accept-Language": "en-US,en;q=0.9", | ||
Priority: "u=1, i", | ||
Connection: "close", | ||
}, | ||
}) | ||
.then(async (response) => { | ||
++counter; | ||
console.log( | ||
`[${counter}]taps: ${data.count} #balance>>>> ${parseInt( | ||
response.data.clickerUser.balanceCoins | ||
)}` | ||
); | ||
await Sleep(getRandomInt(1, 5) * 1000); | ||
return response.data; | ||
}) | ||
.catch(async (error) => { | ||
console.log("Error:", error); | ||
return false; | ||
}); | ||
for (user of Authorizations) { | ||
await Sleep(0.5); | ||
temp = Date.now(); | ||
if (temp < user.nextTimestamp) continue; | ||
Authorization = user.auth; | ||
data.timestamp = temp; | ||
user.lastTimestamp = temp; | ||
data.count = getRandomInt(10, 20); | ||
// data.availableTaps = data.count * 2 + 1; | ||
temp = await axios | ||
.post("https://api.hamsterkombat.io/clicker/tap", data, { | ||
headers: { | ||
"Content-Type": "application/json", | ||
Authorization, | ||
Accept: "application/json", | ||
"Sec-Ch-Ua": '"Not_A Brand";v="8", "Chromium";v="120"', | ||
"Sec-Ch-Ua-Mobile": "?0", | ||
"User-Agent": | ||
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.6099.199 Safari/537.36", | ||
"Sec-Ch-Ua-Platform": '"Linux"', | ||
Origin: "https://hamsterkombat.io", | ||
"Sec-Fetch-Site": "same-site", | ||
"Sec-Fetch-Mode": "cors", | ||
"Sec-Fetch-Dest": "empty", | ||
Referer: "https://hamsterkombat.io/", | ||
"Accept-Encoding": "gzip, deflate, br", | ||
"Accept-Language": "en-US,en;q=0.9", | ||
Priority: "u=1, i", | ||
Connection: "close", | ||
}, | ||
}) | ||
.then(async (response) => { | ||
++user.requests; | ||
user.lastTap = data.count; | ||
user.balance = Math.floor(response.data.clickerUser.balanceCoins); | ||
user.nextTimestamp = genTimestamp( | ||
getRandomInt(1, 5), | ||
user.nextTimestamp | ||
); | ||
return response.data; | ||
}) | ||
.catch(async (error) => { | ||
++user.errors; | ||
user.nextTimestamp = genTimestamp( | ||
getRandomInt(10, 15), | ||
user.nextTimestamp | ||
); | ||
// console.log(user.name, ">>>>>>Error:", error); | ||
return false; | ||
}); | ||
|
||
if (!temp) { | ||
await Sleep(getRandomInt(10, 20) * 1000); | ||
} else if ( | ||
parseInt(temp.clickerUser.availableTaps) <= | ||
20 * temp.clickerUser.earnPerTap | ||
) { | ||
temp = | ||
Math.ceil( | ||
(temp.clickerUser.earnPerTap * 20) / | ||
Math.ceil(temp.clickerUser.earnPassivePerSec) | ||
) + getRandomInt(3, 10); | ||
console.log(`[WAIT] ${temp}sec...`); | ||
await Sleep(temp * 1000); | ||
continue; | ||
if ( | ||
temp && | ||
Math.floor(temp.clickerUser.availableTaps) <= | ||
20 * temp.clickerUser.earnPerTap | ||
) { | ||
temp = | ||
Math.ceil( | ||
(temp.clickerUser.earnPerTap * 20) / | ||
Math.ceil(temp.clickerUser.earnPassivePerSec) | ||
) + getRandomInt(1, 5); | ||
user.nextTimestamp = genTimestamp(temp, user.nextTimestamp); | ||
} | ||
} | ||
|
||
await Sleep(3000); | ||
await Sleep(2); | ||
} |