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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 20cc0d58f0e199196e4a392b772de131da8b835b
4
- data.tar.gz: 26df3b18e96f0eeaea0043d650caa8821718b908
3
+ metadata.gz: d4a9165f53a9235ba9666ec8a08d8352c6840f9d
4
+ data.tar.gz: 748db43dd0ee9d435ff925ca43ba08c235fa0408
5
5
  SHA512:
6
- metadata.gz: 2502c699fc34efcb63d6f2bc46af06a3a8dddc64f0e85046981ce74ea4ed5a41f99d26a278ffe5bea62734842c5294aa5ed5e25bfec17e5c3342913f3ad1c20b
7
- data.tar.gz: 3e36ea32e913443a2ee291b90a9a17f280734da0c586360f1b5e77538296b69dd83fd4bc01f0594bf981322755c9ca10fe034897b05bf63ef09b2109ad1a31c3
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.2048].include?(@action)
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'
@@ -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
 
@@ -1,3 +1,3 @@
1
1
  module Nexposecli
2
- VERSION = "0.3.8"
2
+ VERSION = "0.3.9"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nexposecli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.8
4
+ version: 0.3.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Erik Gomez