Skip to content

Commit c245e64

Browse files
committed
added peer to each print statement and rex table
1 parent aa2922e commit c245e64

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

modules/auxiliary/scanner/misc/dahua_dvr_auth_bypass.rb

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -108,9 +108,9 @@ def grab_email
108108
print_good("#{peer} -- Email Settings:")
109109
return unless data.first =~ /([\x00]{8,}(?=.{1,255}$)[0-9A-Z](?:(?:[0-9A-Z]|-){0,61}[0-9A-Z])?(?:\.[0-9A-Z](?:(?:[0-9A-Z]|-){0,61}[0-9A-Z])?)*\.?+:\d+)/i
110110
if mailhost = Regexp.last_match[1].split(':')
111-
print_status(" Server: #{mailhost[0]}") unless mailhost[0].blank?
112-
print_status(" Server Port: #{mailhost[1]}") unless mailhost[1].blank?
113-
print_status(" Destination Email: #{data[1]}") unless data[1].blank?
111+
print_status("#{peer} -- Server: #{mailhost[0]}") unless mailhost[0].blank?
112+
print_status("#{peer} -- Server Port: #{mailhost[1]}") unless mailhost[1].blank?
113+
print_status("#{peer} -- Destination Email: #{data[1]}") unless data[1].blank?
114114
mailserver = "#{mailhost[0]}"
115115
mailport = "#{mailhost[1]}"
116116
muser = "#{data[5]}"
@@ -131,7 +131,7 @@ def grab_ddns
131131
ddns_table = Rex::Ui::Text::Table.new(
132132
'Header' => 'Dahua DDNS Settings',
133133
'Indent' => 1,
134-
'Columns' => ['DDNS Service', 'DDNS Server', 'DDNS Port', 'Domain', 'Username', 'Password']
134+
'Columns' => ['Peer', 'DDNS Service', 'DDNS Server', 'DDNS Port', 'Domain', 'Username', 'Password']
135135
)
136136
data.each_with_index do |val, index|
137137
next if index == 0
@@ -142,7 +142,7 @@ def grab_ddns
142142
ddns_domain = val[3]
143143
ddns_user = val[4]
144144
ddns_pass = val[5]
145-
ddns_table << [ ddns_service, ddns_server, ddns_port, ddns_domain, ddns_user, ddns_pass ]
145+
ddns_table << [ peer, ddns_service, ddns_server, ddns_port, ddns_domain, ddns_user, ddns_pass ]
146146
unless ddns_server.blank? && ddns_port.blank? && ddns_user.blank? && ddns_pass.blank?
147147
if datastore['VERBOSE']
148148
ddns_table.print
@@ -167,10 +167,10 @@ def grab_nas
167167
ftpuser.strip!
168168
ftppass.strip!
169169
unless ftpuser.blank? || ftppass.blank?
170-
print_good(" NAS Server: #{server}")
171-
print_good(" NAS Port: #{port}")
172-
print_good(" FTP User: #{ftpuser}")
173-
print_good(" FTP Pass: #{ftppass}")
170+
print_good("#{peer} -- NAS Server: #{server}")
171+
print_good("#{peer} -- NAS Port: #{port}")
172+
print_good("#{peer} -- FTP User: #{ftpuser}")
173+
print_good("#{peer} -- FTP Pass: #{ftppass}")
174174
report_creds(
175175
host: server,
176176
port: port,

0 commit comments

Comments
 (0)