var x = true; const trip = process.argv.slice(2); if(trip == "") { console.log("No argument supplied."); console.log("Usage: node trip.js [tripcode]"); process.exit(1) } function limit (string = '', limit = 0) { return string.substring(0, limit) } const { encode } = require('iconv-lite'); const replace = { ':': 'A', ';': 'B', '<': 'C', '=': 'D', '>': 'E', '?': 'F', '@': 'G', '[': 'a', '\\': 'b', ']': 'c', '^': 'd', '_': 'e', '`': 'f', }; const crypt = require('unix-crypt-td-js'); while(x) { password = limit(Math.random().toString(36).replace('0.', ''), 10); encoded = encode(password, 'SHIFT_JIS') .toString('latin1'); let salt = `${encoded}H..` .substring(1, 3) .replace(/[^.-z]/g, '.'); for (let find in replace) { salt = salt.split(find).join(replace[find]); } hashed = crypt(encoded, salt); var ayumi = new RegExp(trip, 'i' ); if(hashed.slice(-10).match(ayumi)) { console.log('#'+password, '=', hashed.slice(-10)); } }