Bugfixing
This commit is contained in:
4265
data/plugins.txt
4265
data/plugins.txt
File diff suppressed because it is too large
Load Diff
26938
data/plugins_full.txt
26938
data/plugins_full.txt
File diff suppressed because it is too large
Load Diff
1475
data/themes.txt
Normal file
1475
data/themes.txt
Normal file
File diff suppressed because it is too large
Load Diff
6207
data/themes_full.txt
Normal file
6207
data/themes_full.txt
Normal file
File diff suppressed because it is too large
Load Diff
@@ -103,7 +103,7 @@ module WpPlugins
|
|||||||
targets_url.flatten!
|
targets_url.flatten!
|
||||||
targets_url.uniq!
|
targets_url.uniq!
|
||||||
# randomize the plugins array to *maybe* help in some crappy IDS/IPS/WAF detection
|
# randomize the plugins array to *maybe* help in some crappy IDS/IPS/WAF detection
|
||||||
targets_url.sort_by { rand }
|
targets_url.sort_by! { rand }
|
||||||
end
|
end
|
||||||
|
|
||||||
# http://code.google.com/p/wpscan/issues/detail?id=42
|
# http://code.google.com/p/wpscan/issues/detail?id=42
|
||||||
|
|||||||
@@ -82,7 +82,7 @@ module WpTimthumbs
|
|||||||
|
|
||||||
targets.uniq!
|
targets.uniq!
|
||||||
# randomize the array to *maybe* help in some crappy IDS/IPS/WAF evasion
|
# randomize the array to *maybe* help in some crappy IDS/IPS/WAF evasion
|
||||||
targets.sort_by { rand }
|
targets.sort_by! { rand }
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.timthumbs_file(timthumbs_file_path = nil)
|
def self.timthumbs_file(timthumbs_file_path = nil)
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ class Generate_List
|
|||||||
page_count = 1
|
page_count = 1
|
||||||
queue_count = 0
|
queue_count = 0
|
||||||
|
|
||||||
(1...pages.to_i).each do |page|
|
(1...(pages.to_i+1)).each do |page|
|
||||||
# First page has another URL
|
# First page has another URL
|
||||||
url = (page == 1) ? @popular_url : @popular_url + 'page/' + page.to_s + '/'
|
url = (page == 1) ? @popular_url : @popular_url + 'page/' + page.to_s + '/'
|
||||||
request = @browser.forge_request(url)
|
request = @browser.forge_request(url)
|
||||||
@@ -75,7 +75,7 @@ class Generate_List
|
|||||||
page_count += 1
|
page_count += 1
|
||||||
response.body.scan(@popular_regex).each do |item|
|
response.body.scan(@popular_regex).each do |item|
|
||||||
puts "[+] Found popular #{@type}: #{item}" if @verbose
|
puts "[+] Found popular #{@type}: #{item}" if @verbose
|
||||||
found_items << item
|
found_items << item[0]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -90,15 +90,17 @@ class Generate_List
|
|||||||
|
|
||||||
@hydra.run
|
@hydra.run
|
||||||
|
|
||||||
found_items.uniq
|
found_items.sort!
|
||||||
found_items.sort
|
found_items.uniq!
|
||||||
return found_items
|
return found_items
|
||||||
end
|
end
|
||||||
|
|
||||||
# Save the file
|
# Save the file
|
||||||
def save(items)
|
def save(items)
|
||||||
puts "[*] We have parsed #{items} #{@type}s"
|
items.sort!
|
||||||
File.open(@file_name, 'w') { |f| f.write(items) }
|
items.uniq!
|
||||||
|
puts "[*] We have parsed #{items.length} #{@type}s"
|
||||||
|
File.open(@file_name, 'w') { |f| f.puts(items) }
|
||||||
puts "New #{@file_name} file created"
|
puts "New #{@file_name} file created"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ class Svn_Parser
|
|||||||
@svn_hydra = @svn_browser.hydra
|
@svn_hydra = @svn_browser.hydra
|
||||||
end
|
end
|
||||||
|
|
||||||
def parse(dirs = nil)
|
def parse(dirs=nil)
|
||||||
if dirs == nil
|
if dirs == nil
|
||||||
dirs = get_root_directories
|
dirs = get_root_directories
|
||||||
end
|
end
|
||||||
@@ -43,11 +43,11 @@ class Svn_Parser
|
|||||||
def get_root_directories
|
def get_root_directories
|
||||||
dirs = []
|
dirs = []
|
||||||
rootindex = @svn_browser.get(@svn_root).body
|
rootindex = @svn_browser.get(@svn_root).body
|
||||||
rootindex.scan(%r{<li><a href=".*">(.*)/</a></li>}i).each do |dir|
|
rootindex.scan(%r{<li><a href=".+">(.+)/</a></li>}i).each do |dir|
|
||||||
dirs << dir[0]
|
dirs << dir[0]
|
||||||
end
|
end
|
||||||
dirs.uniq
|
dirs.sort!
|
||||||
dirs.sort
|
dirs.uniq!
|
||||||
return dirs
|
return dirs
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -62,14 +62,14 @@ class Svn_Parser
|
|||||||
# trunk folder present
|
# trunk folder present
|
||||||
if contains_trunk(response)
|
if contains_trunk(response)
|
||||||
puts "[+] Adding trunk on #{dir}" if @verbose
|
puts "[+] Adding trunk on #{dir}" if @verbose
|
||||||
urls << (svnurl << "trunk/")
|
urls << { :name => dir, :folder => "trunk"}
|
||||||
# no trunk folder. This is true on theme svn repos
|
# no trunk folder. This is true on theme svn repos
|
||||||
else
|
else
|
||||||
folders = response.body.scan(%r{^\s*<li><a href="(.*)/">.*/</a></li>$}i)
|
folders = response.body.scan(%r{^\s*<li><a href="(.+)/">.+/</a></li>$}i)
|
||||||
if folders != nil and folders.length > 0
|
if folders != nil and folders.length > 0
|
||||||
last_version = folders.last[0]
|
last_version = folders.last[0]
|
||||||
puts "[+] Adding #{last_version} on #{dir}" if @verbose
|
puts "[+] Adding #{last_version} on #{dir}" if @verbose
|
||||||
urls << (svnurl + last_version + "/")
|
urls << { :name => dir, :folder => last_version}
|
||||||
else
|
else
|
||||||
puts "[+] No content in #{dir}" if @verbose
|
puts "[+] No content in #{dir}" if @verbose
|
||||||
end
|
end
|
||||||
@@ -89,20 +89,24 @@ class Svn_Parser
|
|||||||
end
|
end
|
||||||
|
|
||||||
# Get a file in each directory
|
# Get a file in each directory
|
||||||
def get_svn_file_entries(urls)
|
def get_svn_file_entries(dirs)
|
||||||
entries = []
|
entries = []
|
||||||
queue_count = 0
|
queue_count = 0
|
||||||
urls.each do |url|
|
dirs.each do |dir|
|
||||||
|
url = @svn_root + dir[:name] + "/" + dir[:folder] + "/"
|
||||||
request = @svn_browser.forge_request(url)
|
request = @svn_browser.forge_request(url)
|
||||||
request.on_complete do |response|
|
request.on_complete do |response|
|
||||||
puts "[+] Parsing url #{url} [#{response.code.to_s}]" if @verbose
|
puts "[+] Parsing url #{url} [#{response.code.to_s}]" if @verbose
|
||||||
file = response.body[%r{<li><a href="(.*\..*)">.*</a></li>}i, 1]
|
file = response.body[%r{<li><a href="(.+\.[^/]+)">.+</a></li>}i, 1]
|
||||||
# TODO: recursive parsing of subdirectories if there is no file in the root directory
|
# TODO: recursive parsing of subdirectories if there is no file in the root directory
|
||||||
|
path = dir[:name] + "/"
|
||||||
if file
|
if file
|
||||||
url += "/" + file
|
path += file
|
||||||
entries << url
|
entries << path
|
||||||
|
puts "[+] Added #{path}" if @verbose
|
||||||
elsif @keep_empty_dirs
|
elsif @keep_empty_dirs
|
||||||
entries << url
|
entries << path
|
||||||
|
puts "[+] Added #{path}" if @verbose
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
queue_count += 1
|
queue_count += 1
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ begin
|
|||||||
if argument == ''
|
if argument == ''
|
||||||
puts "Number of pages not supplied, defaulting to 150 pages ..."
|
puts "Number of pages not supplied, defaulting to 150 pages ..."
|
||||||
@number_of_pages = 150
|
@number_of_pages = 150
|
||||||
else
|
else
|
||||||
@number_of_pages = argument.to_i
|
@number_of_pages = argument.to_i
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user