Skip to content

Commit dccfb63

Browse files
author
HD Moore
committed
Cleanup based on PR rapid7#1008 feedback
1 parent 36f82fb commit dccfb63

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

modules/auxiliary/scanner/scada/digi_realport_serialport_scan.rb

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,9 @@ def run_host(target_host)
5757

5858
return unless realport_connect
5959

60-
vprint_status("#{target_host}:#{rport} is running #{@realport_name} ( ports: #{@ports} )")
60+
info = "#{@realport_name} ( ports: #{@realport_port_count} )"
61+
vprint_status("#{target_host}:#{rport} is running #{info}")
62+
report_service(:host => rhost, :port => rport, :name => "realport", :info => info)
6163

6264
1.upto(@realport_port_count) do |pnum|
6365
unless test_ports.include?('ALL') or test_ports.include?(pnum.to_s)
@@ -71,6 +73,15 @@ def run_host(target_host)
7173
res = realport_recv_banner(pnum - 1, datastore['BANNER_TIMEOUT'])
7274
if res and res.length > 0
7375
print_status("#{target_host}:#{rport} [port #{pnum} @ #{baud}bps] #{res.inspect}")
76+
report_note(
77+
:host => target_host,
78+
:proto => 'tcp',
79+
:port => rport,
80+
:type => "realport.port#{pnum}.banner",
81+
:data => {:baud => baud, :banner => res},
82+
:update => :unique_data
83+
)
84+
7485
end
7586
realport_close(pnum - 1)
7687
end

modules/auxiliary/scanner/scada/digi_realport_version.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,5 +40,6 @@ def run_host(target_host)
4040
print_status("#{target_host}:#{rport} #{info}")
4141
report_service(:host => rhost, :port => rport, :name => "realport", :info => info)
4242
end
43+
realport_disconnect
4344
end
4445
end

0 commit comments

Comments
 (0)