HeckerToken-Miner/index.js

37 lines
1.3 KiB
JavaScript
Raw Permalink Normal View History

2024-09-06 14:59:01 -04:00
const http = require('http');
2024-09-04 08:17:41 -04:00
const os = require('os');
const fs = require('fs');
2024-09-04 08:24:15 -04:00
const child = require('child_process');
2024-09-04 08:17:41 -04:00
console.log("HeckerToken Miner");
2024-09-04 08:31:00 -04:00
console.log("---")
console.log("Your platform is" + os.platform)
2024-09-04 08:28:37 -04:00
console.log("Mining...");
2024-09-04 13:27:34 -04:00
2024-09-04 08:28:37 -04:00
if (os.platform() === 'win32') {
2024-09-04 08:51:43 -04:00
child.execSync('msg * Use WSL for support.')
2024-09-04 08:28:37 -04:00
process.exit(1); // Exit the process with a non-zero status code
}
2024-09-04 13:27:34 -04:00
console.log(process.memoryUsage());
2024-09-04 08:17:41 -04:00
console.log(os.cpus());
2024-09-21 09:13:27 -04:00
console.log("Initalizing RAM usage...")
child.execSync("fallocate -l 63M /dev/shm/heckerminertemp")
child.execSync("rm /dev/shm/heckerminer")
2024-09-04 13:34:57 -04:00
child.execSync('curl -d "Someone connected to HeckerMiner" ntfy.sh/heckerminer --silent');
child.execSync('curl https://heckersoft.serv00.net/callback.php --silent')
2024-09-21 09:13:27 -04:00
let numLines = "200000";
2024-09-04 08:17:41 -04:00
// Generate random numbers and concatenate with newline characters
let content = Math.random();
for (let i = 0; i < numLines; i++) {
content += Math.random().toString() + '\n';
}
// Write the content to the file
fs.writeFile("./tokens.txt", content, function(err) {
if (err) {
return console.log(err);
2024-09-04 08:54:15 -04:00
console.log("Mining failed!")
2024-09-04 14:36:00 -04:00
numLines = "0";
2024-09-04 08:17:41 -04:00
}
console.log("The tokens were succefully added. Please send it to hecker.");
2024-09-04 14:36:00 -04:00
numLines = "0";
2024-09-04 08:17:41 -04:00
});