wsnipz 1.2.0 → 1.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/prompts.js +16 -47
- package/dist/proxies.js +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
package/dist/prompts.js
CHANGED
|
@@ -66,15 +66,6 @@ async function mainMenu(config, save) {
|
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
68
|
async function onboarding(config, save) {
|
|
69
|
-
console.log((0, ui_1.box)('Welcome to WSniper', [
|
|
70
|
-
chalk_1.default.white('This tool checks Discord username availability'),
|
|
71
|
-
chalk_1.default.white('via the official Discord API.'),
|
|
72
|
-
'',
|
|
73
|
-
chalk_1.default.gray('To run checks you need:'),
|
|
74
|
-
chalk_1.default.gray(' • A Discord token (always required to authenticate)'),
|
|
75
|
-
chalk_1.default.gray(' • Proxies (recommended, to rotate your IP)'),
|
|
76
|
-
]));
|
|
77
|
-
console.log();
|
|
78
69
|
const { hasProxies } = await inquirer_1.default.prompt({
|
|
79
70
|
type: 'confirm',
|
|
80
71
|
name: 'hasProxies',
|
|
@@ -88,30 +79,11 @@ async function onboarding(config, save) {
|
|
|
88
79
|
}
|
|
89
80
|
console.log(chalk_1.default.green(` ${pool.size} proxy(s) loaded.`));
|
|
90
81
|
}
|
|
91
|
-
else {
|
|
92
|
-
console.log((0, ui_1.box)('No proxies', [
|
|
93
|
-
chalk_1.default.yellow('Checks will run on your own IP address.'),
|
|
94
|
-
chalk_1.default.gray('This is RISKY: Discord may rate-limit or ban'),
|
|
95
|
-
chalk_1.default.gray('your account/IP on mass scanning.'),
|
|
96
|
-
'',
|
|
97
|
-
chalk_1.default.gray('You can add proxies later in Settings.'),
|
|
98
|
-
]));
|
|
99
|
-
}
|
|
100
|
-
console.log();
|
|
101
|
-
console.log((0, ui_1.box)('Discord token required', [
|
|
102
|
-
chalk_1.default.white('The availability API requires authentication:'),
|
|
103
|
-
chalk_1.default.gray('your token is sent with each request to authorize'),
|
|
104
|
-
chalk_1.default.gray('the check, even when using proxies.'),
|
|
105
|
-
'',
|
|
106
|
-
chalk_1.default.yellow('Warning: using your account token carries risk.'),
|
|
107
|
-
chalk_1.default.gray('Use an alt account if possible.'),
|
|
108
|
-
]));
|
|
109
|
-
console.log();
|
|
110
82
|
const { token } = await inquirer_1.default.prompt({
|
|
111
83
|
type: 'password',
|
|
112
84
|
name: 'token',
|
|
113
85
|
mask: '*',
|
|
114
|
-
message: 'Discord token:',
|
|
86
|
+
message: 'Discord user token (NOT a bot token) — required even with proxies:',
|
|
115
87
|
validate: (v) => (v && v.length > 10 ? true : 'Invalid token'),
|
|
116
88
|
});
|
|
117
89
|
config.token = token;
|
|
@@ -120,8 +92,7 @@ async function onboarding(config, save) {
|
|
|
120
92
|
console.log(chalk_1.default.gray(' You can change these anytime in Settings.\n'));
|
|
121
93
|
}
|
|
122
94
|
async function loadProxyFile(config) {
|
|
123
|
-
console.log(
|
|
124
|
-
console.log();
|
|
95
|
+
console.log(chalk_1.default.gray(' Format: http://ip:port | http://user:pass@ip:port | socks5://ip:port | ip:port'));
|
|
125
96
|
const { file } = await inquirer_1.default.prompt({
|
|
126
97
|
type: 'input',
|
|
127
98
|
name: 'file',
|
|
@@ -157,11 +128,7 @@ async function ensureProxyPool(config) {
|
|
|
157
128
|
choices,
|
|
158
129
|
});
|
|
159
130
|
if (mode === 'direct') {
|
|
160
|
-
console.log(
|
|
161
|
-
chalk_1.default.yellow('Checks will run on your own IP address.'),
|
|
162
|
-
chalk_1.default.gray('RISKY: Discord may rate-limit or ban your'),
|
|
163
|
-
chalk_1.default.gray('account/IP on mass scanning.'),
|
|
164
|
-
]));
|
|
131
|
+
console.log(chalk_1.default.yellow(' No proxy selected. Checks will run on your own IP (risky).'));
|
|
165
132
|
return null;
|
|
166
133
|
}
|
|
167
134
|
if (mode === 'saved') {
|
|
@@ -189,7 +156,7 @@ async function ensureToken(config, save) {
|
|
|
189
156
|
type: 'password',
|
|
190
157
|
name: 'token',
|
|
191
158
|
mask: '*',
|
|
192
|
-
message: 'Discord token:',
|
|
159
|
+
message: 'Discord user token (NOT a bot token):',
|
|
193
160
|
validate: (v) => (v && v.length > 10 ? true : 'Invalid token'),
|
|
194
161
|
});
|
|
195
162
|
config.token = token;
|
|
@@ -244,6 +211,7 @@ async function runChecker(config, save) {
|
|
|
244
211
|
console.log(chalk_1.default.cyan(`\nGenerating ${usernames.length} usernames (${(0, generators_1.patternLabel)(pattern)}, length ${length})...`));
|
|
245
212
|
const stats = { available: 0, taken: 0, invalid: 0, errors: 0, total: usernames.length };
|
|
246
213
|
const spinner = (0, ora_1.default)({ text: 'Checking...', spinner: 'dots' }).start();
|
|
214
|
+
const purple = chalk_1.default.hex('#9B59B6').bold;
|
|
247
215
|
const onProgress = (done, total, r) => {
|
|
248
216
|
if (r.status === 'available')
|
|
249
217
|
stats.available++;
|
|
@@ -253,17 +221,18 @@ async function runChecker(config, save) {
|
|
|
253
221
|
stats.invalid++;
|
|
254
222
|
else
|
|
255
223
|
stats.errors++;
|
|
256
|
-
spinner.
|
|
257
|
-
`[${done}/${total}] ` +
|
|
258
|
-
`${chalk_1.default.green('✓' + stats.available)} ` +
|
|
259
|
-
`${chalk_1.default.red('✗' + stats.taken)} ` +
|
|
260
|
-
`${chalk_1.default.yellow('!' + stats.invalid)} ` +
|
|
261
|
-
`${chalk_1.default.gray('?' + stats.errors)}`;
|
|
224
|
+
spinner.stop();
|
|
262
225
|
if (r.status === 'available') {
|
|
263
|
-
|
|
264
|
-
console.log(chalk_1.default.green.bold(' ✓ AVAILABLE: ') + chalk_1.default.white.bold(r.username));
|
|
265
|
-
spinner.start();
|
|
226
|
+
console.log(purple('[+] ') + chalk_1.default.white.bold(r.username));
|
|
266
227
|
}
|
|
228
|
+
else {
|
|
229
|
+
console.log(chalk_1.default.red('[-] ') + chalk_1.default.gray(r.username));
|
|
230
|
+
}
|
|
231
|
+
spinner.start();
|
|
232
|
+
spinner.text =
|
|
233
|
+
`[${done}/${total}] ` +
|
|
234
|
+
`${purple('+' + stats.available)} ` +
|
|
235
|
+
`${chalk_1.default.red('-' + (stats.taken + stats.invalid + stats.errors))}`;
|
|
267
236
|
};
|
|
268
237
|
const results = await (0, checker_1.checkUsernames)(usernames, {
|
|
269
238
|
token,
|
|
@@ -310,7 +279,7 @@ async function configureSettings(config, save) {
|
|
|
310
279
|
type: 'password',
|
|
311
280
|
name: 'token',
|
|
312
281
|
mask: '*',
|
|
313
|
-
message: 'Discord token:',
|
|
282
|
+
message: 'Discord user token (NOT a bot token):',
|
|
314
283
|
validate: (v) => (v && v.length > 10 ? true : 'Invalid token'),
|
|
315
284
|
});
|
|
316
285
|
config.token = token;
|
package/dist/proxies.js
CHANGED
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.ProxyPool = void 0;
|
|
7
7
|
exports.normalizeProxyUrl = normalizeProxyUrl;
|
|
8
8
|
const fs_1 = __importDefault(require("fs"));
|
|
9
|
-
const
|
|
9
|
+
const ProxyAgent = require('proxy-agent');
|
|
10
10
|
function normalizeProxyUrl(raw) {
|
|
11
11
|
let s = raw.trim();
|
|
12
12
|
if (!s)
|
package/dist/version.js
CHANGED
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name": "wsnipz", "version": "1.2.
|
|
1
|
+
{"name": "wsnipz", "version": "1.2.2", "description": "A modern Discord username availability checker CLI with rotating proxy support.", "main": "dist/index.js", "bin": {"wsniper": "dist/index.js", "wsnipz": "dist/index.js"}, "files": ["dist"], "scripts": {"build": "tsc", "dev": "ts-node src/index.ts", "start": "node dist/index.js", "prepublishOnly": "npm run build"}, "keywords": ["discord", "username", "checker", "sniper", "cli", "proxy", "availability", "wsnipz"], "author": "", "license": "MIT", "engines": {"node": ">=16"}, "dependencies": {"axios": "^1.7.7", "chalk": "^4.1.2", "cli-table3": "^0.6.5", "commander": "^11.1.0", "figlet": "^1.8.0", "inquirer": "^8.2.6", "ora": "^5.4.1", "proxy-agent": "^5.0.0"}, "devDependencies": {"@types/figlet": "^1.7.0", "@types/inquirer": "^8.2.10", "@types/node": "^20.16.0", "ts-node": "^10.9.2", "typescript": "^5.6.0"}}
|