use tr instead of gsub

GSoC/Meterpreter_Web_Console
Kent 'picat' Gruber 2018-09-17 09:53:59 -04:00
parent c97a2ce626
commit c3ca1a6cb8
1 changed files with 1 additions and 1 deletions

View File

@ -224,7 +224,7 @@ def nmap_validate_arg(str)
end
# Check for commas outside of quoted arguments
quoted_22 = /\x22[^\x22]*\x22/n
requoted_str = str.gsub(/'/,"\"")
requoted_str = str.tr('\'','"')
if requoted_str.split(quoted_22).join[/,/]
print_error "Malformed nmap arguments (unquoted comma): #{str}"
return false