wsnipz 1.1.0 → 1.2.0

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 CHANGED
@@ -36,6 +36,9 @@ exports.PROXY_FORMAT_LINES = [
36
36
  chalk_1.default.gray(' ip:port:user:pass -> http by default'),
37
37
  ];
38
38
  async function mainMenu(config, save) {
39
+ if (!config.token && !config.proxy) {
40
+ await onboarding(config, save);
41
+ }
39
42
  while (true) {
40
43
  const { choice } = await inquirer_1.default.prompt({
41
44
  type: 'list',
@@ -62,6 +65,80 @@ async function mainMenu(config, save) {
62
65
  }
63
66
  }
64
67
  }
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
+ const { hasProxies } = await inquirer_1.default.prompt({
79
+ type: 'confirm',
80
+ name: 'hasProxies',
81
+ message: 'Do you have proxies to use?',
82
+ default: false,
83
+ });
84
+ if (hasProxies) {
85
+ const pool = await loadProxyFile(config);
86
+ if (pool.size === 0) {
87
+ console.log(chalk_1.default.red(' No valid proxies found in the file.'));
88
+ }
89
+ console.log(chalk_1.default.green(` ${pool.size} proxy(s) loaded.`));
90
+ }
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
+ const { token } = await inquirer_1.default.prompt({
111
+ type: 'password',
112
+ name: 'token',
113
+ mask: '*',
114
+ message: 'Discord token:',
115
+ validate: (v) => (v && v.length > 10 ? true : 'Invalid token'),
116
+ });
117
+ config.token = token;
118
+ save(config);
119
+ console.log(chalk_1.default.green('\n Setup complete!'));
120
+ console.log(chalk_1.default.gray(' You can change these anytime in Settings.\n'));
121
+ }
122
+ async function loadProxyFile(config) {
123
+ console.log((0, ui_1.box)('Proxy format', exports.PROXY_FORMAT_LINES));
124
+ console.log();
125
+ const { file } = await inquirer_1.default.prompt({
126
+ type: 'input',
127
+ name: 'file',
128
+ message: 'Path to the proxy .txt file:',
129
+ default: 'proxies.txt',
130
+ validate: (v) => v && fs_1.default.existsSync(v) ? true : 'File not found',
131
+ });
132
+ const { rotating } = await inquirer_1.default.prompt({
133
+ type: 'confirm',
134
+ name: 'rotating',
135
+ message: 'Are your proxies rotating (the provider changes the IP automatically)?',
136
+ default: true,
137
+ });
138
+ const pool = proxies_1.ProxyPool.loadFromFile(file, rotating);
139
+ config.proxy = { file, rotating, loaded: pool.list };
140
+ return pool;
141
+ }
65
142
  async function ensureProxyPool(config) {
66
143
  const choices = [];
67
144
  if (config.proxy && config.proxy.file && fs_1.default.existsSync(config.proxy.file)) {
@@ -80,32 +157,20 @@ async function ensureProxyPool(config) {
80
157
  choices,
81
158
  });
82
159
  if (mode === 'direct') {
83
- console.log(chalk_1.default.yellow(' Direct connection selected (not recommended for mass scanning).'));
160
+ console.log((0, ui_1.box)('No proxies', [
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
+ ]));
84
165
  return null;
85
166
  }
86
167
  if (mode === 'saved') {
87
168
  return proxies_1.ProxyPool.loadFromFile(config.proxy.file, config.proxy.rotating);
88
169
  }
89
- console.log((0, ui_1.box)('Proxy format', exports.PROXY_FORMAT_LINES));
90
- console.log();
91
- const { file } = await inquirer_1.default.prompt({
92
- type: 'input',
93
- name: 'file',
94
- message: 'Path to the proxy .txt file:',
95
- default: 'proxies.txt',
96
- validate: (v) => v && fs_1.default.existsSync(v) ? true : 'File not found',
97
- });
98
- const { rotating } = await inquirer_1.default.prompt({
99
- type: 'confirm',
100
- name: 'rotating',
101
- message: 'Are your proxies rotating (the provider changes the IP automatically)?',
102
- default: true,
103
- });
104
- const pool = proxies_1.ProxyPool.loadFromFile(file, rotating);
170
+ const pool = await loadProxyFile(config);
105
171
  if (pool.size === 0) {
106
172
  console.log(chalk_1.default.red(' No valid proxies found in the file.'));
107
173
  }
108
- config.proxy = { file, rotating, loaded: pool.list };
109
174
  console.log(chalk_1.default.green(` ${pool.size} proxy(s) loaded.`));
110
175
  return pool;
111
176
  }
package/dist/version.js CHANGED
@@ -2,4 +2,4 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = exports.PACKAGE_NAME = void 0;
4
4
  exports.PACKAGE_NAME = 'wsnipz';
5
- exports.VERSION = '1.1.0';
5
+ exports.VERSION = '1.2.0';
package/package.json CHANGED
@@ -1 +1 @@
1
- {"name": "wsnipz", "version": "1.1.0", "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"}}
1
+ {"name": "wsnipz", "version": "1.2.0", "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"}}