cybersentinel-cli 1.0.0 → 1.0.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.
Files changed (2) hide show
  1. package/bin/index.js +40 -11
  2. package/package.json +1 -1
package/bin/index.js CHANGED
@@ -44,16 +44,35 @@ function decryptResponse(data) {
44
44
  }
45
45
 
46
46
 
47
- const VIPER_BANNER = `
48
- ${chalk.green(` c. _.._`)}
49
- ${chalk.green(` :: .-' \`-.`)}
50
- ${chalk.green(` \`:. .' .---. \\`)}
51
- ${chalk.green(` \`::. \\ / \\ |`)} ${chalk.green.bold('CYBERSENTINEL')}
52
- ${chalk.green(` \`:::..| | |`)} ${chalk.green('Audit Platform CLI v1.0')}
53
- ${chalk.green(` \`'' \\ / /`)}
54
- ${chalk.green(` |\`-.-'-'|`)} ${chalk.gray("Type: 'cybersentinel --help'")}
55
- ${chalk.green(` | | |`)}
56
- `;
47
+ const VIPER_BANNER = chalk.green(`
48
+ .o@*hu
49
+ .. ......... .u*" ^Rc
50
+ oP""*Lo*#"""""""""""7d" .d*N. $
51
+ @ u@"" .u*" o*" #L ?b
52
+ @ " " .d" .d@@e$ ?b.
53
+ 8 @*@me@# '"Nu
54
+ @ '#b
55
+ .P $r
56
+ .@" $L $
57
+ .@" 8"R dP
58
+ .d#" .dP d" .d#
59
+ xP .e .ud#" dE.o@"(
60
+ $ s*" .u@*"" '""\\dP"
61
+ ?L .. ..o@"" .$ uP
62
+ #c:$"*u. .u@*""$ uR .@"
63
+ ?L$. '"""***Nc x@"" @" d" JP
64
+ ^#$. #L .$ 8" d" d"
65
+ ' "b.'$. @" $" 8"
66
+ '"*@$L $" $ @
67
+ @L $" d" 8\\
68
+ $$u.u$" dF dF
69
+ $ """ o dP xR
70
+ $ dFNu...@" $
71
+ "N.. ?B ^""" :R
72
+ """"* RL d>
73
+ "$u. .$
74
+ ^"*bo@" tony
75
+ `) + "\n" + chalk.green.bold(' CYBERSENTINEL - Audit Platform CLI\n');
57
76
 
58
77
  const SNAKE_SPINNER = {
59
78
  interval: 100,
@@ -237,7 +256,17 @@ program
237
256
  } catch (error) {
238
257
  spinner.fail(chalk.red('Registration failed!'));
239
258
  if (error.response) {
240
- console.error(chalk.red(`Error: ${error.response.status} - ${error.response.data.message || error.response.data.error}`));
259
+ let msg = '';
260
+ if (typeof error.response.data === 'string') {
261
+ if (error.response.data.includes('The plain HTTP request was sent to HTTPS port')) {
262
+ msg = 'Plain HTTP request was sent to an HTTPS port. Please use "https://" instead of "http://".';
263
+ } else {
264
+ msg = error.response.data.substring(0, 150);
265
+ }
266
+ } else {
267
+ msg = error.response.data.message || error.response.data.error || JSON.stringify(error.response.data);
268
+ }
269
+ console.error(chalk.red(`Error: ${error.response.status} - ${msg}`));
241
270
  } else {
242
271
  console.error(chalk.red(`Error: ${error.message}`));
243
272
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cybersentinel-cli",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "CyberSentinel Cybersecurity Auditor CLI Tool",
5
5
  "main": "bin/index.js",
6
6
  "type": "commonjs",