Skip to content

Commit e542a6c

Browse files
committed
Fix importing with Acunetix
Add a default scheme of `http://` to URIs without a scheme. Also update some documentation.
1 parent 8af751b commit e542a6c

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

lib/msf/core/db_manager/service.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ def get_service(wspace, host, proto, port)
4343
# opts may contain
4444
# +:name+:: the application layer protocol (e.g. ssh, mssql, smb)
4545
# +:sname+:: an alias for the above
46+
# +:workspace+:: the workspace for the service
4647
#
4748
def report_service(opts)
4849
return if not active

lib/rex/parser/acunetix_nokogiri.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@ def end_element(name=nil)
5959
@text = nil
6060
when "StartURL" # Populates @state[:starturl_uri], we use this a lot
6161
@state[:has_text] = false
62+
# StartURL does not always include the scheme
63+
@text.prepend("http://") unless URI.parse(@text).scheme
6264
collect_host
6365
collect_service
6466
@text = nil

0 commit comments

Comments
 (0)