icoa-cli 2.19.1 → 2.19.3
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/commands/ctf.js +7 -3
- package/package.json +1 -1
package/dist/commands/ctf.js
CHANGED
|
@@ -30,8 +30,8 @@ export function registerCtfCommands(program) {
|
|
|
30
30
|
logCommand(`ctf join ${url}`);
|
|
31
31
|
console.log();
|
|
32
32
|
printInfo(`Connecting to ${chalk.bold(url)}`);
|
|
33
|
-
const username = await input({ message: 'Username:' });
|
|
34
|
-
const password = await passwordPrompt({ message: 'Password:', mask: '*' });
|
|
33
|
+
const username = await input({ message: chalk.white('Username:'), theme: { prefix: '', style: { message: (t) => t } } });
|
|
34
|
+
const password = await passwordPrompt({ message: chalk.white('Password:'), mask: '*', theme: { prefix: '', style: { message: (t) => t } } });
|
|
35
35
|
let token = '';
|
|
36
36
|
let sessionCookie = '';
|
|
37
37
|
let csrfNonce = '';
|
|
@@ -121,8 +121,12 @@ export function registerCtfCommands(program) {
|
|
|
121
121
|
console.log(chalk.white(' status ') + chalk.gray('Check score & budget'));
|
|
122
122
|
}
|
|
123
123
|
catch (err) {
|
|
124
|
-
spinner2.fail('Connection failed');
|
|
124
|
+
spinner2.fail('Connection test failed');
|
|
125
125
|
printError(err.message);
|
|
126
|
+
// Still save URL so user can retry
|
|
127
|
+
saveConfig({ ctfdUrl: url, sessionCookie: sessionCookie });
|
|
128
|
+
console.log();
|
|
129
|
+
printInfo('Connection saved. Try: join ' + url);
|
|
126
130
|
}
|
|
127
131
|
});
|
|
128
132
|
// ─── icoa ctf logout ───
|