File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
modules/auxiliary/scanner/ssl Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -203,26 +203,26 @@ def jabber_connect_msg(hostname)
203
203
end
204
204
205
205
def tls_jabber
206
- sock . put ( jabber_connect_msg ( datastore [ 'XMPPDOMAIN' ] ) )
206
+ sock . put ( jabber_connect_msg ( datastore [ 'XMPPDOMAIN' ] ) )
207
207
res = sock . get
208
- if res && res =~ / host-unknown/
208
+ if res && res . include? ( ' host-unknown' )
209
209
jabber_host = res . match ( / from='([\w .]*)' / )
210
210
if jabber_host && jabber_host [ 1 ]
211
211
disconnect
212
212
connect
213
213
vprint_status ( "#{ peer } - Connecting with autodetected remote XMPP hostname: #{ jabber_host [ 1 ] } ..." )
214
- sock . put ( jabber_connect_msg ( jabber_host [ 1 ] ) )
214
+ sock . put ( jabber_connect_msg ( jabber_host [ 1 ] ) )
215
215
res = sock . get
216
216
end
217
217
end
218
- if res . nil? || res =~ / stream:error/ || res !~ /<starttls xmlns=['"]urn:ietf:params:xml:ns:xmpp-tls['"]/
219
- vprint_error ( "#{ peer } - Jabber host unknown. Please try changing the XMPPDOMAIN option." ) if res && res =~ /< host-unknown/
218
+ if res . nil? || res . include? ( ' stream:error' ) || res !~ /<starttls xmlns=['"]urn:ietf:params:xml:ns:xmpp-tls['"]/
219
+ vprint_error ( "#{ peer } - Jabber host unknown. Please try changing the XMPPDOMAIN option." ) if res && res . include? ( ' host-unknown' )
220
220
return nil
221
221
end
222
222
msg = "<starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'/>"
223
223
sock . put ( msg )
224
224
res = sock . get
225
- return nil if res . nil? || res !~ / <proceed/
225
+ return nil if res . nil? || ! res . include? ( ' <proceed' )
226
226
res
227
227
end
228
228
You can’t perform that action at this time.
0 commit comments