Class: SSHScan::ScanEngine
- Inherits:
-
Object
- Object
- SSHScan::ScanEngine
- Defined in:
- lib/ssh_scan/scan_engine.rb
Instance Method Summary collapse
Instance Method Details
#scan(opts) ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/ssh_scan/scan_engine.rb', line 7 def scan(opts) target = opts[:target] port = opts[:port] policy = opts[:policy_file] # Connect and get results client = SSHScan::Client.new(target, port) client.connect() result = client.get_kex_result() # If policy defined, then add compliance results unless policy.nil? policy_mgr = SSHScan::PolicyManager.new(result, policy) result['compliance'] = policy_mgr.compliance_results end return result end |