cvss_cli 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/exe/cvss +17 -1
- data/lib/cvss_cli/version.rb +1 -1
- data/lib/cvss_cli.rb +6 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: efab40941a8e1f9dbf9025e11e7fb194d8653038d21240f7a4433a2d607558b5
|
4
|
+
data.tar.gz: 3a7a665b48ffdcb366824946e92d021bb47b2a4fd34c753dded3abef24926821
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7fa56d7cfb8a18a78f7dc5bb3ca7f835e7645f91fa9fd4e3556a05558aa3cfdc0499f3816fa0ef99b0db454bdad7abd4f770fb6762e666f2b5aad63fc774f427
|
7
|
+
data.tar.gz: ed90e49adad28b389791e2a9800c25aea348c7e4f2b5382a07a390041a84c74614532530df743044b6d1c5a119afa73336f2f0d8f9a05ef2f081a52f5de2e5a4
|
data/exe/cvss
CHANGED
@@ -1,6 +1,8 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
require "cvss_cli"
|
3
3
|
require 'colorize'
|
4
|
+
require 'shellwords'
|
5
|
+
require 'readline'
|
4
6
|
|
5
7
|
if ENV['CVSS_CLI_PATH'].nil?
|
6
8
|
puts 'CVSS_CLI_PATH not set. Please set this environment variable in order to use cvss_cli.'.red
|
@@ -12,4 +14,18 @@ unless File.exist?(File.join(ENV['CVSS_CLI_PATH'], "cvss3_1.yaml"))
|
|
12
14
|
exit 1
|
13
15
|
end
|
14
16
|
|
15
|
-
|
17
|
+
if ARGV.empty?
|
18
|
+
|
19
|
+
begin
|
20
|
+
while line = Readline.readline('cvss> '.light_blue, true)
|
21
|
+
args = Shellwords.split line
|
22
|
+
CvssCli::CLI.start args if line && !line.empty?
|
23
|
+
end
|
24
|
+
rescue Exception => e
|
25
|
+
puts e
|
26
|
+
Kernel.exit 0
|
27
|
+
end
|
28
|
+
|
29
|
+
else
|
30
|
+
CvssCli::CLI.start(ARGV)
|
31
|
+
end
|
data/lib/cvss_cli/version.rb
CHANGED
data/lib/cvss_cli.rb
CHANGED
@@ -72,6 +72,12 @@ module CvssCli
|
|
72
72
|
invoke :load, [cvss_string] if cvss_string
|
73
73
|
end
|
74
74
|
|
75
|
+
desc 'exit', 'exits the application'
|
76
|
+
map quit: :exit
|
77
|
+
def exit
|
78
|
+
Kernel.exit 0
|
79
|
+
end
|
80
|
+
|
75
81
|
no_commands do
|
76
82
|
def write_file
|
77
83
|
open(File.join(ENV['CVSS_CLI_PATH'], 'cvss_string'), 'w') do |f|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cvss_cli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Martin Haunschmid, Daniel Haider
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-07-
|
11
|
+
date: 2022-07-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|