This file contains hidden or 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
| const crypto = require('node:crypto'); | |
| const net = require('node:net'); | |
| const [username, password] = process.argv.slice(2); | |
| if (!username || !password) { | |
| console.error('Usage: node self-rating.js <username> <password>'); | |
| process.exit(1); | |
| } |
This file contains hidden or 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
| const net = require('net'); | |
| const { URL } = require('url'); | |
| const proxy = new URL('socks5://USERNAME:PASSWORD@rp.scrapegw.com:6060'); | |
| const targetHost = '18.117.245.0'; | |
| const targetPort = 43594; | |
| const iterations = 10; | |
| const probe = Buffer.from('0000000100', 'hex'); | |
| if (proxy.hostname === 'PROXY_HOST') { |
This file contains hidden or 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
| #!/usr/bin/env node | |
| /** | |
| * Gradient text formatter (per line): | |
| * - Each line = one sentence | |
| * - Random gradient palette per sentence (configurable anchor colors) | |
| * - Per-character coloring based on sentence length | |
| * - Outputs tags like <#f0a> before each character | |
| * | |
| * Non-repeating “faster” gradients: | |
| * - --curve <n> : gamma curve on the gradient position (default 1.8). Higher = faster changes early. |
This file contains hidden or 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
| #!/usr/bin/env node | |
| const fs = require("fs"); | |
| const path = require("path"); | |
| const sharp = require("sharp"); | |
| const MAP_TILE_CHUNKS_PER_SIDE = 3; | |
| function parseArgs(argv) { | |
| const positional = []; |
This file contains hidden or 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
| #!/usr/bin/env node | |
| "use strict"; | |
| /** | |
| * Heaps PAK single-file extract + replace (repack) | |
| * Based on heaps: hxd/fmt/pak/Reader.hx, Writer.hx, Build.hx, FileSystem.hx | |
| * | |
| * Commands: | |
| * Extract one file: | |
| * node pak_onefile_edit.js extract <pakFile> "<path/in/pak.ext>" <outFile> |
This file contains hidden or 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
| #!/usr/bin/env node | |
| "use strict"; | |
| /** | |
| * Extract all assets from a Heaps-style PAK file (like hxd.fmt.pak.Build -x), | |
| * and convert DDS payloads to PNG using texconv.exe (must be in PATH). | |
| * | |
| * Usage: | |
| * node extract-pak.js "C:\path\to\res.pak" | |
| * node extract-pak.js "C:\path\to\res.pak" --out "C:\output\folder" |
This file contains hidden or 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
| import fs from "fs"; | |
| import crypto from "crypto"; | |
| import { decompress } from "@mongodb-js/zstd"; | |
| import { Image } from "image-js"; | |
| import Bcdec from "./wasm/bcdec.js"; | |
| // ---------------- CLI ---------------- | |
| const OLD_PATH = process.argv[2]; | |
| const NEW_PATH = process.argv[3]; | |
| if (!OLD_PATH || !NEW_PATH) { |
This file contains hidden or 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
| import {spawn} from 'child_process'; | |
| import {EOL} from 'os'; | |
| import {request} from 'http'; | |
| const assetRipperPath = 'C:\\Users\\jaspe\\Downloads\\AssetRipper\\AssetRipper.GUI.Free.exe'; | |
| const assetFolderPath = 'C:\\Program Files (x86)\\Steam\\steamapps\\common\\BitCraft Online Demo'; | |
| const outPath = 'C:\\Users\\jaspe\\projects\\bitcraft-assets'; | |
| let port; |
This file contains hidden or 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
| import {spawn} from 'child_process'; | |
| import {EOL} from 'os'; | |
| const assetRipperPath = 'C:\\Users\\kattoor\\Downloads\\AssetRipper\\AssetRipper.GUI.Free.exe'; | |
| const assetFolderPath = 'C:\\Program Files (x86)\\Steam\\steamapps\\common\\BitCraft Online Demo'; | |
| const outPath = 'C:\\Users\\kattoor\\projects\\bitcraft-assets'; | |
| let apiBase; | |
| function startAssetRipperAndListenToStdOut(executablePath) { |
This file contains hidden or 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
| process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0'; | |
| import fs from 'fs'; | |
| import {WebSocket} from 'ws'; | |
| import {execSync} from 'child_process'; | |
| async function getIdentityToken() { | |
| const response = await fetch('https://131.153.155.197/v1/identity', {method: 'POST'}); | |
| const {token: identityToken} = await response.json(); | |
| return identityToken; |
NewerOlder