WpItem::Vulnerable specs

This commit is contained in:
erwanlr
2013-03-25 20:30:26 +01:00
parent 95041945ff
commit d946ef55a8
12 changed files with 112 additions and 49 deletions

View File

@@ -30,7 +30,6 @@ class WpVersion < WpItem
# Returns the first match of <pattern> in the body of the url
def scan_url(target_uri, pattern, path = nil)
return nil
url = path ? target_uri.merge(path).to_s : target_uri.to_s
response = Browser.instance.get_and_follow_location(url)

View File

@@ -1,19 +1,16 @@
# encoding: UTF-8
class WpVersion < WpItem
def vulns_file
unless @vulns_file
@vulns_file = WP_VULNS_FILE
end
@vulns_file
end
def vulns_xpath
"//wordpress[@version='#{@number}']/vulnerability"
end
module Vulnerable
def vulns_file
unless @vulns_file
@vulns_file = WP_VULNS_FILE
end
@vulns_file
end
def vulns_xpath
"//wordpress[@version='#{@number}']/vulnerability"
end
end
end