more XSD checking

This commit is contained in:
Christian Mehlmauer
2013-01-21 22:18:12 +01:00
parent c2cdf97bee
commit 10616b18fc
7 changed files with 105 additions and 31 deletions

View File

@@ -39,7 +39,10 @@ THEMES_FILE = DATA_DIR + "/themes.txt"
THEMES_FULL_FILE = DATA_DIR + "/themes_full.txt"
THEMES_VULNS_FILE = DATA_DIR + "/theme_vulns.xml"
WP_VULNS_FILE = DATA_DIR + "/wp_vulns.xml"
WP_VERSIONS_FILE = DATA_DIR + "/wp_versions.xml"
LOCAL_FILES_FILE = DATA_DIR + "/local_vulnerable_files.xml"
VULNS_XSD = DATA_DIR + "/vuln.xsd"
WP_VERSIONS_XSD = DATA_DIR + "/wp_versions.xsd"
WPSCAN_VERSION = "2.0"

View File

@@ -124,7 +124,7 @@ class WpVersion < Vulnerable
def self.find_from_advanced_fingerprinting(options)
target_uri = options[:base_url]
# needed for rpsec tests
version_xml = options[:version_xml] || DATA_DIR + "/wp_versions.xml"
version_xml = options[:version_xml] || WP_VERSIONS_FILE
xml = Nokogiri::XML(File.open(version_xml)) do |config|
config.noblanks
end

View File

@@ -93,7 +93,7 @@ class CheckerPlugin < Plugin
def check_local_vulnerable_files(dir_to_scan)
if Dir::exist?(dir_to_scan)
xml_file = DATA_DIR + "/local_vulnerable_files.xml"
xml_file = LOCAL_FILES_FILE
local_hashes = {}
file_extension_to_scan = "*.{js,php,swf,html,htm}"