Skip to content

Commit f267c11

Browse files
committed
Add regex fix
1 parent e7f9833 commit f267c11

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/msf/core/db.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2972,10 +2972,10 @@ def import_filetype_detect(data)
29722972
elsif (firstline.index("<scanJob>"))
29732973
@import_filedata[:type] = "Retina XML"
29742974
return :retina_xml
2975-
elsif (firstline.index("<get_reports_response status=\"200\" status_text=\"OK\">"))
2975+
elsif (firstline =~ /<get_reports_response status=['"]200['"] status_text=['"]OK['"]>/)
29762976
@import_filedata[:type] = "OpenVAS XML"
29772977
return :openvas_new_xml
2978-
elsif (firstline.index("<report id=\"") or firstline.index("<report id=\'"))
2978+
elsif (firstline =~ /<report id=['"]/)
29792979
@import_filedata[:type] = "OpenVAS XML"
29802980
return :openvas_new_xml
29812981
elsif (firstline.index("<NessusClientData>"))

0 commit comments

Comments
 (0)