nexposecli 0.3.8 → 0.3.9
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.
- checksums.yaml +4 -4
- data/bin/nexposecli +13 -2
- data/lib/nexposecli/args.rb +3 -0
- data/lib/nexposecli/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d4a9165f53a9235ba9666ec8a08d8352c6840f9d
|
4
|
+
data.tar.gz: 748db43dd0ee9d435ff925ca43ba08c235fa0408
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1d4fa562621450c0ff81eed330de3df01f9720637cb00f5153c840492a0d781c54ccf088110e531650c83fc463e5ddc41c555023abf8a0232e1c7f4450d4580c
|
7
|
+
data.tar.gz: 2b0c924e4f8032e948e5fd292c13fe34a9a370195dc6616abc3d2bfbbbdeef226a55fc88e4dbdcf5336613ae89ff0c9ac42cf8474a4140dbc45fc76ee66631bb
|
data/bin/nexposecli
CHANGED
@@ -355,8 +355,9 @@ uputs("CLI", "Checking for the requested action")
|
|
355
355
|
@action |= 512 if args.status
|
356
356
|
@action |= 1024 if args.exception
|
357
357
|
@action |= 2048 if args.schedule
|
358
|
+
@action |= 4096 if args.search
|
358
359
|
uputs("ACTION", "The requested action value is: #{@action.to_s}")
|
359
|
-
raise "You can only submit one action per task, see --help (action submitted: #{@action.to_s})" unless [1,2,4,8,16,32,64,128,256,512,1024
|
360
|
+
raise "You can only submit one action per task, see --help (action submitted: #{@action.to_s})" unless [1,2,4,8,16,32,64,128,256,512,1024,2048,4096].include?(@action)
|
360
361
|
|
361
362
|
uputs("TARGET", "Checking for the requested target")
|
362
363
|
@target = 0
|
@@ -1772,6 +1773,8 @@ when 512 # TARGET DASSET
|
|
1772
1773
|
elsif field_str == "CVSS_SCORE"
|
1773
1774
|
# test for float, and possibly IN_RANGE op
|
1774
1775
|
valid_filterv = [7.0]
|
1776
|
+
elsif field_str == "SCAN_DATE"
|
1777
|
+
valid_filterv = [args.filterv.to_i]
|
1775
1778
|
elsif field_str == "RISK_SCORE" || field_str == "SITE_ID"
|
1776
1779
|
# test for fixnum, and possibly IN_RANGE op
|
1777
1780
|
valid_filterv = [args.filterv.to_i]
|
@@ -1916,10 +1919,18 @@ when 512 # TARGET DASSET
|
|
1916
1919
|
puts 'The Dynamic Asset Group Id must be numeric.'
|
1917
1920
|
end
|
1918
1921
|
when 16 # delete
|
1919
|
-
# EJG
|
1920
1922
|
uputs("ACTION", 'delete DASSET action requested')
|
1921
1923
|
@nsc.delete_asset_group(args.id.to_i)
|
1922
1924
|
puts "DASSET id #{args.id.to_s} has been deleted."
|
1925
|
+
when 4096 # search
|
1926
|
+
uputs("ACTION", 'search DASSET action requested')
|
1927
|
+
fgroup = @nsc.groups.select {|group|group.name == args.name }
|
1928
|
+
if !fgroup.empty?
|
1929
|
+
upp(fgroup)
|
1930
|
+
puts "DASSET id:#{fgroup[0].id}"
|
1931
|
+
else
|
1932
|
+
puts "DASSET id was not found."
|
1933
|
+
end
|
1923
1934
|
else
|
1924
1935
|
uputs("ACTION", 'The action requested is not implemented for target')
|
1925
1936
|
puts 'The action requested is not implemented for target'
|
data/lib/nexposecli/args.rb
CHANGED
@@ -54,6 +54,9 @@ module Nexposecli
|
|
54
54
|
short : s
|
55
55
|
desc : The show action is used to display details of a single object
|
56
56
|
|
57
|
+
- name : search
|
58
|
+
desc : The search action is used to find or locate the id of a single object by name
|
59
|
+
|
57
60
|
- name : status
|
58
61
|
desc : The status action is used to display the status of a single object
|
59
62
|
|
data/lib/nexposecli/version.rb
CHANGED