diff --git a/doc/Array.html b/doc/Array.html index 3019df95..2aedb0b7 100644 --- a/doc/Array.html +++ b/doc/Array.html @@ -1,232 +1,308 @@ - - - + + + - + -class Array - RDoc Documentation + Class: Array - - - - - - - - - - + + + + + + - - -
-

class Array

- -
- -
- - - - -
- - - - - - - - - - -
-

Public Instance Methods

- - -
- -
- _grep_(regexp) - click to toggle source +
+
+

In Files

+ +
+ + +
+ +
+ + +
+

Parent

+ + +
+ -
+ + + + + + +
+

Methods

+ +
+ + + +
+ + +
+ +
+

Array

+ +
+ +
+ + + + +
+ + + + + + + + + + +
+

Public Instance Methods

+ + +
+ -
-
# File lib/common_helper.rb, line 111
+          
+ _grep_(regexp) + click to toggle source +
+ + +
+ +

Fix for grep with symbols in ruby <= 1.8.7

+ + + +
+
+# File lib/common/hacks.rb, line 19
 def _grep_(regexp)
   matches = []
   self.each do |value|
@@ -235,57 +311,62 @@
   end
   matches
 end
-
+
+ +
+ + +
+ Also aliased as: grep +
-
- -
- Also aliased as: grep -
- + +
- -
+ +
+ + +
+ grep(regexp) + click to toggle source +
+ + +
+ + + + + +
+ + + + +
+ Alias for: _grep_ +
+ +
+ + +
-
- -
- grep(regexp) - click to toggle source -
- - -
- - - - - -
- - - - -
- Alias for: _grep_ -
- -
- - -
+
- - + +
+

[Validate]

+

Generated with the Darkfish + Rdoc Generator 2.

+
- + + diff --git a/doc/Browser.html b/doc/Browser.html index cce6590c..21a056a7 100644 --- a/doc/Browser.html +++ b/doc/Browser.html @@ -1,444 +1,612 @@ - - - + + + - + -class Browser - RDoc Documentation + Class: Browser - - - - - - - - - - + + + + + + - - -
-

class Browser

- -
- -
- - - - -
- - - - - - -
-

Constants

-
- -
ACCESSOR_OPTIONS - -
- - -
USER_AGENT_MODES - -
- - -
-
- - - - -
-

Attributes

- - -
-
- config_file[R] -
- -
- - - +
+
+

In Files

+
- -
-
- hydra[R] -
-
+ +
+ +
+ + +
+

Parent

+ - -
-
- - - -
-

Public Class Methods

+ - - + +
+ + +
+

Files

+ +
+ + + + + +
+
+ +
+

Browser

+ +
+ +
+ + + + +
+ + + + + + +
+

Constants

+
+ +
ACCESSOR_OPTIONS
+ +
+ + +
USER_AGENT_MODES
+ +
+ + +
+
+ + + + +
+

Attributes

+ + +
+ + +
+ config_file[R] +
+ +
+ + + +
+
+ + +
+ hydra[R] +
-
+
+
+
+ +
+ + + + +
+

Public Class Methods

+ + +
+ -
-
# File lib/browser.rb, line 64
+          
+ instance(options = {}) + click to toggle source +
+ + +
+ + + + + +
+
+# File lib/common/browser.rb, line 48
 def self.instance(options = {})
   unless @@instance
     @@instance = new(options)
   end
   @@instance
 end
-
- -
+
+ +
- - - -
- - -
- -
- reset() - click to toggle source -
- - -
- - -
-
# File lib/browser.rb, line 71
+        
+ + +
+ + + +
+ reset() + click to toggle source +
+ + +
+ + + + + +
+
+# File lib/common/browser.rb, line 55
 def self.reset
   @@instance = nil
 end
-
+
+ +
+ -
- - - -
+ +
+ +
- - -
-

Public Instance Methods

+
+

Public Instance Methods

- -
- -
- forge_request(url, params = {}) - click to toggle source -
- - -
- - - + +
+ -
-
# File lib/browser.rb, line 178
+          
+ forge_request(url, params = {}) + click to toggle source +
+ + +
+ + + + + +
+
+# File lib/common/browser.rb, line 146
 def forge_request(url, params = {})
   Typhoeus::Request.new(
     url.to_s,
     merge_request_params(params)
   )
 end
-
- -
+
+ +
- - - -
- - -
- -
- get(url, params = {}) - click to toggle source -
- - -
- - -
-
# File lib/browser.rb, line 166
+        
+ + +
+ + + +
+ get(url, params = {}) + click to toggle source +
+ + +
+ + + + + +
+
+# File lib/common/browser.rb, line 126
 def get(url, params = {})
   run_request(
-    forge_request(url, params.merge(:method => :get))
+    forge_request(url, params.merge(method: :get))
   )
 end
-
+
+ +
+ -
- - - -
- - -
- -
- load_config(config_file = nil) - click to toggle source -
- - -
-

TODO reload hydra (if the .#load_config is called on a +

+ + +
+ + + +
+ get_and_follow_location(url, params = {}) + click to toggle source +
+ + +
+ + + + + +
+
+# File lib/common/browser.rb, line 138
+def get_and_follow_location(url, params = {})
+  params[:maxredirs] ||= 2
+
+  run_request(
+    forge_request(url, params.merge(method: :get, followlocation: true))
+  )
+end
+
+ +
+ + + + +
+ + +
+ + + +
+ invalid_proxy_auth_format() + click to toggle source +
+ + +
+ + + + + +
+
+# File lib/common/browser.rb, line 104
+def invalid_proxy_auth_format
+  'Invalid proxy auth format, expected username:password or {proxy_username: username, proxy_password: password}'
+end
+
+ +
+ + + + +
+ + +
+ + + +
+ load_config(config_file = nil) + click to toggle source +
+ + +
+ +

TODO reload hydra (if the .load_config is called on a browser object, hydra will not have the new @max_threads and @request_timeout)

- + - -
-
# File lib/browser.rb, line 136
+            
+            
+
+# File lib/common/browser.rb, line 110
 def load_config(config_file = nil)
   @config_file = config_file || @config_file
 
-  data = JSON.parse(File.read(@config_file))
+  if File.symlink?(@config_file)
+    raise "[ERROR] Config file is a symlink."
+  else
+    data = JSON.parse(File.read(@config_file))
+  end
 
   ACCESSOR_OPTIONS.each do |option|
     option_name = option.to_s
@@ -446,241 +614,212 @@ browser object, hydra will not have the new @max_threads and
     self.send(:"#{option_name}=", data[option_name])
   end
 end
-
- -
+
+ +
- - - -
- - -
- -
- max_threads=(max_threads) - click to toggle source -
- - -
- - -
-
# File lib/browser.rb, line 101
+        
+ + +
+ + + +
+ max_threads=(max_threads) + click to toggle source +
+ + +
+ + + + + +
+
+# File lib/common/browser.rb, line 85
 def max_threads=(max_threads)
   if max_threads.nil? or max_threads <= 0
     max_threads = 1
   end
   @max_threads = max_threads
 end
-
- -
+
+ +
- - - -
- - -
- -
- merge_request_params(params = {}) - click to toggle source -
- - -
- - -
-
# File lib/browser.rb, line 185
+        
+ + +
+ + + +
+ merge_request_params(params = {}) + click to toggle source +
+ + +
+ + + + + +
+
+# File lib/common/browser.rb, line 153
 def merge_request_params(params = {})
+  params = Browser.append_params_header_field(
+    params,
+    'User-Agent',
+    self.user_agent
+  )
+
   if @proxy
-    params = params.merge(:proxy => @proxy)
+    params = params.merge(proxy: @proxy)
 
     if @proxy_auth
-      params = params.merge(@proxy_auth)
+      params = params.merge(proxyauth: @proxy_auth)
     end
   end
 
   if @basic_auth
-    if !params.has_key?(:headers)
-      params = params.merge(:headers => {'Authorization' => @basic_auth})
-    elsif !params[:headers].has_key?('Authorization')
-      params[:headers]['Authorization'] = @basic_auth
-    end
+    params = Browser.append_params_header_field(
+      params,
+      'Authorization',
+      @basic_auth
+    )
   end
 
-  unless params.has_key?(:disable_ssl_host_verification)
-    params = params.merge(:disable_ssl_host_verification => true)
+  # Used to enable the cache system if :cache_ttl > 0
+  unless params.has_key?(:cache_ttl)
+    params = params.merge(cache_ttl: @cache_ttl)
   end
 
-  unless params.has_key?(:disable_ssl_peer_verification)
-    params = params.merge(:disable_ssl_peer_verification => true)
-  end
-
-  if !params.has_key?(:headers)
-    params = params.merge(:headers => {'user-agent' => self.user_agent})
-  elsif !params[:headers].has_key?('user-agent')
-    params[:headers]['user-agent'] = self.user_agent
-  end
-
-  # Used to enable the cache system if :cache_timeout > 0
-  unless params.has_key?(:cache_timeout)
-    params = params.merge(:cache_timeout => @cache_timeout)
-  end
+  # Disable SSL-Certificate checks
+  params = params.merge(ssl_verifypeer: false)
+  params = params.merge(ssl_verifyhost: 0)
 
   params
 end
-
- -
+
+ +
- - - -
- - -
- -
- post(url, params = {}) - click to toggle source -
- - -
- - -
-
# File lib/browser.rb, line 172
+        
+ + +
+ + + +
+ post(url, params = {}) + click to toggle source +
+ + +
+ + + + + +
+
+# File lib/common/browser.rb, line 132
 def post(url, params = {})
   run_request(
-    forge_request(url, params.merge(:method => :post))
+    forge_request(url, params.merge(method: :post))
   )
 end
-
- -
+
+ +
- - - -
- - -
- -
- proxy_auth=(auth) - click to toggle source -
- - -
- - -
-
# File lib/browser.rb, line 108
+        
+ + +
+ + + +
+ proxy_auth=(auth) + click to toggle source +
+ + +
+ + + + + +
+
+# File lib/common/browser.rb, line 92
 def proxy_auth=(auth)
   unless auth.nil?
-    if auth.is_a?(Hash)
-      if !auth.include?(:proxy_username) or !auth.include?(:proxy_password)
-        raise_invalid_proxy_format()
-      end
+    if auth.is_a?(Hash) && auth.include?(:proxy_username) && auth.include?(:proxy_password)
+      @proxy_auth = auth[:proxy_username] + ':' + auth[:proxy_password]
+    elsif auth.is_a?(String) && auth.index(':') != nil
       @proxy_auth = auth
-    elsif auth.is_a?(String)
-      if matches = %r{([^:]+):(.*)}.match(auth)
-        @proxy_auth = {
-          proxy_username: matches[1],
-          proxy_password: matches[2]
-        }
-      else
-        raise_invalid_proxy_auth_format()
-      end
     else
-      raise_invalid_proxy_auth_format()
+      raise invalid_proxy_auth_format
     end
   end
 end
-
- -
+
+ +
- - - -
- - -
- -
- raise_invalid_proxy_auth_format() - click to toggle source -
- - -
- - -
-
# File lib/browser.rb, line 130
-def raise_invalid_proxy_auth_format
-  raise 'Invalid proxy auth format, expected username:password or {proxy_username: username, proxy_password: password}'
-end
-
- -
+
- - - -
- - -
- -
- user_agent() - click to toggle source -
- - -
- -

return the user agent, according to the user_agent_mode

- + +
+ -
-
# File lib/browser.rb, line 89
+          
+ user_agent() + click to toggle source +
+ + +
+ +

return the user agent, according to the user_agent_mode

+ + + +
+
+# File lib/common/browser.rb, line 73
 def user_agent
   case @user_agent_mode
   when 'semi-static'
@@ -692,33 +831,36 @@ browser object, hydra will not have the new @max_threads and
   end
   @user_agent
 end
-
- -
+
+ +
- - - -
- - -
- -
- user_agent_mode=(ua_mode) - click to toggle source -
- - -
- - -
-
# File lib/browser.rb, line 75
+        
+ + +
+ + + +
+ user_agent_mode=(ua_mode) + click to toggle source +
+ + +
+ + + + + +
+
+# File lib/common/browser.rb, line 59
 def user_agent_mode=(ua_mode)
   ua_mode ||= 'static'
 
@@ -731,26 +873,29 @@ browser object, hydra will not have the new @max_threads and
     raise "Unknow user agent mode : '#{ua_mode}'"
   end
 end
-
+
+ +
+ -
- - - -
+ +
+ +
-
+
- - + +
+

[Validate]

+

Generated with the Darkfish + Rdoc Generator 2.

+
- + + diff --git a/doc/BruteForce.html b/doc/BruteForce.html index 86a4de4e..e5743480 100644 --- a/doc/BruteForce.html +++ b/doc/BruteForce.html @@ -1,321 +1,400 @@ - - - + + + - + -module BruteForce - RDoc Documentation + Module: BruteForce - - - - - - - - - - + + + + + + - - -
-

module BruteForce

- -
- -
- - - - -
- - - - - - - - - - -
-

Public Class Methods

- - -
- -
- lines_in_file(file_path) - click to toggle source +
+
+

In Files

+ +
+ + +
+ +
+ + + + + + + + +
+

Methods

+ +
+ + + +
+ + +
+ +
+

BruteForce

+ +
+ +
+ + + + +
+ + + + + + + + + + +
+

Public Class Methods

+ + +
+ -
-

Counts the number of lines in the wordlist It can take a couple of minutes +

+ lines_in_file(file_path) + click to toggle source +
+ + +
+ +

Counts the number of lines in the wordlist It can take a couple of minutes on large wordlists, although bareable.

- + - -
-
# File lib/wpscan/modules/brute_force.rb, line 117
+            
+            
+
+# File lib/wpscan/modules/brute_force.rb, line 101
 def self.lines_in_file(file_path)
   lines = 0
   File.open(file_path, 'r').each { |_| lines += 1 }
   lines
 end
-
+
+ +
+ -
- - - -
- - -
- -
-

Public Instance Methods

- - -
- -
- brute_force(logins, wordlist_path, options = {}) - click to toggle source -
- - -
-

param array of string logins param string wordlist_path param hash options

+
+ + +
+ +
+

Public Instance Methods

+ + +
+ + + +
+ brute_force(wp_users, wordlist_path, options = {}) + click to toggle source +
+ + +
+ +

param array of WpUsers wp_users param string +wordlist_path param hash options

boolean :show_progression If true, will output the details (Sucess, error etc)
- + - -
-
# File lib/wpscan/modules/brute_force.rb, line 25
-def brute_force(logins, wordlist_path, options = {})
+            
+            
+
+# File lib/wpscan/modules/brute_force.rb, line 8
+def brute_force(wp_users, wordlist_path, options = {})
   hydra               = Browser.instance.hydra
   number_of_passwords = BruteForce.lines_in_file(wordlist_path)
   login_url           = login_url()
   found               = []
   show_progression    = options[:show_progression] || false
 
-  logins.each do |login|
+  wp_users.each do |wp_user|
     queue_count    = 0
     request_count  = 0
     password_found = false
 
     File.open(wordlist_path, 'r').each do |password|
-
       # ignore file comments, but will miss passwords if they start with a hash...
       next if password[0, 1] == '#'
 
+      password.strip!
+
       # keep a count of the amount of requests to be sent
       request_count += 1
       queue_count   += 1
 
       # create local vars for on_complete call back, Issue 51.
-      username = login.name != 'empty' ? login.name : login.nickname # Issue #66
+      login    = wp_user.login
       password = password
 
       # the request object
       request = Browser.instance.forge_request(login_url,
         {
           method: :post,
-          params: { log: URI::encode(username), pwd: URI::encode(password) },
-          cache_timeout: 0
+          body: { log: URI::encode(login), pwd: URI::encode(password) },
+          cache_ttl: 0
         }
       )
 
       # tell hydra what to do when the request completes
       request.on_complete do |response|
 
-        puts "\n  Trying Username : #{username} Password : #{password}" if @verbose
+        puts "\n  Trying Username : #{login} Password : #{password}" if @verbose
 
-        if response.body =~ %rlogin_error/
-          puts "\nIncorrect username and/or password." if @verbose
+        if response.body =~ /login_error/
+          puts "\nIncorrect login and/or password." if @verbose
         elsif response.code == 302
-          puts "\n  " + green('[SUCCESS]') + " Username : #{username} Password : #{password}\n" if show_progression
-          found << { name: username, password: password }
+          puts "\n  " + green('[SUCCESS]') + " Login : #{login} Password : #{password}\n" if show_progression
+          found << { name: login, password: password }
           password_found = true
         elsif response.timed_out?
           puts red('ERROR:') + ' Request timed out.' if show_progression
         elsif response.code == 0
           puts red('ERROR:') + ' No response from remote server. WAF/IPS?' if show_progression
         # code is a fixnum, needs a string for regex
-        elsif response.code.to_s =~ %r^50/
+        elsif response.code.to_s =~ /^50/
           puts red('ERROR:') + ' Server error, try reducing the number of threads.' if show_progression
         else
-          puts "\n" + red('ERROR:') + " We recieved an unknown response for #{password}..." if show_progression
+          puts "\n" + red('ERROR:') + " We received an unknown response for #{password}..." if show_progression
 
           # HACK to get the coverage :/ (otherwise some output is present in the rspec)
           puts red("Code: #{response.code.to_s}") if @verbose
@@ -324,14 +403,14 @@ on large wordlists, although bareable.

end end - # move onto the next username if we have found a valid password + # move onto the next login if we have found a valid password break if password_found # queue the request to be sent later hydra.queue(request) # progress indicator - print "\r Brute forcing user '#{username}' with #{number_of_passwords} passwords... #{(request_count * 100) / number_of_passwords}% complete." if show_progression + print "\r Brute forcing user '#{login}' with #{number_of_passwords} passwords... #{(request_count * 100) / number_of_passwords}% complete." if show_progression # it can take a long time to queue 2 million requests, # for that reason, we queue @threads, send @threads, queue @threads and so on. @@ -350,26 +429,29 @@ on large wordlists, although bareable.

end found end
-
+
+ +
+ -
- - - -
+ +
+ + - + - - + +
+

[Validate]

+

Generated with the Darkfish + Rdoc Generator 2.

+
- + + diff --git a/doc/CREDITS.html b/doc/CREDITS.html index 264f5ffd..947ec699 100644 --- a/doc/CREDITS.html +++ b/doc/CREDITS.html @@ -1,157 +1,222 @@ - + + - + - + -CREDITS - RDoc Documentation + File: CREDITS [RDoc Documentation] - - - - - - - - - - + + + + + + - -
- -

*CREDITS*

+
+ +

*CREDITS*

This file is to give credit to WPScan’s contributors. If you feel your name should be in here, email ryandewhurst at gmail.

@@ -168,15 +233,15 @@ should be in here, email ryandewhurst at gmail.

potential solutions to bugs. Callum Pember - Implemented proxy support - callumpember at gmail.com g0tmi1k - Additional timthumb checks + bug reports. Melvin Lammerts - Reported a couple of fake vulnerabilities - -melvin at 12k.nl Paolo Perego - @thesp0nge - Basic authentification

+melvin at 12k.nl Paolo Perego - @thesp0nge - Basic authentication

-
+
- - - +
+

[Validate]

+

Generated with the Darkfish + Rdoc Generator 2.

+
+ + diff --git a/doc/CacheFileStore.html b/doc/CacheFileStore.html index 1b86f843..4a7b2da6 100644 --- a/doc/CacheFileStore.html +++ b/doc/CacheFileStore.html @@ -1,276 +1,356 @@ - - - + + + - + -class CacheFileStore - RDoc Documentation + Class: CacheFileStore - - - - - - - - - - + + + + + + - - -
-

class CacheFileStore

- -
- -
- - - - -
- - - - - - - - -
-

Attributes

- - -
-
- serializer[R] -
- -
- - - -
+
+
+
+

+ Home + Classes + Methods +

- -
-
- storage_path[R] -
+
-
- - - -
-
- -
- - - - -
-

Public Class Methods

- - -
- -
- new(storage_path, serializer = Marshal) - click to toggle source -
- - -
+
+
+

In Files

+
+ +
+
+ + +
+ +
+ + +
+

Parent

+ + + +
+ + + + + + + + +
+

Methods

+ +
+ + + +
+ + +
+ +
+

CacheFileStore

+ +
+ +
+ + + + +
+ + + + + + + + +
+

Attributes

+ + +
+ + +
+ serializer[R] +
+ +
+ + + +
+
+ +
+ + +
+ storage_path[R] +
+ +
+ + + +
+
+ +
+ + + + +
+

Public Class Methods

+ + +
+ + + +
+ new(storage_path, serializer = Marshal) + click to toggle source +
+ + +
+ +

The serializer must have the 2 methods .load and .dump

(Marshal and YAML have them)

YAML is Human Readable, contrary to Marshal which store in a binary format Marshal does not need any “require”

- + - -
-
# File lib/cache_file_store.rb, line 36
+            
+            
+
+# File lib/common/cache_file_store.rb, line 19
 def initialize(storage_path, serializer = Marshal)
   @storage_path = File.expand_path(storage_path)
   @serializer = serializer
@@ -281,101 +361,110 @@ Marshal does not need any “require”

Dir.mkdir(@storage_path) end end
-
+
+ +
+ -
- - - -
+ +
+ +
-
- -
-

Public Instance Methods

+
+

Public Instance Methods

- -
- -
- clean() - click to toggle source -
- - -
- - - + +
+ -
-
# File lib/cache_file_store.rb, line 47
+          
+ clean() + click to toggle source +
+ + +
+ + + + + +
+
+# File lib/common/cache_file_store.rb, line 30
 def clean
   Dir[File.join(@storage_path, '*')].each do |f|
-    File.delete(f)
+    File.delete(f) unless File.symlink?(f)
   end
 end
-
- -
+
+ +
- - - -
- - -
- -
- get_entry_file_path(key) - click to toggle source -
- - -
- - -
-
# File lib/cache_file_store.rb, line 69
+        
+ + +
+ + + +
+ get_entry_file_path(key) + click to toggle source +
+ + +
+ + + + + +
+
+# File lib/common/cache_file_store.rb, line 52
 def get_entry_file_path(key)
-  @storage_path + '/' + key
+  File::join(@storage_path, key)
 end
-
- -
+
+ +
- - - -
- - -
- -
- read_entry(key) - click to toggle source -
- - -
- - -
-
# File lib/cache_file_store.rb, line 53
+        
+ + +
+ + + +
+ read_entry(key) + click to toggle source +
+ + +
+ + + + + +
+
+# File lib/common/cache_file_store.rb, line 36
 def read_entry(key)
   entry_file_path = get_entry_file_path(key)
 
@@ -383,60 +472,66 @@ Marshal does not need any “require”

return @serializer.load(File.read(entry_file_path)) end end
-
- -
+
+ +
- - - -
- - -
- -
- write_entry(key, data_to_store, cache_timeout) - click to toggle source -
- - -
- - -
-
# File lib/cache_file_store.rb, line 61
-def write_entry(key, data_to_store, cache_timeout)
-  if cache_timeout > 0
+        
+ + +
+ + + +
+ write_entry(key, data_to_store, cache_ttl) + click to toggle source +
+ + +
+ + + + + +
+
+# File lib/common/cache_file_store.rb, line 44
+def write_entry(key, data_to_store, cache_ttl)
+  if cache_ttl > 0
     File.open(get_entry_file_path(key), 'w') do |f|
       f.write(@serializer.dump(data_to_store))
     end
   end
 end
-
+
+ +
+ -
- - - -
+ +
+ +
-
+
- - + +
+

[Validate]

+

Generated with the Darkfish + Rdoc Generator 2.

+
- + + diff --git a/doc/CheckerPlugin.html b/doc/CheckerPlugin.html index 8b862477..68859458 100644 --- a/doc/CheckerPlugin.html +++ b/doc/CheckerPlugin.html @@ -1,254 +1,312 @@ - - - + + + - + -class CheckerPlugin - RDoc Documentation + Class: CheckerPlugin - - - - - - - - - - + + + + + + - - -
-

class CheckerPlugin

- -
- -
WPScan - WordPress Security Scanner
-Copyright (C) 2012-2013
-
-This program is free software: you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program.  If not, see <http://www.gnu.org/licenses/>.
- -

++

- -
- - - - -
- - - - - - - - - - -
-

Public Class Methods

- - -
- -
- new() - click to toggle source +
+ + + +
+ +
+ + +
+

Parent

+ + +
+ -
+ + + + + + + + + + +
+ + +
+ +
+

CheckerPlugin

+ +
+ +
+ + + + +
+ + + + + + + + + + +
+

Public Class Methods

+ + +
+ -
-
# File lib/wpstools/plugins/checker/checker_plugin.rb, line 21
+          
+ new() + click to toggle source +
+ + +
+ + + + + +
+
+# File lib/wpstools/plugins/checker/checker_plugin.rb, line 4
 def initialize
   super(author: 'WPScanTeam - @erwanlr')
 
@@ -257,39 +315,42 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
'--check-local-vulnerable-files LOCAL_DIRECTORY', '--clvf', 'Perform a recursive scan in the LOCAL_DIRECTORY to find vulnerable files or shells'] ) end
-
+
+ +
+ -
- - - -
+ +
+ +
-
- -
-

Public Instance Methods

+
+

Public Instance Methods

- -
- -
- check_local_vulnerable_files(dir_to_scan) - click to toggle source -
- - -
- - - + +
+ -
-
# File lib/wpstools/plugins/checker/checker_plugin.rb, line 93
+          
+ check_local_vulnerable_files(dir_to_scan) + click to toggle source +
+ + +
+ + + + + +
+
+# File lib/wpstools/plugins/checker/checker_plugin.rb, line 74
 def check_local_vulnerable_files(dir_to_scan)
   if Dir::exist?(dir_to_scan)
     xml_file               = LOCAL_FILES_FILE
@@ -312,9 +373,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
puts '[+] Checking for vulnerable files ...' - xml = Nokogiri::XML(File.open(xml_file)) do |config| - config.noblanks - end + xml = xml(xml_file) xml.xpath('//hash').each do |node| sha1sum = node.attribute('sha1').text @@ -343,44 +402,45 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
puts "The supplied directory '#{dir_to_scan}' does not exist" end end -
- -
+
+ +
- - - -
- - -
- -
- check_vuln_ref_urls() - click to toggle source -
- - -
- - -
-
# File lib/wpstools/plugins/checker/checker_plugin.rb, line 40
+        
+ + +
+ + + +
+ check_vuln_ref_urls() + click to toggle source +
+ + +
+ + + + + +
+
+# File lib/wpstools/plugins/checker/checker_plugin.rb, line 23
 def check_vuln_ref_urls
   vuln_ref_files   = [PLUGINS_VULNS_FILE, THEMES_VULNS_FILE, WP_VULNS_FILE]
   error_codes      = [404, 500, 403]
-  not_found_regexp = %r{No Results Found|error 404|ID Invalid or Not Found}
+  not_found_regexp = %{No Results Found|error 404|ID Invalid or Not Found}
 
   puts '[+] Checking vulnerabilities reference urls'
 
   vuln_ref_files.each do |vuln_ref_file|
-    xml = Nokogiri::XML(File.open(vuln_ref_file)) do |config|
-      config.noblanks
-    end
+    xml = xml(vuln_ref_file)
 
     urls = []
     xml.xpath('//reference').each { |node| urls << node.text }
@@ -395,7 +455,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
number_of_urls = urls.size urls.each do |url| - request = browser.forge_request(url, { cache_timeout: 0, follow_location: true }) + request = browser.forge_request(url, { cache_ttl: 0, followlocation: true }) request_count += 1 request.on_complete do |response| @@ -422,33 +482,36 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.end end end -
- -
+
+ +
- - - -
- - -
- -
- run(options = {}) - click to toggle source -
- - -
- - -
-
# File lib/wpstools/plugins/checker/checker_plugin.rb, line 30
+        
+ + +
+ + + +
+ run(options = {}) + click to toggle source +
+ + +
+ + + + + +
+
+# File lib/wpstools/plugins/checker/checker_plugin.rb, line 13
 def run(options = {})
   if options[:check_vuln_ref_urls]
     check_vuln_ref_urls
@@ -458,26 +521,29 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
check_local_vulnerable_files(options[:check_local_vulnerable_files]) end end -
+
+ +
+ -
- - - -
+ +
+ + - + - - + +
+

[Validate]

+

Generated with the Darkfish + Rdoc Generator 2.

+
- + + diff --git a/doc/CustomOptionParser.html b/doc/CustomOptionParser.html index ede810f2..2252ad7c 100644 --- a/doc/CustomOptionParser.html +++ b/doc/CustomOptionParser.html @@ -1,365 +1,431 @@ - - - + + + - + -class CustomOptionParser - RDoc Documentation + Class: CustomOptionParser - - - - - - - - - - + + + + + + - - -
-

class CustomOptionParser

- -
- -
WPScan - WordPress Security Scanner
-Copyright (C) 2012-2013
-
-This program is free software: you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program.  If not, see <http://www.gnu.org/licenses/>.
- -

++

- -
- - - - -
- - - - - - - - -
-

Attributes

- - -
-
- symbols_used[R] -
- -
- - - +
+
+

In Files

+
+ -
- +
- - -
-

Public Class Methods

- - -
+
+ + +
+

Parent

-
- new(banner = nil, width = 32, indent = ' ' * 4) - click to toggle source + + +
+ + + + + + + + +
+

Methods

+ +
+ + + +
+ + +
+ +
+

CustomOptionParser

+ +
+ +
+ + + + +
+ + + + + + + + +
+

Attributes

+ + +
+ + +
+ symbols_used[R] +
+ +
+ + + +
+
+ -
- - - + + +
+

Public Class Methods

+ + +
+ -
-
# File lib/common/custom_option_parser.rb, line 23
+          
+ new(banner = nil, width = 32, indent = ' ' * 4) + click to toggle source +
+ + +
+ + + + + +
+
+# File lib/common/custom_option_parser.rb, line 6
 def initialize(banner = nil, width = 32, indent = ' ' * 4)
   @results         = {}
   @symbols_used    = []
   super(banner, width, indent)
 end
-
+
+ +
+ -
- - - -
+ +
+ +
-
- -
-

Protected Class Methods

+
+

Protected Class Methods

- -
- -
- option_to_symbol(option) - click to toggle source -
- - -
- -

param Array option

- + +
+ -
-
# File lib/common/custom_option_parser.rb, line 73
+          
+ option_to_symbol(option) + click to toggle source +
+ + +
+ +

param Array option

+ + + +
+
+# File lib/common/custom_option_parser.rb, line 56
 def self.option_to_symbol(option)
   option_name = nil
 
   option.each do |option_attr|
-    if option_attr =~ %r^--/
+    if option_attr =~ /^--/
       option_name = option_attr
       break
     end
   end
 
   if option_name
-    option_name = option_name.gsub(%r^--/, '').gsub(%r-/, '_').gsub(%r .*$/, '')
+    option_name = option_name.gsub(/^--/, '').gsub(/-/, '_').gsub(/ .*$/, '')
     :"#{option_name}"
   else
     raise "Could not find the option name for #{option}"
   end
 end
-
+
+ +
+ -
- - - -
- - -
- -
-

Public Instance Methods

- - -
- -
- add(options) - click to toggle source -
- - -
-

param Array(Array) or + + +

+ +
+

Public Instance Methods

+ + +
+ + + +
+ add(options) + click to toggle source +
+ + +
+ +

param Array(Array) or Array options

- + - -
-
# File lib/common/custom_option_parser.rb, line 31
+            
+            
+
+# File lib/common/custom_option_parser.rb, line 14
 def add(options)
   if options.is_a?(Array)
     if options[0].is_a?(Array)
@@ -373,38 +439,41 @@ href="Array.html">Array options

raise "Options must be at least an Array, or an Array(Array). #{options.class} supplied" end end
-
- -
+
+ +
- - - -
- - -
- -
- add_option(option) - click to toggle source -
- - -
- -

param Array option

-
-
# File lib/common/custom_option_parser.rb, line 46
+        
+ + +
+ + + +
+ add_option(option) + click to toggle source +
+ + +
+ +

param Array option

+ + + +
+
+# File lib/common/custom_option_parser.rb, line 29
 def add_option(option)
   if option.is_a?(Array)
     option_symbol = CustomOptionParser::option_to_symbol(option)
 
-    unless @symbols_used.include?(option_symbol)
+    if !@symbols_used.include?(option_symbol)
       @symbols_used << option_symbol
 
       self.on(*option) do |arg|
@@ -417,58 +486,64 @@ href="Array.html">Array options

raise "The option must be an array, #{option.class} supplied : '#{option}'" end end
-
- -
+
+ +
- - - -
- - -
- -
- results(argv = default_argv) - click to toggle source -
- - -
- -

return Hash

-
-
# File lib/common/custom_option_parser.rb, line 65
+        
+ + +
+ + + +
+ results(argv = default_argv) + click to toggle source +
+ + +
+ +

return Hash

+ + + +
+
+# File lib/common/custom_option_parser.rb, line 48
 def results(argv = default_argv)
   self.parse!(argv) if @results.empty?
 
   @results
 end
-
+
+ +
+ -
- - - -
+ +
+ + -
+ - - + +
+

[Validate]

+

Generated with the Darkfish + Rdoc Generator 2.

+
- + + diff --git a/doc/Gemfile.html b/doc/Gemfile.html index df9dfd21..32a9d306 100644 --- a/doc/Gemfile.html +++ b/doc/Gemfile.html @@ -1,176 +1,240 @@ - + + - + - + -Gemfile - RDoc Documentation + File: Gemfile [RDoc Documentation] - - - - - - - - - - + + + + + + - -
- +
+

source “rubygems.org

-

gem “typhoeus”, “0.4.2” gem “nokogiri” gem “json”

+

gem “typhoeus”, “>=0.6.2” gem “nokogiri” gem “json”

group :development, :test do

-
gem "webmock", "1.8.11"
-gem "simplecov"
-gem "rspec", :require => "spec"
-
+
gem "webmock", ">=1.9.3"
+gem "simplecov"
+gem "rspec", :require => "spec"

end

-
+
- - - +
+

[Validate]

+

Generated with the Darkfish + Rdoc Generator 2.

+
+ + diff --git a/doc/GenerateList.html b/doc/GenerateList.html index 10029895..e4739e0d 100644 --- a/doc/GenerateList.html +++ b/doc/GenerateList.html @@ -1,273 +1,353 @@ - - - + + + - + -class GenerateList - RDoc Documentation + Class: GenerateList - - - - - - - - - - + + + + + + - - -
-

class GenerateList

- -
- -

This tool generates a list to use for plugin and theme enumeration

- -
- - - - -
- - - - - - - - -
-

Attributes

- - -
-
- verbose[RW] -
- -
- - - +
- +
- - -
-

Public Class Methods

- - -
+
+ + +
+

Parent

-
- new(type, verbose) - click to toggle source + + +
+ + + + + + + + + + + + +
+ + +
+ +
+

GenerateList

+ +
+ +

This tool generates a list to use for plugin and theme enumeration

+ +
+ + + + +
+ + + + + + + + +
+

Attributes

+ + +
+ + + + +
+ verbose[RW] +
+ +
+ + + +
+
+ -
- -

type = themes | plugins

- + + +
+

Public Class Methods

+ + +
+ -
-
# File lib/wpstools/plugins/list_generator/generate_list.rb, line 25
+          
+ new(type, verbose) + click to toggle source +
+ + +
+ +

type = themes | plugins

+ + + +
+
+# File lib/wpstools/plugins/list_generator/generate_list.rb, line 8
 def initialize(type, verbose)
-  if type =~ %rplugins/
+  if type =~ /plugins/
     @type           = 'plugin'
     @svn_url        = 'http://plugins.svn.wordpress.org/'
     @popular_url    = 'http://wordpress.org/extend/plugins/browse/popular/'
-    @popular_regex  = %r{<h3><a href="http://wordpress.org/extend/plugins/(.+)/">.+</a></h3>}
-  elsif type =~ %rthemes/
+    @popular_regex  = %{<h3><a href="http://wordpress.org/extend/plugins/(.+)/">.+</a></h3>}
+  elsif type =~ /themes/
     @type           = 'theme'
     @svn_url        = 'http://themes.svn.wordpress.org/'
     @popular_url    = 'http://wordpress.org/extend/themes/browse/popular/'
-    @popular_regex  = %r{<h3><a href="http://wordpress.org/extend/themes/(.+)">.+</a></h3>}
+    @popular_regex  = %{<h3><a href="http://wordpress.org/extend/themes/(.+)">.+</a></h3>}
   else
     raise "Type #{type} not defined"
   end
@@ -275,104 +355,113 @@
   @browser  = Browser.instance
   @hydra    = @browser.hydra
 end
-
+
+ +
+ -
- - - -
+ +
+ +
-
- -
-

Public Instance Methods

+
+

Public Instance Methods

- -
- -
- generate_full_list() - click to toggle source -
- - -
- - - + +
+ -
-
# File lib/wpstools/plugins/list_generator/generate_list.rb, line 69
+          
+ generate_full_list() + click to toggle source +
+ + +
+ + + + + +
+
+# File lib/wpstools/plugins/list_generator/generate_list.rb, line 52
 def generate_full_list
   set_file_name(:full)
   items = SvnParser.new(@svn_url).parse
   save items
 end
-
- -
+
+ +
- - - -
- - - - - - - - -
- -
- save(items) - click to toggle source -
- - -
- -

Save the file

-
-
# File lib/wpstools/plugins/list_generator/generate_list.rb, line 120
+        
+ + +
+ + + +
+ save(items) + click to toggle source +
+ + +
+ +

Save the file

+ + + +
+
+# File lib/wpstools/plugins/list_generator/generate_list.rb, line 103
 def save(items)
   items.sort!
   items.uniq!
@@ -442,33 +534,36 @@ parse the response for the names.

File.open(@file_name, 'w') { |f| f.puts(items) } puts "New #@file_name file created" end
-
- -
+
+ +
- - - -
- - -
- -
- set_file_name(type) - click to toggle source -
- - -
- - -
-
# File lib/wpstools/plugins/list_generator/generate_list.rb, line 44
+        
+ + +
+ + + +
+ set_file_name(type) + click to toggle source +
+ + +
+ + + + + +
+
+# File lib/wpstools/plugins/list_generator/generate_list.rb, line 27
 def set_file_name(type)
   case @type
   when 'plugin'
@@ -493,26 +588,29 @@ parse the response for the names.

raise "Unknown type #@type" end end
-
+
+ +
+ -
- - - -
+ +
+ +
-
+ - - + +
+

[Validate]

+

Generated with the Darkfish + Rdoc Generator 2.

+
- + + diff --git a/doc/GitUpdater.html b/doc/GitUpdater.html index 14fb6a9e..fd8ea4d0 100644 --- a/doc/GitUpdater.html +++ b/doc/GitUpdater.html @@ -1,423 +1,517 @@ - - - + + + - + -class GitUpdater - RDoc Documentation + Class: GitUpdater - - - - - - - - - - + + + + + + - - -
-

class GitUpdater

- -
- -
- - - - -
- - - - - - - - - - -
-

Public Instance Methods

- - -
- -
- has_local_changes?() - click to toggle source +
+
+

In Files

+ +
+ + +
+ +
+ + +
+

Parent

+ + +
+ - + + +
+ +
+

GitUpdater

+ +
+ +
+ + + + +
+ + + + + + + + + + +
+

Public Instance Methods

+ + +
+ -
-
# File lib/updater/git_updater.rb, line 38
+          
+ has_local_changes?() + click to toggle source +
+ + +
+ + + + + +
+
+# File lib/common/updater/git_updater.rb, line 21
 def has_local_changes?
-  %x[git #{repo_directory_arguments()} diff --exit-code 2>&1] =~ %rdiff/ ? true : false
+  %[git #{repo_directory_arguments()} diff --exit-code 2>&1] =~ /diff/ ? true : false
 end
-
- -
+
+ +
- - - -
- - -
- -
- is_installed?() - click to toggle source -
- - -
- - -
-
# File lib/updater/git_updater.rb, line 23
+        
+ + +
+ + + +
+ is_installed?() + click to toggle source +
+ + +
+ + + + + +
+
+# File lib/common/updater/git_updater.rb, line 6
 def is_installed?
-  %x[git #{repo_directory_arguments()} status 2>&1] =~ %rOn branch/ ? true : false
+  %[git #{repo_directory_arguments()} status 2>&1] =~ /On branch/ ? true : false
 end
-
+
+ +
+ -
- - - -
- - -
- -
- local_revision_number() - click to toggle source -
- - -
-

Git has not a revsion number like SVN, so we will take the 7 first chars of +

+ + +
+ + + +
+ local_revision_number() + click to toggle source +
+ + +
+ +

Git has not a revsion number like SVN, so we will take the 7 first chars of the last commit hash

- + - -
-
# File lib/updater/git_updater.rb, line 29
+            
+            
+
+# File lib/common/updater/git_updater.rb, line 12
 def local_revision_number
-  git_log = %x[git #{repo_directory_arguments()} log -1 2>&1]
-  git_log[%rcommit ([0-9a-z]{7})/, 1].to_s
+  git_log = %[git #{repo_directory_arguments()} log -1 2>&1]
+  git_log[/commit ([0-9a-z]{7})/, 1].to_s
 end
-
- -
+
+ +
- - - -
- - -
- -
- reset_head() - click to toggle source -
- - -
- - -
-
# File lib/updater/git_updater.rb, line 42
+        
+ + +
+ + + +
+ reset_head() + click to toggle source +
+ + +
+ + + + + +
+
+# File lib/common/updater/git_updater.rb, line 25
 def reset_head
-  %x[git #{repo_directory_arguments()} reset --hard HEAD]
+  %[git #{repo_directory_arguments()} reset --hard HEAD]
 end
-
- -
+
+ +
- - - -
- - -
- -
- update() - click to toggle source -
- - -
- - -
-
# File lib/updater/git_updater.rb, line 34
+        
+ + +
+ + + +
+ update() + click to toggle source +
+ + +
+ + + + + +
+
+# File lib/common/updater/git_updater.rb, line 17
 def update
-  %x[git #{repo_directory_arguments()} pull]
+  %[git #{repo_directory_arguments()} pull]
 end
-
+
+ +
+ -
- - - -
+ +
+ +
-
- -
-

Protected Instance Methods

+
+

Protected Instance Methods

- -
- -
- repo_directory_arguments() - click to toggle source -
- - -
- - - + +
+ -
-
# File lib/updater/git_updater.rb, line 47
+          
+ repo_directory_arguments() + click to toggle source +
+ + +
+ + + + + +
+
+# File lib/common/updater/git_updater.rb, line 30
 def repo_directory_arguments
   if @repo_directory
     return "--git-dir=\"#{@repo_directory}/.git\" --work-tree=\"#{@repo_directory}\""
   end
 end
-
+
+ +
+ -
- - - -
+ +
+ +
-
+
- - + +
+

[Validate]

+

Generated with the Darkfish + Rdoc Generator 2.

+
- + + diff --git a/doc/LICENSE.html b/doc/LICENSE.html new file mode 100644 index 00000000..39433a9c --- /dev/null +++ b/doc/LICENSE.html @@ -0,0 +1,244 @@ + + + + + + + + File: LICENSE [RDoc Documentation] + + + + + + + + + + +
+
+
+

+ Home + Classes + Methods +

+
+
+ +
+ + +
+

Files

+ +
+ + + + + +
+
+ +
+ +

WPScan - WordPress Security Scanner Copyright (C) 2012-2013

+ +

This program is free software: you can redistribute it and/or modify it +under the terms of the GNU General Public License as published by the Free +Software Foundation, either version 3 of the License, or (at your option) +any later version.

+ +

This program is distributed in the hope that it will be useful, but WITHOUT +ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +more details.

+ +

You should have received a copy of the GNU General Public License along +with this program. If not, see <www.gnu.org/licenses/>.

+ +
+ +
+

[Validate]

+

Generated with the Darkfish + Rdoc Generator 2.

+
+ + + diff --git a/doc/ListGeneratorPlugin.html b/doc/ListGeneratorPlugin.html index bdc55889..83ef1385 100644 --- a/doc/ListGeneratorPlugin.html +++ b/doc/ListGeneratorPlugin.html @@ -1,250 +1,308 @@ - - - + + + - + -class ListGeneratorPlugin - RDoc Documentation + Class: ListGeneratorPlugin - - - - - - - - - - + + + + + + - - -
-

class ListGeneratorPlugin

- -
- -
WPScan - WordPress Security Scanner
-Copyright (C) 2012-2013
-
-This program is free software: you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program.  If not, see <http://www.gnu.org/licenses/>.
- -

++

- -
- - - - -
- - - - - - - - - - -
-

Public Class Methods

- - -
- -
- new() - click to toggle source + + +
+ + +
+

Parent

+ + +
+ -
+ + + + + + +
+

Methods

+ +
+ + + +
+ + +
+ +
+

ListGeneratorPlugin

+ +
+ +
+ + + + +
+ + + + + + + + + + +
+

Public Class Methods

+ + +
+ -
-
# File lib/wpstools/plugins/list_generator/list_generator_plugin.rb, line 21
+          
+ new() + click to toggle source +
+ + +
+ + + + + +
+
+# File lib/wpstools/plugins/list_generator/list_generator_plugin.rb, line 4
 def initialize
   super(author: 'WPScanTeam - @FireFart')
 
@@ -258,91 +316,85 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
'--generate-all', '--ga', 'Generate a new full plugins, full themes, popular plugins and popular themes list'] ) end
-
+
+ +
+ -
- - - -
+ +
+ +
-
- -
-

Public Instance Methods

+
+

Public Instance Methods

- -
- -
- run(options = {}) - click to toggle source -
- - -
- - - + +
+ -
-
# File lib/wpstools/plugins/list_generator/list_generator_plugin.rb, line 35
+          
+ run(options = {}) + click to toggle source +
+ + +
+ + + + + +
+
+# File lib/wpstools/plugins/list_generator/list_generator_plugin.rb, line 18
 def run(options = {})
-  verbose      = options[:verbose] || false
+  @verbose     = options[:verbose] || false
   generate_all = options[:generate_all] || false
 
   if options.has_key?(:generate_plugin_list) || generate_all
-    number_of_pages = options[:generate_plugin_list] || 150
-
-    puts '[+] Generating new most popular plugin list'
-    puts
-    GenerateList.new('plugins', verbose).generate_popular_list(number_of_pages)
+    most_popular('plugin', options[:generate_plugin_list] || 150)
   end
 
   if options[:generate_full_plugin_list] || generate_all
-    puts '[+] Generating new full plugin list'
-    puts
-    GenerateList.new('plugins', verbose).generate_full_list
+    full('plugin')
   end
 
   if options.has_key?(:generate_theme_list) || generate_all
-    number_of_pages = options[:generate_theme_list] || 150
-
-    puts '[+] Generating new most popular theme list'
-    puts
-    GenerateList.new('themes', verbose).generate_popular_list(number_of_pages)
+    most_popular('theme', options[:generate_theme_list] || 150)
   end
 
   if options[:generate_full_theme_list] || generate_all
-    puts '[+] Generating new full theme list'
-    puts
-    GenerateList.new('themes', verbose).generate_full_list
+    full('theme')
   end
 end
-
+
+ +
+ -
- - - -
+ +
+ +
-
+
- - + +
+

[Validate]

+

Generated with the Darkfish + Rdoc Generator 2.

+
- + + diff --git a/doc/Malwares.html b/doc/Malwares.html index 29040a91..032f4195 100644 --- a/doc/Malwares.html +++ b/doc/Malwares.html @@ -1,327 +1,410 @@ - - - + + + - + -module Malwares - RDoc Documentation + Module: Malwares - - - - - - - - - - + + + + + + - - -
-

module Malwares

- -
- -
- - - - -
- - - - - - - - - - -
-

Public Class Methods

- - -
- -
- malware_pattern(url_regex) - click to toggle source +
+
+

In Files

+ +
+ + +
+ +
+ + + + + + + + +
+

Methods

+ +
+ + + +
+ + + +
+

Malwares

+ +
+ +
+ + + + +
+ + + + + + + + + + +
+

Public Class Methods

+ + +
+ -
-
# File lib/wpscan/modules/malwares.rb, line 59
+          
+ malware_pattern(url_regex) + click to toggle source +
+ + +
+ + + + + +
+
+# File lib/wpscan/modules/malwares.rb, line 42
 def self.malware_pattern(url_regex)
   # no need to escape regex here, because malware.txt contains regex
-  %r{<(?:script|iframe).* src=(?:"|')(#{url_regex}[^"']*)(?:"|')[^>]*>}
+  %{<(?:script|iframe).* src=(?:"|')(#{url_regex}[^"']*)(?:"|')[^>]*>}
 end
-
- -
+
+ +
- - - -
- - -
- -
- malwares_file(malwares_file_path) - click to toggle source -
- - -
- - -
-
# File lib/wpscan/modules/malwares.rb, line 55
+        
+ + +
+ + + +
+ malwares_file(malwares_file_path) + click to toggle source +
+ + +
+ + + + + +
+
+# File lib/wpscan/modules/malwares.rb, line 38
 def self.malwares_file(malwares_file_path)
   malwares_file_path || DATA_DIR + '/malwares.txt'
 end
-
+
+ +
+ -
- - - -
+ +
+ +
-
- -
-

Public Instance Methods

+
+

Public Instance Methods

- -
- -
- has_malwares?(malwares_file_path = nil) - click to toggle source -
- - -
- - - + +
+ -
-
# File lib/wpscan/modules/malwares.rb, line 26
+          
+ has_malwares?(malwares_file_path = nil) + click to toggle source +
+ + +
+ + + + + +
+
+# File lib/wpscan/modules/malwares.rb, line 9
 def has_malwares?(malwares_file_path = nil)
   !malwares(malwares_file_path).empty?
 end
-
- -
+
+ +
- - - -
- - -
- -
- malwares(malwares_file_path = nil) - click to toggle source -
- - -
- -

return array of string (url of malwares found)

-
-
# File lib/wpscan/modules/malwares.rb, line 31
+        
+ + +
+ + + +
+ malwares(malwares_file_path = nil) + click to toggle source +
+ + +
+ +

return array of string (url of malwares found)

+ + + +
+
+# File lib/wpscan/modules/malwares.rb, line 14
 def malwares(malwares_file_path = nil)
   unless @malwares
     malwares_found = []
@@ -345,26 +428,29 @@
   end
   @malwares
 end
-
+
+ +
+ -
- - - -
+ +
+ +
-
+
- - + +
+

[Validate]

+

Generated with the Darkfish + Rdoc Generator 2.

+
- + + diff --git a/doc/Object.html b/doc/Object.html index c8d867b6..07d30bc2 100644 --- a/doc/Object.html +++ b/doc/Object.html @@ -1,460 +1,559 @@ - - - + + + - + -class Object - RDoc Documentation + Class: Object - - - - - - - - - - + + + + + + - - -
-

class Object

- -
- -
- - - - -
- - - - - - -
-

Constants

-
- -
CACHE_DIR - -
- - -
COMMON_LIB_DIR - -
- - -
COMON_PLUGINS_DIR - -

Plugins directories

- - -
CONF_DIR - -
- - -
DATA_DIR - -
- - -
LIB_DIR - -
- - -
LOCAL_FILES_FILE - -
- - -
LOCAL_FILES_XSD - -
- - -
LOG_FILE - -
- - -
PLUGINS_FILE - -

Data files

- - -
PLUGINS_FULL_FILE - -
- - -
PLUGINS_VULNS_FILE - -
- - -
REVISION - -
- - -
ROOT_DIR - -
- - -
THEMES_FILE - -
- - -
THEMES_FULL_FILE - -
- - -
THEMES_VULNS_FILE - -
- - -
UPDATER_LIB_DIR - -
- - -
VULNS_XSD - -
- - -
WPSCAN_LIB_DIR - -
- - -
WPSCAN_PLUGINS_DIR - -
- - -
WPSCAN_VERSION - -
- - -
WPSTOOLS_LIB_DIR - -
- - -
WPSTOOLS_PLUGINS_DIR - -
- - -
WP_VERSIONS_FILE - -
- - -
WP_VERSIONS_XSD - -
- - -
WP_VULNS_FILE - -
- - -
-
- - - - - - -
-

Public Instance Methods

- - -
- -
- add_http_protocol(url) - click to toggle source + + +
+ + +
+

Parent

+ + +
+ -
+ + + + + + +
+

Methods

+ +
+ + + +
+ + +
+ +
+

Object

+ +
+ +
+ + + + +
+ + + + + + +
+

Constants

+
+ +
CACHE_DIR
+ +
+ + +
COLLECTIONS_LIB_DIR
+ +
+ + +
COMMON_LIB_DIR
+ +
+ + +
COMMON_PLUGINS_DIR
+ +

Plugins directories

+ + +
CONF_DIR
+ +
+ + +
DATA_DIR
+ +
+ + +
LIB_DIR
+ +
+ + +
LOCAL_FILES_FILE
+ +
+ + +
LOCAL_FILES_XSD
+ +
+ + +
LOG_FILE
+ +
+ + +
MODELS_LIB_DIR
+ +
+ + +
PLUGINS_FILE
+ +

Data files

+ + +
PLUGINS_FULL_FILE
+ +
+ + +
PLUGINS_VULNS_FILE
+ +
+ + +
REVISION
+ +
+ + +
ROOT_DIR
+ +
+ + +
THEMES_FILE
+ +
+ + +
THEMES_FULL_FILE
+ +
+ + +
THEMES_VULNS_FILE
+ +
+ + +
UPDATER_LIB_DIR
+ +
+ + +
VULNS_XSD
+ +
+ + +
WPSCAN_LIB_DIR
+ +
+ + +
WPSCAN_PLUGINS_DIR
+ +
+ + +
WPSCAN_VERSION
+ +
+ + +
WPSTOOLS_LIB_DIR
+ +
+ + +
WPSTOOLS_PLUGINS_DIR
+ +
+ + +
WP_VERSIONS_FILE
+ +
+ + +
WP_VERSIONS_XSD
+ +
+ + +
WP_VULNS_FILE
+ +
+ + +
+
+ + + + + + +
+

Public Instance Methods

+ + +
+ -
-
# File lib/common_helper.rb, line 65
+          
+ add_http_protocol(url) + click to toggle source +
+ + +
+ +

Add protocol

+ + + +
+
+# File lib/common/common_helper.rb, line 58
 def add_http_protocol(url)
-  url =~ %r^https?:/ ? url : "http://#{url}"
+  url =~ /^https?:/ ? url : "http://#{url}"
 end
-
- -
+
+ +
- - - -
- - -
- -
- add_trailing_slash(url) - click to toggle source -
- - -
- - -
-
# File lib/common_helper.rb, line 69
+        
+ + +
+ + + +
+ add_trailing_slash(url) + click to toggle source +
+ + +
+ + + + + +
+
+# File lib/common/common_helper.rb, line 62
 def add_trailing_slash(url)
-  url =~ %r\/$/ ? url : "#{url}/"
+  url =~ /\/$/ ? url : "#{url}/"
 end
-
- -
+
+ +
- - - -
- - -
- -
- banner() - click to toggle source -
- - -
- -

our 1337 banner

- + + + + +
- - - -
- - -
- -
- colorize(text, color_code) - click to toggle source -
- - -
- - -
-
# File lib/common_helper.rb, line 154
+        
+ + +
+ + + +
+ colorize(text, color_code) + click to toggle source +
+ + +
+ + + + + +
+
+# File lib/common/common_helper.rb, line 92
 def colorize(text, color_code)
   "\e[#{color_code}m#{text}\e[0m"
 end
-
- -
+
+ +
- - - -
- - -
- -
- get_equal_string_end(stringarray = ['']) - click to toggle source -
- - -
- -

Gets the string all elements in stringarray ends with

-
-
# File lib/common_helper.rb, line 74
-def get_equal_string_end(stringarray = [''])
-  already_found = ''
-  looping = true
-  counter = -1
-  if stringarray.kind_of? Array and stringarray.length > 1
-    base = stringarray[0]
-    while looping
-      character = base[counter, 1]
-      stringarray.each do |s|
-        if s[counter, 1] != character
-          looping = false
-          break
-        end
-      end
-      if looping == false or (counter * -1) > base.length
-        break
-      end
-      already_found = "#{character if character}#{already_found}"
-      counter -= 1
-    end
-  end
-  already_found
-end
-
- -
+
- - - -
- - -
- -
- get_metasploit_url(module_path) - click to toggle source -
- - -
- - - + +
+ -
-
# File lib/common_helper.rb, line 166
-def get_metasploit_url(module_path)
-  # remove leading slash
-  module_path = module_path.sub(%r^\//, '')
-  "http://www.metasploit.com/modules/#{module_path}"
-end
-
- -
- - - - -
- - -
- -
- green(text) - click to toggle source -
- - -
- - +
+ green(text) + click to toggle source +
- -
-
# File lib/common_helper.rb, line 162
+          
+ + + + + +
+
+# File lib/common/common_helper.rb, line 100
 def green(text)
   colorize(text, 32)
 end
-
- -
+
+ +
- - - -
- - -
- -
- help() - click to toggle source -
- - -
- -

command help

-
-
# File lib/wpscan/wpscan_helper.rb, line 73
+        
+ + +
+ + + +
+ help() + click to toggle source +
+ + +
+ +

command help

+ + + +
+
+# File lib/wpscan/wpscan_helper.rb, line 57
 def help
   puts 'Help :'
   puts
@@ -665,7 +687,7 @@
   puts '  Multiple values are allowed : "-e t,p" will enumerate timthumbs and plugins'
   puts '  If no option is supplied, the default is "vt,tt,u,vp"'
   puts
-  puts '--exclude-content-based "<regexp or string>" Used with the enumeration option, will exclude all occurence based on the regexp or string supplied'
+  puts '--exclude-content-based "<regexp or string>" Used with the enumeration option, will exclude all occurrences based on the regexp or string supplied'
   puts '                                             You do not need to provide the regexp delimiters, but you must write the quotes (simple or double)'
   puts '--config-file | -c <config file> Use the specified config file'
   puts '--follow-redirection  If the target url has a redirection, it will be followed without asking if you wanted to do so or not'
@@ -674,7 +696,7 @@
   puts '--proxy <[protocol://]host:port> Supply a proxy (will override the one from conf/browser.conf.json).'
   puts '                                 HTTP, SOCKS4 SOCKS4A and SOCKS5 are supported. If no protocol is given (format host:port), HTTP will be used'
   puts '--proxy-auth <username:password>  Supply the proxy login credentials (will override the one from conf/browser.conf.json).'
-  puts '--basic-auth <username:password>  Set the HTTP Basic authentification'
+  puts '--basic-auth <username:password>  Set the HTTP Basic authentication'
   puts '--wordlist | -w <wordlist>  Supply a wordlist for the password bruter and do the brute.'
   puts '--threads  | -t <number of threads>  The number of threads to use when multi-threading requests. (will override the value from conf/browser.conf.json)'
   puts '--username | -U <username>  Only brute force the supplied username.'
@@ -682,171 +704,496 @@
   puts '--verbose  | -v Verbose output.'
   puts
 end
-
- -
+
+ +
- - - -
- - -
- -
- output_vulnerabilities(vulns) - click to toggle source -
- - -
- - -
-
# File wpscan.rb, line 24
-def output_vulnerabilities(vulns)
-  vulns.each do |vulnerability|
+        
+ + +
+ + + +
+ main() + click to toggle source +
+ + +
+ + + + + +
+
+# File wpscan.rb, line 5
+def main
+  # delete old logfile, check if it is a symlink first.
+  File.delete(LOG_FILE) if File.exist?(LOG_FILE) and !File.symlink?(LOG_FILE)
+
+  banner()
+
+  begin
+    wpscan_options = WpscanOptions.load_from_arguments
+
+    unless wpscan_options.has_options?
+      usage()
+      puts red('No argument supplied')
+      exit(0)
+    end
+
+    if wpscan_options.help
+      help()
+      usage()
+      exit
+    end
+
+    # Check for updates
+    if wpscan_options.update
+      if !@updater.nil?
+        if @updater.has_local_changes?
+          puts "#{red('[!]')} Local file changes detected, an update will override local changes, do you want to continue updating? [y/n]"
+          Readline.readline =~ /^y/ ? @updater.reset_head : raise('Update aborted')
+        end
+        puts @updater.update()
+      else
+        puts 'Svn / Git not installed, or wpscan has not been installed with one of them.'
+        puts 'Update aborted'
+      end
+      exit(1)
+    end
+
+    wp_target = WpTarget.new(wpscan_options.url, wpscan_options.to_h)
+
+    # Remote website up?
+    unless wp_target.online?
+      raise "The WordPress URL supplied '#{wp_target.uri}' seems to be down."
+    end
+
+    if wpscan_options.proxy
+      proxy_response = Browser.instance.get(wp_target.url)
+
+      unless WpTarget::valid_response_codes.include?(proxy_response.code)
+        raise "Proxy Error :\r\n#{proxy_response.headers}"
+      end
+    end
+
+    redirection = wp_target.redirection
+    if redirection
+      if wpscan_options.follow_redirection
+        puts "Following redirection #{redirection}"
+        puts
+      else
+        puts "The remote host tried to redirect us to #{redirection}"
+        puts 'Do you want follow the redirection ? [y/n]'
+      end
+
+      if wpscan_options.follow_redirection or Readline.readline =~ /^y/
+        wpscan_options.url = redirection
+        wp_target = WpTarget.new(redirection, wpscan_options.to_h)
+      else
+        puts 'Scan aborted'
+        exit
+      end
+    end
+
+    if wp_target.has_basic_auth? && wpscan_options.basic_auth.nil?
+      raise 'Basic authentication is required, please provide it with --basic-auth <login:password>'
+    end
+
+    # Remote website is wordpress?
+    unless wpscan_options.force
+      unless wp_target.wordpress?
+        raise 'The remote website is up, but does not seem to be running WordPress.'
+      end
+    end
+
+    unless wp_target.wp_content_dir
+      raise 'The wp_content_dir has not been found, please supply it with --wp-content-dir'
+    end
+
+    unless wp_target.wp_plugins_dir_exists?
+      puts "The plugins directory '#{wp_target.wp_plugins_dir}' does not exist."
+      puts 'You can specify one per command line option (don\t forget to include the wp-content directory if needed)'
+      puts 'Continue? [y/n]'
+      unless Readline.readline =~ /^y/
+        exit
+      end
+    end
+
+    # Output runtime data
+    start_time = Time.now
+    puts "| URL: #{wp_target.url}"
+    puts "| Started on #{start_time.asctime}"
     puts
-    puts ' | ' + red("* Title: #{vulnerability.title}")
-    vulnerability.references.each do |r|
-      puts ' | ' + red("* Reference: #{r}")
+
+    if wp_target.has_robots?
+      puts green('[+]') + " robots.txt available under '#{wp_target.robots_url}'"
     end
-    vulnerability.metasploit_modules.each do |m|
-      puts ' | ' + red("* Metasploit module: #{get_metasploit_url(m)}")
+
+    if wp_target.has_readme?
+      puts red('[!]') + " The WordPress '#{wp_target.readme_url}' file exists"
     end
+
+    if wp_target.has_full_path_disclosure?
+      puts red('[!]') + " Full Path Disclosure (FPD) in '#{wp_target.full_path_disclosure_url}'"
+    end
+
+    if wp_target.has_debug_log?
+      puts red('[!]') + " Debug log file found : #{wp_target.debug_log_url}"
+    end
+
+    wp_target.config_backup.each do |file_url|
+      puts red("[!] A wp-config.php backup file has been found '#{file_url}'")
+    end
+
+    if wp_target.search_replace_db_2_exists?
+      puts red("[!] searchreplacedb2.php has been found '#{wp_target.search_replace_db_2_url}'")
+    end
+
+    if wp_target.is_multisite?
+      puts green('[+]') + ' This site seems to be a multisite (http://codex.wordpress.org/Glossary#Multisite)'
+    end
+
+    if wp_target.registration_enabled?
+      puts green('[+]') + ' User registration is enabled'
+    end
+
+    if wp_target.has_xml_rpc?
+      puts green('[+]') + " XML-RPC Interface available under #{wp_target.xml_rpc_url}"
+    end
+
+    if wp_target.has_malwares?
+      malwares = wp_target.malwares
+      puts red('[!]') + " #{malwares.size} malware(s) found :"
+
+      malwares.each do |malware_url|
+        puts
+        puts ' | ' + red("#{malware_url}")
+      end
+      puts
+    end
+
+    enum_options = {
+      show_progression: true,
+      exclude_content:  wpscan_options.exclude_content_based
+    }
+
+    if wp_version = wp_target.version(WP_VERSIONS_FILE)
+      wp_version.output
+    end
+
+    if wp_theme = wp_target.theme
+      puts
+      # Theme version is handled in #to_s
+      puts green('[+]') + " The WordPress theme in use is #{wp_theme}"
+      wp_theme.output
+    end
+
+    if wpscan_options.enumerate_plugins == nil and wpscan_options.enumerate_only_vulnerable_plugins == nil
+      puts
+      puts green('[+]') + ' Enumerating plugins from passive detection ... '
+
+      wp_plugins = WpPlugins.passive_detection(wp_target)
+      if !wp_plugins.empty?
+        puts "#{wp_plugins.size} plugins found :"
+
+        wp_plugins.output
+      else
+        puts 'No plugins found :('
+      end
+    end
+
+    # Enumerate the installed plugins
+    if wpscan_options.enumerate_plugins or wpscan_options.enumerate_only_vulnerable_plugins or wpscan_options.enumerate_all_plugins
+      puts
+      puts green('[+]') + " Enumerating installed plugins #{'(only vulnerable ones)' if wpscan_options.enumerate_only_vulnerable_plugins} ..."
+      puts
+
+      wp_plugins = WpPlugins.aggressive_detection(wp_target,
+        enum_options.merge(
+          file: wpscan_options.enumerate_all_plugins ? PLUGINS_FULL_FILE : PLUGINS_FILE,
+          only_vulnerable: wpscan_options.enumerate_only_vulnerable_plugins || false
+        )
+      )
+      if !wp_plugins.empty?
+        puts
+        puts
+        puts green('[+]') + " We found #{wp_plugins.size} plugins:"
+
+        wp_plugins.output
+      else
+        puts
+        puts 'No plugins found :('
+      end
+    end
+
+    # Enumerate installed themes
+    if wpscan_options.enumerate_themes or wpscan_options.enumerate_only_vulnerable_themes or wpscan_options.enumerate_all_themes
+      puts
+      puts green('[+]') + " Enumerating installed themes #{'(only vulnerable ones)' if wpscan_options.enumerate_only_vulnerable_themes} ..."
+      puts
+
+      wp_themes = WpThemes.aggressive_detection(wp_target,
+        enum_options.merge(
+          file: wpscan_options.enumerate_all_themes ? THEMES_FULL_FILE : THEMES_FILE,
+          only_vulnerable: wpscan_options.enumerate_only_vulnerable_themes || false
+        )
+      )
+
+      if !wp_themes.empty?
+        puts
+        puts
+        puts green('[+]') + " We found #{wp_themes.size} themes:"
+
+        wp_themes.output
+      else
+        puts
+        puts 'No themes found :('
+      end
+    end
+
+    if wpscan_options.enumerate_timthumbs
+      puts
+      puts green('[+]') + ' Enumerating timthumb files ...'
+      puts
+
+      wp_timthumbs = WpTimthumbs.aggressive_detection(wp_target,
+        enum_options.merge(
+          file: DATA_DIR + '/timthumbs.txt',
+          theme_name: wp_theme ? wp_theme.name : nil
+        )
+      )
+      if !wp_timthumbs.empty?
+        puts
+        puts green('[+]') + " We found #{wp_timthumbs.size} timthumb file/s :"
+        puts
+
+        wp_timthumbs.output
+
+        puts
+        puts red(' * Reference: http://www.exploit-db.com/exploits/17602/')
+      else
+        puts
+        puts 'No timthumb files found :('
+      end
+    end
+
+    # If we haven't been supplied a username, enumerate them...
+    if !wpscan_options.username and wpscan_options.wordlist or wpscan_options.enumerate_usernames
+      puts
+      puts green('[+]') + ' Enumerating usernames ...'
+
+      wp_users = WpUsers.aggressive_detection(wp_target,
+        enum_options.merge(
+          range: wpscan_options.enumerate_usernames_range,
+          show_progression: false
+        )
+      )
+
+      if wp_users.empty?
+        puts
+        puts 'We did not enumerate any usernames :('
+        puts 'Try supplying your own username with the --username option'
+        puts
+        exit(1)
+      else
+        puts
+        puts green('[+]') + " We found the following #{wp_users.size} user/s :"
+
+        wp_users.output(' ' * 4)
+      end
+
+    else
+      # FIXME : Change the .username to .login (and also the --username in the CLI)
+      wp_users = WpUsers.new << WpUser.new(wp_target, login: wpscan_options.username)
+    end
+
+    # Start the brute forcer
+    bruteforce = true
+    if wpscan_options.wordlist
+      if wp_target.has_login_protection?
+
+        protection_plugin = wp_target.login_protection_plugin()
+
+        puts
+        puts "The plugin #{protection_plugin.name} has been detected. It might record the IP and timestamp of every failed login. Not a good idea for brute forcing !"
+        puts '[?] Do you want to start the brute force anyway ? [y/n]'
+
+        bruteforce = false if Readline.readline !~ /^y/
+      end
+
+      if bruteforce
+        puts
+        puts green('[+]') + ' Starting the password brute forcer'
+        puts
+        wp_target.brute_force(wp_users, wpscan_options.wordlist, { show_progression: true })
+      else
+        puts
+        puts 'Brute forcing aborted'
+      end
+    end
+
+    stop_time = Time.now
+    puts
+    puts green("[+] Finished at #{stop_time.asctime}")
+    elapsed = stop_time - start_time
+    puts green("[+] Elapsed time: #{Time.at(elapsed).utc.strftime('%H:%M:%S')}")
+    exit() # must exit!
+  rescue => e
+    puts red("[ERROR] #{e.message}")
+    puts red('Trace :')
+    puts red(e.backtrace.join("\n"))
   end
 end
-
- -
+
+ +
- - - -
- - -
- -
- puts(o = '') - click to toggle source -
- - -
- -

Override for puts to enable logging

-
-
# File lib/common_helper.rb, line 173
+        
+ + +
+ + + +
+ puts(o = '') + click to toggle source +
+ + +
+ +

Override for puts to enable logging

+ + + +
+
+# File lib/common/hacks.rb, line 50
 def puts(o = '')
   # remove color for logging
   if o.respond_to?('gsub')
-    temp = o.gsub(%r\e\[\d+m(.*)?\e\[0m/, '\1')
+    temp = o.gsub(/\e\[\d+m(.*)?\e\[0m/, '\1')
     File.open(LOG_FILE, 'a+') { |f| f.puts(temp) }
   end
   super(o)
 end
-
- -
+
+ +
- - - -
- - -
- -
- red(text) - click to toggle source -
- - -
- - -
-
# File lib/common_helper.rb, line 158
+        
+ + +
+ + + +
+ red(text) + click to toggle source +
+ + +
+ + + + + +
+
+# File lib/common/common_helper.rb, line 96
 def red(text)
   colorize(text, 31)
 end
-
- -
+
+ +
- - - -
- - -
- -
- require_files_from_directory(absolute_dir_path, files_pattern = '*.rb') - click to toggle source -
- - -
- -

TODO : add an exclude pattern ?

-
-
# File lib/common_helper.rb, line 53
+        
+ + +
+ + + +
+ require_files_from_directory(absolute_dir_path, files_pattern = '*.rb') + click to toggle source +
+ + +
+ +

TODO : add an exclude pattern ?

+ + + +
+
+# File lib/common/common_helper.rb, line 44
 def require_files_from_directory(absolute_dir_path, files_pattern = '*.rb')
-  Dir[File.join(absolute_dir_path, files_pattern)].sort.each do |f|
+  files = Dir[File.join(absolute_dir_path, files_pattern)]
+
+  # Files in the root dir are loaded first, then thoses in the subdirectories
+  files.sort_by { |file| [file.count("/"), file] }.each do |f|
     f = File.expand_path(f)
-    require f
     #puts "require #{f}" # Used for debug
+    require f
   end
 end
-
- -
+
+ +
- - - -
- - -
- -
- usage() - click to toggle source -
- - -
- -

wpscan usage

-
-
# File lib/wpscan/wpscan_helper.rb, line 24
+        
+ + +
+ + + +
+ usage() + click to toggle source +
+ + +
+ +

wpscan usage

+ + + +
+
+# File lib/wpscan/wpscan_helper.rb, line 8
 def usage
   script_name = $0
   puts
@@ -894,26 +1241,64 @@
   puts 'See README for further information.'
   puts
 end
-
+
+ +
+ -
- + +
- -
+ +
+ + +
+ xml(file) + click to toggle source +
+ + +
+ + + + + +
+
+# File lib/common/common_helper.rb, line 104
+def xml(file)
+  Nokogiri::XML(File.open(file)) do |config|
+    config.noblanks
+  end
+end
+
+ +
+ + + + +
+ + +
-
+
- - + +
+

[Validate]

+

Generated with the Darkfish + Rdoc Generator 2.

+
- + + diff --git a/doc/Plugin.html b/doc/Plugin.html index 32a83b9a..6cd9b231 100644 --- a/doc/Plugin.html +++ b/doc/Plugin.html @@ -1,321 +1,386 @@ - - - + + + - + -class Plugin - RDoc Documentation + Class: Plugin - - - - - - - - - - + + + + + + - - -
-

class Plugin

- -
- -
WPScan - WordPress Security Scanner
-Copyright (C) 2012-2013
-
-This program is free software: you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program.  If not, see <http://www.gnu.org/licenses/>.
- -

++

- -
- - - - -
- - - - - - - - -
-

Attributes

- - -
-
- author[R] -
- -
- - - +
+
+

In Files

+
- -
-
- registered_options[R] -
-
+ +
+ +
+ + +
+

Parent

+ - -
-
- - - -
-

Public Class Methods

+ - -
+ + + + +
+

Methods

+ +
+ + + +
+ +
+ + +
+

Files

+ +
+ + + + + +
+
+ +
+

Plugin

+ +
+ +
+ + + + +
+ + + + + + + + +
+

Attributes

+ + +
+ + +
+ author[R] +
+ +
+ + + +
+
+ + +
+ registered_options[R] +
-
+
+
+
+ +
+ + + + +
+

Public Class Methods

+ + +
+ -
-
# File lib/common/plugins/plugin.rb, line 23
+          
+ new(infos = {}) + click to toggle source +
+ + +
+ + + + + +
+
+# File lib/common/plugins/plugin.rb, line 6
 def initialize(infos = {})
   @author  = infos[:author]
 end
-
+
+ +
+ -
- - - -
+ +
+ +
- - -
-

Public Instance Methods

+
+

Public Instance Methods

- -
- -
- register_options(*options) - click to toggle source -
- - -
- -

param Array options

- + +
+ -
-
# File lib/common/plugins/plugin.rb, line 32
+          
+ register_options(*options) + click to toggle source +
+ + +
+ +

param Array options

+ + + +
+
+# File lib/common/plugins/plugin.rb, line 15
 def register_options(*options)
   options.each do |option|
     unless option.is_a?(Array)
@@ -324,56 +389,62 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
end @registered_options = options end
-
- -
+
+ +
- - - -
- - -
- -
- run(options = {}) - click to toggle source -
- - -
- - -
-
# File lib/common/plugins/plugin.rb, line 27
+        
+ + +
+ + + +
+ run(options = {}) + click to toggle source +
+ + +
+ + + + + +
+
+# File lib/common/plugins/plugin.rb, line 10
 def run(options = {})
   raise NotImplementedError
 end
-
+
+ +
+ -
- - - -
+ +
+ + - + - - + +
+

[Validate]

+

Generated with the Darkfish + Rdoc Generator 2.

+
- + + diff --git a/doc/Plugins.html b/doc/Plugins.html index fd46d568..05d66663 100644 --- a/doc/Plugins.html +++ b/doc/Plugins.html @@ -1,272 +1,332 @@ - - - + + + - + -class Plugins - RDoc Documentation + Class: Plugins - - - - - - - - - - + + + + + + - - -
-

class Plugins

- -
- -
WPScan - WordPress Security Scanner
-Copyright (C) 2012-2013
-
-This program is free software: you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program.  If not, see <http://www.gnu.org/licenses/>.
- -

++

- -
- - - - -
- - - - - - - - -
-

Attributes

- - -
-
- option_parser[R] -
- -
- - - +
+
+

In Files

+
+ -
- +
- - -
-

Public Class Methods

- - -
+
+ + +
+

Parent

-
- new(option_parser = nil) - click to toggle source + + +
+ + + + + + + + +
+

Methods

+ +
+ + + +
+ + +
+ +
+

Plugins

+ +
+ +
+ + + + +
+ + + + + + + + +
+

Attributes

+ + +
+ + +
+ option_parser[R] +
+ +
+ + + +
+
+ -
- - - + + +
+

Public Class Methods

+ + +
+ -
-
# File lib/common/plugins/plugins.rb, line 23
+          
+ new(option_parser = nil) + click to toggle source +
+ + +
+ + + + + +
+
+# File lib/common/plugins/plugins.rb, line 6
 def initialize(option_parser = nil)
   if option_parser
     if option_parser.is_a?(CustomOptionParser)
@@ -278,71 +338,77 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
@option_parser = CustomOptionParser.new end end
-
+
+ +
+ -
- - - -
+ +
+ +
-
- -
-

Public Instance Methods

+
+

Public Instance Methods

- -
- -
- register(*plugins) - click to toggle source -
- - -
- -

param Array(Plugin) plugins

- + +
+ -
-
# File lib/common/plugins/plugins.rb, line 36
+          
+ register(*plugins) + click to toggle source +
+ + +
+ +

param Array(Plugin) plugins

+ + + +
+
+# File lib/common/plugins/plugins.rb, line 19
 def register(*plugins)
   plugins.each do |plugin|
     register_plugin(plugin)
   end
 end
-
- -
+
+ +
- - - -
- - -
- -
- register_plugin(plugin) - click to toggle source -
- - -
- -

param Plugin plugin

-
-
# File lib/common/plugins/plugins.rb, line 43
+        
+ + +
+ + + +
+ register_plugin(plugin) + click to toggle source +
+ + +
+ +

param Plugin plugin

+ + + +
+
+# File lib/common/plugins/plugins.rb, line 26
 def register_plugin(plugin)
   if plugin.is_a?(Plugin)
     self << plugin
@@ -355,26 +421,29 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
raise "The argument must be an instance of Plugin, #{plugin.class} supplied" end end -
+
+ +
+ -
- - - -
+ +
+ +
-
+ - - + +
+

[Validate]

+

Generated with the Darkfish + Rdoc Generator 2.

+
- + + diff --git a/doc/README.html b/doc/README.html index 67c960b9..b8a21706 100644 --- a/doc/README.html +++ b/doc/README.html @@ -1,156 +1,221 @@ - + + - + - + -README - RDoc Documentation + File: README [RDoc Documentation] - - - - - - - - - - + + + + + + - -
- +
+

__

__          _______   _____
@@ -162,7 +227,7 @@
 
 

__

-

LICENSE==

+

LICENSE==

WPScan - WordPress Security Scanner Copyright (C) 2011-2013 The WPScan Team

@@ -182,87 +247,91 @@ href="http://www.gnu.org/licenses/">www.gnu.org/licenses/>.

ryandewhurst at gmail

-

INSTALL==

+

INSTALL==

-
WPScan comes pre-installed on the following Linux distributions:
+
WPScan comes pre-installed on the following Linux distributions:
 
- * BackBox Linux
- * BackTrack Linux (outdated WPScan installed, update needed)
- * Pentoo
- * SamuraiWTF
+ * BackBox Linux
+ * BackTrack Linux (outdated WPScan installed, update needed)
+ * Pentoo
+ * SamuraiWTF
 
-Prerequisites:
+Prerequisites:
 
- * Windows not supported
- * Ruby => 1.9
- * RubyGems
- * Git
+ * Windows not supported
+ * Ruby => 1.9
+ * RubyGems
+ * Git
 
--> Installing on Debian/Ubuntu:
+-> Installing on Debian/Ubuntu:
 
-  sudo apt-get install libcurl4-gnutls-dev libopenssl-ruby libxml2 libxml2-dev libxslt1-dev ruby-dev
-  git clone https:/%rgithub.com/wpscanteam/wpscan.git
-  cd wpscan
-  sudo gem install bundler && bundle install --without test development
+  sudo apt-get install libcurl4-gnutls-dev libopenssl-ruby libxml2 libxml2-dev libxslt1-dev ruby-dev
+  git clone https://github.com/wpscanteam/wpscan.git
+  cd wpscan
+  sudo gem install bundler && bundle install --without test development
 
--> Installing on Fedora:
+-> Installing on Fedora:
 
-  sudo yum install libcurl-devel
-  git clone https:/%rgithub.com/wpscanteam/wpscan.git
-  cd wpscan
-  sudo gem install bundler && bundle install --without test development
+  sudo yum install libcurl-devel
+  git clone https://github.com/wpscanteam/wpscan.git
+  cd wpscan
+  sudo gem install bundler && bundle install --without test development
 
--> Installing on Archlinux:
+-> Installing on Archlinux:
 
-  pacman -Sy ruby
-  pacman -Sy libyaml
+  pacman -Sy ruby
+  pacman -Sy libyaml
 
-  git clone https:/%rgithub.com/wpscanteam/wpscan.git
-  cd wpscan
-  sudo gem install bundler && bundle install --without test development
+  git clone https://github.com/wpscanteam/wpscan.git
+  cd wpscan
+  sudo gem install bundler && bundle install --without test development
 
-  gem install typhoeus
-  gem install nokogiri
+  gem install typhoeus
+  gem install nokogiri
 
--> Installing on Mac OS X:
+-> Installing on Mac OS X:
 
-  git clone https:/%rgithub.com/wpscanteam/wpscan.git
-  cd wpscan
-  sudo gem install bundler && bundle install --without test development
-
+ git clone https://github.com/wpscanteam/wpscan.git + cd wpscan + sudo gem install bundler && bundle install --without test development
-

KNOWN ISSUES==

+

KNOWN ISSUES==

-
- Typhoeus segmentation fault:
-    Update cURL to version => 7.21 (may have to install from source)
-    See http:/%rcode.google.com/p/wpscan/issues/detail?id=81
+
- Typhoeus segmentation fault:
+    Update cURL to version => 7.21 (may have to install from source)
+    See http://code.google.com/p/wpscan/issues/detail?id=81
 
-- Proxy not working:
-    Update cURL to version => 7.21.7 (may have to install from source).
+- Proxy not working:
+    Update cURL to version => 7.21.7 (may have to install from source).
 
-    Installation from sources :
-      - Grab the sources from http:/%rcurl.haxx.se/download.html
-      - Decompress the archive
-      - Open the folder with the extracted files
-      - Run ./configure
-      - Run make
-      - Run sudo make install
-      - Run sudo ldconfig
+    Installation from sources :
+      - Grab the sources from http://curl.haxx.se/download.html
+      - Decompress the archive
+      - Open the folder with the extracted files
+      - Run ./configure
+      - Run make
+      - Run sudo make install
+      - Run sudo ldconfig
 
-- cannot load such file -- readline:
-    Run sudo aptitude install libreadline5-dev libncurses5-dev
+- cannot load such file -- readline:
+    Run sudo aptitude install libreadline5-dev libncurses5-dev
 
-    Then, open the directory of the readline gem (you have to locate it)
+    Then, open the directory of the readline gem (you have to locate it)
 
-    cd ~%r.rvm/rc/ruby-1.9.2-p180/ext/readline
-    ruby extconf.rb
-    make
-    make install
+    cd ~/.rvm/src/ruby-1.9.2-p180/ext/readline
+    ruby extconf.rb
+    make
+    make install
 
-    See http:/%rvvv.tobiassjosten.net/ruby-on-rails/fixing-readline-for-the-ruby-on-rails-console/ for more details
-
+ See http://vvv.tobiassjosten.net/ruby-on-rails/fixing-readline-for-the-ruby-on-rails-console/ for more details -

WPSCAN ARGUMENTS==

+- no such file to load -- rubygems + Run update-alternatives --config ruby + And select your ruby version + + See https://github.com/wpscanteam/wpscan/issues/148
+ +

WPSCAN ARGUMENTS==

–update Update to the latest revision

@@ -287,7 +356,7 @@ Multiple values are allowed : '-e tt,p' will enumerate timthumbs and plugins If no option is supplied, the default is 'vt,tt,u,vp'

–exclude-content-based ‘<regexp or string>’ Used with the -enumeration option, will exclude all occurence based on the regexp or +enumeration option, will exclude all occurrences based on the regexp or string supplied

You do not need to provide the regexp delimiters, but you must write the quotes (simple or double)
@@ -313,7 +382,7 @@ one from conf/browser.conf.json).

–proxy-auth <username:password> Supply the proxy login credentials (will override the one from conf/browser.conf.json).

-

–basic-auth <username:password> Set the HTTP Basic authentification

+

–basic-auth <username:password> Set the HTTP Basic authentication

–wordlist | -w <wordlist> Supply a wordlist for the password bruter and do the brute.

@@ -328,7 +397,7 @@ conf/browser.conf.json)

–verbose | -v Verbose output.

-

WPSCAN EXAMPLES==

+

WPSCAN EXAMPLES==

Do ‘non-intrusive’ checks…

@@ -342,60 +411,61 @@ conf/browser.conf.json)

ruby wpscan.rb --url www.example.com --wordlist darkc0de.lst --username admin
-

Enumerate instaled plugins…

+

Enumerate installed plugins…

ruby wpscan.rb --url www.example.com --enumerate p
-

WPSTOOLS ARGUMENTS==

+

WPSTOOLS ARGUMENTS==

–help | -h This help screen. –Verbose | -v Verbose output. –update | -u Update to the latest revision. –generate_plugin_list [number of pages] Generate a new data/plugins.txt file. (supply number of -pages to parse, default : 150) –gpl Alias for -–generate_plugin_list –check-local-vulnerable-files | –clvf <local -directory> Perform a recursive scan in the <local directory> to -find vulnerable files or shells

+pages to parse, default : 150) –gpl Alias for –generate_plugin_list +–check-local-vulnerable-files | –clvf <local directory> Perform a +recursive scan in the <local directory> to find vulnerable files or +shells

-

WPSTOOLS EXAMPLES==

+

WPSTOOLS EXAMPLES==

-

ruby wpstools.rb –generate_plugin_list 150

+

ruby wpstools.rb –generate_plugin_list 150

-

ruby wpstools.rb –check-local-vulnerable-files /var/www/wordpress/

+

ruby wpstools.rb +–check-local-vulnerable-files /var/www/wordpress/

-

PROJECT HOME===

+

PROJECT HOME===

www.wpscan.org

-

REPOSITORY===

+

REPOSITORY===

github.com/wpscanteam/wpscan

-

ISSUES===

+

ISSUES===

github.com/wpscanteam/wpscan/issues

-

SPONSOR===

+

SPONSOR===

WPScan is sponsored by the RandomStorm Open Source Initiative.

Visit RandomStorm at www.randomstorm.com

-
+
- - - +
+

[Validate]

+

Generated with the Darkfish + Rdoc Generator 2.

+
+ + diff --git a/doc/StatsPlugin.html b/doc/StatsPlugin.html new file mode 100644 index 00000000..979b70dc --- /dev/null +++ b/doc/StatsPlugin.html @@ -0,0 +1,632 @@ + + + + + + + Class: StatsPlugin + + + + + + + + + + + +
+
+
+

+ Home + Classes + Methods +

+
+
+ +
+
+

In Files

+ +
+ + +
+ +
+ + +
+

Parent

+ + + +
+ + + + + + + + + + + + +
+ +
+ + +
+

Files

+ +
+ + + + + +
+
+ +
+

StatsPlugin

+ +
+ +
+ + + + +
+ + + + + + + + + + +
+

Public Class Methods

+ + +
+ + + +
+ new() + click to toggle source +
+ + +
+ + + + + +
+
+# File lib/wpstools/plugins/stats/stats_plugin.rb, line 4
+def initialize
+  super(author: 'WPScanTeam - Christian Mehlmauer')
+
+  register_options(
+      ['--stats', '--s', 'Show WpScan Database statistics']
+  )
+end
+
+ +
+ + + + +
+ + +
+ +
+

Public Instance Methods

+ + +
+ + + +
+ lines_in_file(file) + click to toggle source +
+ + +
+ + + + + +
+
+# File lib/wpstools/plugins/stats/stats_plugin.rb, line 50
+def lines_in_file(file)
+  IO.readlines(file).size
+end
+
+ +
+ + + + +
+ + +
+ + + +
+ plugin_vulns_count(file=PLUGINS_VULNS_FILE) + click to toggle source +
+ + +
+ + + + + +
+
+# File lib/wpstools/plugins/stats/stats_plugin.rb, line 34
+def plugin_vulns_count(file=PLUGINS_VULNS_FILE)
+  xml(file).xpath("count(//vulnerability)").to_i
+end
+
+ +
+ + + + +
+ + +
+ + + +
+ run(options = {}) + click to toggle source +
+ + +
+ + + + + +
+
+# File lib/wpstools/plugins/stats/stats_plugin.rb, line 12
+def run(options = {})
+  if options[:stats]
+    puts "Wpscan Databse Statistics:"
+    puts "--------------------------"
+    puts "[#] Total vulnerable plugins: #{vuln_plugin_count}"
+    puts "[#] Total vulnerable themes: #{vuln_theme_count}"
+    puts "[#] Total plugin vulnerabilities: #{plugin_vulns_count}"
+    puts "[#] Total theme vulnerabilities: #{theme_vulns_count}"
+    puts "[#] Total plugins to enumerate: #{total_plugins}"
+    puts "[#] Total themes to enumerate: #{total_themes}"
+    puts
+  end
+end
+
+ +
+ + + + +
+ + +
+ + + +
+ theme_vulns_count(file=THEMES_VULNS_FILE) + click to toggle source +
+ + +
+ + + + + +
+
+# File lib/wpstools/plugins/stats/stats_plugin.rb, line 38
+def theme_vulns_count(file=THEMES_VULNS_FILE)
+  xml(file).xpath("count(//vulnerability)").to_i
+end
+
+ +
+ + + + +
+ + +
+ + + +
+ total_plugins(file=PLUGINS_FULL_FILE) + click to toggle source +
+ + +
+ + + + + +
+
+# File lib/wpstools/plugins/stats/stats_plugin.rb, line 42
+def total_plugins(file=PLUGINS_FULL_FILE)
+  lines_in_file(file)
+end
+
+ +
+ + + + +
+ + +
+ + + +
+ total_themes(file=THEMES_FULL_FILE) + click to toggle source +
+ + +
+ + + + + +
+
+# File lib/wpstools/plugins/stats/stats_plugin.rb, line 46
+def total_themes(file=THEMES_FULL_FILE)
+  lines_in_file(file)
+end
+
+ +
+ + + + +
+ + +
+ + + +
+ vuln_plugin_count(file=PLUGINS_VULNS_FILE) + click to toggle source +
+ + +
+ + + + + +
+
+# File lib/wpstools/plugins/stats/stats_plugin.rb, line 26
+def vuln_plugin_count(file=PLUGINS_VULNS_FILE)
+  xml(file).xpath("count(//plugin)").to_i
+end
+
+ +
+ + + + +
+ + +
+ + + +
+ vuln_theme_count(file=THEMES_VULNS_FILE) + click to toggle source +
+ + +
+ + + + + +
+
+# File lib/wpstools/plugins/stats/stats_plugin.rb, line 30
+def vuln_theme_count(file=THEMES_VULNS_FILE)
+  xml(file).xpath("count(//theme)").to_i
+end
+
+ +
+ + + + +
+ + +
+ +
+ + +
+ +
+

[Validate]

+

Generated with the Darkfish + Rdoc Generator 2.

+
+ + + + diff --git a/doc/SvnParser.html b/doc/SvnParser.html index 10f29a54..03a41045 100644 --- a/doc/SvnParser.html +++ b/doc/SvnParser.html @@ -1,341 +1,435 @@ - - - + + + - + -class SvnParser - RDoc Documentation + Class: SvnParser - - - - - - - - - - + + + + + + - - -
-

class SvnParser

- -
- +
+

This Class Parses SVN Repositories via HTTP

-
- - - - -
- +
- - - -
-

Attributes

+
+ -
-
- keep_empty_dirs[RW] -
-
- - - -
-
-
-
- svn_root[RW] -
-
- - - -
-
-
-
- verbose[RW] -
+ +
+

Attributes

-
- - -
-
- -
- +
+ + + + +
+ keep_empty_dirs[RW] +
- - -
-

Public Class Methods

- - -
- -
- new(svn_root) - click to toggle source -
- - -
+
+
+
+ +
+ + + + +
+ svn_root[RW] +
+ +
+ + + +
+
+ +
+ + + + +
+ verbose[RW] +
+ +
+ + + +
+
+ +
+ + + + +
+

Public Class Methods

+ + +
+ -
-
# File lib/wpstools/plugins/list_generator/svn_parser.rb, line 24
+          
+ new(svn_root) + click to toggle source +
+ + +
+ + + + + +
+
+# File lib/wpstools/plugins/list_generator/svn_parser.rb, line 7
 def initialize(svn_root)
   @svn_root    = svn_root
   @svn_browser = Browser.instance
   @svn_hydra   = @svn_browser.hydra
 end
-
+
+ +
+ -
- - - -
+ +
+ +
- - -
-

Public Instance Methods

+
+

Public Instance Methods

- -
- -
- parse() - click to toggle source -
- - -
- - - + +
+ -
-
# File lib/wpstools/plugins/list_generator/svn_parser.rb, line 30
+          
+ parse() + click to toggle source +
+ + +
+ + + + + +
+
+# File lib/wpstools/plugins/list_generator/svn_parser.rb, line 13
 def parse
   get_root_directories
 end
-
+
+ +
+ -
- - - -
+ +
+ +
-
+ - - + +
+

[Validate]

+

Generated with the Darkfish + Rdoc Generator 2.

+
- + + diff --git a/doc/SvnUpdater.html b/doc/SvnUpdater.html index aebd536e..71f7e32f 100644 --- a/doc/SvnUpdater.html +++ b/doc/SvnUpdater.html @@ -1,336 +1,421 @@ - - - + + + - + -class SvnUpdater - RDoc Documentation + Class: SvnUpdater - - - - - - - - - - + + + + + + - - -
-

class SvnUpdater

- -
- -
- - - - -
- - - - - - -
-

Constants

-
- -
REVISION_PATTERN - -
- - -
TRUNK_URL - -
- - -
-
- - - - - - -
-

Public Instance Methods

- - -
- -
- is_installed?() - click to toggle source +
+
+

In Files

+ +
+ + +
+ +
+ + +
+

Parent

+ + +
+ -
+ + + + + + + + + + +
+ + +
+ +
+

SvnUpdater

+ +
+ +
+ + + + +
+ + + + + + +
+

Constants

+
+ +
REVISION_PATTERN
+ +
+ + +
TRUNK_URL
+ +
+ + +
+
+ + + + + + +
+

Public Instance Methods

+ + +
+ -
-
# File lib/updater/svn_updater.rb, line 26
+          
+ is_installed?() + click to toggle source +
+ + +
+ + + + + +
+
+# File lib/common/updater/svn_updater.rb, line 9
 def is_installed?
-  %x[svn info "#@repo_directory" --xml 2>&1] =~ %rrevision=/ ? true : false
+  %[svn info "#@repo_directory" --xml 2>&1] =~ /revision=/ ? true : false
 end
-
- -
+
+ +
- - - -
- - -
- -
- local_revision_number() - click to toggle source -
- - -
- - -
-
# File lib/updater/svn_updater.rb, line 30
+        
+ + +
+ + + +
+ local_revision_number() + click to toggle source +
+ + +
+ + + + + +
+
+# File lib/common/updater/svn_updater.rb, line 13
 def local_revision_number
-  local_revision = %x[svn info "#@repo_directory" --xml 2>&1]
+  local_revision = %[svn info "#@repo_directory" --xml 2>&1]
   local_revision[REVISION_PATTERN, 1].to_s
 end
-
- -
+
+ +
- - - -
- - -
- -
- update() - click to toggle source -
- - -
- - -
-
# File lib/updater/svn_updater.rb, line 35
+        
+ + +
+ + + +
+ update() + click to toggle source +
+ + +
+ + + + + +
+
+# File lib/common/updater/svn_updater.rb, line 18
 def update
-  %x[svn up "#@repo_directory"]
+  %[svn up "#@repo_directory"]
 end
-
+
+ +
+ -
- - - -
+ +
+ +
-
+
- - + +
+

[Validate]

+

Generated with the Darkfish + Rdoc Generator 2.

+
- + + diff --git a/doc/Typhoeus.html b/doc/Typhoeus.html new file mode 100644 index 00000000..445faadd --- /dev/null +++ b/doc/Typhoeus.html @@ -0,0 +1,295 @@ + + + + + + + Module: Typhoeus + + + + + + + + + + + +
+
+
+

+ Home + Classes + Methods +

+
+
+ +
+
+

In Files

+ +
+ + +
+ +
+ + + + + + +
+

Namespace

+ +
+ + + + + +
+ +
+ + +
+

Files

+ +
+ + + + + +
+
+ +
+

Typhoeus

+ +
+ +

Implementaion of a cache_key (Typhoeus::Request#hash has too many options)

+
+ +

This is used in WpItem::Existable

+ +
+ + + + +
+ + + + + + + + + + +
+ + +
+ +
+

[Validate]

+

Generated with the Darkfish + Rdoc Generator 2.

+
+ + + + diff --git a/doc/Typhoeus/Request.html b/doc/Typhoeus/Request.html new file mode 100644 index 00000000..8754d8f2 --- /dev/null +++ b/doc/Typhoeus/Request.html @@ -0,0 +1,293 @@ + + + + + + + Class: Typhoeus::Request + + + + + + + + + + + +
+
+
+

+ Home + Classes + Methods +

+
+
+ +
+
+

In Files

+ +
+ + +
+ +
+ + +
+

Parent

+ + + +
+ + + + + + +
+

Namespace

+ +
+ + + + + +
+ +
+ + +
+

Files

+ +
+ + + + + +
+
+ +
+

Typhoeus::Request

+ +
+ +
+ + + + +
+ + + + + + + + + + +
+ + +
+ +
+

[Validate]

+

Generated with the Darkfish + Rdoc Generator 2.

+
+ + + + diff --git a/doc/Typhoeus/Request/Cacheable.html b/doc/Typhoeus/Request/Cacheable.html new file mode 100644 index 00000000..2c0a6447 --- /dev/null +++ b/doc/Typhoeus/Request/Cacheable.html @@ -0,0 +1,324 @@ + + + + + + + Module: Typhoeus::Request::Cacheable + + + + + + + + + + + +
+
+
+

+ Home + Classes + Methods +

+
+
+ +
+
+

In Files

+ +
+ + +
+ +
+ + + + + + + + +
+

Methods

+ +
+ + + +
+ +
+ + +
+

Files

+ +
+ + + + + +
+
+ +
+

Typhoeus::Request::Cacheable

+ +
+ +
+ + + + +
+ + + + + + + + + + +
+

Public Instance Methods

+ + +
+ + + +
+ cache_key() + click to toggle source +
+ + +
+ + + + + +
+
+# File lib/common/typhoeus_cache.rb, line 8
+def cache_key
+  Digest::SHA2.hexdigest("#{url}-#{options[:body]}-#{options[:method]}")[0..32]
+end
+
+ +
+ + + + +
+ + +
+ +
+ + +
+ +
+

[Validate]

+

Generated with the Darkfish + Rdoc Generator 2.

+
+ + + + diff --git a/doc/Typhoeus/Response.html b/doc/Typhoeus/Response.html new file mode 100644 index 00000000..7001513e --- /dev/null +++ b/doc/Typhoeus/Response.html @@ -0,0 +1,337 @@ + + + + + + + Class: Typhoeus::Response + + + + + + + + + + + +
+
+
+

+ Home + Classes + Methods +

+
+
+ +
+
+

In Files

+
+ +
+
+ + +
+ +
+ + +
+

Parent

+ + + +
+ + + + + + + + +
+

Methods

+ +
+ + + +
+ +
+ + +
+

Files

+ +
+ + + + + +
+
+ +
+

Typhoeus::Response

+ +
+ +
+ + + + +
+ + + + + + + + + + +
+

Public Instance Methods

+ + +
+ + + +
+ has_valid_hash?(error_404_hash, homepage_hash) + click to toggle source +
+ + +
+ +

Compare the body hash to error_404_hash and homepage_hash returns true if +they are different, false otherwise

+ +

@return [ Boolean ]

+ + + +
+
+# File lib/common/hacks.rb, line 40
+def has_valid_hash?(error_404_hash, homepage_hash)
+  body_hash = Digest::MD5.hexdigest(self.body)
+
+  body_hash != error_404_hash && body_hash != homepage_hash
+end
+
+ +
+ + + + +
+ + +
+ +
+ + +
+ +
+

[Validate]

+

Generated with the Darkfish + Rdoc Generator 2.

+
+ + + + diff --git a/doc/TyphoeusCache.html b/doc/TyphoeusCache.html new file mode 100644 index 00000000..f33c025b --- /dev/null +++ b/doc/TyphoeusCache.html @@ -0,0 +1,367 @@ + + + + + + + Class: TyphoeusCache + + + + + + + + + + + +
+
+
+

+ Home + Classes + Methods +

+
+
+ +
+
+

In Files

+ +
+ + +
+ +
+ + +
+

Parent

+ + + +
+ + + + + + + + +
+

Methods

+ +
+ + + +
+ +
+ + +
+

Files

+ +
+ + + + + +
+
+ +
+

TyphoeusCache

+ +
+ +
+ + + + +
+ + + + + + + + + + +
+

Public Instance Methods

+ + +
+ + + +
+ get(request) + click to toggle source +
+ + +
+ + + + + +
+
+# File lib/common/typhoeus_cache.rb, line 17
+def get(request)
+  read_entry(request.cache_key)
+end
+
+ +
+ + + + +
+ + +
+ + + +
+ set(request, response) + click to toggle source +
+ + +
+ + + + + +
+
+# File lib/common/typhoeus_cache.rb, line 21
+def set(request, response)
+  write_entry(request.cache_key, response, request.cache_ttl)
+end
+
+ +
+ + + + +
+ + +
+ +
+ + +
+ +
+

[Validate]

+

Generated with the Darkfish + Rdoc Generator 2.

+
+ + + + diff --git a/doc/URI.html b/doc/URI.html index 9380ec73..ba26acce 100644 --- a/doc/URI.html +++ b/doc/URI.html @@ -1,247 +1,359 @@ - - - + + + - + -module URI - RDoc Documentation + Module: URI - - - - - - - - - - + + + + + + - - -
-

module URI

- -
- -
- - - - -
- - - - - - - - - - -
-

Public Class Methods

- - -
- -
- escape(str) - click to toggle source +
+
+

In Files

+ +
+ + +
+ +
+ + + + + + + + +
+

Methods

+ +
+ + + +
+ + +
+ +
+

URI

+ +
+ +
+ + + + +
+ + + + + + + + + + +
+

Public Instance Methods

+ + +
+ -
+
+ encode(str) + click to toggle source +
+ +
+ + + + + +
+ -
-
# File lib/common_helper.rb, line 102
-def self.escape(str)
-  URI.encode_www_form_component(str).gsub('+', '%20')
+          
+ Alias for: escape +
+ +
+ + +
+ + + +
+ escape(str) + click to toggle source +
+ + +
+ + + + + +
+
+# File lib/common/hacks.rb, line 8
+def escape(str)
+  URI::Parser.new.escape(str)
 end
-
+
+ +
+ + +
+ Also aliased as: encode +
-
- - - -
+ +
+ +
-
+
- - + +
+

[Validate]

+

Generated with the Darkfish + Rdoc Generator 2.

+
- + + diff --git a/doc/Updater.html b/doc/Updater.html index a2658a82..cf713904 100644 --- a/doc/Updater.html +++ b/doc/Updater.html @@ -1,379 +1,469 @@ - - - + + + - + -class Updater - RDoc Documentation + Class: Updater - - - - - - - - - - + + + + + + - - -
-

class Updater

- -
- -

This class act as an absract one

- -
- - - - -
- - - - - - - - -
-

Attributes

- - -
-
- repo_directory[R] -
- -
- - - +
+
+

In Files

+
+ -
- +
- - -
-

Public Class Methods

- - -
+
+ + +
+

Parent

-
- new(repo_directory = nil) - click to toggle source + + +
+ + + + + + + + +
+

Methods

+ +
+ + + +
+ + +
+ +
+

Updater

+ +
+ +

This class act as an absract one

+ +
+ + + + +
+ + + + + + + + +
+

Attributes

+ + +
+ + +
+ repo_directory[R] +
+ +
+ + + +
+
+ + + + +
+

Public Class Methods

+ + +
+ -
-

TODO : add a last ‘/ to #repo_directory if it’s +

+ new(repo_directory = nil) + click to toggle source +
+ + +
+ +

TODO : add a last ‘/ to repo_directory if it’s not present

- + - -
-
# File lib/updater/updater.rb, line 25
+            
+            
+
+# File lib/common/updater/updater.rb, line 8
 def initialize(repo_directory = nil)
   @repo_directory = repo_directory
 end
-
+
+ +
+ -
- - - -
+ +
+ +
-
- -
-

Public Instance Methods

+
+

Public Instance Methods

- -
- -
- is_installed?() - click to toggle source -
- - -
- - - + +
+ -
-
# File lib/updater/updater.rb, line 29
+          
+ is_installed?() + click to toggle source +
+ + +
+ + + + + +
+
+# File lib/common/updater/updater.rb, line 12
 def is_installed?
   raise NotImplementedError
 end
-
- -
+
+ +
- - - -
- - -
- -
- local_revision_number() - click to toggle source -
- - -
- - -
-
# File lib/updater/updater.rb, line 33
+        
+ + +
+ + + +
+ local_revision_number() + click to toggle source +
+ + +
+ + + + + +
+
+# File lib/common/updater/updater.rb, line 16
 def local_revision_number
   raise NotImplementedError
 end
-
- -
+
+ +
- - - -
- - -
- -
- update() - click to toggle source -
- - -
- - -
-
# File lib/updater/updater.rb, line 37
+        
+ + +
+ + + +
+ update() + click to toggle source +
+ + +
+ + + + + +
+
+# File lib/common/updater/updater.rb, line 20
 def update
   raise NotImplementedError
 end
-
+
+ +
+ -
- - - -
+ +
+ +
-
+ - - + +
+

[Validate]

+

Generated with the Darkfish + Rdoc Generator 2.

+
- + + diff --git a/doc/UpdaterFactory.html b/doc/UpdaterFactory.html index 6958e0fc..9f803b5e 100644 --- a/doc/UpdaterFactory.html +++ b/doc/UpdaterFactory.html @@ -1,232 +1,308 @@ - - - + + + - + -class UpdaterFactory - RDoc Documentation + Class: UpdaterFactory - - - - - - - - - - + + + + + + - - -
-

class UpdaterFactory

- -
- -
- - - - -
- - - - - - - - - - -
-

Public Class Methods

- - -
- -
- get_updater(repo_directory) - click to toggle source +
+
+

In Files

+ +
+ + +
+ +
+ + +
+

Parent

+ + +
+ -
+ + + + + + + + + + +
+ + +
+ +
+

UpdaterFactory

+ +
+ +
+ + + + +
+ + + + + + + + + + +
+

Public Class Methods

+ + +
+ -
-
# File lib/updater/updater_factory.rb, line 21
+          
+ get_updater(repo_directory) + click to toggle source +
+ + +
+ + + + + +
+
+# File lib/common/updater/updater_factory.rb, line 4
 def self.get_updater(repo_directory)
   self.available_updaters_classes().each do |updater_symbol|
     updater = Object.const_get(updater_symbol).new(repo_directory)
@@ -237,62 +313,68 @@
   end
   nil
 end
-
+
+ +
+ -
- - - -
+ +
+ +
-
- -
-

Protected Class Methods

+
+

Protected Class Methods

- -
- -
- available_updaters_classes() - click to toggle source -
- - -
- -

return array of class symbols

- + +
+ -
-
# File lib/updater/updater_factory.rb, line 35
+          
+ available_updaters_classes() + click to toggle source +
+ + +
+ +

return array of class symbols

+ + + +
+
+# File lib/common/updater/updater_factory.rb, line 18
 def self.available_updaters_classes
-  Object.constants.grep(%r^.+Updater$/)
+  Object.constants.grep(/^.+Updater$/)
 end
-
+
+ +
+ -
- - - -
+ +
+ +
-
+
- - + +
+

[Validate]

+

Generated with the Darkfish + Rdoc Generator 2.

+
- + + diff --git a/doc/Vulnerabilities.html b/doc/Vulnerabilities.html new file mode 100644 index 00000000..cf492471 --- /dev/null +++ b/doc/Vulnerabilities.html @@ -0,0 +1,308 @@ + + + + + + + Class: Vulnerabilities + + + + + + + + + + + +
+
+
+

+ Home + Classes + Methods +

+
+
+ +
+ + + +
+ +
+ + +
+

Parent

+ + + +
+ + + + + + +
+

Namespace

+ +
+ + + + + + +
+

Included Modules

+ +
+ +
+ +
+ + +
+

Files

+ +
+ + + + + +
+
+ +
+

Vulnerabilities

+ +
+ +
+ + + + +
+ + + + + + + + + + +
+ + +
+ +
+

[Validate]

+

Generated with the Darkfish + Rdoc Generator 2.

+
+ + + + diff --git a/doc/Vulnerabilities/Output.html b/doc/Vulnerabilities/Output.html new file mode 100644 index 00000000..e07da77c --- /dev/null +++ b/doc/Vulnerabilities/Output.html @@ -0,0 +1,326 @@ + + + + + + + Module: Vulnerabilities::Output + + + + + + + + + + + +
+
+
+

+ Home + Classes + Methods +

+
+
+ +
+ + + +
+ +
+ + + + + + + + +
+

Methods

+ +
+ + + +
+ +
+ + +
+

Files

+ +
+ + + + + +
+
+ +
+

Vulnerabilities::Output

+ +
+ +
+ + + + +
+ + + + + + + + + + +
+

Public Instance Methods

+ + +
+ + + +
+ output() + click to toggle source +
+ + +
+ + + + + +
+
+# File lib/common/collections/vulnerabilities/output.rb, line 5
+def output
+  self.each do |v|
+    v.output
+  end
+end
+
+ +
+ + + + +
+ + +
+ +
+ + +
+ +
+

[Validate]

+

Generated with the Darkfish + Rdoc Generator 2.

+
+ + + + diff --git a/doc/Vulnerability.html b/doc/Vulnerability.html new file mode 100644 index 00000000..49e4a202 --- /dev/null +++ b/doc/Vulnerability.html @@ -0,0 +1,528 @@ + + + + + + + Class: Vulnerability + + + + + + + + + + + +
+
+
+

+ Home + Classes + Methods +

+
+
+ +
+ + + +
+ +
+ + +
+

Parent

+ + + +
+ + + + + + +
+

Namespace

+ +
+ + + + +
+

Methods

+ +
+ + + + +
+

Included Modules

+ +
+ +
+ +
+ + +
+

Files

+ +
+ + + + + +
+
+ +
+

Vulnerability

+ +
+ +
+ + + + +
+ + + + + + + + +
+

Attributes

+ + +
+ + + + +
+ metasploit_modules[RW] +
+ +
+ + + +
+
+ +
+ + + + +
+ references[RW] +
+ +
+ + + +
+
+ +
+ + + + +
+ title[RW] +
+ +
+ + + +
+
+ +
+ + + + +
+ type[RW] +
+ +
+ + + +
+
+ +
+ + + + +
+

Public Class Methods

+ + +
+ + + +
+ load_from_xml_node(xml_node) + click to toggle source +
+ + +
+ +

Create the Vulnerability from the xml_node

+ +

@param [ Nokogiri::XML::Node ] xml_node

+ +

@return [ Vulnerability ]

+ + + +
+
+# File lib/common/models/vulnerability.rb, line 37
+def self.load_from_xml_node(xml_node)
+  new(
+    xml_node.search('title').text,
+    xml_node.search('type').text,
+    xml_node.search('reference').map(&:text),
+    xml_node.search('metasploit').map(&:text)
+  )
+end
+
+ +
+ + + + +
+ + +
+ + + +
+ new(title, type, references, metasploit_modules = []) + click to toggle source +
+ + +
+ +

@param [ String ] title The title of the vulnerability @param [ String ] +type The type of the vulnerability @param [ Array +] references References urls @param [ Array ] metasploit_modules +Metasploit modules for the vulnerability

+ +

@return [ Vulnerability ]

+ + + +
+
+# File lib/common/models/vulnerability.rb, line 16
+def initialize(title, type, references, metasploit_modules = [])
+  @title              = title
+  @type               = type
+  @references         = references
+  @metasploit_modules = metasploit_modules
+end
+
+ +
+ + + + +
+ + +
+ +
+

Public Instance Methods

+ + +
+ + + +
+ ==(other) + click to toggle source +
+ + +
+ +

@param [ Vulnerability ] other

+ +

@return [ Boolean ] :nocov:

+ + + +
+
+# File lib/common/models/vulnerability.rb, line 27
+def ==(other)
+  title == other.title && type == other.type && references == other.references
+end
+
+ +
+ + + + +
+ + +
+ +
+ + +
+ +
+

[Validate]

+

Generated with the Darkfish + Rdoc Generator 2.

+
+ + + + diff --git a/doc/Vulnerability/Output.html b/doc/Vulnerability/Output.html new file mode 100644 index 00000000..806d6d76 --- /dev/null +++ b/doc/Vulnerability/Output.html @@ -0,0 +1,374 @@ + + + + + + + Module: Vulnerability::Output + + + + + + + + + + + +
+
+
+

+ Home + Classes + Methods +

+
+
+ +
+
+

In Files

+ +
+ + +
+ +
+ + + + + + + + +
+

Methods

+ +
+ + + +
+ +
+ + +
+

Files

+ +
+ + + + + +
+
+ +
+

Vulnerability::Output

+ +
+ +
+ + + + +
+ + + + + + + + + + +
+

Public Class Methods

+ + +
+ + + +
+ metasploit_module_url(module_path) + click to toggle source +
+ + +
+ +

@return [ String ] The url to the metasploit module page

+ + + +
+
+# File lib/common/models/vulnerability/output.rb, line 18
+def self.metasploit_module_url(module_path)
+  # remove leading slash
+  module_path = module_path.sub(/^\//, '')
+  "http://www.metasploit.com/modules/#{module_path}"
+end
+
+ +
+ + + + +
+ + +
+ +
+

Public Instance Methods

+ + +
+ + + +
+ output() + click to toggle source +
+ + +
+ +

output the vulnerability

+ + + +
+
+# File lib/common/models/vulnerability/output.rb, line 6
+def output
+  puts ' |'
+  puts ' | ' + red("* Title: #{title}")
+  references.each do |r|
+    puts ' | ' + red("* Reference: #{r}")
+  end
+  metasploit_modules.each do |m|
+    puts ' | ' + red("* Metasploit module: #{metasploit_module_url(m)}")
+  end
+end
+
+ +
+ + + + +
+ + +
+ +
+ + +
+ +
+

[Validate]

+

Generated with the Darkfish + Rdoc Generator 2.

+
+ + + + diff --git a/doc/Vulnerable.html b/doc/Vulnerable.html deleted file mode 100644 index ec1ae138..00000000 --- a/doc/Vulnerable.html +++ /dev/null @@ -1,301 +0,0 @@ - - - - - - -class Vulnerable - RDoc Documentation - - - - - - - - - - - - - - - - -
-

class Vulnerable

- -
- -
- - - - -
- - - - - - - - -
-

Attributes

- - -
-
- vulns_file[R] -
- -
- - - -
-
- -
-
- vulns_xpath[R] -
- -
- - - -
-
- -
- - - - -
-

Public Instance Methods

- - -
- -
- vulnerabilities() - click to toggle source -
- - -
- -

@return an array of WpVulnerability (can -be empty)

- - - -
-
# File lib/wpscan/vulnerable.rb, line 24
-def vulnerabilities
-  vulnerabilities = []
-
-  xml = Nokogiri::XML(File.open(@vulns_file)) do |config|
-    config.noblanks
-  end
-
-  xml.xpath(@vulns_xpath).each do |node|
-    vulnerabilities << WpVulnerability.new(
-      node.search('title').text,
-      node.search('reference').map(&:text),
-      node.search('type').text,
-      node.search('metasploit').map(&:text)
-    )
-  end
-  vulnerabilities
-end
-
- -
- - - - -
- - -
- -
- -
- - - - diff --git a/doc/WebSite.html b/doc/WebSite.html index 98d4e479..1e1f7ea4 100644 --- a/doc/WebSite.html +++ b/doc/WebSite.html @@ -1,278 +1,430 @@ - - - + + + - + -module WebSite - RDoc Documentation + Class: WebSite - + - + + + + - - - - - - + + +
+
+
+

+ Home + Classes + Methods +

+
+
- - - -
-

module WebSite

- -
- -
- - - - -
- - - - - - - - - - -
-

Public Class Methods

- - -
+
+ + +
+

Parent

-
- page_hash(url) - click to toggle source + + +
+ + + + + + + + + + + + +
+ + +
+ +
+

WebSite

+ +
+ +
+ + + + +
+ + + + + + + + +
+

Attributes

+ + +
+ + +
+ uri[R] +
+ +
+ + + +
+
+ + + + +
+

Public Class Methods

+ + +
+ -
-

Return the MD5 hash of the page given by url

+
+ new(site_url) + click to toggle source +
+ + +
+ + + + + +
+
+# File lib/wpscan/web_site.rb, line 6
+def initialize(site_url)
+  self.url = site_url
+end
+
+ +
+ -
-
# File lib/wpscan/modules/web_site.rb, line 94
+        
+ + +
+ + + +
+ page_hash(url) + click to toggle source +
+ + +
+ +

Return the MD5 hash of the page given by url

+ + + +
+
+# File lib/wpscan/web_site.rb, line 79
 def self.page_hash(url)
   Digest::MD5.hexdigest(Browser.instance.get(url).body)
 end
-
+
+ +
+ -
- - - -
+ +
+ +
-
- -
-

Public Instance Methods

+
+

Public Instance Methods

- -
- -
- error_404_hash() - click to toggle source -
- - -
- -

Return the MD5 hash of a 404 page

- + +
+ -
-
# File lib/wpscan/modules/web_site.rb, line 106
+          
+ error_404_hash() + click to toggle source +
+ + +
+ +

Return the MD5 hash of a 404 page

+ + + +
+
+# File lib/wpscan/web_site.rb, line 91
 def error_404_hash
   unless @error_404_hash
     non_existant_page = Digest::MD5.hexdigest(rand(999_999_999).to_s) + '.html'
@@ -280,157 +432,205 @@
   end
   @error_404_hash
 end
-
- -
+
+ +
- - - -
- - -
- -
- has_basic_auth?() - click to toggle source -
- - -
- - -
-
# File lib/wpscan/modules/web_site.rb, line 26
+        
+ + +
+ + + +
+ has_basic_auth?() + click to toggle source +
+ + +
+ + + + + +
+
+# File lib/wpscan/web_site.rb, line 23
 def has_basic_auth?
   Browser.instance.get(@uri.to_s).code == 401
 end
-
- -
+
+ +
- - - -
- - -
- -
- has_xml_rpc?() - click to toggle source -
- - -
- - -
-
# File lib/wpscan/modules/web_site.rb, line 56
+        
+ + +
+ + + +
+ has_robots?() + click to toggle source +
+ + +
+ +

Checks if a robots.txt file exists

+ + + +
+
+# File lib/wpscan/web_site.rb, line 107
+def has_robots?
+  Browser.instance.get(robots_url).code == 200
+end
+
+ +
+ + + + +
+ + +
+ + + +
+ has_xml_rpc?() + click to toggle source +
+ + +
+ + + + + +
+
+# File lib/wpscan/web_site.rb, line 27
 def has_xml_rpc?
   !xml_rpc_url.nil?
 end
-
- -
+
+ +
- - - -
- - -
- -
- homepage_hash() - click to toggle source -
- - -
- - -
-
# File lib/wpscan/modules/web_site.rb, line 98
+        
+ + +
+ + + +
+ homepage_hash() + click to toggle source +
+ + +
+ + + + + +
+
+# File lib/wpscan/web_site.rb, line 83
 def homepage_hash
   unless @homepage_hash
     @homepage_hash = WebSite.page_hash(@uri.to_s)
   end
   @homepage_hash
 end
-
- -
+
+ +
- - - -
- - -
- -
- online?() - click to toggle source -
- - -
- -

Checks if the remote website is up.

-
-
# File lib/wpscan/modules/web_site.rb, line 22
+        
+ + +
+ + + +
+ online?() + click to toggle source +
+ + +
+ +

Checks if the remote website is up.

+ + + +
+
+# File lib/wpscan/web_site.rb, line 19
 def online?
   Browser.instance.get(@uri.to_s).code != 0
 end
-
+
+ +
+ -
- - - -
- - -
- -
- redirection(url = nil) - click to toggle source -
- - -
-

See if the remote url returns 30x redirect This method is recursive Return +

+ + +
+ + + +
+ redirection(url = nil) + click to toggle source +
+ + +
+ +

See if the remote url returns 30x redirect This method is recursive Return a string with the redirection or nil

- + - -
-
# File lib/wpscan/modules/web_site.rb, line 76
+            
+            
+
+# File lib/wpscan/web_site.rb, line 61
 def redirection(url = nil)
   redirection = nil
   url ||= @uri.to_s
@@ -447,147 +647,279 @@ a string with the redirection or nil

redirection end
-
+
+ +
+ -
- - - -
- - -
- -
- rss_url() - click to toggle source -
- - -
-

Will try to find the rss url in the homepage Only the first one found iw +

+ + +
+ + + +
+ robots_url() + click to toggle source +
+ + +
+ +

Gets a robots.txt URL

+ + + +
+
+# File lib/wpscan/web_site.rb, line 112
+def robots_url
+  robots = @uri.clone
+  robots.path = '/robots.txt'
+  robots.to_s
+end
+
+ +
+ + + + +
+ + +
+ + + +
+ rss_url() + click to toggle source +
+ + +
+ +

Will try to find the rss url in the homepage Only the first one found iw returned

- + - -
-
# File lib/wpscan/modules/web_site.rb, line 116
+            
+            
+
+# File lib/wpscan/web_site.rb, line 101
 def rss_url
   homepage_body = Browser.instance.get(@uri.to_s).body
-  homepage_body[%r{<link .* type="application/rss\+xml" .* href="([^"]+)" />}, 1]
+  homepage_body[%{<link .* type="application/rss\+xml" .* href="([^"]+)" />}, 1]
 end
-
- -
+
+ +
- - - -
- - -
- -
- wordpress?() - click to toggle source -
- - -
- -

check if the remote website is actually running wordpress.

-
-
# File lib/wpscan/modules/web_site.rb, line 32
-def wordpress?
-  wordpress = false
+        
- response = Browser.instance.get( - login_url(), - { follow_location: true, max_redirects: 2 } - ) + +
+ - if response.body =~ %r{WordPress} - wordpress = true - else - response = Browser.instance.get( - xml_rpc_url, - { follow_location: true, max_redirects: 2 } - ) + +
+ url() + click to toggle source +
+ - if response.body =~ %r{XML-RPC server accepts POST requests only} - wordpress = true - end - end +
+ + + - wordpress + +
+
+# File lib/wpscan/web_site.rb, line 14
+def url
+  @uri.to_s
 end
-
- -
+
+ +
- - - -
- - -
- -
- xml_rpc_url() - click to toggle source -
- - -
- - -
-
# File lib/wpscan/modules/web_site.rb, line 60
+        
+ + +
+ + + +
+ url=(url) + click to toggle source +
+ + +
+ + + + + +
+
+# File lib/wpscan/web_site.rb, line 10
+def url=(url)
+  @uri = URI.parse(add_trailing_slash(add_http_protocol(url)))
+end
+
+ +
+ + + + +
+ + +
+ + + +
+ xml_rpc_url() + click to toggle source +
+ + +
+ +

See www.hixie.ch/specs/pingback/pingback-1.0#TOC2.3

+ + + +
+
+# File lib/wpscan/web_site.rb, line 32
 def xml_rpc_url
   unless @xmlrpc_url
-    headers = Browser.instance.get(@uri.to_s).headers_hash
-    value = headers['x-pingback']
-    if value.nil? or value.empty?
-      @xmlrpc_url = nil
-    else
-      @xmlrpc_url = value
-    end
+    @xmlrpc_url = xml_rpc_url_from_headers() || xml_rpc_url_from_body()
   end
   @xmlrpc_url
 end
-
+
+ +
+ -
- + +
- -
+ +
+ + +
+ xml_rpc_url_from_body() + click to toggle source +
+ + +
+ + + + + +
+
+# File lib/wpscan/web_site.rb, line 52
+def xml_rpc_url_from_body
+  body = Browser.instance.get(@uri.to_s).body
+
+  body[%{<link rel="pingback" href="([^"]+)" ?\/?>}, 1]
+end
+
+ +
+ + + + +
+ + +
+ + + +
+ xml_rpc_url_from_headers() + click to toggle source +
+ + +
+ + + + + +
+
+# File lib/wpscan/web_site.rb, line 39
+def xml_rpc_url_from_headers
+  headers    = Browser.instance.get(@uri.to_s).headers_hash
+  xmlrpc_url = nil
+
+  unless headers.nil?
+    pingback_url = headers['X-Pingback']
+    unless pingback_url.nil? || pingback_url.empty?
+      xmlrpc_url = pingback_url
+    end
+  end
+  xmlrpc_url
+end
+
+ +
+ + + + +
+ + +
-
+
- -
+ +
+

[Validate]

+

Generated with the Darkfish + Rdoc Generator 2.

+
- + + diff --git a/doc/WpConfigBackup.html b/doc/WpConfigBackup.html index 4538a0ac..39b11f19 100644 --- a/doc/WpConfigBackup.html +++ b/doc/WpConfigBackup.html @@ -1,311 +1,398 @@ - - - + + + - + -module WpConfigBackup - RDoc Documentation + Module: WpConfigBackup - - - - - - - - - - + + + + + + - - -
-

module WpConfigBackup

- -
- -
- - - - -
- - - - - - - - - - -
-

Public Class Methods

- - -
- -
- config_backup_files() - click to toggle source +
+
+

In Files

+ +
+ + +
+ +
+ + + + + + + + +
+

Methods

+ +
+ + + +
+ + + +
+

WpConfigBackup

+ +
+ +
+ + + + +
+ + + + + + + + + + +
+

Public Class Methods

+ + +
+ -
-
# File lib/wpscan/modules/wp_config_backup.rb, line 49
+          
+ config_backup_files() + click to toggle source +
+ + +
+ +

@return Array

+ + + +
+
+# File lib/wpscan/modules/wp_config_backup.rb, line 39
 def self.config_backup_files
-  %w{
+  %{
     wp-config.php~ #wp-config.php# wp-config.php.save wp-config.php.swp wp-config.php.swo wp-config.php_bak
     wp-config.bak wp-config.php.bak wp-config.save wp-config.old wp-config.php.old wp-config.php.orig
     wp-config.orig wp-config.php.original wp-config.original wp-config.txt
   } # thanks to Feross.org for these
 end
-
+
+ +
+ -
- - - -
- - -
- -
-

Public Instance Methods

- - -
- -
- config_backup() - click to toggle source -
- - -
-

Checks to see if wp-config.php has a backup See + + +

+ +
+

Public Instance Methods

+ + +
+ + + +
+ config_backup() + click to toggle source +
+ + +
+ +

Checks to see if wp-config.php has a backup See www.feross.org/cmsploit/ return an array of backup config files url

- + - -
-
# File lib/wpscan/modules/wp_config_backup.rb, line 24
+            
+            
+
+# File lib/wpscan/modules/wp_config_backup.rb, line 7
 def config_backup
-  found = []
-  backups = WpConfigBackup.config_backup_files
-  browser = Browser.instance
-  hydra = browser.hydra
+  found       = []
+  backups     = WpConfigBackup.config_backup_files
+  browser     = Browser.instance
+  hydra       = browser.hydra
+  queue_count = 0
 
   backups.each do |file|
     file_url = @uri.merge(URI.escape(file)).to_s
     request = browser.forge_request(file_url)
 
     request.on_complete do |response|
-      if response.body[%r{define}] and not response.body[%r{<\s?html}]
+      if response.body[%{define}] and not response.body[%{<\s?html}]
         found << file_url
       end
     end
 
     hydra.queue(request)
+    queue_count += 1
+
+    if queue_count == browser.max_threads
+      hydra.run
+      queue_count = 0
+    end
   end
 
   hydra.run
 
   found
 end
-
+
+ +
+ -
- - - -
+ +
+ +
- + - - + +
+

[Validate]

+

Generated with the Darkfish + Rdoc Generator 2.

+
- + + diff --git a/doc/WpDetector.html b/doc/WpDetector.html deleted file mode 100644 index 6dc5d84e..00000000 --- a/doc/WpDetector.html +++ /dev/null @@ -1,333 +0,0 @@ - - - - - - -class WpDetector - RDoc Documentation - - - - - - - - - - - - - - - - -
-

class WpDetector

- -
- -
- - - - -
- - - - - - - - - - -
-

Public Class Methods

- - -
- -
- aggressive_detection(options, items = []) - click to toggle source -
- - -
- - - - - -
-
# File lib/wpscan/wp_detector.rb, line 21
-def self.aggressive_detection(options, items = [])
-  WpOptions.check_options(options)
-
-  result = items
-  if items == nil or items.length == 0
-    unless options[:only_vulnerable_ones]
-      result = passive_detection(options[:base_url], options[:type], options[:wp_content_dir])
-    end
-  end
-
-  enum_results = WpEnumerator.enumerate(options)
-  enum_results.each do |enum_result|
-    already_present = false
-    result.each do |r|
-      # Already found via passive detection
-      if r.name == enum_result.name
-        already_present = true
-        break
-      end
-    end
-    unless already_present
-      result << enum_result
-    end
-  end
-  result
-end
-
- -
- - - - -
- - -
- -
- passive_detection(url, type, wp_content_dir) - click to toggle source -
- - -
- -

plugins and themes can be found in the source code :

- -
<script src='http://example.com/wp-content/plugins/s2member/...' />
-<link rel='stylesheet' href='http://example.com/wp-content/plugins/wp-minify/..' type='text/css' media='screen'/>
-...
- - - -
-
# File lib/wpscan/wp_detector.rb, line 52
-def self.passive_detection(url, type, wp_content_dir)
-  items    = []
-  response = Browser.instance.get(url)
-  regex1   = %r{(?:[^=:]+)\s?(?:=|:)\s?(?:"|')[^"']+\\?/}
-  regex2   = %r{\\?/}
-  regex3   = %r{\\?/([^/\\"']+)\\?(?:/|"|')}
-  # Custom wp-content dir is now used in this regex
-  names    = response.body.scan(%r#{regex1}#{Regexp.escape(wp_content_dir)}#{regex2}#{Regexp.escape(type)}#{regex3}/)
-
-  names.flatten!
-  names.uniq!
-
-  names.each do |item|
-    items << WpItem.new(
-      base_url:       url,
-      name:           item,
-      type:           type,
-      path:           "#{item}/",
-      wp_content_dir: wp_content_dir,
-      vulns_file:     ''
-    )
-  end
-  items
-end
-
- -
- - - - -
- - -
- -
- -
- - - - diff --git a/doc/WpEnumerator.html b/doc/WpEnumerator.html deleted file mode 100644 index ad4f4183..00000000 --- a/doc/WpEnumerator.html +++ /dev/null @@ -1,418 +0,0 @@ - - - - - - -class WpEnumerator - RDoc Documentation - - - - - - - - - - - - - - - - -
-

class WpEnumerator

- -
- -

Enumerate over a given set of items and check if they exist

- -
- - - - -
- - - - - - - - - - -
-

Public Class Methods

- - -
- -
- enumerate(options = {}, items = nil) - click to toggle source -
- - -
- -

Enumerate the given Targets

- -

Attributes

-
  • -

    targets - targets to enumerate

    -
    • -

      :base_url - Base URL

      -
    -
    • -

      :wp_content - wp-content directory

      -
    -
    • -

      :path - Path to plugin

      -
    -
  • -

    type - "plugins" or "themes", item to enumerate

    -
  • -

    filename - filename in the data directory with paths

    -
  • -

    show_progression - Show a progress bar during enumeration

    -
- - - -
-
# File lib/wpscan/wp_enumerator.rb, line 33
-def self.enumerate(options = {}, items = nil)
-
-  WpOptions.check_options(options)
-
-  targets = self.generate_items(options)
-
-  unless items == nil
-    items.each do |i|
-      targets << i
-    end
-  end
-
-  found            = []
-  queue_count      = 0
-  request_count    = 0
-  enum_browser     = Browser.instance
-  enum_hydra       = enum_browser.hydra
-  enumerate_size   = targets.size
-  exclude_regexp   = options[:exclude_content_based] ? %r{#{options[:exclude_content_based]}} : nil
-  show_progression = options[:show_progression] || false
-
-  targets.each do |target|
-    url = target.get_full_url
-
-    request = enum_browser.forge_request(url, { cache_timeout: 0, follow_location: true })
-    request_count += 1
-
-    request.on_complete do |response|
-      page_hash = Digest::MD5.hexdigest(response.body)
-
-      print "\rChecking for #{enumerate_size} total #{options[:type]}... #{(request_count * 100) / enumerate_size}% complete." if show_progression
-
-      if WpTarget.valid_response_codes.include?(response.code)
-        if page_hash != options[:error_404_hash] and page_hash != options[:homepage_hash]
-          if options[:exclude_content_based]
-            unless response.body[exclude_regexp]
-              found << target
-            end
-          else
-            found << target
-          end
-        end
-      end
-    end
-
-    enum_hydra.queue(request)
-    queue_count += 1
-
-    if queue_count == enum_browser.max_threads
-      enum_hydra.run
-      queue_count = 0
-    end
-  end
-
-  enum_hydra.run
-  found
-end
-
- -
- - - - -
- - -
- -
-

Protected Class Methods

- - -
- -
- generate_items(options = {}) - click to toggle source -
- - -
- - - - - -
-
# File lib/wpscan/wp_enumerator.rb, line 93
-def self.generate_items(options = {})
-  only_vulnerable   = options[:only_vulnerable_ones]
-  file              = options[:file]
-  vulns_file        = options[:vulns_file]
-  wp_content_dir    = options[:wp_content_dir]
-  url               = options[:base_url]
-  type              = options[:type]
-  plugins_dir       = options[:wp_plugins_dir]
-  targets_url       = []
-
-  unless only_vulnerable
-    # Open and parse the 'most popular' plugin list...
-    File.open(file, 'r') do |f|
-      f.readlines.collect do |line|
-        l = line.strip
-        targets_url << WpItem.new(
-          base_url:       url,
-          path:           l,
-          wp_content_dir: wp_content_dir,
-          name:           l =~ %r.+\/.+/ ? File.dirname(l) : l.sub(%r\/$/, ''),
-          vulns_file:     vulns_file,
-          type:           type,
-          wp_plugins_dir: plugins_dir
-        )
-      end
-    end
-  end
-
-  # Timthumbs have no XML file
-  unless type =~ %rtimthumbs/
-    xml = Nokogiri::XML(File.open(vulns_file)) do |config|
-      config.noblanks
-    end
-
-    # We check if the plugin name from the plugin_vulns_file is already in targets, otherwise we add it
-    xml.xpath(options[:vulns_xpath_2]).each do |node|
-      name = node.attribute('name').text
-      targets_url << WpItem.new(
-        base_url:       url,
-        path:           name,
-        wp_content_dir: wp_content_dir,
-        name:           name,
-        vulns_file:     vulns_file,
-        type:           type,
-        wp_plugins_dir: plugins_dir
-      )
-      end
-  end
-
-  targets_url.flatten! { |t| t.name }
-  targets_url.uniq! { |t| t.name }
-  # randomize the plugins array to *maybe* help in some crappy IDS/IPS/WAF detection
-  targets_url.sort_by! { rand }
-end
-
- -
- - - - -
- - -
- -
- -
- - - - diff --git a/doc/WpFullPathDisclosure.html b/doc/WpFullPathDisclosure.html index e927e6ea..ee81d5fd 100644 --- a/doc/WpFullPathDisclosure.html +++ b/doc/WpFullPathDisclosure.html @@ -1,280 +1,360 @@ - - - + + + - + -module WpFullPathDisclosure - RDoc Documentation + Module: WpFullPathDisclosure - - - - - - - - - - + + + + + + - - -
-

module WpFullPathDisclosure

- -
- -
- - - - -
- - - - - - - - - - -
-

Public Instance Methods

- - -
- -
- full_path_disclosure_url() - click to toggle source +
+ + + +
+ +
+ + + + + + + + + + + + +
+ + + +
+

WpFullPathDisclosure

+ +
+ +
+ + + + +
+ + + + + + + + + + +
+

Public Instance Methods

+ + +
+ -
-
# File lib/wpscan/modules/wp_full_path_disclosure.rb, line 27
+          
+ full_path_disclosure_url() + click to toggle source +
+ + +
+ + + + + +
+
+# File lib/wpscan/modules/wp_full_path_disclosure.rb, line 10
 def full_path_disclosure_url
   @uri.merge('wp-includes/rss-functions.php').to_s
 end
-
- -
+
+ +
- - - -
- - -
- -
- has_full_path_disclosure?() - click to toggle source -
- - -
- -

Check for Full Path Disclosure (FPD)

-
-
# File lib/wpscan/modules/wp_full_path_disclosure.rb, line 22
+        
+ + +
+ + + +
+ has_full_path_disclosure?() + click to toggle source +
+ + +
+ +

Check for Full Path Disclosure (FPD)

+ + + +
+
+# File lib/wpscan/modules/wp_full_path_disclosure.rb, line 5
 def has_full_path_disclosure?
   response = Browser.instance.get(full_path_disclosure_url())
-  response.body[%r{Fatal error}]
+  response.body[%{Fatal error}]
 end
-
+
+ +
+ -
- - - -
+ +
+ +
-
+
- - + +
+

[Validate]

+

Generated with the Darkfish + Rdoc Generator 2.

+
- + + diff --git a/doc/WpItem.html b/doc/WpItem.html index 3fcf4ba2..68108e7f 100644 --- a/doc/WpItem.html +++ b/doc/WpItem.html @@ -1,955 +1,849 @@ - - - + + + - + -class WpItem - RDoc Documentation + Class: WpItem - - - - - - - - - - + + + + + + - - -
-

class WpItem

- -
- -
- - - - -
- - - - - - - - -
-

Attributes

- - -
-
- base_url[R] -
- -
- - - -
-
- -
-
- name[R] -
- -
- - - -
-
- -
-
- path[R] -
- -
- - - -
-
- -
-
- type[R] -
- -
- - - -
-
- -
-
- vulns_file[R] -
- -
- - - -
-
- -
-
- vulns_xpath[R] -
- -
- - - -
-
- -
-
- wp_content_dir[R] -
- -
- - - -
-
- -
-
- wp_plugins_dir[R] -
- -
- - - -
-
- -
- - - - -
-

Public Class Methods

- - -
- -
- new(options) - click to toggle source -
- - -
- - - - - -
-
# File lib/wpscan/wp_item.rb, line 25
-def initialize(options)
-  @type           = options[:type]
-  @wp_content_dir = options[:wp_content_dir] ? options[:wp_content_dir].sub(%r^\//, '').sub(%r\/$/, '') : 'wp-content'
-  @wp_plugins_dir = options[:wp_plugins_dir] || "#@wp_content_dir/plugins"
-  @base_url       = options[:base_url]
-  @path           = options[:path]
-  @name           = options[:name] || extract_name_from_url
-  @vulns_file     = options[:vulns_file]
-  @vulns_xpath    = options[:vulns_xpath].sub(%r\$name\$/, @name) unless options[:vulns_xpath] == nil
-
-  raise('base_url not set')       unless @base_url
-  raise('path not set')           unless @path
-  raise('wp_content_dir not set') unless @wp_content_dir
-  raise('name not set')           unless @name
-  raise('vulns_file not set')     unless @vulns_file
-  raise('type not set')           unless @type
-end
-
- -
- - - - -
- - -
- -
-

Public Instance Methods

- - -
- -
- <=>(other) - click to toggle source -
- - -
- -

Compare

- - - -
-
# File lib/wpscan/wp_item.rb, line 149
-def <=>(other)
-  other.name <=> self.name
-end
-
- -
- - - - -
- - -
- -
- ==(other) - click to toggle source -
- - -
- -

Compare

- - - -
-
# File lib/wpscan/wp_item.rb, line 139
-def ==(other)
-  other.name == self.name
-end
-
- -
- - - - -
- - -
- -
- ===(other) - click to toggle source -
- - -
- -

Compare

- - - -
-
# File lib/wpscan/wp_item.rb, line 144
-def ===(other)
-  other.name == self.name
-end
-
- -
- - - - -
- - -
- -
- changelog_url() - click to toggle source -
- - -
- -

Url for changelog.txt

- - - -
-
# File lib/wpscan/wp_item.rb, line 159
-def changelog_url
-  get_url_without_filename.merge('changelog.txt')
-end
-
- -
- - - - -
- - -
- -
- directory_listing?() - click to toggle source -
- - -
- -

Is directory listing enabled?

- - - -
-
# File lib/wpscan/wp_item.rb, line 122
-def directory_listing?
-  # Need to remove to file part from the url
-  Browser.instance.get(get_url_without_filename).body[%r{<title>Index of}] ? true : false
-end
-
- -
- - - - -
- - -
- -
- extract_name_from_url() - click to toggle source -
- - -
- -

Extract item name from a url

- - - -
-
# File lib/wpscan/wp_item.rb, line 128
-def extract_name_from_url
-  get_full_url.to_s[%r{^(https?://.*/([^/]+)/)}, 2]
-end
-
- -
- - - - -
- - -
- -
- get_full_url() - click to toggle source -
- - -
- -

Get the full url for this item

- - - -
-
# File lib/wpscan/wp_item.rb, line 84
-def get_full_url
-  url = @base_url.to_s.end_with?('/') ? @base_url.to_s : "#@base_url/"
-  # remove first and last /
-  wp_content_dir = @wp_content_dir.sub(%r^\//, "").sub(%r\/$/, '')
-  # remove first /
-  path = @path.sub(%r^\//, '')
-  if type == 'plugins'
-    # plugins can be outside of wp-content. wp_content_dir included in wp_plugins_dir
-    ret = URI.parse(URI.encode("#{url}#@wp_plugins_dir/#{path}"))
-  elsif type == 'timthumbs'
-    # timthumbs have folder in path variable
-    ret = URI.parse(URI.encode("#{url}#{wp_content_dir}/#{path}"))
-  else
-    ret = URI.parse(URI.encode("#{url}#{wp_content_dir}/#{get_sub_folder}/#{path}"))
-  end
-  ret
-end
-
- -
- - - - -
- - -
- -
- get_sub_folder() - click to toggle source -
- - -
- - - - - -
-
# File lib/wpscan/wp_item.rb, line 70
-def get_sub_folder
-  case @type
-  when 'themes'
-    folder = 'themes'
-  when 'timthumbs'
-    # not needed
-    folder = nil
-  else
-    raise("unknown type #@type")
-  end
-  folder
-end
-
- -
- - - - -
- - -
- -
- get_url_without_filename() - click to toggle source -
- - -
- -

Gets the full url for this item without filenames

- - - -
-
# File lib/wpscan/wp_item.rb, line 103
-def get_url_without_filename
-  location_url = get_full_url.to_s
-  valid_location_url = location_url[%r{^(https?://.*/)[^.]+\.[^/]+$}, 1]
-  unless valid_location_url
-    valid_location_url = add_trailing_slash(location_url)
-  end
-  URI.parse(URI.encode(valid_location_url))
-end
-
- -
- - - - -
- - -
- -
- has_changelog?() - click to toggle source -
- - -
- -

changelog.txt present?

- - - -
-
# File lib/wpscan/wp_item.rb, line 173
-def has_changelog?
-  unless @changelog
-    status = Browser.instance.get(changelog_url).code
-    @changelog = status == 200 ? true : false
-  end
-  @changelog
-end
-
- -
- - - - -
- - -
- -
- has_readme?() - click to toggle source -
- - -
- -

readme.txt present?

- - - -
-
# File lib/wpscan/wp_item.rb, line 164
-def has_readme?
-  unless @readme
-    status = Browser.instance.get(readme_url).code
-    @readme = status == 200 ? true : false
-  end
-  @readme
-end
-
- -
- - - - -
- - -
- -
- readme_url() - click to toggle source -
- - -
- -

Url for readme.txt

- - - -
-
# File lib/wpscan/wp_item.rb, line 154
-def readme_url
-  get_url_without_filename.merge('readme.txt')
-end
-
- -
- - - - -
- - -
- -
- to_s() - click to toggle source -
- - -
- -

To string. Adds a version number if detected

- - - -
-
# File lib/wpscan/wp_item.rb, line 133
-def to_s
-  item_version = version
-  "#@name#{' v' + item_version.strip if item_version}"
-end
-
- -
- - - - -
- - -
- -
- version() - click to toggle source -
- - -
- -

Returns version number from readme.txt if it exists

- - - -
-
# File lib/wpscan/wp_item.rb, line 113
-def version
-  unless @version
-    response = Browser.instance.get(get_full_url.merge('readme.txt').to_s)
-    @version = response.body[%r{stable tag: #{WpVersion.version_pattern}}, 1]
-  end
-  @version
-end
-
- -
- - - - -
- - -
- -
- wp_org_item?() - click to toggle source -
- - -
- -

returns true if this theme or plugin is hosted on wordpress.org

- - - -
-
# File lib/wpscan/wp_item.rb, line 57
-def wp_org_item?
-  case @type
-  when 'themes'
-    file = THEMES_FULL_FILE
-  when 'plugins'
-    file = PLUGINS_FULL_FILE
-  else
-    raise("Unknown type #@type")
-  end
-  f = File.readlines(file, encoding: 'UTF-8').grep(%r^#{Regexp.escape(@name)}$/)
-  f.empty? ? false : true
-end
-
- -
- - - - -
- - -
- -
- wp_org_url() - click to toggle source -
- - -
- -

The wordpress.org plugins directory URL See: github.com/wpscanteam/wpscan/issues/100

- - - -
-
# File lib/wpscan/wp_item.rb, line 45
-def wp_org_url
-  case @type
-  when 'themes'
-    return URI('http://wordpress.org/extend/themes/').merge("#@name/")
-  when 'plugins'
-    return URI('http://wordpress.org/extend/plugins/').merge("#@name/")
-  else
-    raise("No Wordpress URL for #@type")
-  end
-end
-
- -
- - - - -
- - -
- -
- -
- - - + + diff --git a/doc/WpItem/Existable.html b/doc/WpItem/Existable.html new file mode 100644 index 00000000..e60f2fd7 --- /dev/null +++ b/doc/WpItem/Existable.html @@ -0,0 +1,397 @@ + + + + + + + Module: WpItem::Existable + + + + + + + + + + + +
+
+
+

+ Home + Classes + Methods +

+
+
+ +
+
+

In Files

+ +
+ + +
+ +
+ + + + + + + + +
+

Methods

+ +
+ + + +
+ +
+ + +
+

Files

+ +
+ + + + + +
+
+ +
+

WpItem::Existable

+ +
+ +
+ + + + +
+ + + + + + + + + + +
+

Public Instance Methods

+ + +
+ + + +
+ exists?(options = {}, response = nil) + click to toggle source +
+ + +
+ +

Check the existence of the WpItem If the +response is supplied, it’s used for the verification Otherwise a new +request is done

+ +

@param [ Hash ] options See exists_from_response? @param [ Typhoeus::Response ] response

+ +

@return [ Boolean ]

+ + + +
+
+# File lib/common/models/wp_item/existable.rb, line 13
+def exists?(options = {}, response = nil)
+  unless response
+    response = Browser.instance.get(url)
+  end
+  exists_from_response?(response, options)
+end
+
+ +
+ + + + +
+ + +
+ +
+

Protected Instance Methods

+ + +
+ + + +
+ exists_from_response?(response, options = {}) + click to toggle source +
+ + +
+ +

@param [ Typhoeus::Response ] +response @param [ options ] options

+ +

@option options [ Hash ] :error_404_hash The hash of the error 404 page +@option options [ Hash ] :homepage_hash The hash of the homepage @option +options [ Hash ] :exclude_content A regexp with the pattern to exclude from +the body of the response

+ +

@return [ Boolean ]

+ + + +
+
+# File lib/common/models/wp_item/existable.rb, line 30
+def exists_from_response?(response, options = {})
+  # FIXME : The response is supposed to follow locations, so we should not have 301 or 302.

+  # However, due to an issue with Typhoeus or Webmock, the location is not followed in specs

+  # See https://github.com/typhoeus/typhoeus/issues/279

+  if [200, 301, 302, 401, 403].include?(response.code)
+    if response.has_valid_hash?(options[:error_404_hash], options[:homepage_hash])
+      if options[:exclude_content]
+        unless response.body.match(options[:exclude_content])
+          return true
+        end
+      else
+        return true
+      end
+    end
+  end
+  false
+end
+
+ +
+ + + + +
+ + +
+ +
+ + +
+ +
+

[Validate]

+

Generated with the Darkfish + Rdoc Generator 2.

+
+ + + + diff --git a/doc/WpItem/Findable.html b/doc/WpItem/Findable.html new file mode 100644 index 00000000..c17f8839 --- /dev/null +++ b/doc/WpItem/Findable.html @@ -0,0 +1,275 @@ + + + + + + + Module: WpItem::Findable + + + + + + + + + + + +
+
+
+

+ Home + Classes + Methods +

+
+
+ +
+
+

In Files

+ +
+ + +
+ +
+ + + + + + + + + +
+ +
+ + +
+

Files

+ +
+ + + + + +
+
+ +
+

WpItem::Findable

+ +
+ +
+ + + + +
+ + + + + + + + + + +
+ + +
+ +
+

[Validate]

+

Generated with the Darkfish + Rdoc Generator 2.

+
+ + + + diff --git a/doc/WpItem/Infos.html b/doc/WpItem/Infos.html new file mode 100644 index 00000000..899e31db --- /dev/null +++ b/doc/WpItem/Infos.html @@ -0,0 +1,545 @@ + + + + + + + Module: WpItem::Infos + + + + + + + + + + + +
+
+
+

+ Home + Classes + Methods +

+
+
+ +
+
+

In Files

+ +
+ + +
+ +
+ + + + + + + + + + + + +
+ +
+ + +
+

Files

+ +
+ + + + + +
+
+ +
+

WpItem::Infos

+ +
+ +

@uri is used instead of uri to avoid the presence of the :path into it

+ +
+ + + + +
+ + + + + + + + + + +
+

Public Instance Methods

+ + +
+ + + +
+ changelog_url() + click to toggle source +
+ + +
+ +

@return [ String ] The url to the changelog file

+ + + +
+
+# File lib/common/models/wp_item/infos.rb, line 23
+def changelog_url
+  @uri.merge('changelog.txt').to_s
+end
+
+ +
+ + + + +
+ + +
+ + + +
+ error_log_url() + click to toggle source +
+ + +
+ +

@return [ String ] The url to the error_log file

+ + + +
+
+# File lib/common/models/wp_item/infos.rb, line 48
+def error_log_url
+  @uri.merge('error_log').to_s
+end
+
+ +
+ + + + +
+ + +
+ + + +
+ has_changelog?() + click to toggle source +
+ + +
+ +

@return [ Boolean ]

+ + + +
+
+# File lib/common/models/wp_item/infos.rb, line 18
+def has_changelog?
+  Browser.instance.get(changelog_url).code == 200 ? true : false
+end
+
+ +
+ + + + +
+ + +
+ + + +
+ has_directory_listing?() + click to toggle source +
+ + +
+ +

@return [ Boolean ]

+ + + +
+
+# File lib/common/models/wp_item/infos.rb, line 28
+def has_directory_listing?
+  Browser.instance.get(@uri.to_s).body[%{<title>Index of}] ? true : false
+end
+
+ +
+ + + + +
+ + +
+ + + +
+ has_error_log?() + click to toggle source +
+ + +
+ +

Discover any error_log files created by WordPress These are created by the +WordPress error_log() function They are normally found in the /plugins/ +directory, however can also be found in their specific plugin dir. www.exploit-db.com/ghdb/3714/

+ +

Only the first 700 bytes are checked to avoid the download of the whole +file which can be very huge (like 2 Go)

+ +

@return [ Boolean ]

+ + + +
+
+# File lib/common/models/wp_item/infos.rb, line 42
+def has_error_log?
+  response_body = Browser.instance.get(error_log_url, headers: {'range' => 'bytes=0-700'}).body
+  response_body[%{PHP Fatal error}] ? true : false
+end
+
+ +
+ + + + +
+ + +
+ + + +
+ has_readme?() + click to toggle source +
+ + +
+ +

@return [ Boolean ]

+ + + +
+
+# File lib/common/models/wp_item/infos.rb, line 8
+def has_readme?
+  Browser.instance.get(readme_url).code == 200 ? true : false
+end
+
+ +
+ + + + +
+ + +
+ + + +
+ readme_url() + click to toggle source +
+ + +
+ +

@return [ String ] The url to the readme file

+ + + +
+
+# File lib/common/models/wp_item/infos.rb, line 13
+def readme_url
+  @uri.merge('readme.txt').to_s
+end
+
+ +
+ + + + +
+ + +
+ +
+ + +
+ +
+

[Validate]

+

Generated with the Darkfish + Rdoc Generator 2.

+
+ + + + diff --git a/doc/WpItem/Output.html b/doc/WpItem/Output.html new file mode 100644 index 00000000..95594dd0 --- /dev/null +++ b/doc/WpItem/Output.html @@ -0,0 +1,336 @@ + + + + + + + Module: WpItem::Output + + + + + + + + + + + +
+
+
+

+ Home + Classes + Methods +

+
+
+ +
+
+

In Files

+ +
+ + +
+ +
+ + + + + + + + +
+

Methods

+ +
+ + + +
+ +
+ + +
+

Files

+ +
+ + + + + +
+
+ +
+

WpItem::Output

+ +
+ +
+ + + + +
+ + + + + + + + + + +
+

Public Instance Methods

+ + +
+ + + +
+ output() + click to toggle source +
+ + +
+ +

@return [ Void ]

+ + + +
+
+# File lib/common/models/wp_item/output.rb, line 6
+def output
+  puts
+  puts " | Name: #{self}" #this will also output the version number if detected
+  puts " | Location: #{url}"
+  #puts " | WordPress: #{wordpress_url}" if wordpress_org_item?
+  puts ' | Directory listing enabled: Yes' if has_directory_listing?
+  puts " | Readme: #{readme_url}" if has_readme?
+  puts " | Changelog: #{changelog_url}" if has_changelog?
+
+  vulnerabilities.output
+
+  if has_error_log?
+    puts ' | ' + red('[!]') + " An error_log file has been found : #{error_log_url}"
+  end
+end
+
+ +
+ + + + +
+ + +
+ +
+ + +
+ +
+

[Validate]

+

Generated with the Darkfish + Rdoc Generator 2.

+
+ + + + diff --git a/doc/WpItem/Versionable.html b/doc/WpItem/Versionable.html new file mode 100644 index 00000000..6abcbb14 --- /dev/null +++ b/doc/WpItem/Versionable.html @@ -0,0 +1,366 @@ + + + + + + + Module: WpItem::Versionable + + + + + + + + + + + +
+
+
+

+ Home + Classes + Methods +

+
+
+ +
+
+

In Files

+ +
+ + +
+ +
+ + + + + + + + +
+

Methods

+ +
+ + + +
+ +
+ + +
+

Files

+ +
+ + + + + +
+
+ +
+

WpItem::Versionable

+ +
+ +
+ + + + +
+ + + + + + + + + + +
+

Public Instance Methods

+ + +
+ + + +
+ to_s() + click to toggle source +
+ + +
+ +

@return [ String ]

+ + + +
+
+# File lib/common/models/wp_item/versionable.rb, line 19
+def to_s
+  item_version = self.version
+  "#@name#{' v' + item_version.strip if item_version}"
+end
+
+ +
+ + + + +
+ + +
+ + + +
+ version() + click to toggle source +
+ + +
+ +

Get the version from the readme.txt

+ +

@return [ String ] The version number

+ + + +
+
+# File lib/common/models/wp_item/versionable.rb, line 10
+def version
+  unless @version
+    response = Browser.instance.get(readme_url)
+    @version = response.body[%{stable tag: #{WpVersion.version_pattern}}, 1]
+  end
+  @version
+end
+
+ +
+ + + + +
+ + +
+ +
+ + +
+ +
+

[Validate]

+

Generated with the Darkfish + Rdoc Generator 2.

+
+ + + + diff --git a/doc/WpItem/Vulnerable.html b/doc/WpItem/Vulnerable.html new file mode 100644 index 00000000..a9c8ac83 --- /dev/null +++ b/doc/WpItem/Vulnerable.html @@ -0,0 +1,374 @@ + + + + + + + Module: WpItem::Vulnerable + + + + + + + + + + + +
+
+
+

+ Home + Classes + Methods +

+
+
+ +
+
+

In Files

+ +
+ + +
+ +
+ + + + + + + + +
+

Methods

+ +
+ + + +
+ +
+ + +
+

Files

+ +
+ + + + + +
+
+ +
+

WpItem::Vulnerable

+ +
+ +
+ + + + +
+ + + + + + + + +
+

Attributes

+ + +
+ + + + +
+ vulns_file[RW] +
+ +
+ + + +
+
+ +
+ + + + +
+ vulns_xpath[RW] +
+ +
+ + + +
+
+ +
+ + + + +
+

Public Instance Methods

+ + +
+ + + +
+ vulnerabilities() + click to toggle source +
+ + +
+ +

Get the vulnerabilities associated to the WpItem

+ +

@return [ Vulnerabilities ]

+ + + +
+
+# File lib/common/models/wp_item/vulnerable.rb, line 9
+def vulnerabilities
+  xml             = xml(vulns_file)
+  vulnerabilities = Vulnerabilities.new
+
+  xml.xpath(vulns_xpath).each do |node|
+    vulnerabilities << Vulnerability.load_from_xml_node(node)
+  end
+  vulnerabilities
+end
+
+ +
+ + + + +
+ + +
+ +
+ + +
+ +
+

[Validate]

+

Generated with the Darkfish + Rdoc Generator 2.

+
+ + + + diff --git a/doc/WpItems.html b/doc/WpItems.html new file mode 100644 index 00000000..87e1f2d3 --- /dev/null +++ b/doc/WpItems.html @@ -0,0 +1,313 @@ + + + + + + + Class: WpItems + + + + + + + + + + + +
+
+
+

+ Home + Classes + Methods +

+
+
+ +
+ + + +
+ +
+ + +
+

Parent

+ + + +
+ + + + + + +
+

Namespace

+ +
+ + + + + + +
+

Included Modules

+ +
+ +
+ +
+ + +
+

Files

+ +
+ + + + + +
+
+ +
+

WpItems

+ +
+ +
+ + + + +
+ + + + + + + + + + +
+ + +
+ +
+

[Validate]

+

Generated with the Darkfish + Rdoc Generator 2.

+
+ + + + diff --git a/doc/WpItems/Detectable.html b/doc/WpItems/Detectable.html new file mode 100644 index 00000000..a29b9f29 --- /dev/null +++ b/doc/WpItems/Detectable.html @@ -0,0 +1,744 @@ + + + + + + + Module: WpItems::Detectable + + + + + + + + + + + +
+
+
+

+ Home + Classes + Methods +

+
+
+ +
+ + + +
+ +
+ + + + + + + + + + + + +
+ +
+ + +
+

Files

+ +
+ + + + + +
+
+ +
+

WpItems::Detectable

+ +
+ +
+ + + + +
+ + + + + + + + +
+

Attributes

+ + +
+ + +
+ item_xpath[R] +
+ +
+ + + +
+
+ +
+ + +
+ vulns_file[R] +
+ +
+ + + +
+
+ +
+ + + + +
+

Public Instance Methods

+ + +
+ + + +
+ aggressive_detection(wp_target, options = {}) + click to toggle source +
+ + +
+ +

@param [ Wptarget ] wp_target @param [ Hash ] options @option options [ +Boolean ] :show_progression Whether or not output the progress bar @option +options [ Boolean ] :only_vulnerable Only check for vulnerable items +@option options [ String ] :exclude_content

+ +

@return [ WpItems ]

+ + + +
+
+# File lib/common/collections/wp_items/detectable.rb, line 14
+def aggressive_detection(wp_target, options = {})
+  queue_count      = 0
+  request_count    = 0
+  browser          = Browser.instance
+  hydra            = browser.hydra
+  targets          = targets_items(wp_target, options)
+  targets_size     = targets.size
+  show_progression = options[:show_progression] || false
+  exist_options    = {
+    error_404_hash:  wp_target.error_404_hash,
+    homepage_hash:   wp_target.homepage_hash,
+    exclude_content: options[:exclude_content] ? %{#{options[:exclude_content]}} : nil
+  }
+
+  # If we only want the vulnerable ones, the passive detection is ignored

+  # Otherwise, a passive detection is performed, and results will be merged

+  results = options[:only_vulnerable] ? new : passive_detection(wp_target, options)
+
+  targets.each do |target_item|
+    request = browser.forge_request(target_item.url, request_params)
+    request_count += 1
+
+    request.on_complete do |response|
+
+      print "\rChecking for #{targets_size} total ... #{(request_count * 100) / targets_size}% complete." if show_progression
+
+      if target_item.exists?(exist_options, response)
+        if !results.include?(target_item)
+          results << target_item
+        end
+      end
+    end
+
+    hydra.queue(request)
+    queue_count += 1
+
+    if queue_count == browser.max_threads
+      hydra.run
+      queue_count = 0
+    end
+  end
+
+  hydra.run
+  results.sort!
+  results # can't just return results.sort because the #sort returns an array, and we want a WpItems

+end
+
+ +
+ + + + +
+ + +
+ + + +
+ passive_detection(wp_target, options = {}) + click to toggle source +
+ + +
+ +

@param [ WpTarget ] wp_target @param [ Hash +] options

+ +

@return [ WpItems ]

+ + + +
+
+# File lib/common/collections/wp_items/detectable.rb, line 65
+def passive_detection(wp_target, options = {})
+  results      = new
+  item_class   = self.item_class
+  type         = self.to_s.gsub(/Wp/, '').downcase
+  response     = Browser.instance.get(wp_target.url)
+  item_options = {
+    wp_content_dir: wp_target.wp_content_dir,
+    wp_plugins_dir: wp_target.wp_plugins_dir,
+    vulns_file:     self.vulns_file
+  }
+
+  regex1 = %{(?:[^=:]+)\s?(?:=|:)\s?(?:"|')[^"']+\\?/}
+  regex2 = %{\\?/}
+  regex3 = %{\\?/([^/\\"']+)\\?(?:/|"|')}
+
+  names = response.body.scan(/#{regex1}#{Regexp.escape(wp_target.wp_content_dir)}#{regex2}#{Regexp.escape(type)}#{regex3}/)
+
+  names.flatten.uniq.each do |name|
+    results << item_class.new(wp_target.uri, item_options.merge(name: name))
+  end
+
+  results.sort!
+  results
+end
+
+ +
+ + + + +
+ + +
+ +
+

Protected Instance Methods

+ + +
+ + + +
+ create_item(klass, name, wp_target, vulns_file = nil) + click to toggle source +
+ + +
+ +

@param [ Class ] klass @param [ String ] name @param [ WpTarget ] wp_target @option [ String ] vulns_file

+ +

@return [ WpItem ]

+ + + +
+
+# File lib/common/collections/wp_items/detectable.rb, line 147
+def create_item(klass, name, wp_target, vulns_file = nil)
+  klass.new(
+    wp_target.uri,
+    name:           name,
+    vulns_file:     vulns_file,
+    wp_content_dir: wp_target.wp_content_dir,
+    wp_plugins_dir: wp_target.wp_plugins_dir
+  )
+end
+
+ +
+ + + + +
+ + +
+ + + +
+ item_class() + click to toggle source +
+ + +
+ +

@return [ Class ]

+ + + +
+
+# File lib/common/collections/wp_items/detectable.rb, line 180
+def item_class
+  Object.const_get(self.to_s.gsub(/.$/, ''))
+end
+
+ +
+ + + + +
+ + +
+ + + +
+ request_params() + click to toggle source +
+ + +
+ +

The default request parameters

+ +

@return [ Hash ]

+ + + +
+
+# File lib/common/collections/wp_items/detectable.rb, line 95
+def request_params; { cache_ttl: 0, followlocation: true } end
+
+ +
+ + + + +
+ + +
+ + + +
+ targets_items(wp_target, options = {}) + click to toggle source +
+ + +
+ +

@param [ WpTarget ] wp_target @param [ +options ] options @option options [ Boolean ] :only_vulnerable @option +options [ String ] :file The path to the file containing the targets

+ +

@return [ Array<WpItem> ]

+ + + +
+
+# File lib/common/collections/wp_items/detectable.rb, line 103
+def targets_items(wp_target, options = {})
+  item_class = self.item_class
+  vulns_file = self.vulns_file
+
+  targets = vulnerable_targets_items(wp_target, item_class, vulns_file)
+
+  unless options[:only_vulnerable]
+    unless options[:file]
+      raise 'A file must be supplied'
+    end
+
+    targets += targets_items_from_file(options[:file], wp_target, item_class, vulns_file)
+  end
+
+  targets.uniq! { |t| t.name }
+  targets.sort_by { rand }
+end
+
+ +
+ + + + +
+ + +
+ + + +
+ targets_items_from_file(file, wp_target, item_class, vulns_file) + click to toggle source +
+ + +
+ +

@param [ String ] file @param [ WpTarget ] +wp_target @param [ Class ] item_class @param [ String ] +vulns_file

+ +

@return [ WpItem ]

+ + + +
+
+# File lib/common/collections/wp_items/detectable.rb, line 163
+def targets_items_from_file(file, wp_target, item_class, vulns_file)
+  targets = []
+
+  File.open(file, 'r') do |f|
+    f.readlines.collect do |item_name|
+      targets << create_item(
+        item_class,
+        item_name.strip,
+        wp_target,
+        vulns_file
+      )
+    end
+  end
+  targets
+end
+
+ +
+ + + + +
+ + +
+ + + +
+ vulnerable_targets_items(wp_target, item_class, vulns_file) + click to toggle source +
+ + +
+ +

@param [ WpTarget ] wp_target @param [ Class +] item_class @param [ +String ] vulns_file

+ +

@return [ Array<WpItem> ]

+ + + +
+
+# File lib/common/collections/wp_items/detectable.rb, line 126
+def vulnerable_targets_items(wp_target, item_class, vulns_file)
+  targets = []
+  xml     = xml(vulns_file)
+
+  xml.xpath(item_xpath).each do |node|
+    targets << create_item(
+      item_class,
+      node.attribute('name').text,
+      wp_target,
+      vulns_file
+    )
+  end
+  targets
+end
+
+ +
+ + + + +
+ + +
+ +
+ + +
+ +
+

[Validate]

+

Generated with the Darkfish + Rdoc Generator 2.

+
+ + + + diff --git a/doc/WpItems/Output.html b/doc/WpItems/Output.html new file mode 100644 index 00000000..77e51197 --- /dev/null +++ b/doc/WpItems/Output.html @@ -0,0 +1,324 @@ + + + + + + + Module: WpItems::Output + + + + + + + + + + + +
+
+
+

+ Home + Classes + Methods +

+
+
+ +
+
+

In Files

+ +
+ + +
+ +
+ + + + + + + + +
+

Methods

+ +
+ + + +
+ +
+ + +
+

Files

+ +
+ + + + + +
+
+ +
+

WpItems::Output

+ +
+ +
+ + + + +
+ + + + + + + + + + +
+

Public Instance Methods

+ + +
+ + + +
+ output() + click to toggle source +
+ + +
+ + + + + +
+
+# File lib/common/collections/wp_items/output.rb, line 5
+def output
+  self.each { |item| item.output }
+end
+
+ +
+ + + + +
+ + +
+ +
+ + +
+ +
+

[Validate]

+

Generated with the Darkfish + Rdoc Generator 2.

+
+ + + + diff --git a/doc/WpLoginProtection.html b/doc/WpLoginProtection.html index 526201dd..2f7cbf47 100644 --- a/doc/WpLoginProtection.html +++ b/doc/WpLoginProtection.html @@ -1,296 +1,375 @@ - - - + + + - + -module WpLoginProtection - RDoc Documentation + Module: WpLoginProtection - - - - - - - - - - + + + + + + - - -
-

module WpLoginProtection

- -
- -
- - - - -
- - - - - - -
-

Constants

-
- -
LOGIN_PROTECTION_METHOD_PATTERN - -
- - -
-
- - - - - - -
-

Public Instance Methods

- - -
- -
- has_login_protection?() - click to toggle source +
+ + + +
+ + + + + +
+

WpLoginProtection

+ +
+ +
+ + + + +
+ + + + + + +
+

Constants

+
+ +
LOGIN_PROTECTION_METHOD_PATTERN
+
+ +
+
+ + + + + + +
+

Public Instance Methods

+ + +
+ -
-
# File lib/wpscan/modules/wp_login_protection.rb, line 25
+          
+ has_login_protection?() + click to toggle source +
+ + +
+ + + + + +
+
+# File lib/wpscan/modules/wp_login_protection.rb, line 8
 def has_login_protection?
   !login_protection_plugin().nil?
 end
-
+
+ +
+ -
- - - -
- - -
- -
- login_protection_plugin() - click to toggle source -
- - -
-

Checks if a login protection plugin is enabled + + +

+ + + +
+ login_protection_plugin() + click to toggle source +
+ + +
+ +

Checks if a login protection plugin is enabled code.google.com/p/wpscan/issues/detail?id=111 return a WpPlugin object or nil if no one is found

- + - -
-
# File lib/wpscan/modules/wp_login_protection.rb, line 32
+            
+            
+
+# File lib/wpscan/modules/wp_login_protection.rb, line 15
 def login_protection_plugin
   unless @login_protection_plugin
     protected_methods.grep(LOGIN_PROTECTION_METHOD_PATTERN).each do |symbol_to_call|
@@ -299,10 +378,10 @@ found

plugin_name = symbol_to_call[LOGIN_PROTECTION_METHOD_PATTERN, 1].gsub('_', '-') return @login_protection_plugin = WpPlugin.new( + @uri, name: plugin_name, - base_url: @uri, - path: "/plugins/#{plugin_name}/", - wp_content_dir: @wp_content_dir + wp_content_dir: wp_content_dir, + wp_plugins_dir: wp_plugins_dir ) end end @@ -310,419 +389,476 @@ found

end @login_protection_plugin end
-
+
+ +
+ -
- - - -
+ +
+ +
-
- -
-

Protected Instance Methods

+
+

Protected Instance Methods

- -
- -
- better_wp_security_url() - click to toggle source -
- - -
- - - + +
+ -
-
# File lib/wpscan/modules/wp_login_protection.rb, line 69
+          
+ better_wp_security_url() + click to toggle source +
+ + +
+ + + + + +
+
+# File lib/wpscan/modules/wp_login_protection.rb, line 61
 def better_wp_security_url
-  WpPlugin.new(wp_content_dir:  @wp_content_dir,
-               base_url:        @uri,
-               path:            '/plugins/better-wp-security/',
-               name:            'better-wp-security'
-  ).get_url_without_filename
+  plugin_url('better-wp-security/')
 end
-
- -
+
+ +
- - - -
- - -
- -
- bluetrait_event_viewer_url() - click to toggle source -
- - -
- - -
-
# File lib/wpscan/modules/wp_login_protection.rb, line 121
+        
+ + +
+ + + +
+ bluetrait_event_viewer_url() + click to toggle source +
+ + +
+ + + + + +
+
+# File lib/wpscan/modules/wp_login_protection.rb, line 97
 def bluetrait_event_viewer_url
-  WpPlugin.new(wp_content_dir:  @wp_content_dir,
-               base_url:        @uri,
-               path:            '/plugins/bluetrait-event-viewer/',
-               name:            'bluetrait-event-viewer'
-  ).get_url_without_filename
+  plugin_url('bluetrait-event-viewer')
 end
-
+
+ +
+ -
- - - -
- - -
- -
- has_better_wp_security_protection?() - click to toggle source -
- - -
-

+ + +

+ + + +
+ has_better_wp_security_protection?() + click to toggle source +
+ + +
+ +

wordpress.org/extend/plugins/better-wp-security/

- + - -
-
# File lib/wpscan/modules/wp_login_protection.rb, line 65
+            
+            
+
+# File lib/wpscan/modules/wp_login_protection.rb, line 48
 def has_better_wp_security_protection?
-  Browser.instance.get(better_wp_security_url()).code != 404
+  Browser.instance.get(better_wp_security_url).code != 404
 end
-
+
+ +
+ -
- - - -
- - -
- -
- has_bluetrait_event_viewer_protection?() - click to toggle source -
- - -
-

+ + +

+ + + +
+ has_bluetrait_event_viewer_protection?() + click to toggle source +
+ + +
+ +

wordpress.org/extend/plugins/bluetrait-event-viewer/

- + - -
-
# File lib/wpscan/modules/wp_login_protection.rb, line 117
+            
+            
+
+# File lib/wpscan/modules/wp_login_protection.rb, line 93
 def has_bluetrait_event_viewer_protection?
-  Browser.instance.get(bluetrait_event_viewer_url()).code != 404
+  Browser.instance.get(bluetrait_event_viewer_url).code != 404
 end
-
+
+ +
+ -
- - - -
- - -
- -
- has_limit_login_attempts_protection?() - click to toggle source -
- - -
-

+ + +

+ + + +
+ has_limit_login_attempts_protection?() + click to toggle source +
+ + +
+ +

wordpress.org/extend/plugins/limit-login-attempts/

- + - -
-
# File lib/wpscan/modules/wp_login_protection.rb, line 104
+            
+            
+
+# File lib/wpscan/modules/wp_login_protection.rb, line 84
 def has_limit_login_attempts_protection?
-  Browser.instance.get(limit_login_attempts_url()).code != 404
+  Browser.instance.get(limit_login_attempts_url).code != 404
 end
-
+
+ +
+ -
- - - -
- - -
- -
- has_login_lock_protection?() - click to toggle source -
- - -
-

+ + +

+ + + +
+ has_login_lock_protection?() + click to toggle source +
+ + +
+ +

wordpress.org/extend/plugins/login-lock/

- + - -
-
# File lib/wpscan/modules/wp_login_protection.rb, line 60
+            
+            
+
+# File lib/wpscan/modules/wp_login_protection.rb, line 43
 def has_login_lock_protection?
-  Browser.instance.get(login_url()).body =~ %r{LOGIN LOCK} ? true : false
+  Browser.instance.get(login_url).body =~ %{LOGIN LOCK} ? true : false
 end
-
+
+ +
+ -
- - - -
- - -
- -
- has_login_lockdown_protection?() - click to toggle source -
- - -
-

Thanks to Alip Aswalid for providing this method. + + +

+ + + +
+ has_login_lockdown_protection?() + click to toggle source +
+ + +
+ +

Thanks to Alip Aswalid for providing this method. wordpress.org/extend/plugins/login-lockdown/

- + - -
-
# File lib/wpscan/modules/wp_login_protection.rb, line 55
+            
+            
+
+# File lib/wpscan/modules/wp_login_protection.rb, line 38
 def has_login_lockdown_protection?
-  Browser.instance.get(login_url()).body =~ %r{Login LockDown} ? true : false
+  Browser.instance.get(login_url).body =~ %{Login LockDown} ? true : false
 end
-
+
+ +
+ -
- - - -
- - -
- -
- has_login_security_solution_protection?() - click to toggle source -
- - -
-

+ + +

+ + + +
+ has_login_security_solution_protection?() + click to toggle source +
+ + +
+ +

wordpress.org/extend/plugins/login-security-solution/

- + - -
-
# File lib/wpscan/modules/wp_login_protection.rb, line 91
+            
+            
+
+# File lib/wpscan/modules/wp_login_protection.rb, line 75
 def has_login_security_solution_protection?
   Browser.instance.get(login_security_solution_url()).code != 404
 end
-
+
+ +
+ -
- - - -
- - -
- -
- has_simple_login_lockdown_protection?() - click to toggle source -
- - -
-

+ + +

+ + + +
+ has_simple_login_lockdown_protection?() + click to toggle source +
+ + +
+ +

wordpress.org/extend/plugins/simple-login-lockdown/

- + - -
-
# File lib/wpscan/modules/wp_login_protection.rb, line 78
+            
+            
+
+# File lib/wpscan/modules/wp_login_protection.rb, line 66
 def has_simple_login_lockdown_protection?
-  Browser.instance.get(simple_login_lockdown_url()).code != 404
+  Browser.instance.get(simple_login_lockdown_url).code != 404
 end
-
- -
+
+ +
- - - -
- - -
- -
- limit_login_attempts_url() - click to toggle source -
- - -
- - -
-
# File lib/wpscan/modules/wp_login_protection.rb, line 108
+        
+ + +
+ + + +
+ limit_login_attempts_url() + click to toggle source +
+ + +
+ + + + + +
+
+# File lib/wpscan/modules/wp_login_protection.rb, line 88
 def limit_login_attempts_url
-  WpPlugin.new(wp_content_dir:  @wp_content_dir,
-               base_url:        @uri,
-               path:            '/plugins/limit-login-attempts/',
-               name:            'limit-login-attempts'
-  ).get_url_without_filename
+  plugin_url('limit-login-attempts')
 end
-
- -
+
+ +
- - - -
- - -
- -
- login_security_solution_url() - click to toggle source -
- - -
- - -
-
# File lib/wpscan/modules/wp_login_protection.rb, line 95
+        
+ + +
+ + + +
+ login_security_solution_url() + click to toggle source +
+ + +
+ + + + + +
+
+# File lib/wpscan/modules/wp_login_protection.rb, line 79
 def login_security_solution_url
-  WpPlugin.new(wp_content_dir:  @wp_content_dir,
-               base_url:        @uri,
-               path:            '/plugins/login-security-solution/',
-               name:            'login-security-solution'
-  ).get_url_without_filename
+  plugin_url('login-security-solution')
 end
-
- -
+
+ +
- - - -
- - -
- -
- simple_login_lockdown_url() - click to toggle source -
- - -
- - -
-
# File lib/wpscan/modules/wp_login_protection.rb, line 82
+        
+ + +
+ + + +
+ plugin_url(plugin_name) + click to toggle source +
+ + +
+ + + + + +
+
+# File lib/wpscan/modules/wp_login_protection.rb, line 52
+def plugin_url(plugin_name)
+  WpPlugin.new(
+    @uri,
+    name:           plugin_name,
+    wp_content_dir: wp_content_dir,
+    wp_plugins_dir: wp_plugins_dir
+  ).url
+end
+
+ +
+ + + + +
+ + +
+ + + +
+ simple_login_lockdown_url() + click to toggle source +
+ + +
+ + + + + +
+
+# File lib/wpscan/modules/wp_login_protection.rb, line 70
 def simple_login_lockdown_url
-  WpPlugin.new(wp_content_dir:  @wp_content_dir,
-               base_url:        @uri,
-               path:            '/plugins/simple-login-lockdown/',
-               name:            'simple-login-lockdown'
-  ).get_url_without_filename
+  plugin_url('simple-login-lockdown/')
 end
-
+
+ +
+ -
- - - -
+ +
+ +
-
+
- - + +
+

[Validate]

+

Generated with the Darkfish + Rdoc Generator 2.

+
- + + diff --git a/doc/WpOptions.html b/doc/WpOptions.html deleted file mode 100644 index 7cb8e7f0..00000000 --- a/doc/WpOptions.html +++ /dev/null @@ -1,291 +0,0 @@ - - - - - - -class WpOptions - RDoc Documentation - - - - - - - - - - - - - - - - -
-

class WpOptions

- -
- -

Options Hash

- -

Options

- - -
- - - - -
- - - - - - - - - - -
-

Public Class Methods

- - -
- -
- check_options(options) - click to toggle source -
- - -
- - - - - -
-
# File lib/wpscan/wp_options.rb, line 34
-def self.check_options(options)
-  raise('base_url must be set')             unless options[:base_url] != nil and options[:base_url].to_s.length > 0
-  raise('only_vulnerable_ones must be set') unless options[:only_vulnerable_ones] != nil
-  raise('file must be set')                 unless options[:file] != nil and options[:file].length > 0
-  raise('vulns_file must be set')           unless options[:vulns_file] != nil and options[:vulns_file].length > 0
-  raise('vulns_xpath must be set')          unless options[:vulns_xpath] != nil and options[:vulns_xpath].length > 0
-  raise('vulns_xpath_2 must be set')        unless options[:vulns_xpath_2] != nil and options[:vulns_xpath_2].length > 0
-  raise('wp_content_dir must be set')       unless options[:wp_content_dir] != nil and options[:wp_content_dir].length > 0
-  raise('show_progression must be set')     unless options[:show_progression] != nil
-  raise('error_404_hash must be set')       unless options[:error_404_hash] != nil and options[:error_404_hash].length > 0
-  raise('type must be set')                 unless options[:type] != nil and options[:type].length > 0
-
-  unless options[:type] =~ %rplugins/ or options[:type] =~ %rthemes/ or options[:type] =~ %rtimthumbs/
-    raise("Unknown type #{options[:type]}")
-  end
-end
-
- -
- - - - -
- - -
- -
- -
- - - - diff --git a/doc/WpPlugin.html b/doc/WpPlugin.html index 665efca1..1c9965fc 100644 --- a/doc/WpPlugin.html +++ b/doc/WpPlugin.html @@ -1,335 +1,362 @@ - - - + + + - + -class WpPlugin - RDoc Documentation + Class: WpPlugin - - - - - - - - - - + + + + + + - - -
-

class WpPlugin

- -
- -
- - - - -
- - - - - - - - - - -
-

Public Class Methods

- - -
- -
- new(options = {}) - click to toggle source -
- - -
- - - - - -
-
# File lib/wpscan/wp_plugin.rb, line 20
-def initialize(options = {})
-  if options[:vulns_file].nil? or options[:vulns_file] == ''
-    options[:vulns_file] = PLUGINS_VULNS_FILE
-  end
-
-  options[:vulns_xpath]   = "//plugin[@name='$name$']/vulnerability"
-  options[:vulns_xpath_2] = '//plugin'
-  options[:type]          = 'plugins'
-
-  super(options)
-end
-
- -
- - - - -
- - -
- -
-

Public Instance Methods

- - -
- -
- error_log?() - click to toggle source -
- - -
- -

Discover any error_log files created by WordPress These are created by the -WordPress error_log() function They are normally found in the /plugins/ -directory, however can also be found in their specific plugin dir. www.exploit-db.com/ghdb/3714/

- - - -
-
# File lib/wpscan/wp_plugin.rb, line 37
-def error_log?
-  response_body = Browser.instance.get(error_log_url(), headers: {'range' => 'bytes=0-700'}).body
-  response_body[%r{PHP Fatal error}] ? true : false
-end
-
- -
- - - - -
- - -
- -
- error_log_url() - click to toggle source -
- - -
- - - - - -
-
# File lib/wpscan/wp_plugin.rb, line 42
-def error_log_url
-  get_full_url.merge('error_log').to_s
-end
-
- -
- - - - -
- - -
- -
- -
- - - + + diff --git a/doc/WpPlugin/Vulnerable.html b/doc/WpPlugin/Vulnerable.html new file mode 100644 index 00000000..d4c4049d --- /dev/null +++ b/doc/WpPlugin/Vulnerable.html @@ -0,0 +1,362 @@ + + + + + + + Module: WpPlugin::Vulnerable + + + + + + + + + + + +
+
+
+

+ Home + Classes + Methods +

+
+
+ +
+
+

In Files

+ +
+ + +
+ +
+ + + + + + + + +
+

Methods

+ +
+ + + +
+ +
+ + +
+

Files

+ +
+ + + + + +
+
+ +
+

WpPlugin::Vulnerable

+ +
+ +
+ + + + +
+ + + + + + + + + + +
+

Public Instance Methods

+ + +
+ + + +
+ vulns_file() + click to toggle source +
+ + +
+ +

@return [ String ] The path to the file containing vulnerabilities

+ + + +
+
+# File lib/common/models/wp_plugin/vulnerable.rb, line 6
+def vulns_file
+  unless @vulns_file
+    @vulns_file = PLUGINS_VULNS_FILE
+  end
+  @vulns_file
+end
+
+ +
+ + + + +
+ + +
+ + + +
+ vulns_xpath() + click to toggle source +
+ + +
+ +

@return [ String ]

+ + + +
+
+# File lib/common/models/wp_plugin/vulnerable.rb, line 14
+def vulns_xpath
+  "//plugin[@name='#{@name}']/vulnerability"
+end
+
+ +
+ + + + +
+ + +
+ +
+ + +
+ +
+

[Validate]

+

Generated with the Darkfish + Rdoc Generator 2.

+
+ + + + diff --git a/doc/WpPlugins.html b/doc/WpPlugins.html index 0997dad8..71c8bece 100644 --- a/doc/WpPlugins.html +++ b/doc/WpPlugins.html @@ -1,322 +1,296 @@ - - - + + + - + -module WpPlugins - RDoc Documentation + Class: WpPlugins - + - + + + + - - - - - - + + +
+
+
+

+ Home + Classes + Methods +

+
+
- -
-
- - - - - +
+ +
+ + + +
+ + + + + + + + + + +
+ + +
+ +
+

[Validate]

+

Generated with the Darkfish + Rdoc Generator 2.

-
- - - - -
- - -
-

module WpPlugins

- -
- -
- - - - -
- - - - - - - - - - -
-

Public Instance Methods

- - -
- -
- plugins_from_aggressive_detection(options) - click to toggle source -
- - -
- -

Enumerate installed plugins.

- -

return array of WpPlugin

- - - -
-
# File lib/wpscan/modules/wp_plugins.rb, line 24
-def plugins_from_aggressive_detection(options)
-  if options[:vulns_file].nil? or options[:vulns_file] == ''
-    options[:vulns_file] = PLUGINS_VULNS_FILE
-  end
-
-  options[:file]          = options[:file] || (options[:full] ? PLUGINS_FULL_FILE : PLUGINS_FILE)
-  options[:vulns_xpath]   = "//plugin[@name='#{@name}']/vulnerability"
-  options[:vulns_xpath_2] = '//plugin'
-  options[:type]          = 'plugins'
-  result = WpDetector.aggressive_detection(options)
-  plugins = []
-  result.each do |r|
-    plugins << WpPlugin.new(
-      base_url:       r.base_url,
-      path:           r.path,
-      wp_content_dir: r.wp_content_dir,
-      name:           r.name,
-      type:           'plugins',
-      wp_plugins_dir: r.wp_plugins_dir
-    )
-  end
-  plugins.sort_by { |p| p.name }
-end
-
- -
- - - - -
- - -
- -
- plugins_from_passive_detection(options) - click to toggle source -
- - -
- -

code.google.com/p/wpscan/issues/detail?id=42 -plugins can be found in the source code :

- -
<script src='http://example.com/wp-content/plugins/s2member/...' />
-<link rel='stylesheet' href='http://example.com/wp-content/plugins/wp-minify/..' type='text/css' media='screen'/>
-...
- -

return array of WpPlugin

- - - -
-
# File lib/wpscan/modules/wp_plugins.rb, line 54
-def plugins_from_passive_detection(options)
-  plugins = []
-  temp = WpDetector.passive_detection(options[:base_url], 'plugins', options[:wp_content_dir])
-
-  temp.each do |item|
-    plugins << WpPlugin.new(
-      base_url:       item.base_url,
-      name:           item.name,
-      path:           item.path,
-      wp_content_dir: options[:wp_content_dir],
-      type:           'plugins',
-      wp_plugins_dir: options[:wp_plugins_dir]
-    )
-  end
-  plugins.sort_by { |p| p.name }
-end
-
- -
- - - - -
- - -
- -
- -
- - - + + diff --git a/doc/WpPlugins/Detectable.html b/doc/WpPlugins/Detectable.html new file mode 100644 index 00000000..e7bf9f09 --- /dev/null +++ b/doc/WpPlugins/Detectable.html @@ -0,0 +1,359 @@ + + + + + + + Module: WpPlugins::Detectable + + + + + + + + + + + +
+
+
+

+ Home + Classes + Methods +

+
+
+ +
+ + + +
+ +
+ + + + + + + + +
+

Methods

+ +
+ + + +
+ +
+ + +
+

Files

+ +
+ + + + + +
+
+ +
+

WpPlugins::Detectable

+ +
+ +
+ + + + +
+ + + + + + + + + + +
+

Public Instance Methods

+ + +
+ + + +
+ item_xpath() + click to toggle source +
+ + +
+ +

@return [ String ]

+ + + +
+
+# File lib/common/collections/wp_plugins/detectable.rb, line 11
+def item_xpath
+  '//plugin'
+end
+
+ +
+ + + + +
+ + +
+ + + +
+ vulns_file() + click to toggle source +
+ + +
+ +

@return [ String ]

+ + + +
+
+# File lib/common/collections/wp_plugins/detectable.rb, line 6
+def vulns_file
+  PLUGINS_VULNS_FILE
+end
+
+ +
+ + + + +
+ + +
+ +
+ + +
+ +
+

[Validate]

+

Generated with the Darkfish + Rdoc Generator 2.

+
+ + + + diff --git a/doc/WpReadme.html b/doc/WpReadme.html index 21feeb80..e9b3f9e6 100644 --- a/doc/WpReadme.html +++ b/doc/WpReadme.html @@ -1,286 +1,366 @@ - - - + + + - + -module WpReadme - RDoc Documentation + Module: WpReadme - - - - - - - - - - + + + + + + - - -
-

module WpReadme

- -
- -
- - - - -
- - - - - - - - - - -
-

Public Instance Methods

- - -
- -
- has_readme?() - click to toggle source -
- - -
+
+
+

In Files

+
+ +
+
+ + +
+ +
+ + + + + + + + +
+

Methods

+ +
+ + + +
+ + +
+ +
+

WpReadme

+ +
+ +
+ + + + +
+ + + + + + + + + + +
+

Public Instance Methods

+ + +
+ + + +
+ has_readme?() + click to toggle source +
+ + +
+ +

Checks to see if the readme.html file exists

This file comes by default in a wordpress installation, and if deleted is reinstated with an upgrade.

- + - -
-
# File lib/wpscan/modules/wp_readme.rb, line 25
+            
+            
+
+# File lib/wpscan/modules/wp_readme.rb, line 8
 def has_readme?
   response = Browser.instance.get(readme_url())
 
   unless response.code == 404
-    response.body =~ %r{wordpress}
+    response.body =~ %{wordpress}
   end
 end
-
- -
+
+ +
- - - -
- - -
- -
- readme_url() - click to toggle source -
- - -
- - -
-
# File lib/wpscan/modules/wp_readme.rb, line 33
+        
+ + +
+ + + +
+ readme_url() + click to toggle source +
+ + +
+ + + + + +
+
+# File lib/wpscan/modules/wp_readme.rb, line 16
 def readme_url
   @uri.merge('readme.html').to_s
 end
-
+
+ +
+ -
- - - -
+ +
+ +
-
+
- - + +
+

[Validate]

+

Generated with the Darkfish + Rdoc Generator 2.

+
- + + diff --git a/doc/WpTarget.html b/doc/WpTarget.html index 51470ba7..601fc96e 100644 --- a/doc/WpTarget.html +++ b/doc/WpTarget.html @@ -1,347 +1,397 @@ - - - + + + - + -class WpTarget - RDoc Documentation + Class: WpTarget - - - - - - - - - - + + + + + + - - -
-

class WpTarget

- -
- -
- - - - -
- - - - - - - - -
-

Attributes

- - -
-
- uri[R] -
- -
- - - +
+
+

In Files

+
- -
-
- verbose[R] -
-
+ +
+ +
+ + +
+

Parent

+ - -
-
- - - -
-

Public Class Methods

+ - -
+ + + + + + + + + +
+

Included Modules

+ +
+ +
+ + +
+ +
+

WpTarget

+ +
+ +
+ + + + +
+ + + + + + + + +
+

Attributes

+ + +
+ + +
+ verbose[R] +
+ +
+ + + +
+
+ -
- - - + + +
+

Public Class Methods

+ + +
+ -
-
# File lib/wpscan/wp_target.rb, line 34
+          
+ new(target_url, options = {}) + click to toggle source +
+ + +
+ + + + + +
+
+# File lib/wpscan/wp_target.rb, line 20
 def initialize(target_url, options = {})
-  @uri            = URI.parse(add_trailing_slash(add_http_protocol(target_url)))
+  super(target_url)
+
   @verbose        = options[:verbose]
   @wp_content_dir = options[:wp_content_dir]
   @wp_plugins_dir = options[:wp_plugins_dir]
@@ -349,140 +399,231 @@
 
   Browser.instance(options.merge(:max_threads => options[:threads]))
 end
-
- -
+
+ +
- - - -
- - -
- -
- valid_response_codes() - click to toggle source -
- - -
- -

Valid HTTP return codes

-
-
# File lib/wpscan/wp_target.rb, line 62
+        
+ + +
+ + + +
+ valid_response_codes() + click to toggle source +
+ + +
+ +

Valid HTTP return codes

+ + + +
+
+# File lib/wpscan/wp_target.rb, line 70
 def self.valid_response_codes
-  [200, 301, 302, 401, 403, 500]
+  [200, 301, 302, 401, 403, 500, 400]
 end
-
+
+ +
+ -
- - - -
+ +
+ +
- - -
-

Public Instance Methods

+
+

Public Instance Methods

- -
- -
- debug_log_url() - click to toggle source -
- - -
- - - + +
+ -
-
# File lib/wpscan/wp_target.rb, line 109
+          
+ debug_log_url() + click to toggle source +
+ + +
+ + + + + +
+
+# File lib/wpscan/wp_target.rb, line 140
 def debug_log_url
   @uri.merge("#{wp_content_dir()}/debug.log").to_s
 end
-
- -
+
+ +
- - - -
- - -
- -
- has_debug_log?() - click to toggle source -
- - -
- - -
-
# File lib/wpscan/wp_target.rb, line 103
+        
+ + +
+ + + +
+ default_wp_content_dir_exists?() + click to toggle source +
+ + +
+ + + + + +
+
+# File lib/wpscan/wp_target.rb, line 112
+def default_wp_content_dir_exists?
+  response = Browser.instance.get(@uri.merge('wp-content').to_s)
+  hash = Digest::MD5.hexdigest(response.body)
+
+  if WpTarget.valid_response_codes.include?(response.code)
+    return true if hash != error_404_hash and hash != homepage_hash
+  end
+
+  false
+end
+
+ +
+ + + + +
+ + +
+ + + +
+ has_debug_log?() + click to toggle source +
+ + +
+ + + + + +
+
+# File lib/wpscan/wp_target.rb, line 134
 def has_debug_log?
   # We only get the first 700 bytes of the file to avoid loading huge file (like 2Go)
   response_body = Browser.instance.get(debug_log_url(), headers: {'range' => 'bytes=0-700'}).body
-  response_body[%r{\[[^\]]+\] PHP (?:Warning|Error|Notice):}] ? true : false
+  response_body[%{\[[^\]]+\] PHP (?:Warning|Error|Notice):}] ? true : false
 end
-
- -
+
+ +
- - - -
- - -
- -
- is_multisite?() - click to toggle source -
- - -
- - -
-
# File lib/wpscan/wp_target.rb, line 148
+        
+ + +
+ + + +
+ has_plugin?(name, version = nil) + click to toggle source +
+ + +
+ + + + + +
+
+# File lib/wpscan/wp_target.rb, line 86
+def has_plugin?(name, version = nil)
+  WpPlugin.new(
+    @uri,
+    name: name,
+    version: version,
+    wp_content_dir: wp_content_dir,
+    wp_plugins_dir: wp_plugins_dir
+  ).exists?
+end
+
+ +
+ + + + +
+ + +
+ + + +
+ is_multisite?() + click to toggle source +
+ + +
+ + + + + +
+
+# File lib/wpscan/wp_target.rb, line 179
 def is_multisite?
   unless @multisite
     # when multi site, there is no redirection or a redirect to the site itself
     # otherwise redirect to wp-login.php
     url = @uri.merge('wp-signup.php')
     resp = Browser.instance.get(url)
-    if resp.code == 302 and resp.headers_hash['location'] =~ %rwp-login\.php\?action=register/
+    if resp.code == 302 and resp.headers_hash['location'] =~ /wp-login\.php\?action=register/
       @multisite = false
-    elsif resp.code == 302 and resp.headers_hash['location'] =~ %rwp-signup\.php/
+    elsif resp.code == 302 and resp.headers_hash['location'] =~ /wp-signup\.php/
       @multisite = true
     elsif resp.code == 200
       @multisite = true
@@ -492,33 +633,36 @@
   end
   @multisite
 end
-
- -
+
+ +
- - - -
- - -
- -
- login_url() - click to toggle source -
- - -
- - -
-
# File lib/wpscan/wp_target.rb, line 49
+        
+ + +
+ + + +
+ login_url() + click to toggle source +
+ + +
+ + + + + +
+
+# File lib/wpscan/wp_target.rb, line 57
 def login_url
   url = @uri.merge('wp-login.php').to_s
 
@@ -530,43 +674,46 @@
 
   url
 end
-
- -
+
+ +
- - - -
- - -
- -
- registration_enabled?() - click to toggle source -
- - -
- -

Should check wp-login.php if registration is enabled or not

-
-
# File lib/wpscan/wp_target.rb, line 126
+        
+ + +
+ + + +
+ registration_enabled?() + click to toggle source +
+ + +
+ +

Should check wp-login.php if registration is enabled or not

+ + + +
+
+# File lib/wpscan/wp_target.rb, line 157
 def registration_enabled?
   resp = Browser.instance.get(registration_url)
   # redirect only on non multi sites
-  if resp.code == 302 and resp.headers_hash['location'] =~ %rwp-login\.php\?registration=disabled/
+  if resp.code == 302 and resp.headers_hash['location'] =~ /wp-login\.php\?registration=disabled/
     enabled = false
   # multi site registration form
-  elsif resp.code == 200 and resp.body =~ %r<form id="setupform" method="post" action="[^"]*wp-signup\.php[^"]*">/
+  elsif resp.code == 200 and resp.body =~ /<form id="setupform" method="post" action="[^"]*wp-signup\.php[^"]*">/
     enabled = true
   # normal registration form
-  elsif resp.code == 200 and resp.body =~ %r<form name="registerform" id="registerform" action="[^"]*wp-login\.php[^"]*"/
+  elsif resp.code == 200 and resp.body =~ /<form name="registerform" id="registerform" action="[^"]*wp-login\.php[^"]*"/
     enabled = true
   # registration disabled
   else
@@ -574,314 +721,366 @@
   end
   enabled
 end
-
- -
+
+ +
- - - -
- - -
- -
- registration_url() - click to toggle source -
- - -
- - -
-
# File lib/wpscan/wp_target.rb, line 144
+        
+ + +
+ + + +
+ registration_url() + click to toggle source +
+ + +
+ + + + + +
+
+# File lib/wpscan/wp_target.rb, line 175
 def registration_url
   is_multisite? ? @uri.merge('wp-signup.php') : @uri.merge('wp-login.php?action=register')
 end
-
- -
+
+ +
- - - -
- - -
- -
- search_replace_db_2_exists?() - click to toggle source -
- - -
- - -
-
# File lib/wpscan/wp_target.rb, line 120
+        
+ + +
+ + + +
+ search_replace_db_2_exists?() + click to toggle source +
+ + +
+ + + + + +
+
+# File lib/wpscan/wp_target.rb, line 151
 def search_replace_db_2_exists?
   resp = Browser.instance.get(search_replace_db_2_url)
-  resp.code == 200 && resp.body[%r{by interconnect}]
+  resp.code == 200 && resp.body[%{by interconnect}]
 end
-
+
+ +
+ -
- - - -
- - -
- -
- search_replace_db_2_url() - click to toggle source -
- - -
-

Script for replacing strings in wordpress databases reveals databse +

+ + +
+ + + +
+ search_replace_db_2_url() + click to toggle source +
+ + +
+ +

Script for replacing strings in wordpress databases reveals databse credentials after hitting submit interconnectit.com/124/search-and-replace-for-wordpress-databases/

- + - -
-
# File lib/wpscan/wp_target.rb, line 116
+            
+            
+
+# File lib/wpscan/wp_target.rb, line 147
 def search_replace_db_2_url
   @uri.merge('searchreplacedb2.php').to_s
 end
-
- -
+
+ +
- - - -
- - -
- -
- theme() - click to toggle source -
- - -
- -

return WpTheme

-
-
# File lib/wpscan/wp_target.rb, line 67
+        
+ + +
+ + + +
+ theme() + click to toggle source +
+ + +
+ +

return WpTheme

+ + + +
+
+# File lib/wpscan/wp_target.rb, line 75
 def theme
   WpTheme.find(@uri)
 end
-
- -
+
+ +
- - - -
- - -
- -
- url() - click to toggle source -
- - -
- -

Alias of @uri.to_s

-
-
# File lib/wpscan/wp_target.rb, line 45
-def url
-  @uri.to_s
+        
+ + +
+ + + +
+ version(versions_xml) + click to toggle source +
+ + +
+ +

@param [ String ] versions_xml

+ +

@return [ WpVersion ]

+ + + +
+
+# File lib/wpscan/wp_target.rb, line 82
+def version(versions_xml)
+  WpVersion.find(@uri, wp_content_dir, wp_plugins_dir, versions_xml)
 end
-
- -
+
+ +
- - - -
- - -
- -
- version() - click to toggle source -
- - -
- -

return WpVersion

-
-
# File lib/wpscan/wp_target.rb, line 72
-def version
-  WpVersion.find(@uri, wp_content_dir)
+        
+ + +
+ + + +
+ wordpress?() + click to toggle source +
+ + +
+ +

check if the target website is actually running wordpress.

+ + + +
+
+# File lib/wpscan/wp_target.rb, line 33
+def wordpress?
+  wordpress = false
+
+  response = Browser.instance.get_and_follow_location(@uri.to_s)
+
+  if response.body =~ /["'][^"']*\/wp-content\/[^"']*["']/
+    wordpress = true
+  else
+    response = Browser.instance.get_and_follow_location(xml_rpc_url)
+
+    if response.body =~ %{XML-RPC server accepts POST requests only}
+      wordpress = true
+    else
+      response = Browser.instance.get_and_follow_location(login_url)
+
+      if response.code == 200 && response.body =~ %{WordPress}
+        wordpress = true
+      end
+    end
+  end
+
+  wordpress
 end
-
- -
+
+ +
- - - -
- - -
- -
- wp_content_dir() - click to toggle source -
- - -
- - -
-
# File lib/wpscan/wp_target.rb, line 76
+        
+ + +
+ + + +
+ wp_content_dir() + click to toggle source +
+ + +
+ + + + + +
+
+# File lib/wpscan/wp_target.rb, line 96
 def wp_content_dir
   unless @wp_content_dir
     index_body = Browser.instance.get(@uri.to_s).body
-    # Only use the path because domain can be text or an ip
-    uri_path = @uri.path
+    uri_path = @uri.path # Only use the path because domain can be text or an IP
 
-    if index_body[%r\/wp-content\/(?:themes|plugins)\//]
+    if index_body[/\/wp-content\/(?:themes|plugins)\//] || default_wp_content_dir_exists?
       @wp_content_dir = 'wp-content'
     else
       domains_excluded = '(?:www\.)?(facebook|twitter)\.com'
-      @wp_content_dir  = index_body[%r(?:href|src)\s*=\s*(?:"|').+#{Regexp.escape(uri_path)}((?!#{domains_excluded})[^"']+)\/(?:themes|plugins)\/.*(?:"|')/, 1]
+      @wp_content_dir  = index_body[/(?:href|src)\s*=\s*(?:"|').+#{Regexp.escape(uri_path)}((?!#{domains_excluded})[^"']+)\/(?:themes|plugins)\/.*(?:"|')/, 1]
     end
   end
+
   @wp_content_dir
 end
-
- -
+
+ +
- - - -
- - -
- -
- wp_plugins_dir() - click to toggle source -
- - -
- - -
-
# File lib/wpscan/wp_target.rb, line 92
+        
+ + +
+ + + +
+ wp_plugins_dir() + click to toggle source +
+ + +
+ + + + + +
+
+# File lib/wpscan/wp_target.rb, line 123
 def wp_plugins_dir
   unless @wp_plugins_dir
     @wp_plugins_dir = "#{wp_content_dir}/plugins"
   end
   @wp_plugins_dir
 end
-
- -
+
+ +
- - - -
- - -
- -
- wp_plugins_dir_exists?() - click to toggle source -
- - -
- - -
-
# File lib/wpscan/wp_target.rb, line 99
+        
+ + +
+ + + +
+ wp_plugins_dir_exists?() + click to toggle source +
+ + +
+ + + + + +
+
+# File lib/wpscan/wp_target.rb, line 130
 def wp_plugins_dir_exists?
   Browser.instance.get(@uri.merge(wp_plugins_dir)).code != 404
 end
-
+
+ +
+ -
- - - -
+ +
+ +
-
+
- - + +
+

[Validate]

+

Generated with the Darkfish + Rdoc Generator 2.

+
- + + diff --git a/doc/WpTheme.html b/doc/WpTheme.html index 82384e13..eee984aa 100644 --- a/doc/WpTheme.html +++ b/doc/WpTheme.html @@ -1,472 +1,471 @@ - - - + + + - + -class WpTheme - RDoc Documentation + Class: WpTheme - - - - - - - - - - + + + + + + - - -
-

class WpTheme

- -
- -
- - - - -
- - - - - - - - -
-

Attributes

- - -
-
- style_url[R] -
- -
- - - +
- - - -
-

Public Class Methods

+ - -
+ + +
+

Namespace

+ +
+ + + + +
+

Methods

+ +
+ + + + +
+

Included Modules

+ +
+ +
+ + +
+ +
+

WpTheme

+ +
+ +
+ + + + +
+ + + + + + + + +
+

Attributes

+ + +
+ + + + +
+ style_url[W] +
+ +
+ + + +
+
+ + + + +
+

Public Instance Methods

+ + +
+ -
+
+ allowed_options() + click to toggle source +
+ +
+ + + + + +
+
+# File lib/common/models/wp_theme.rb, line 13
+def allowed_options; super << :style_url end
+
+ +
+ -
-
# File lib/wpscan/wp_theme.rb, line 47
-def self.find(target_uri)
-  self.methods.grep(%rfind_from_/).each do |method_to_call|
-    theme = self.send(method_to_call, target_uri)
+        
- return theme if theme - end - nil + +
+ + + +
+ forge_uri(target_base_uri) + click to toggle source +
+ + +
+ +

Sets the @uri

+ +

@param [ URI ] target_base_uri The URI of the wordpress blog

+ +

@return [ void ]

+ + + +
+
+# File lib/common/models/wp_theme.rb, line 20
+def forge_uri(target_base_uri)
+  @uri = target_base_uri.merge(URI.encode(wp_content_dir + '/themes/' + name + '/'))
 end
-
- -
+
+ +
- - - -
- - -
- -
- new(options = {}) - click to toggle source -
- - -
- - -
-
# File lib/wpscan/wp_theme.rb, line 25
-def initialize(options = {})
-  if options[:vulns_file].nil? or options[:vulns_file] == ''
-    options[:vulns_file] = THEMES_VULNS_FILE
-  end
+        
- options[:vulns_xpath] = "//theme[@name='$name$']/vulnerability" - options[:type] = 'themes' - @version = options[:version] - @style_url = options[:style_url] + +
+ - super(options) + +
+ style_url() + click to toggle source +
+ + +
+ +

@return [ String ] The url to the theme stylesheet

+ + + +
+
+# File lib/common/models/wp_theme.rb, line 25
+def style_url
+  unless @style_url
+    @style_url = uri.merge('style.css').to_s
+  end
+  @style_url
 end
-
+
+ +
+ -
- - - -
+ +
+ +
- +
-
-

Protected Class Methods

- - -
- -

Discover the wordpress theme name by parsing the css link rel

- +
+

[Validate]

+

Generated with the Darkfish + Rdoc Generator 2.

+
- - - -
- - - - - - - -
- -
- find_from_wooframework(target_uri) - click to toggle source -
- - -
- -

code.google.com/p/wpscan/issues/detail?id=141

- - - -
-
# File lib/wpscan/wp_theme.rb, line 83
-def self.find_from_wooframework(target_uri)
-  body = Browser.instance.get(target_uri.to_s).body
-  regexp = %r{<meta name="generator" content="([^\s"]+)\s?([^"]+)?" />\s+<meta name="generator" content="WooFramework\s?([^"]+)?" />}
-
-  matches = regexp.match(body)
-  if matches
-    woo_theme_name = matches[1]
-    woo_theme_version = matches[2]
-    woo_framework_version = matches[3] # Not used at this time
-
-    return new(
-      name:            woo_theme_name,
-      version:         woo_theme_version,
-      base_url:        matches[0],
-      path:            '',
-      wp_content_dir:  ''
-    )
-  end
-end
-
- -
- - - - -
- - -
- -
-

Public Instance Methods

- - -
- -
- ===(wp_theme) - click to toggle source -
- - -
- - - - - -
-
# File lib/wpscan/wp_theme.rb, line 56
-def ===(wp_theme)
-  wp_theme.name === @name and wp_theme.version === @version
-end
-
- -
- - - - -
- - -
- - - - - - - + + diff --git a/doc/WpTheme/Findable.html b/doc/WpTheme/Findable.html new file mode 100644 index 00000000..98792c59 --- /dev/null +++ b/doc/WpTheme/Findable.html @@ -0,0 +1,449 @@ + + + + + + + Module: WpTheme::Findable + + + + + + + + + + + +
+
+
+

+ Home + Classes + Methods +

+
+
+ +
+
+

In Files

+ +
+ + +
+ +
+ + + + + + + + +
+

Methods

+ +
+ + + +
+ +
+ + +
+

Files

+ +
+ + + + + +
+
+ +
+

WpTheme::Findable

+ +
+ +
+ + + + +
+ + + + + + + + + + +
+

Public Instance Methods

+ + +
+ + + +
+ find(target_uri) + click to toggle source +
+ + +
+ +

Find the main theme of the blog

+ +

@param [ URI ] target_uri

+ +

@return [ WpTheme ]

+ + + +
+
+# File lib/common/models/wp_theme/findable.rb, line 10
+def find(target_uri)
+  methods.grep(/^find_from_/).each do |method|
+    if wp_theme = self.send(method, target_uri)
+      wp_theme.found_from = method
+
+      return wp_theme
+    end
+  end
+  nil
+end
+
+ +
+ + + + +
+ + +
+ +
+

Protected Instance Methods

+ + + + + +
+ + + +
+ find_from_wooframework(target_uri) + click to toggle source +
+ + +
+ +

code.google.com/p/wpscan/issues/detail?id=141

+ +

@param [ URI ] target_uri

+ +

@return [ WpTheme ]

+ + + +
+
+# File lib/common/models/wp_theme/findable.rb, line 50
+def find_from_wooframework(target_uri)
+  body = Browser.instance.get(target_uri.to_s).body
+  regexp = %{<meta name="generator" content="([^\s"]+)\s?([^"]+)?" />\s+<meta name="generator" content="WooFramework\s?([^"]+)?" />}
+
+
+  if matches = regexp.match(body)
+    woo_theme_name = matches[1]
+    woo_theme_version = matches[2]
+    #woo_framework_version = matches[3] # Not used at this time

+
+    return new(
+      target_uri,
+      {
+        name:    woo_theme_name,
+        version: woo_theme_version
+      }
+    )
+  end
+end
+
+ +
+ + + + +
+ + +
+ +
+ + +
+ +
+

[Validate]

+

Generated with the Darkfish + Rdoc Generator 2.

+
+ + + + diff --git a/doc/WpTheme/Versionable.html b/doc/WpTheme/Versionable.html new file mode 100644 index 00000000..73bbe366 --- /dev/null +++ b/doc/WpTheme/Versionable.html @@ -0,0 +1,330 @@ + + + + + + + Module: WpTheme::Versionable + + + + + + + + + + + +
+
+
+

+ Home + Classes + Methods +

+
+
+ +
+
+

In Files

+ +
+ + +
+ +
+ + + + + + + + +
+

Methods

+ +
+ + + +
+ +
+ + +
+

Files

+ +
+ + + + + +
+
+ +
+

WpTheme::Versionable

+ +
+ +
+ + + + +
+ + + + + + + + + + +
+

Public Instance Methods

+ + +
+ + + +
+ version() + click to toggle source +
+ + +
+ + + + + +
+
+# File lib/common/models/wp_theme/versionable.rb, line 5
+def version
+  unless @version
+    @version = Browser.instance.get(style_url).body[%{Version:\s([^\s]+)}, 1]
+
+    # Get Version from readme.txt

+    @version ||= super
+  end
+  @version
+end
+
+ +
+ + + + +
+ + +
+ +
+ + +
+ +
+

[Validate]

+

Generated with the Darkfish + Rdoc Generator 2.

+
+ + + + diff --git a/doc/WpTheme/Vulnerable.html b/doc/WpTheme/Vulnerable.html new file mode 100644 index 00000000..fc54a79e --- /dev/null +++ b/doc/WpTheme/Vulnerable.html @@ -0,0 +1,362 @@ + + + + + + + Module: WpTheme::Vulnerable + + + + + + + + + + + +
+
+
+

+ Home + Classes + Methods +

+
+
+ +
+
+

In Files

+ +
+ + +
+ +
+ + + + + + + + +
+

Methods

+ +
+ + + +
+ +
+ + +
+

Files

+ +
+ + + + + +
+
+ +
+

WpTheme::Vulnerable

+ +
+ +
+ + + + +
+ + + + + + + + + + +
+

Public Instance Methods

+ + +
+ + + +
+ vulns_file() + click to toggle source +
+ + +
+ +

@return [ String ] The path to the file containing vulnerabilities

+ + + +
+
+# File lib/common/models/wp_theme/vulnerable.rb, line 6
+def vulns_file
+  unless @vulns_file
+    @vulns_file = THEMES_VULNS_FILE
+  end
+  @vulns_file
+end
+
+ +
+ + + + +
+ + +
+ + + +
+ vulns_xpath() + click to toggle source +
+ + +
+ +

@return [ String ]

+ + + +
+
+# File lib/common/models/wp_theme/vulnerable.rb, line 14
+def vulns_xpath
+  "//theme[@name='#{@name}']/vulnerability"
+end
+
+ +
+ + + + +
+ + +
+ +
+ + +
+ +
+

[Validate]

+

Generated with the Darkfish + Rdoc Generator 2.

+
+ + + + diff --git a/doc/WpThemes.html b/doc/WpThemes.html index 83d5159a..b5851555 100644 --- a/doc/WpThemes.html +++ b/doc/WpThemes.html @@ -1,308 +1,296 @@ - - - + + + - + -module WpThemes - RDoc Documentation + Class: WpThemes - + - + + + + - - - - - - + + +
+
+
+

+ Home + Classes + Methods +

+
+
- -
-
- - - - - +
+ +
+ + + +
+ + + + + + + + + + +
+ + +
+ +
+

[Validate]

+

Generated with the Darkfish + Rdoc Generator 2.

-
- - - - -
- - -
-

module WpThemes

- -
- -
- - - - -
- - - - - - - - - - -
-

Public Instance Methods

- - -
- -
- themes_from_aggressive_detection(options) - click to toggle source -
- - -
- - - - - -
-
# File lib/wpscan/modules/wp_themes.rb, line 21
-def themes_from_aggressive_detection(options)
-  if options[:vulns_file].nil? or options[:vulns_file] == ''
-    options[:vulns_file] = THEMES_VULNS_FILE
-  end
-
-  options[:file]          = options[:file] || (options[:full] ? THEMES_FULL_FILE : THEMES_FILE)
-  options[:vulns_xpath]   = "//theme[@name='#{@name}']/vulnerability"
-  options[:vulns_xpath_2] = '//theme'
-  options[:type]          = 'themes'
-  result = WpDetector.aggressive_detection(options)
-  themes = []
-  result.each do |r|
-    themes << WpTheme.new(
-      base_url:       r.base_url,
-      path:           r.path,
-      wp_content_dir: r.wp_content_dir,
-      name:           r.name
-    )
-  end
-  themes.sort_by { |t| t.name }
-end
-
- -
- - - - -
- - -
- -
- themes_from_passive_detection(options) - click to toggle source -
- - -
- - - - - -
-
# File lib/wpscan/modules/wp_themes.rb, line 43
-def themes_from_passive_detection(options)
-  themes = []
-  temp = WpDetector.passive_detection(options[:base_url], 'themes', options[:wp_content_dir])
-
-  temp.each do |item|
-    themes << WpTheme.new(
-      base_url:       item.base_url,
-      name:           item.name,
-      path:           item.path,
-      wp_content_dir: options[:wp_content_dir]
-    )
-  end
-  themes.sort_by { |t| t.name }
-end
-
- -
- - - - -
- - -
- -
- -
- - - + + diff --git a/doc/WpThemes/Detectable.html b/doc/WpThemes/Detectable.html new file mode 100644 index 00000000..984f4fe0 --- /dev/null +++ b/doc/WpThemes/Detectable.html @@ -0,0 +1,359 @@ + + + + + + + Module: WpThemes::Detectable + + + + + + + + + + + +
+
+
+

+ Home + Classes + Methods +

+
+
+ +
+ + + +
+ +
+ + + + + + + + +
+

Methods

+ +
+ + + +
+ +
+ + +
+

Files

+ +
+ + + + + +
+
+ +
+

WpThemes::Detectable

+ +
+ +
+ + + + +
+ + + + + + + + + + +
+

Public Instance Methods

+ + +
+ + + +
+ item_xpath() + click to toggle source +
+ + +
+ +

@return [ String ]

+ + + +
+
+# File lib/common/collections/wp_themes/detectable.rb, line 11
+def item_xpath
+  '//theme'
+end
+
+ +
+ + + + +
+ + +
+ + + +
+ vulns_file() + click to toggle source +
+ + +
+ +

@return [ String ]

+ + + +
+
+# File lib/common/collections/wp_themes/detectable.rb, line 6
+def vulns_file
+  THEMES_VULNS_FILE
+end
+
+ +
+ + + + +
+ + +
+ +
+ + +
+ +
+

[Validate]

+

Generated with the Darkfish + Rdoc Generator 2.

+
+ + + + diff --git a/doc/WpTimthumb.html b/doc/WpTimthumb.html new file mode 100644 index 00000000..d965b250 --- /dev/null +++ b/doc/WpTimthumb.html @@ -0,0 +1,377 @@ + + + + + + + Class: WpTimthumb + + + + + + + + + + + +
+
+
+

+ Home + Classes + Methods +

+
+
+ +
+ + + +
+ +
+ + +
+

Parent

+ + + +
+ + + + + + +
+

Namespace

+ +
+ + + + +
+

Methods

+ +
+ + + + +
+

Included Modules

+ +
+ +
+ +
+ + +
+

Files

+ +
+ + + + + +
+
+ +
+

WpTimthumb

+ +
+ +
+ + + + +
+ + + + + + + + + + +
+

Public Instance Methods

+ + +
+ + + +
+ ==(other) + click to toggle source +
+ + +
+ +

@param [ WpTimthumb ] other

+ +

@return [ Boolean ]

+ + + +
+
+# File lib/common/models/wp_timthumb.rb, line 14
+def ==(other)
+  url == other.url
+end
+
+ +
+ + + + +
+ + +
+ +
+ + +
+ +
+

[Validate]

+

Generated with the Darkfish + Rdoc Generator 2.

+
+ + + + diff --git a/doc/WpTimthumb/Existable.html b/doc/WpTimthumb/Existable.html new file mode 100644 index 00000000..381c73d2 --- /dev/null +++ b/doc/WpTimthumb/Existable.html @@ -0,0 +1,327 @@ + + + + + + + Module: WpTimthumb::Existable + + + + + + + + + + + +
+
+
+

+ Home + Classes + Methods +

+
+
+ +
+
+

In Files

+ +
+ + +
+ +
+ + + + + + + + +
+

Methods

+ +
+ + + +
+ +
+ + +
+

Files

+ +
+ + + + + +
+
+ +
+

WpTimthumb::Existable

+ +
+ +
+ + + + +
+ + + + + + + + + + +
+

Public Instance Methods

+ + +
+ + + +
+ exists_from_response?(response, options = {}) + click to toggle source +
+ + +
+ +

@param [ Typhoeus::Response ] +response @param [ Hash ] options

+ +

@return [ Boolean ]

+ + + +
+
+# File lib/common/models/wp_timthumb/existable.rb, line 9
+def exists_from_response?(response, options = {})
+  response.code == 400 && response.body =~ /no image specified/ ? true : false
+end
+
+ +
+ + + + +
+ + +
+ +
+ + +
+ +
+

[Validate]

+

Generated with the Darkfish + Rdoc Generator 2.

+
+ + + + diff --git a/doc/WpTimthumb/Output.html b/doc/WpTimthumb/Output.html new file mode 100644 index 00000000..67674de8 --- /dev/null +++ b/doc/WpTimthumb/Output.html @@ -0,0 +1,324 @@ + + + + + + + Module: WpTimthumb::Output + + + + + + + + + + + +
+
+
+

+ Home + Classes + Methods +

+
+
+ +
+
+

In Files

+ +
+ + +
+ +
+ + + + + + + + +
+

Methods

+ +
+ + + +
+ +
+ + +
+

Files

+ +
+ + + + + +
+
+ +
+

WpTimthumb::Output

+ +
+ +
+ + + + +
+ + + + + + + + + + +
+

Public Instance Methods

+ + +
+ + + +
+ output() + click to toggle source +
+ + +
+ + + + + +
+
+# File lib/common/models/wp_timthumb/output.rb, line 5
+def output
+  puts ' | ' + red('[!]') + " #{self}"
+end
+
+ +
+ + + + +
+ + +
+ +
+ + +
+ +
+

[Validate]

+

Generated with the Darkfish + Rdoc Generator 2.

+
+ + + + diff --git a/doc/WpTimthumb/Versionable.html b/doc/WpTimthumb/Versionable.html new file mode 100644 index 00000000..b0fd9f51 --- /dev/null +++ b/doc/WpTimthumb/Versionable.html @@ -0,0 +1,366 @@ + + + + + + + Module: WpTimthumb::Versionable + + + + + + + + + + + +
+
+
+

+ Home + Classes + Methods +

+
+
+ +
+ + + +
+ +
+ + + + + + + + +
+

Methods

+ +
+ + + +
+ +
+ + +
+

Files

+ +
+ + + + + +
+
+ +
+

WpTimthumb::Versionable

+ +
+ +
+ + + + +
+ + + + + + + + + + +
+

Public Instance Methods

+ + +
+ + + +
+ to_s() + click to toggle source +
+ + +
+ +

@return [ String ]

+ + + +
+
+# File lib/common/models/wp_timthumb/versionable.rb, line 18
+def to_s
+  "#{url}#{ ' v' + version if version}"
+end
+
+ +
+ + + + +
+ + +
+ + + +
+ version() + click to toggle source +
+ + +
+ +

Get the version from the body of an invalid request See code.google.com/p/timthumb/source/browse/trunk/timthumb.php#426

+ +

@return [ String ] The version

+ + + +
+
+# File lib/common/models/wp_timthumb/versionable.rb, line 9
+def version
+  unless @version
+    response = Browser.instance.get(url)
+    @version = response.body[%{TimThumb version\s*: ([^<]+)} , 1]
+  end
+  @version
+end
+
+ +
+ + + + +
+ + +
+ +
+ + +
+ +
+

[Validate]

+

Generated with the Darkfish + Rdoc Generator 2.

+
+ + + + diff --git a/doc/WpTimthumbs.html b/doc/WpTimthumbs.html index d167f58d..d8b9d507 100644 --- a/doc/WpTimthumbs.html +++ b/doc/WpTimthumbs.html @@ -1,350 +1,296 @@ - - - + + + - + -module WpTimthumbs - RDoc Documentation + Class: WpTimthumbs - + - + + + + - - - - - - + + +
+
+
+

+ Home + Classes + Methods +

+
+
- -
-
- - - - - +
+ +
+ + + +
+ + + + + + + + + + +
+ + +
+ +
+

[Validate]

+

Generated with the Darkfish + Rdoc Generator 2.

-
- - - - -
- - -
-

module WpTimthumbs

- -
- -
- - - - -
- - - - - - - - - - -
-

Public Instance Methods

- - -
- -
- has_timthumbs?(theme_name, options = {}) - click to toggle source -
- - -
- - - - - -
-
# File lib/wpscan/modules/wp_timthumbs.rb, line 27
-def has_timthumbs?(theme_name, options = {})
-  !timthumbs(theme_name, options).empty?
-end
-
- -
- - - - -
- - -
- -
- timthumbs(theme_name = nil, options = {}) - click to toggle source -
- - -
- - - - - -
-
# File lib/wpscan/modules/wp_timthumbs.rb, line 31
-def timthumbs(theme_name = nil, options = {})
-  if @wp_timthumbs.nil?
-    options[:type]                  = 'timthumbs'
-    options[:only_vulnerable_ones]  = false
-    options[:file]                  = options[:file] || DATA_DIR + '/timthumbs.txt'
-    options[:vulns_file]            = 'xxx'
-    options[:vulns_xpath]           = 'xxx'
-    options[:vulns_xpath_2]         = 'xxx'
-
-    WpOptions.check_options(options)
-    if theme_name == nil
-      custom_items = nil
-    else
-      custom_items = targets_url_from_theme(theme_name, options)
-    end
-    @wp_timthumbs = WpEnumerator.enumerate(options, custom_items)
-  end
-  @wp_timthumbs
-end
-
- -
- - - - -
- - -
- -
-

Protected Instance Methods

- - -
- -
- targets_url_from_theme(theme_name, options) - click to toggle source -
- - -
- - - - - -
-
# File lib/wpscan/modules/wp_timthumbs.rb, line 52
-def targets_url_from_theme(theme_name, options)
-  targets = []
-  theme_name = URI.escape(theme_name)
-
-  %w{
-    timthumb.php lib/timthumb.php inc/timthumb.php includes/timthumb.php
-    scripts/timthumb.php tools/timthumb.php functions/timthumb.php
-  }.each do |file|
-    targets << WpItem.new(
-      base_url:       options[:base_url],
-      path:           "themes/#{theme_name}/#{file}",
-      wp_content_dir: options[:wp_content_dir],
-      name:           theme_name,
-      vulns_file:     'XX',
-      type:           'timthumbs',
-      wp_plugins_dir: options[:wp_plugins_dir]
-    )
-  end
-  targets
-end
-
- -
- - - - -
- - -
- -
- -
- - - + + diff --git a/doc/WpTimthumbs/Detectable.html b/doc/WpTimthumbs/Detectable.html new file mode 100644 index 00000000..aef7c919 --- /dev/null +++ b/doc/WpTimthumbs/Detectable.html @@ -0,0 +1,519 @@ + + + + + + + Module: WpTimthumbs::Detectable + + + + + + + + + + + +
+
+
+

+ Home + Classes + Methods +

+
+
+ +
+ + + +
+ +
+ + + + + + + + + + + + +
+ +
+ + +
+

Files

+ +
+ + + + + +
+
+ +
+

WpTimthumbs::Detectable

+ +
+ +
+ + + + +
+ + + + + + + + + + +
+

Public Instance Methods

+ + +
+ + + +
+ passive_detection(wp_target, options = {}) + click to toggle source +
+ + +
+ +

No passive detection

+ +

@param [ WpTarget ] wp_target @param [ Hash +] options

+ +

@return [ WpTimthumbs ]

+ + + +
+
+# File lib/common/collections/wp_timthumbs/detectable.rb, line 11
+def passive_detection(wp_target, options = {})
+  new
+end
+
+ +
+ + + + +
+ + +
+ +
+

Protected Instance Methods

+ + +
+ + + +
+ create_item(wp_target, path = nil) + click to toggle source +
+ + +
+ +

@param [ WpTarget ] wp_target @option [ +String ] path

+ +

@return [ WpTimthumb ]

+ + + +
+
+# File lib/common/collections/wp_timthumbs/detectable.rb, line 71
+def create_item(wp_target, path = nil)
+  options = {
+    wp_content_dir: wp_target.wp_content_dir,
+    wp_plugins_dir: wp_target.wp_plugins_dir
+  }
+
+  options.merge!(path: path) if path
+
+  WpTimthumb.new(wp_target.uri, options)
+end
+
+ +
+ + + + +
+ + +
+ + + +
+ targets_items(wp_target, options = {}) + click to toggle source +
+ + +
+ +

@param [ WpTarget ] wp_target @param [ Hash +] options @option options [ String ] :file The path to the file containing +the targets @option options [ String ] :theme_name

+ +

@return [ Array<WpTimthumb> ]

+ + + +
+
+# File lib/common/collections/wp_timthumbs/detectable.rb, line 23
+def targets_items(wp_target, options = {})
+  targets = options[:theme_name] ? theme_timthumbs(options[:theme_name], wp_target) : []
+
+  if options[:file]
+    targets += targets_items_from_file(options[:file], wp_target)
+  end
+
+  targets.uniq { |i| i.url }
+end
+
+ +
+ + + + +
+ + +
+ + + +
+ targets_items_from_file(file, wp_target) + click to toggle source +
+ + +
+ +

@param [ String ] file @param [ WpTarget ] +wp_target

+ +

@return [ Array<WpTimthumb> ]

+ + + +
+
+# File lib/common/collections/wp_timthumbs/detectable.rb, line 56
+def targets_items_from_file(file, wp_target)
+  targets = []
+
+  File.open(file, 'r') do |f|
+    f.readlines.collect do |path|
+      targets << create_item(wp_target, path.strip)
+    end
+  end
+  targets
+end
+
+ +
+ + + + +
+ + +
+ + + +
+ theme_timthumbs(theme_name, wp_target) + click to toggle source +
+ + +
+ +

@param [ String ] theme_name @param [ WpTarget ] wp_target

+ +

@return [ Array<WpTimthumb> ]

+ + + +
+
+# File lib/common/collections/wp_timthumbs/detectable.rb, line 37
+def theme_timthumbs(theme_name, wp_target)
+  targets     = []
+  wp_timthumb = create_item(wp_target)
+
+  %{
+    timthumb.php lib/timthumb.php inc/timthumb.php includes/timthumb.php
+    scripts/timthumb.php tools/timthumb.php functions/timthumb.php
+  }.each do |path|
+    wp_timthumb.path = "$wp-content$/themes/#{theme_name}/#{path}"
+
+    targets << wp_timthumb.dup
+  end
+  targets
+end
+
+ +
+ + + + +
+ + +
+ +
+ + +
+ +
+

[Validate]

+

Generated with the Darkfish + Rdoc Generator 2.

+
+ + + + diff --git a/doc/WpUser.html b/doc/WpUser.html index 89a1e295..68af57a5 100644 --- a/doc/WpUser.html +++ b/doc/WpUser.html @@ -1,558 +1,616 @@ - - - + + + - + -class WpUser - RDoc Documentation + Class: WpUser - - - - - - - - - - + + + + + + - - -
-

class WpUser

- -
- -
- - - - -
- - - - - - - - - - -
-

Public Class Methods

- - -
- -
- new(name, id, nickname) - click to toggle source -
- - -
- - - - - -
-
# File lib/wpscan/wp_user.rb, line 54
-def initialize(name, id, nickname)
-  self.name = name
-  self.id = id
-  self.nickname = nickname
-end
-
- -
- - - - -
- - -
- -
-

Public Instance Methods

- - -
- -
- <=>(other) - click to toggle source -
- - -
- - - - - -
-
# File lib/wpscan/wp_user.rb, line 60
-def <=>(other)
-  other.name <=> self.name
-end
-
- -
- - - - -
- - -
- -
- ===(other) - click to toggle source -
- - -
- - - - - -
-
# File lib/wpscan/wp_user.rb, line 64
-def ===(other)
-  other.name === self.name and other.id === self.id and other.nickname === self.nickname
-end
-
- -
- - - - -
- - -
- -
- eql?(other) - click to toggle source -
- - -
- - - - - -
-
# File lib/wpscan/wp_user.rb, line 68
-def eql?(other)
-  other.name === self.name and other.id === self.id and other.nickname === self.nickname
-end
-
- -
- - - - -
- - -
- -
- id() - click to toggle source -
- - -
- - - - - -
-
# File lib/wpscan/wp_user.rb, line 32
-def id
-  if @id.nil? or @id.to_s.strip.empty?
-    return 'empty'
-  end
-  @id
-end
-
- -
- - - - -
- - -
- -
- id=(new_id) - click to toggle source -
- - -
- - - - - -
-
# File lib/wpscan/wp_user.rb, line 39
-def id=(new_id)
-  @id = new_id
-end
-
- -
- - - - -
- - -
- -
- name() - click to toggle source -
- - -
- - - - - -
-
# File lib/wpscan/wp_user.rb, line 21
-def name
-  if @name.nil? or @name.to_s.strip.empty?
-    return 'empty'
-  end
-  @name
-end
-
- -
- - - - -
- - -
- -
- name=(new_name) - click to toggle source -
- - -
- - - - - -
-
# File lib/wpscan/wp_user.rb, line 28
-def name=(new_name)
-  @name = new_name
-end
-
- -
- - - - -
- - -
- -
- nickname() - click to toggle source -
- - -
- - - - - -
-
# File lib/wpscan/wp_user.rb, line 43
-def nickname
-  if @nickname.nil? or @nickname.to_s.strip.empty?
-    return 'empty'
-  end
-  @nickname
-end
-
- -
- - - - -
- - -
- -
- nickname=(new_nickname) - click to toggle source -
- - -
- - - - - -
-
# File lib/wpscan/wp_user.rb, line 50
-def nickname=(new_nickname)
-  @nickname = new_nickname
-end
-
- -
- - - - -
- - -
- -
- -
- - - + + diff --git a/doc/WpUser/Existable.html b/doc/WpUser/Existable.html new file mode 100644 index 00000000..a464adf3 --- /dev/null +++ b/doc/WpUser/Existable.html @@ -0,0 +1,468 @@ + + + + + + + Module: WpUser::Existable + + + + + + + + + + + +
+
+
+

+ Home + Classes + Methods +

+
+
+ +
+
+

In Files

+ +
+ + +
+ +
+ + + + + + + + + + + + +
+ +
+ + +
+

Files

+ +
+ + + + + +
+
+ +
+

WpUser::Existable

+ +
+ +
+ + + + +
+ + + + + + + + + + +
+

Public Class Methods

+ + +
+ + + +
+ display_name_from_body(body) + click to toggle source +
+ + +
+ +

@note Some bodies are encoded in ASCII-8BIT, and Nokogiri doesn’t support +it

+ +
So it's forced to UTF-8 when this encoding is detected
+ +

@param [ String ] body

+ +

@return [ String ] The display_name

+ + + +
+
+# File lib/common/models/wp_user/existable.rb, line 63
+def self.display_name_from_body(body)
+  if title_tag = body[%{<title>([^<]+)</title>}, 1]
+    title_tag.force_encoding('UTF-8') if title_tag.encoding == Encoding::ASCII_8BIT
+    title_tag = Nokogiri::HTML::DocumentFragment.parse(title_tag).to_s
+    # &amp; are not decoded with Nokogiri

+    title_tag.sub!('&amp;', '&')
+
+    name = title_tag[%{([^|«]+) }, 1]
+
+    return name.strip if name
+  end
+end
+
+ +
+ + + + +
+ + +
+ + + +
+ login_from_author_pattern(text) + click to toggle source +
+ + +
+ +

@param [ String ] text

+ +

@return [ String ] The login

+ + + +
+
+# File lib/common/models/wp_user/existable.rb, line 38
+def self.login_from_author_pattern(text)
+  text[%{/author/([^/\b]+)/?}, 1]
+end
+
+ +
+ + + + +
+ + +
+ + + +
+ login_from_body(body) + click to toggle source +
+ + +
+ +

@param [ String ] body

+ +

@return [ String ] The login

+ + + +
+
+# File lib/common/models/wp_user/existable.rb, line 45
+def self.login_from_body(body)
+  # Feed URL with Permalinks

+  login = WpUser::Existable.login_from_author_pattern(body)
+
+  unless login
+    # No Permalinks

+    login = body[%{<body class="archive author author-([^\s]+) author-(\d+)}, 1]
+  end
+
+  login
+end
+
+ +
+ + + + +
+ + +
+ +
+

Public Instance Methods

+ + +
+ + + +
+ exists_from_response?(response, options = {}) + click to toggle source +
+ + +
+ +

@param [ Typhoeus::Response ] +response @param [ Hash ] options

+ +

@return [ Boolean ]

+ + + +
+
+# File lib/common/models/wp_user/existable.rb, line 9
+def exists_from_response?(response, options = {})
+  load_from_response(response)
+
+  @login ? true : false
+end
+
+ +
+ + + + +
+ + +
+ +
+ + +
+ +
+

[Validate]

+

Generated with the Darkfish + Rdoc Generator 2.

+
+ + + + diff --git a/doc/WpUsernames.html b/doc/WpUsernames.html deleted file mode 100644 index ebed9fe5..00000000 --- a/doc/WpUsernames.html +++ /dev/null @@ -1,468 +0,0 @@ - - - - - - -module WpUsernames - RDoc Documentation - - - - - - - - - - - - - - - - -
-

module WpUsernames

- -
- -
- - - - -
- - - - - - - - - - -
-

Public Instance Methods

- - -
- -
- author_url(author_id) - click to toggle source -
- - -
- - - - - -
-
# File lib/wpscan/modules/wp_usernames.rb, line 102
-def author_url(author_id)
-  @uri.merge("?author=#{author_id}").to_s
-end
-
- -
- - - - -
- - -
- -
- extract_nickname_from_body(body) - click to toggle source -
- - -
- - - - - -
-
# File lib/wpscan/modules/wp_usernames.rb, line 77
-def extract_nickname_from_body(body)
-  body[%r{<title>([^<]*)</title>}, 1]
-end
-
- -
- - - - -
- - -
- -
- get_nickname_from_response(resp) - click to toggle source -
- - -
- - - - - -
-
# File lib/wpscan/modules/wp_usernames.rb, line 69
-def get_nickname_from_response(resp)
-  nickname = nil
-  if resp.code == 200
-    nickname = extract_nickname_from_body(resp.body)
-  end
-  nickname
-end
-
- -
- - - - -
- - -
- -
- get_nickname_from_url(url) - click to toggle source -
- - -
- - - - - -
-
# File lib/wpscan/modules/wp_usernames.rb, line 60
-def get_nickname_from_url(url)
-  resp = Browser.instance.get(url, { follow_location: true, max_redirects: 2 })
-  nickname = nil
-  if resp.code == 200
-    nickname = extract_nickname_from_body(resp.body)
-  end
-  nickname
-end
-
- -
- - - - -
- - -
- -
- remove_junk_from_nickname(usernames) - click to toggle source -
- - -
- - - - - -
-
# File lib/wpscan/modules/wp_usernames.rb, line 81
-def remove_junk_from_nickname(usernames)
-  unless usernames.kind_of? Array
-    raise('Need an array as input')
-  end
-  nicknames = []
-  usernames.each do |u|
-    unless u.kind_of? WpUser
-      raise('Items must be of type WpUser')
-    end
-    nickname = u.nickname
-    unless nickname == 'empty'
-      nicknames << nickname
-    end
-  end
-  junk = get_equal_string_end(nicknames)
-  usernames.each do |u|
-    u.nickname = u.nickname.sub(%r#{Regexp.escape(junk)}$/, '')
-  end
-  usernames
-end
-
- -
- - - - -
- - -
- -
- usernames(options = {}) - click to toggle source -
- - -
- -

Enumerate wordpress usernames by using Veronica Valeros’s technique: seclists.org/fulldisclosure/2011/May/493

- -

Available options :

- -
:range - default : 1..10
- -

returns an array of WpUser (can be empty)

- - - -
-
# File lib/wpscan/modules/wp_usernames.rb, line 28
-def usernames(options = {})
-  range = options[:range] || (1..10)
-  browser = Browser.instance
-  usernames = []
-
-  range.each do |author_id|
-    url = author_url(author_id)
-    response = browser.get(url)
-
-    username = nil
-    nickname = nil
-    if response.code == 301 # username in location?
-      username = response.headers_hash['location'][%r{/author/([^/\b]+)/?}, 1]
-      # Get the real name from the redirect site
-      nickname = get_nickname_from_url(url)
-    elsif response.code == 200 # username in body?
-      username = response.body[%r{posts by (.*) feed}, 1]
-      nickname = get_nickname_from_response(response)
-    end
-
-    unless username == nil and nickname == nil
-      usernames << WpUser.new(username, author_id, nickname)
-    end
-  end
-  usernames = remove_junk_from_nickname(usernames)
-
-  # clean the array, remove nils and possible duplicates
-  usernames.flatten!
-  usernames.compact!
-  usernames.uniq
-end
-
- -
- - - - -
- - -
- -
- -
- - - - diff --git a/doc/WpUsers.html b/doc/WpUsers.html new file mode 100644 index 00000000..66afec11 --- /dev/null +++ b/doc/WpUsers.html @@ -0,0 +1,313 @@ + + + + + + + Class: WpUsers + + + + + + + + + + + +
+
+
+

+ Home + Classes + Methods +

+
+
+ +
+ + + +
+ +
+ + +
+

Parent

+ + + +
+ + + + + + +
+

Namespace

+ +
+ + + + + + +
+

Included Modules

+ +
+ +
+ +
+ + +
+

Files

+ +
+ + + + + +
+
+ +
+

WpUsers

+ +
+ +
+ + + + +
+ + + + + + + + + + +
+ + +
+ +
+

[Validate]

+

Generated with the Darkfish + Rdoc Generator 2.

+
+ + + + diff --git a/doc/WpUsers/Detectable.html b/doc/WpUsers/Detectable.html new file mode 100644 index 00000000..7e08dd43 --- /dev/null +++ b/doc/WpUsers/Detectable.html @@ -0,0 +1,409 @@ + + + + + + + Module: WpUsers::Detectable + + + + + + + + + + + +
+
+
+

+ Home + Classes + Methods +

+
+
+ +
+ + + +
+ +
+ + + + + + + + +
+

Methods

+ +
+ + + +
+ +
+ + +
+

Files

+ +
+ + + + + +
+
+ +
+

WpUsers::Detectable

+ +
+ +
+ + + + +
+ + + + + + + + + + +
+

Public Instance Methods

+ + +
+ + + +
+ passive_detection(wp_target, options = {}) + click to toggle source +
+ + +
+ +

No passive detection

+ +

@return [ WpUsers ]

+ + + +
+
+# File lib/common/collections/wp_users/detectable.rb, line 11
+def passive_detection(wp_target, options = {})
+  new
+end
+
+ +
+ + + + +
+ + +
+ + + +
+ request_params() + click to toggle source +
+ + +
+ +

@return [ Hash ]

+ + + +
+
+# File lib/common/collections/wp_users/detectable.rb, line 6
+def request_params; {} end
+
+ +
+ + + + +
+ + +
+ +
+

Protected Instance Methods

+ + +
+ + + +
+ targets_items(wp_target, options = {}) + click to toggle source +
+ + +
+ +

@param [ WpTarget ] wp_target @param [ Hash +] options @option options [ Range ] :range ((1..10))

+ +

@return [ Array<WpUser> ]

+ + + +
+
+# File lib/common/collections/wp_users/detectable.rb, line 22
+def targets_items(wp_target, options = {})
+  range   = options[:range] || (1..10)
+  targets = []
+
+  range.each do |user_id|
+    targets << WpUser.new(wp_target.uri, id: user_id)
+  end
+  targets
+end
+
+ +
+ + + + +
+ + +
+ +
+ + +
+ +
+

[Validate]

+

Generated with the Darkfish + Rdoc Generator 2.

+
+ + + + diff --git a/doc/WpUsers/Output.html b/doc/WpUsers/Output.html new file mode 100644 index 00000000..d78b0dab --- /dev/null +++ b/doc/WpUsers/Output.html @@ -0,0 +1,341 @@ + + + + + + + Module: WpUsers::Output + + + + + + + + + + + +
+
+
+

+ Home + Classes + Methods +

+
+
+ +
+
+

In Files

+ +
+ + +
+ +
+ + + + + + + + +
+

Methods

+ +
+ + + +
+ +
+ + +
+

Files

+ +
+ + + + + +
+
+ +
+

WpUsers::Output

+ +
+ +
+ + + + +
+ + + + + + + + + + +
+

Public Instance Methods

+ + +
+ + + +
+ output(left_margin = '') + click to toggle source +
+ + +
+ +

TODO : create a generic method to output tabs

+ + + +
+
+# File lib/common/collections/wp_users/output.rb, line 6
+def output(left_margin = '')
+  max_id_length = self.sort { |a, b| a.id.to_s.length <=> b.id.to_s.length }.last.id.to_s.length
+  max_login_length = self.sort { |a, b| a.login.length <=> b.login.length }.last.login.length
+  max_display_name_length = self.sort { |a, b| a.display_name.length <=> b.display_name.length }.last.display_name.length
+
+  inner_space         = 2
+  id_length           = (max_id_length + inner_space * 2) /2 *2
+  login_length        = max_login_length + inner_space * 2
+  display_name_length = max_display_name_length + inner_space * 2
+
+  puts left_margin + '+' * (id_length + login_length + display_name_length + 4)
+  puts left_margin + '|' + 'id'.center(id_length) + '|' + 'login'.center(login_length) + '|' + 'display name'.center(display_name_length) + '|'
+  puts left_margin + '|' + '+' * (id_length + login_length + display_name_length + 2) + '|'
+
+  self.each do |u|
+    puts left_margin + '|' + u.id.to_s.center(id_length) + '|' +  u.login.center(login_length) + '|' + u.display_name.center(display_name_length) + '|'
+  end
+
+  puts left_margin + '+' * (id_length + login_length + display_name_length + 4)
+end
+
+ +
+ + + + +
+ + +
+ +
+ + +
+ +
+

[Validate]

+

Generated with the Darkfish + Rdoc Generator 2.

+
+ + + + diff --git a/doc/WpVersion.html b/doc/WpVersion.html index 317f5f57..b71367dd 100644 --- a/doc/WpVersion.html +++ b/doc/WpVersion.html @@ -1,687 +1,430 @@ - - - + + + - + -class WpVersion - RDoc Documentation + Class: WpVersion - - - - - - - - - - + + + + + + - - -
-

class WpVersion

- -
- -
- - - - -
- - - - - - - - -
-

Attributes

- - -
-
- discovery_method[R] -
- -
- - - -
-

Public Class Methods

+ - -
+ + +
+

Namespace

+ +
+ + + + +
+

Methods

+ +
+ + + + +
+

Included Modules

+ +
+ +
+ + +
+ +
+

WpVersion

+ +
+ +
+ + + + +
+ + + + + + + + +
+

Attributes

+ + +
+ + + + +
+ number[RW] +
+ +
+ +

The version number

+ +
+
+ -
- -

Will use all method self.find_from_* to try to detect the version Once the -version is found, it will return a WpVersion -object The method_name will be without ‘find_from_’ and ‘_’ will be replace -by ‘ ’ (IE ‘meta generator’, ‘rss generator’ etc) If the version is not -found, nil is returned

+ + +
+

Public Instance Methods

-

The order in which the find_from_* methods are is important, they will be -called in the same order (::find_from_meta_generator, -::find_from_rss_generator -etc)

- + +
+ -
-
# File lib/wpscan/wp_version.rb, line 39
-def self.find(target_uri, wp_content_dir)
-  options = {
-    base_url:       target_uri,
-    wp_content_dir: wp_content_dir
-  }
-  self.methods.grep(%rfind_from_/).each do |method_to_call|
-    version = self.send(method_to_call, options)
+          
+ ==(other) + click to toggle source +
+ - if version - return new(version, discovery_method: method_to_call[%r{find_from_(.*)}, 1].gsub('_', ' ')) - end - end - nil +
+ +

@param [ WpVersion ] other

+ +

@return [ Boolean ]

+ + + +
+
+# File lib/common/models/wp_version.rb, line 21
+def ==(other)
+  number == other.number
 end
-
+
+ +
+ -
- + +
- -
+ +
+ + +
+ allowed_options() + click to toggle source +
+ + +
+ +

@return [ Array ]

+ + + +
+
+# File lib/common/models/wp_version.rb, line 16
+def allowed_options; super << :number << :found_from end
+
+ +
+ + + + +
+ + +
-
- -
- new(number, options = {}) - click to toggle source -
- - -
- - - - - -
-
# File lib/wpscan/wp_version.rb, line 25
-def initialize(number, options = {})
-  @number           = number
-  @discovery_method = options[:discovery_method]
-  @vulns_file       = options[:vulns_file] || WP_VULNS_FILE
-  @vulns_xpath      = "//wordpress[@version='#{@number}']/vulnerability"
-end
-
- -
- - - - -
- - - +
-
-

Protected Class Methods

- -
- -
- find_from_advanced_fingerprinting(options) - click to toggle source -
- +
-
- -

Uses data/wp_versions.xml to try to identify a wordpress version.

+
+

[Validate]

+

Generated with the Darkfish + Rdoc Generator 2.

+
-

It does this by using client side file hashing

- -
/!\ Warning : this method might return false positive if the file used for fingerprinting is part of a theme (they can be updated)
- - - -
-
# File lib/wpscan/wp_version.rb, line 124
-def self.find_from_advanced_fingerprinting(options)
-  target_uri = options[:base_url]
-  # needed for rpsec tests
-  version_xml = options[:version_xml] || WP_VERSIONS_FILE
-  xml = Nokogiri::XML(File.open(version_xml)) do |config|
-    config.noblanks
-  end
-
-  xml.xpath('//file').each do |node|
-    wp_content = options[:wp_content_dir]
-    wp_plugins = "#{wp_content}/plugins"
-    file_url = target_uri.merge(node.attribute('src').text).to_s
-    file_url = file_url.gsub(%r\$wp-plugins\$/, wp_plugins).gsub(%r\$wp-content\$/, wp_content)
-    response = Browser.instance.get(file_url)
-    md5sum = Digest::MD5.hexdigest(response.body)
-
-    node.search('hash').each do |hash|
-      if hash.attribute('md5').text == md5sum
-        return hash.search('version').text
-      end
-    end
-  end
-  nil # Otherwise the data['file'] is returned (issue #107)
-end
-
- -
- - - - - - - -
- -
- find_from_atom_generator(options) - click to toggle source -
- - -
- -

Attempts to find the WordPress version from, the generator tag in the Atom -source.

- - - -
-
# File lib/wpscan/wp_version.rb, line 99
-def self.find_from_atom_generator(options)
-  target_uri = options[:base_url]
-  response = Browser.instance.get(target_uri.merge('feed/atom/').to_s, { follow_location: true, max_redirects: 2 })
-
-  response.body[%r{<generator uri="http://wordpress.org/" version="#{WpVersion.version_pattern}">WordPress</generator>}, 1]
-end
-
- -
- - - - -
- - - - - -
- -
- find_from_meta_generator(options) - click to toggle source -
- - -
- -

Attempts to find the wordpress version from, the generator meta tag in the -html source.

- -

The meta tag can be removed however it seems, that it is reinstated on -upgrade.

- - - -
-
# File lib/wpscan/wp_version.rb, line 61
-def self.find_from_meta_generator(options)
-  target_uri = options[:base_url]
-  response = Browser.instance.get(target_uri.to_s, { follow_location: true, max_redirects: 2 })
-
-  response.body[%r{name="generator" content="wordpress #{WpVersion.version_pattern}"}, 1]
-end
-
- -
- - - - -
- - -
- -
- find_from_rdf_generator(options) - click to toggle source -
- - -
- -

Attempts to find WordPress version from, the generator tag in the RDF feed -source.

- - - -
-
# File lib/wpscan/wp_version.rb, line 79
-def self.find_from_rdf_generator(options)
-  target_uri = options[:base_url]
-  response = Browser.instance.get(target_uri.merge('feed/rdf/').to_s, { follow_location: true, max_redirects: 2 })
-
-  response.body[%r{<admin:generatorAgent rdf:resource="http://wordpress.org/\?v=#{WpVersion.version_pattern}" />}, 1]
-end
-
- -
- - - - -
- - -
- -
- find_from_readme(options) - click to toggle source -
- - -
- -

Attempts to find the WordPress version from the readme.html file.

- - - -
-
# File lib/wpscan/wp_version.rb, line 150
-def self.find_from_readme(options)
-  target_uri = options[:base_url]
-  Browser.instance.get(target_uri.merge('readme.html').to_s).body[%r{<br />\sversion #{WpVersion.version_pattern}}, 1]
-end
-
- -
- - - - -
- - -
- -
- find_from_rss_generator(options) - click to toggle source -
- - -
- -

Attempts to find the WordPress version from, the generator tag in the RSS -feed source.

- - - -
-
# File lib/wpscan/wp_version.rb, line 70
-def self.find_from_rss_generator(options)
-  target_uri = options[:base_url]
-  response = Browser.instance.get(target_uri.merge('feed/').to_s, { follow_location: true, max_redirects: 2 })
-
-  response.body[%r{<generator>http://wordpress.org/\?v=#{WpVersion.version_pattern}</generator>}, 1]
-end
-
- -
- - - - -
- - -
- -
- find_from_sitemap_generator(options) - click to toggle source -
- - -
- -

Attempts to find the WordPress version from the sitemap.xml file.

- -

See: code.google.com/p/wpscan/issues/detail?id=109

- - - -
-
# File lib/wpscan/wp_version.rb, line 158
-def self.find_from_sitemap_generator(options)
-  target_uri = options[:base_url]
-  Browser.instance.get(target_uri.merge('sitemap.xml').to_s).body[%r{generator="wordpress/#{WpVersion.version_pattern}"}, 1]
-end
-
- -
- - - - -
- - -
- -
- version_pattern() - click to toggle source -
- - -
- -

Used to check if the version is correct: must contain at least one dot.

- - - -
-
# File lib/wpscan/wp_version.rb, line 170
-def self.version_pattern
-  '([^\r\n"\]+\.[^\r\n"\]+)'
-end
-
- -
- - - - -
- - -
- - - - - - - + + diff --git a/doc/WpVersion/Findable.html b/doc/WpVersion/Findable.html new file mode 100644 index 00000000..8f63802e --- /dev/null +++ b/doc/WpVersion/Findable.html @@ -0,0 +1,803 @@ + + + + + + + Module: WpVersion::Findable + + + + + + + + + + + +
+
+
+

+ Home + Classes + Methods +

+
+
+ +
+
+

In Files

+ +
+ + +
+ +
+ + + + + + + + + + + + +
+ +
+ + +
+

Files

+ +
+ + + + + +
+
+ +
+

WpVersion::Findable

+ +
+ +
+ + + + +
+ + + + + + + + + + +
+

Public Instance Methods

+ + +
+ + + +
+ find(target_uri, wp_content_dir, wp_plugins_dir, versions_xml) + click to toggle source +
+ + +
+ +

Find the version of the blog designated from target_uri

+ +

@param [ URI ] target_uri @param [ String ] +wp_content_dir @param [ String ] wp_plugins_dir

+ +

@return [ WpVersion ]

+ + + +
+
+# File lib/common/models/wp_version/findable.rb, line 13
+def find(target_uri, wp_content_dir, wp_plugins_dir, versions_xml)
+  methods.grep(/find_from_/).each do |method|
+
+    if method === :find_from_advanced_fingerprinting
+      version = send(method, target_uri, wp_content_dir, wp_plugins_dir, versions_xml)
+    else
+      version = send(method, target_uri)
+    end
+
+    if version
+      return new(target_uri, number: version, found_from: method)
+    end
+  end
+  nil
+end
+
+ +
+ + + + +
+ + +
+ + + +
+ version_pattern() + click to toggle source +
+ + +
+ +

Used to check if the version is correct: must contain at least one dot.

+ +

@return [ String ]

+ + + +
+
+# File lib/common/models/wp_version/findable.rb, line 32
+def version_pattern
+  '([^\r\n"\]+\.[^\r\n"\]+)'
+end
+
+ +
+ + + + +
+ + +
+ +
+

Protected Instance Methods

+ + +
+ + + +
+ find_from_advanced_fingerprinting(target_uri, wp_content_dir, wp_plugins_dir, versions_xml) + click to toggle source +
+ + +
+ +

Uses data/wp_versions.xml to try to identify a wordpress version.

+ +

It does this by using client side file hashing

+ +

/!\ Warning : this method might return false positive if the file used for +fingerprinting is part of a theme (they can be updated)

+ +

@param [ URI ] target_uri @param [ String ] +wp_content_dir @param [ String ] wp_plugins_dir @param [ String ] +versions_xml The path to the xml containing all versions

+ +

@return [ String ] The version number

+ + + +
+
+# File lib/common/models/wp_version/findable.rb, line 153
+def find_from_advanced_fingerprinting(target_uri, wp_content_dir, wp_plugins_dir, versions_xml)
+  xml     = xml(versions_xml)
+
+  # This wp_item will take care of encoding the path

+  # and replace variables like $wp-content$ & $wp-plugins$

+  wp_item = WpItem.new(target_uri,
+                       wp_content_dir: wp_content_dir,
+                       wp_plugins_dir: wp_plugins_dir)
+
+  xml.xpath('//file').each do |node|
+    wp_item.path = node.attribute('src').text
+
+    response = Browser.instance.get(wp_item.url)
+    md5sum = Digest::MD5.hexdigest(response.body)
+
+    node.search('hash').each do |hash|
+      if hash.attribute('md5').text == md5sum
+        return hash.search('version').text
+      end
+    end
+  end
+  nil
+end
+
+ +
+ + + + +
+ + +
+ + + +
+ find_from_atom_generator(target_uri) + click to toggle source +
+ + +
+ +

Attempts to find the WordPress version from, the generator tag in the Atom +source.

+ +

@param [ URI ] target_uri

+ +

@return [ String ] The version number

+ + + +
+
+# File lib/common/models/wp_version/findable.rb, line 120
+def find_from_atom_generator(target_uri)
+  scan_url(
+    target_uri,
+    %{<generator uri="http://wordpress.org/" version="#{version_pattern}">WordPress</generator>},
+    'feed/atom/'
+  )
+end
+
+ +
+ + + + +
+ + + + + +
+ + + +
+ find_from_meta_generator(target_uri) + click to toggle source +
+ + +
+ +

Attempts to find the wordpress version from, the generator meta tag in the +html source.

+ +

The meta tag can be removed however it seems, that it is reinstated on +upgrade.

+ +

@param [ URI ] target_uri

+ +

@return [ String ] The version number

+ + + +
+
+# File lib/common/models/wp_version/findable.rb, line 67
+def find_from_meta_generator(target_uri)
+  scan_url(
+    target_uri,
+    %{name="generator" content="wordpress #{version_pattern}"}
+  )
+end
+
+ +
+ + + + +
+ + +
+ + + +
+ find_from_rdf_generator(target_uri) + click to toggle source +
+ + +
+ +

Attempts to find WordPress version from, the generator tag in the RDF feed +source.

+ +

@param [ URI ] target_uri

+ +

@return [ String ] The version number

+ + + +
+
+# File lib/common/models/wp_version/findable.rb, line 94
+def find_from_rdf_generator(target_uri)
+  scan_url(
+    target_uri,
+    %{<admin:generatorAgent rdf:resource="http://wordpress.org/\?v=#{version_pattern}" />},
+    'feed/rdf/'
+  )
+end
+
+ +
+ + + + +
+ + +
+ + + +
+ find_from_readme(target_uri) + click to toggle source +
+ + +
+ +

Attempts to find the WordPress version from the readme.html file.

+ +

@param [ URI ] target_uri

+ +

@return [ String ] The version number

+ + + +
+
+# File lib/common/models/wp_version/findable.rb, line 182
+def find_from_readme(target_uri)
+  scan_url(
+    target_uri,
+    %{<br />\sversion #{version_pattern}},
+    'readme.html'
+  )
+end
+
+ +
+ + + + +
+ + +
+ + + +
+ find_from_rss_generator(target_uri) + click to toggle source +
+ + +
+ +

Attempts to find the WordPress version from, the generator tag in the RSS +feed source.

+ +

@param [ URI ] target_uri

+ +

@return [ String ] The version number

+ + + +
+
+# File lib/common/models/wp_version/findable.rb, line 80
+def find_from_rss_generator(target_uri)
+  scan_url(
+    target_uri,
+    %{<generator>http://wordpress.org/\?v=#{version_pattern}</generator>},
+    'feed/'
+  )
+end
+
+ +
+ + + + +
+ + +
+ + + +
+ find_from_sitemap_generator(target_uri) + click to toggle source +
+ + +
+ +

Attempts to find the WordPress version from the sitemap.xml file.

+ +

See: code.google.com/p/wpscan/issues/detail?id=109

+ +

@param [ URI ] target_uri

+ +

@return [ String ] The version number

+ + + +
+
+# File lib/common/models/wp_version/findable.rb, line 197
+def find_from_sitemap_generator(target_uri)
+  scan_url(
+    target_uri,
+    %{generator="wordpress/#{version_pattern}"},
+    'sitemap.xml'
+  )
+end
+
+ +
+ + + + +
+ + +
+ + + +
+ scan_url(target_uri, pattern, path = nil) + click to toggle source +
+ + +
+ +

Returns the first match of <pattern> in the body of the url

+ +

@param [ URI ] target_uri @param [ Regex ] +pattern @param [ String ] path

+ +

@return [ String ]

+ + + +
+
+# File lib/common/models/wp_version/findable.rb, line 45
+def scan_url(target_uri, pattern, path = nil)
+  url = path ? target_uri.merge(path).to_s : target_uri.to_s
+  response = Browser.instance.get_and_follow_location(url)
+
+  response.body[pattern, 1]
+end
+
+ +
+ + + + +
+ + +
+ +
+ + +
+ +
+

[Validate]

+

Generated with the Darkfish + Rdoc Generator 2.

+
+ + + + diff --git a/doc/WpVersion/Output.html b/doc/WpVersion/Output.html new file mode 100644 index 00000000..9f68105a --- /dev/null +++ b/doc/WpVersion/Output.html @@ -0,0 +1,333 @@ + + + + + + + Module: WpVersion::Output + + + + + + + + + + + +
+
+
+

+ Home + Classes + Methods +

+
+
+ +
+
+

In Files

+ +
+ + +
+ +
+ + + + + + + + +
+

Methods

+ +
+ + + +
+ +
+ + +
+

Files

+ +
+ + + + + +
+
+ +
+

WpVersion::Output

+ +
+ +
+ + + + +
+ + + + + + + + + + +
+

Public Instance Methods

+ + +
+ + + +
+ output() + click to toggle source +
+ + +
+ + + + + +
+
+# File lib/common/models/wp_version/output.rb, line 5
+def output
+  puts green('[+]') + " WordPress version #{self.number} identified from #{self.found_from}"
+
+  vulnerabilities = self.vulnerabilities
+
+  unless vulnerabilities.empty?
+    puts
+    puts red('[!]') + " We have identified #{vulnerabilities.size} vulnerabilities from the version number :"
+
+    vulnerabilities.output
+  end
+end
+
+ +
+ + + + +
+ + +
+ +
+ + +
+ +
+

[Validate]

+

Generated with the Darkfish + Rdoc Generator 2.

+
+ + + + diff --git a/doc/WpVersion/Vulnerable.html b/doc/WpVersion/Vulnerable.html new file mode 100644 index 00000000..00642cdd --- /dev/null +++ b/doc/WpVersion/Vulnerable.html @@ -0,0 +1,362 @@ + + + + + + + Module: WpVersion::Vulnerable + + + + + + + + + + + +
+
+
+

+ Home + Classes + Methods +

+
+
+ +
+
+

In Files

+ +
+ + +
+ +
+ + + + + + + + +
+

Methods

+ +
+ + + +
+ +
+ + +
+

Files

+ +
+ + + + + +
+
+ +
+

WpVersion::Vulnerable

+ +
+ +
+ + + + +
+ + + + + + + + + + +
+

Public Instance Methods

+ + +
+ + + +
+ vulns_file() + click to toggle source +
+ + +
+ +

@return [ String ] The path to the file containing vulnerabilities

+ + + +
+
+# File lib/common/models/wp_version/vulnerable.rb, line 6
+def vulns_file
+  unless @vulns_file
+    @vulns_file = WP_VULNS_FILE
+  end
+  @vulns_file
+end
+
+ +
+ + + + +
+ + +
+ + + +
+ vulns_xpath() + click to toggle source +
+ + +
+ +

@return [ String ]

+ + + +
+
+# File lib/common/models/wp_version/vulnerable.rb, line 14
+def vulns_xpath
+  "//wordpress[@version='#{@number}']/vulnerability"
+end
+
+ +
+ + + + +
+ + +
+ +
+ + +
+ +
+

[Validate]

+

Generated with the Darkfish + Rdoc Generator 2.

+
+ + + + diff --git a/doc/WpVulnerability.html b/doc/WpVulnerability.html deleted file mode 100644 index 6977e586..00000000 --- a/doc/WpVulnerability.html +++ /dev/null @@ -1,315 +0,0 @@ - - - - - - -class WpVulnerability - RDoc Documentation - - - - - - - - - - - - - - - - -
-

class WpVulnerability

- -
- -
- - - - -
- - - - - - - - -
-

Attributes

- - -
-
- metasploit_modules[RW] -
- -
- - - -
-
- -
-
- references[RW] -
- -
- - - -
-
- -
-
- title[RW] -
- -
- - - -
-
- -
-
- type[RW] -
- -
- - - -
-
- -
- - - - -
-

Public Class Methods

- - -
- -
- new(title, references, type, metasploit_modules) - click to toggle source -
- - -
- - - - - -
-
# File lib/wpscan/wp_vulnerability.rb, line 22
-def initialize(title, references, type, metasploit_modules)
-  @title              = title
-  @references         = references
-  @type               = type
-  @metasploit_modules = metasploit_modules
-end
-
- -
- - - - -
- - -
- -
- -
- - - - diff --git a/doc/WpscanOptions.html b/doc/WpscanOptions.html index 506d4412..5ba7f08d 100644 --- a/doc/WpscanOptions.html +++ b/doc/WpscanOptions.html @@ -1,286 +1,362 @@ - - - + + + - + -class WpscanOptions - RDoc Documentation + Class: WpscanOptions - - - - - - - - - - + + + + + + - - -
-

class WpscanOptions

- -
- -
- - - - -
- - - - - - -
-

Constants

-
- -
ACCESSOR_OPTIONS - -
- - -
-
- - - - - - -
-

Public Class Methods

- - -
- -
- load_from_arguments() - click to toggle source +
+
+

In Files

+ +
+ + +
+ +
+ + +
+

Parent

+ + +
+ - + + +
+ +
+

WpscanOptions

+ +
+ +
+ + + + +
+ + + + + + +
+

Constants

+
+ +
ACCESSOR_OPTIONS
+ +
+ + +
+
+ + + + + + +
+

Public Class Methods

+ + +
+ + + +
+ load_from_arguments() + click to toggle source +
+ + +
+ +

Will load the options from ARGV return WpscanOptions

- + - -
-
# File lib/wpscan/wpscan_options.rb, line 165
+            
+            
+
+# File lib/wpscan/wpscan_options.rb, line 148
 def self.load_from_arguments
   wpscan_options = WpscanOptions.new
 
@@ -292,106 +368,115 @@ href="WpscanOptions.html">WpscanOptions

wpscan_options end
-
- -
+
+ +
- - - -
- - -
- -
- new() - click to toggle source -
- - -
- - -
-
# File lib/wpscan/wpscan_options.rb, line 52
+        
+ + +
+ + + +
+ new() + click to toggle source +
+ + +
+ + + + + +
+
+# File lib/wpscan/wpscan_options.rb, line 35
 def initialize
   ACCESSOR_OPTIONS.each do |option|
     instance_variable_set("@#{option}", nil)
   end
 end
-
+
+ +
+ -
- - - -
- - -
- -
-

Protected Class Methods

- - -
- -
- clean_option(option) - click to toggle source -
- - -
-

Will removed the ‘-’ or ‘–’ chars at the beginning of option and replace +

+ + +
+ +
+

Protected Class Methods

+ + +
+ + + +
+ clean_option(option) + click to toggle source +
+ + +
+ +

Will removed the ‘-’ or ‘–’ chars at the beginning of option and replace any remaining ‘-’ by ‘_’

param string option return string

- + - -
-
# File lib/wpscan/wpscan_options.rb, line 263
+            
+            
+
+# File lib/wpscan/wpscan_options.rb, line 246
 def self.clean_option(option)
-  cleaned_option = option.gsub(%r^--?/, '')
-  cleaned_option.gsub(%r-/, '_')
+  cleaned_option = option.gsub(/^--?/, '')
+  cleaned_option.gsub(/-/, '_')
 end
-
+
+ +
+ -
- - - -
- - -
- -
- get_opt_long() - click to toggle source -
- - -
-

Even if a short option is given (IE : -u), the long one will be returned +

+ + +
+ + + +
+ get_opt_long() + click to toggle source +
+ + +
+ +

Even if a short option is given (IE : -u), the long one will be returned (IE : –url)

- + - -
-
# File lib/wpscan/wpscan_options.rb, line 232
+            
+            
+
+# File lib/wpscan/wpscan_options.rb, line 215
 def self.get_opt_long
   GetoptLong.new(
     ['--url', '-u', GetoptLong::REQUIRED_ARGUMENT],
@@ -413,133 +498,145 @@ any remaining ‘-’ by ‘_’

['--basic-auth', GetoptLong::REQUIRED_ARGUMENT] ) end
-
- -
+
+ +
- - - -
- - -
- -
- is_long_option?(option) - click to toggle source -
- - -
- - -
-
# File lib/wpscan/wpscan_options.rb, line 254
+        
+ + +
+ + + +
+ is_long_option?(option) + click to toggle source +
+ + +
+ + + + + +
+
+# File lib/wpscan/wpscan_options.rb, line 237
 def self.is_long_option?(option)
   ACCESSOR_OPTIONS.include?(:"#{WpscanOptions.clean_option(option)}")
 end
-
- -
+
+ +
- - - -
- - -
- -
- option_to_instance_variable_setter(option) - click to toggle source -
- - -
- - -
-
# File lib/wpscan/wpscan_options.rb, line 268
+        
+ + +
+ + + +
+ option_to_instance_variable_setter(option) + click to toggle source +
+ + +
+ + + + + +
+
+# File lib/wpscan/wpscan_options.rb, line 251
 def self.option_to_instance_variable_setter(option)
   cleaned_option = WpscanOptions.clean_option(option)
-  option_syms = ACCESSOR_OPTIONS.grep(%r{^#{cleaned_option}$})
+  option_syms = ACCESSOR_OPTIONS.grep(%{^#{cleaned_option}$})
 
   option_syms.length == 1 ? :"#{option_syms.at(0)}=" : nil
 end
-
+
+ +
+ -
- - - -
+ +
+ + - - -
-

Public Instance Methods

+
+

Public Instance Methods

- -
- -
- basic_auth=(basic_auth) - click to toggle source -
- - -
- - - + +
+ -
-
# File lib/wpscan/wpscan_options.rb, line 140
+          
+ basic_auth=(basic_auth) + click to toggle source +
+ + +
+ + + + + +
+
+# File lib/wpscan/wpscan_options.rb, line 123
 def basic_auth=(basic_auth)
   raise 'Invalid basic authentication format, login:password expected' if basic_auth.index(':').nil?
   @basic_auth = "Basic #{Base64.encode64(basic_auth).chomp}"
 end
-
- -
+
+ +
- - - -
- - -
- -
- enumerate_all_plugins=(enumerate_all_plugins) - click to toggle source -
- - -
- - -
-
# File lib/wpscan/wpscan_options.rb, line 108
+        
+ + +
+ + + +
+ enumerate_all_plugins=(enumerate_all_plugins) + click to toggle source +
+ + +
+ + + + + +
+
+# File lib/wpscan/wpscan_options.rb, line 91
 def enumerate_all_plugins=(enumerate_all_plugins)
   if enumerate_all_plugins === true and (@enumerate_plugins === true or @enumerate_only_vulnerable_plugins === true)
     raise 'Please choose only one plugin enumeration option'
@@ -547,33 +644,36 @@ any remaining ‘-’ by ‘_’

@enumerate_all_plugins = enumerate_all_plugins end end
-
- -
+
+ +
- - - -
- - -
- -
- enumerate_all_themes=(enumerate_all_themes) - click to toggle source -
- - -
- - -
-
# File lib/wpscan/wpscan_options.rb, line 132
+        
+ + +
+ + + +
+ enumerate_all_themes=(enumerate_all_themes) + click to toggle source +
+ + +
+ + + + + +
+
+# File lib/wpscan/wpscan_options.rb, line 115
 def enumerate_all_themes=(enumerate_all_themes)
   if enumerate_all_themes === true and (@enumerate_themes === true or @enumerate_only_vulnerable_themes === true)
     raise 'Please choose only one theme enumeration option'
@@ -581,33 +681,36 @@ any remaining ‘-’ by ‘_’

@enumerate_all_themes = enumerate_all_themes end end
-
- -
+
+ +
- - - -
- - -
- -
- enumerate_only_vulnerable_plugins=(enumerate_only_vulnerable_plugins) - click to toggle source -
- - -
- - -
-
# File lib/wpscan/wpscan_options.rb, line 100
+        
+ + +
+ + + +
+ enumerate_only_vulnerable_plugins=(enumerate_only_vulnerable_plugins) + click to toggle source +
+ + +
+ + + + + +
+
+# File lib/wpscan/wpscan_options.rb, line 83
 def enumerate_only_vulnerable_plugins=(enumerate_only_vulnerable_plugins)
   if enumerate_only_vulnerable_plugins === true and (@enumerate_all_plugins === true or @enumerate_plugins === true)
     raise 'Please choose only one plugin enumeration option'
@@ -615,33 +718,36 @@ any remaining ‘-’ by ‘_’

@enumerate_only_vulnerable_plugins = enumerate_only_vulnerable_plugins end end
-
- -
+
+ +
- - - -
- - -
- -
- enumerate_only_vulnerable_themes=(enumerate_only_vulnerable_themes) - click to toggle source -
- - -
- - -
-
# File lib/wpscan/wpscan_options.rb, line 124
+        
+ + +
+ + + +
+ enumerate_only_vulnerable_themes=(enumerate_only_vulnerable_themes) + click to toggle source +
+ + +
+ + + + + +
+
+# File lib/wpscan/wpscan_options.rb, line 107
 def enumerate_only_vulnerable_themes=(enumerate_only_vulnerable_themes)
   if enumerate_only_vulnerable_themes === true and (@enumerate_all_themes === true or @enumerate_themes === true)
     raise 'Please choose only one theme enumeration option'
@@ -649,37 +755,40 @@ any remaining ‘-’ by ‘_’

@enumerate_only_vulnerable_themes = enumerate_only_vulnerable_themes end end
-
+
+ +
+ -
- - - -
- - -
- -
- enumerate_options_from_string(value) - click to toggle source -
- - -
-

Will set enumerate_* from the string value IE : if value = vp => +

+ + +
+ + + +
+ enumerate_options_from_string(value) + click to toggle source +
+ + +
+ +

Will set enumerate_* from the string value IE : if value = vp => :enumerate_only_vulnerable_plugins will be set to true multiple enumeration are possible : ‘u,p’ => :enumerate_usernames and :enumerate_plugins Special case for usernames, a range is possible : u will enumerate usernames from 1 to 10

- + - -
-
# File lib/wpscan/wpscan_options.rb, line 200
+            
+            
+
+# File lib/wpscan/wpscan_options.rb, line 183
 def enumerate_options_from_string(value)
   # Usage of self is mandatory because there are overridden setters
 
@@ -699,43 +808,46 @@ href="http://1-10">u will enumerate usernames from 1 to 10

self.enumerate_all_themes = true if value.include?('at') - value.grep(%r^u/) do |username_enum_value| + value.grep(/^u/) do |username_enum_value| @enumerate_usernames = true # Check for usernames range - matches = %r{\[([\d]+)-([\d]+)\]}.match(username_enum_value) + matches = %{\[([\d]+)-([\d]+)\]}.match(username_enum_value) if matches @enumerate_usernames_range = (matches[1].to_i..matches[2].to_i) end end end
-
- -
+
+ +
- - - -
- - -
- -
- enumerate_plugins=(enumerate_plugins) - click to toggle source -
- - -
- - -
-
# File lib/wpscan/wpscan_options.rb, line 92
+        
+ + +
+ + + +
+ enumerate_plugins=(enumerate_plugins) + click to toggle source +
+ + +
+ + + + + +
+
+# File lib/wpscan/wpscan_options.rb, line 75
 def enumerate_plugins=(enumerate_plugins)
   if enumerate_plugins === true and (@enumerate_all_plugins === true or @enumerate_only_vulnerable_plugins === true)
     raise 'Please choose only one plugin enumeration option'
@@ -743,33 +855,36 @@ href="http://1-10">u will enumerate usernames from 1 to 10

@enumerate_plugins = enumerate_plugins end end
-
- -
+
+ +
- - - -
- - -
- -
- enumerate_themes=(enumerate_themes) - click to toggle source -
- - -
- - -
-
# File lib/wpscan/wpscan_options.rb, line 116
+        
+ + +
+ + + +
+ enumerate_themes=(enumerate_themes) + click to toggle source +
+ + +
+ + + + + +
+
+# File lib/wpscan/wpscan_options.rb, line 99
 def enumerate_themes=(enumerate_themes)
   if enumerate_themes === true and (@enumerate_all_themes === true or @enumerate_only_vulnerable_themes === true)
     raise 'Please choose only one theme enumeration option'
@@ -777,63 +892,69 @@ href="http://1-10">u will enumerate usernames from 1 to 10

@enumerate_themes = enumerate_themes end end
-
- -
+
+ +
- - - -
- - -
- -
- has_options?() - click to toggle source -
- - -
- - -
-
# File lib/wpscan/wpscan_options.rb, line 145
+        
+ + +
+ + + +
+ has_options?() + click to toggle source +
+ + +
+ + + + + +
+
+# File lib/wpscan/wpscan_options.rb, line 128
 def has_options?
   !to_h.empty?
 end
-
- -
+
+ +
- - - -
- - -
- -
- proxy=(proxy) - click to toggle source -
- - -
- - -
-
# File lib/wpscan/wpscan_options.rb, line 76
+        
+ + +
+ + + +
+ proxy=(proxy) + click to toggle source +
+ + +
+ + + + + +
+
+# File lib/wpscan/wpscan_options.rb, line 59
 def proxy=(proxy)
   if proxy.index(':') == nil
     raise 'Invalid proxy format. Should be host:port.'
@@ -841,33 +962,36 @@ href="http://1-10">u will enumerate usernames from 1 to 10

@proxy = proxy end end
-
- -
+
+ +
- - - -
- - -
- -
- proxy_auth=(auth) - click to toggle source -
- - -
- - -
-
# File lib/wpscan/wpscan_options.rb, line 84
+        
+ + +
+ + + +
+ proxy_auth=(auth) + click to toggle source +
+ + +
+ + + + + +
+
+# File lib/wpscan/wpscan_options.rb, line 67
 def proxy_auth=(auth)
   if auth.index(':') == nil
     raise 'Invalid proxy auth format, username:password expected'
@@ -875,34 +999,37 @@ href="http://1-10">u will enumerate usernames from 1 to 10

@proxy_auth = auth end end
-
+
+ +
+ -
- - - -
- - -
- -
- set_option_from_cli(cli_option, cli_value) - click to toggle source -
- - -
-

string cli_option : –url, -u, –proxy etc string cli_value : the option +

+ + +
+ + + +
+ set_option_from_cli(cli_option, cli_value) + click to toggle source +
+ + +
+ +

string cli_option : –url, -u, –proxy etc string cli_value : the option value

- + - -
-
# File lib/wpscan/wpscan_options.rb, line 179
+            
+            
+
+# File lib/wpscan/wpscan_options.rb, line 162
 def set_option_from_cli(cli_option, cli_value)
 
   if WpscanOptions.is_long_option?(cli_option)
@@ -919,63 +1046,69 @@ value

raise "Unknow option : #{cli_option} with value #{cli_value}" end end
-
- -
+
+ +
- - - -
- - -
- -
- threads=(threads) - click to toggle source -
- - -
- - -
-
# File lib/wpscan/wpscan_options.rb, line 64
+        
+ + +
+ + + +
+ threads=(threads) + click to toggle source +
+ + +
+ + + + + +
+
+# File lib/wpscan/wpscan_options.rb, line 47
 def threads=(threads)
   @threads = threads.is_a?(Integer) ? threads : threads.to_i
 end
-
- -
+
+ +
- - - -
- - -
- -
- to_h() - click to toggle source -
- - -
- -

return Hash

-
-
# File lib/wpscan/wpscan_options.rb, line 150
+        
+ + +
+ + + +
+ to_h() + click to toggle source +
+ + +
+ +

return Hash

+ + + +
+
+# File lib/wpscan/wpscan_options.rb, line 133
 def to_h
   options = {}
 
@@ -988,65 +1121,71 @@ value

end options end
-
- -
+
+ +
- - - -
- - -
- -
- url=(url) - click to toggle source -
- - -
- - -
-
# File lib/wpscan/wpscan_options.rb, line 58
+        
+ + +
+ + + +
+ url=(url) + click to toggle source +
+ + +
+ + + + + +
+
+# File lib/wpscan/wpscan_options.rb, line 41
 def url=(url)
   raise 'Empty URL given' if !url
 
   @url = URI.parse(add_http_protocol(url)).to_s
 end
-
- -
+
+ +
- - - -
- - -
- -
- wordlist=(wordlist) - click to toggle source -
- - -
- - -
-
# File lib/wpscan/wpscan_options.rb, line 68
+        
+ + +
+ + + +
+ wordlist=(wordlist) + click to toggle source +
+ + +
+ + + + + +
+
+# File lib/wpscan/wpscan_options.rb, line 51
 def wordlist=(wordlist)
   if File.exists?(wordlist)
     @wordlist = wordlist
@@ -1054,26 +1193,29 @@ value

raise "The file #{wordlist} does not exist" end end
-
+
+ +
+ -
- - - -
+ +
+ +
-
+ - - + +
+

[Validate]

+

Generated with the Darkfish + Rdoc Generator 2.

+
- + + diff --git a/doc/created.rid b/doc/created.rid index 902e9de0..69060591 100644 --- a/doc/created.rid +++ b/doc/created.rid @@ -1,47 +1,75 @@ -Sun, 27 Jan 2013 01:14:27 +0100 -./CREDITS Fri, 11 Jan 2013 21:40:57 +0100 -./Gemfile Wed, 09 Jan 2013 21:35:00 +0100 -./lib/browser.rb Thu, 24 Jan 2013 22:19:29 +0100 -./lib/cache_file_store.rb Thu, 24 Jan 2013 22:19:29 +0100 -./lib/common/custom_option_parser.rb Thu, 24 Jan 2013 22:19:29 +0100 -./lib/common/plugins/plugin.rb Thu, 24 Jan 2013 22:19:29 +0100 -./lib/common/plugins/plugins.rb Thu, 24 Jan 2013 22:19:29 +0100 -./lib/common_helper.rb Thu, 24 Jan 2013 22:19:29 +0100 -./lib/environment.rb Thu, 24 Jan 2013 22:19:29 +0100 -./lib/updater/git_updater.rb Thu, 24 Jan 2013 22:19:29 +0100 -./lib/updater/svn_updater.rb Thu, 24 Jan 2013 22:19:29 +0100 -./lib/updater/updater.rb Thu, 24 Jan 2013 22:19:29 +0100 -./lib/updater/updater_factory.rb Thu, 24 Jan 2013 22:19:29 +0100 -./lib/wpscan/modules/brute_force.rb Sun, 27 Jan 2013 00:31:13 +0100 -./lib/wpscan/modules/malwares.rb Thu, 24 Jan 2013 22:19:29 +0100 -./lib/wpscan/modules/web_site.rb Thu, 24 Jan 2013 22:19:29 +0100 -./lib/wpscan/modules/wp_config_backup.rb Thu, 24 Jan 2013 22:19:29 +0100 -./lib/wpscan/modules/wp_full_path_disclosure.rb Thu, 24 Jan 2013 22:19:29 +0100 -./lib/wpscan/modules/wp_login_protection.rb Thu, 24 Jan 2013 22:19:29 +0100 -./lib/wpscan/modules/wp_plugins.rb Thu, 24 Jan 2013 22:19:29 +0100 -./lib/wpscan/modules/wp_readme.rb Thu, 24 Jan 2013 22:19:29 +0100 -./lib/wpscan/modules/wp_themes.rb Thu, 24 Jan 2013 22:19:29 +0100 -./lib/wpscan/modules/wp_timthumbs.rb Thu, 24 Jan 2013 22:19:29 +0100 -./lib/wpscan/modules/wp_usernames.rb Thu, 24 Jan 2013 22:19:29 +0100 -./lib/wpscan/vulnerable.rb Thu, 24 Jan 2013 22:19:29 +0100 -./lib/wpscan/wp_detector.rb Thu, 24 Jan 2013 22:19:29 +0100 -./lib/wpscan/wp_enumerator.rb Thu, 24 Jan 2013 22:19:29 +0100 -./lib/wpscan/wp_item.rb Fri, 25 Jan 2013 22:39:51 +0100 -./lib/wpscan/wp_options.rb Thu, 24 Jan 2013 22:19:29 +0100 -./lib/wpscan/wp_plugin.rb Thu, 24 Jan 2013 22:19:29 +0100 -./lib/wpscan/wp_target.rb Thu, 24 Jan 2013 22:19:29 +0100 -./lib/wpscan/wp_theme.rb Thu, 24 Jan 2013 22:19:29 +0100 -./lib/wpscan/wp_user.rb Thu, 24 Jan 2013 22:19:29 +0100 -./lib/wpscan/wp_version.rb Thu, 24 Jan 2013 22:19:29 +0100 -./lib/wpscan/wp_vulnerability.rb Thu, 24 Jan 2013 22:19:29 +0100 -./lib/wpscan/wpscan_helper.rb Thu, 24 Jan 2013 22:19:29 +0100 -./lib/wpscan/wpscan_options.rb Thu, 24 Jan 2013 22:19:29 +0100 -./lib/wpstools/plugins/checker/checker_plugin.rb Thu, 24 Jan 2013 22:19:29 +0100 -./lib/wpstools/plugins/list_generator/generate_list.rb Thu, 24 Jan 2013 22:19:29 +0100 -./lib/wpstools/plugins/list_generator/list_generator_plugin.rb Thu, 24 Jan 2013 22:19:29 +0100 -./lib/wpstools/plugins/list_generator/svn_parser.rb Thu, 24 Jan 2013 22:19:29 +0100 -./lib/wpstools/wpstools_helper.rb Thu, 24 Jan 2013 22:19:29 +0100 -./log.txt Sun, 27 Jan 2013 00:31:06 +0100 -./README Sat, 19 Jan 2013 18:50:05 +0100 -./wpscan.rb Thu, 24 Jan 2013 22:19:29 +0100 -./wpstools.rb Thu, 24 Jan 2013 22:19:29 +0100 +Fri, 05 Apr 2013 14:38:41 +0200 +./lib/wpscan/web_site.rb Fri, 05 Apr 2013 14:07:07 +0200 +./lib/wpscan/modules/wp_full_path_disclosure.rb Fri, 05 Apr 2013 14:07:07 +0200 +./lib/wpscan/modules/wp_config_backup.rb Fri, 05 Apr 2013 14:07:07 +0200 +./lib/wpscan/modules/malwares.rb Fri, 05 Apr 2013 14:07:07 +0200 +./lib/wpscan/modules/wp_readme.rb Fri, 05 Apr 2013 14:07:07 +0200 +./lib/wpscan/modules/wp_login_protection.rb Fri, 05 Apr 2013 14:07:07 +0200 +./lib/wpscan/modules/brute_force.rb Fri, 05 Apr 2013 14:07:07 +0200 +./lib/wpscan/wp_target.rb Fri, 05 Apr 2013 14:07:07 +0200 +./lib/wpscan/wpscan_options.rb Fri, 05 Apr 2013 14:07:07 +0200 +./lib/wpscan/wpscan_helper.rb Fri, 05 Apr 2013 14:07:07 +0200 +./lib/common/cache_file_store.rb Fri, 05 Apr 2013 14:07:06 +0200 +./lib/common/typhoeus_cache.rb Fri, 05 Apr 2013 14:07:07 +0200 +./lib/common/browser.rb Fri, 05 Apr 2013 14:07:06 +0200 +./lib/common/models/vulnerability.rb Fri, 05 Apr 2013 14:07:06 +0200 +./lib/common/models/wp_timthumb.rb Fri, 05 Apr 2013 14:07:07 +0200 +./lib/common/models/wp_version/output.rb Fri, 05 Apr 2013 14:07:07 +0200 +./lib/common/models/wp_version/findable.rb Fri, 05 Apr 2013 14:07:07 +0200 +./lib/common/models/wp_version/vulnerable.rb Fri, 05 Apr 2013 14:07:07 +0200 +./lib/common/models/wp_timthumb/output.rb Fri, 05 Apr 2013 14:07:07 +0200 +./lib/common/models/wp_timthumb/versionable.rb Fri, 05 Apr 2013 14:07:07 +0200 +./lib/common/models/wp_timthumb/existable.rb Fri, 05 Apr 2013 14:07:07 +0200 +./lib/common/models/wp_theme.rb Fri, 05 Apr 2013 14:07:07 +0200 +./lib/common/models/wp_user/existable.rb Fri, 05 Apr 2013 14:07:07 +0200 +./lib/common/models/wp_theme/findable.rb Fri, 05 Apr 2013 14:07:07 +0200 +./lib/common/models/wp_theme/versionable.rb Fri, 05 Apr 2013 14:07:07 +0200 +./lib/common/models/wp_theme/vulnerable.rb Fri, 05 Apr 2013 14:07:07 +0200 +./lib/common/models/wp_item/output.rb Fri, 05 Apr 2013 14:07:06 +0200 +./lib/common/models/wp_item/findable.rb Fri, 05 Apr 2013 14:07:06 +0200 +./lib/common/models/wp_item/infos.rb Fri, 05 Apr 2013 14:07:06 +0200 +./lib/common/models/wp_item/versionable.rb Fri, 05 Apr 2013 14:07:06 +0200 +./lib/common/models/wp_item/existable.rb Fri, 05 Apr 2013 14:07:06 +0200 +./lib/common/models/wp_item/vulnerable.rb Fri, 05 Apr 2013 14:07:07 +0200 +./lib/common/models/wp_plugin.rb Fri, 05 Apr 2013 14:07:07 +0200 +./lib/common/models/wp_plugin/vulnerable.rb Fri, 05 Apr 2013 14:07:07 +0200 +./lib/common/models/wp_item.rb Fri, 05 Apr 2013 14:07:06 +0200 +./lib/common/models/wp_version.rb Fri, 05 Apr 2013 14:07:07 +0200 +./lib/common/models/vulnerability/output.rb Fri, 05 Apr 2013 14:07:06 +0200 +./lib/common/models/wp_user.rb Fri, 05 Apr 2013 14:07:07 +0200 +./lib/common/common_helper.rb Fri, 05 Apr 2013 14:07:06 +0200 +./lib/common/collections/wp_users.rb Fri, 05 Apr 2013 14:07:06 +0200 +./lib/common/collections/wp_plugins/detectable.rb Fri, 05 Apr 2013 14:07:06 +0200 +./lib/common/collections/vulnerabilities.rb Fri, 05 Apr 2013 14:07:06 +0200 +./lib/common/collections/vulnerabilities/output.rb Fri, 05 Apr 2013 14:07:06 +0200 +./lib/common/collections/wp_themes.rb Fri, 05 Apr 2013 14:07:06 +0200 +./lib/common/collections/wp_items/output.rb Fri, 05 Apr 2013 14:07:06 +0200 +./lib/common/collections/wp_items/detectable.rb Fri, 05 Apr 2013 14:07:06 +0200 +./lib/common/collections/wp_themes/detectable.rb Fri, 05 Apr 2013 14:07:06 +0200 +./lib/common/collections/wp_items.rb Fri, 05 Apr 2013 14:07:06 +0200 +./lib/common/collections/wp_plugins.rb Fri, 05 Apr 2013 14:07:06 +0200 +./lib/common/collections/wp_users/output.rb Fri, 05 Apr 2013 14:07:06 +0200 +./lib/common/collections/wp_users/detectable.rb Fri, 05 Apr 2013 14:07:06 +0200 +./lib/common/collections/wp_timthumbs.rb Fri, 05 Apr 2013 14:07:06 +0200 +./lib/common/collections/wp_timthumbs/detectable.rb Fri, 05 Apr 2013 14:07:06 +0200 +./lib/common/plugins/plugins.rb Fri, 05 Apr 2013 14:07:07 +0200 +./lib/common/plugins/plugin.rb Fri, 05 Apr 2013 14:07:07 +0200 +./lib/common/hacks.rb Fri, 05 Apr 2013 14:07:06 +0200 +./lib/common/custom_option_parser.rb Fri, 05 Apr 2013 14:07:06 +0200 +./lib/common/updater/updater_factory.rb Fri, 05 Apr 2013 14:07:07 +0200 +./lib/common/updater/git_updater.rb Fri, 05 Apr 2013 14:07:07 +0200 +./lib/common/updater/updater.rb Fri, 05 Apr 2013 14:07:07 +0200 +./lib/common/updater/svn_updater.rb Fri, 05 Apr 2013 14:07:07 +0200 +./lib/environment.rb Fri, 05 Apr 2013 14:07:07 +0200 +./lib/wpstools/plugins/list_generator/svn_parser.rb Fri, 05 Apr 2013 14:07:07 +0200 +./lib/wpstools/plugins/list_generator/generate_list.rb Fri, 05 Apr 2013 14:07:07 +0200 +./lib/wpstools/plugins/list_generator/list_generator_plugin.rb Fri, 05 Apr 2013 14:07:07 +0200 +./lib/wpstools/plugins/checker/checker_plugin.rb Fri, 05 Apr 2013 14:07:07 +0200 +./lib/wpstools/plugins/stats/stats_plugin.rb Fri, 05 Apr 2013 14:07:07 +0200 +./lib/wpstools/wpstools_helper.rb Fri, 05 Apr 2013 14:07:07 +0200 +./Gemfile Mon, 18 Mar 2013 10:03:40 +0100 +./README Wed, 03 Apr 2013 18:50:11 +0200 +./CREDITS Wed, 30 Jan 2013 14:08:28 +0100 +./wpscan.rb Fri, 05 Apr 2013 14:15:07 +0200 +./wpstools.rb Fri, 05 Apr 2013 14:07:07 +0200 +./LICENSE Fri, 05 Apr 2013 14:07:06 +0200 diff --git a/doc/images/add.png b/doc/images/add.png deleted file mode 100755 index 6332fefe..00000000 Binary files a/doc/images/add.png and /dev/null differ diff --git a/doc/images/delete.png b/doc/images/delete.png deleted file mode 100755 index 08f24936..00000000 Binary files a/doc/images/delete.png and /dev/null differ diff --git a/doc/images/tag_blue.png b/doc/images/tag_blue.png deleted file mode 100755 index 3f02b5f8..00000000 Binary files a/doc/images/tag_blue.png and /dev/null differ diff --git a/doc/images/transparent.png b/doc/images/transparent.png deleted file mode 100644 index d665e179..00000000 Binary files a/doc/images/transparent.png and /dev/null differ diff --git a/doc/index.html b/doc/index.html index 3576f3bb..de70c482 100644 --- a/doc/index.html +++ b/doc/index.html @@ -1,160 +1,728 @@ - + + - + - + -RDoc Documentation + RDoc Documentation - + - + + + + - - - - - - + + + +

RDoc Documentation

- - - -

This is the API documentation for RDoc Documentation. - - -

- + + diff --git a/doc/js/darkfish.js b/doc/js/darkfish.js index 4be722fa..84565c1e 100644 --- a/doc/js/darkfish.js +++ b/doc/js/darkfish.js @@ -9,12 +9,12 @@ /* Provide console simulation for firebug-less environments */ if (!("console" in window) || !("firebug" in console)) { - var names = ["log", "debug", "info", "warn", "error", "assert", "dir", "dirxml", + var names = ["log", "debug", "info", "warn", "error", "assert", "dir", "dirxml", "group", "groupEnd", "time", "timeEnd", "count", "trace", "profile", "profileEnd"]; - window.console = {}; - for (var i = 0; i < names.length; ++i) - window.console[names[i]] = function() {}; + window.console = {}; + for (var i = 0; i < names.length; ++i) + window.console[names[i]] = function() {}; }; @@ -23,131 +23,94 @@ if (!("console" in window) || !("firebug" in console)) { */ $.fn.unwrap = function( expr ) { return this.each( function() { - $(this).parents( expr ).eq( 0 ).after( this ).remove(); + $(this).parents( expr ).eq( 0 ).after( this ).remove(); }); }; function showSource( e ) { - var target = e.target; - var codeSections = $(target). - parents('.method-detail'). - find('.method-source-code'); + var target = e.target; + var codeSections = $(target). + parents('.method-detail'). + find('.method-source-code'); - $(target). - parents('.method-detail'). - find('.method-source-code'). - slideToggle(); + $(target). + parents('.method-detail'). + find('.method-source-code'). + slideToggle(); }; function hookSourceViews() { - $('.method-heading').click( showSource ); + $('.method-description,.method-heading').click( showSource ); }; function toggleDebuggingSection() { - $('.debugging-section').slideToggle(); + $('.debugging-section').slideToggle(); }; function hookDebuggingToggle() { - $('#debugging-toggle img').click( toggleDebuggingSection ); + $('#debugging-toggle img').click( toggleDebuggingSection ); }; -function hookTableOfContentsToggle() { - $('.indexpage li .toc-toggle').each( function() { - $(this).click( function() { - $(this).toggleClass('open'); - }); +function hookQuickSearch() { + $('.quicksearch-field').each( function() { + var searchElems = $(this).parents('.section').find( 'li' ); + var toggle = $(this).parents('.section').find('h3 .search-toggle'); + // console.debug( "Toggle is: %o", toggle ); + var qsbox = $(this).parents('form').get( 0 ); - var section = $(this).next(); - - $(this).click( function() { - section.slideToggle(); - }); - }); -} - -function hookSearch() { - var input = $('#search-field').eq(0); - var result = $('#search-results').eq(0); - $(result).show(); - - var search_section = $('#search-section').get(0); - $(search_section).show(); - - var search = new Search(search_data, input, result); - - search.renderItem = function(result) { - var li = document.createElement('li'); - var html = ''; - - // TODO add relative path to + + + + + + +
+
+
Last Modified
+
2013-04-05 14:07:06 +0200
+ + +
Requires
+
+
    + +
  • common/typhoeus_cache
  • + +
+
+ + + +
+
+ +
+ +
+

Description

+ +
+ +
+ + + diff --git a/doc/lib/common/cache_file_store_rb.html b/doc/lib/common/cache_file_store_rb.html new file mode 100644 index 00000000..5c13ce08 --- /dev/null +++ b/doc/lib/common/cache_file_store_rb.html @@ -0,0 +1,61 @@ + + + + + + + + File: cache_file_store.rb [RDoc Documentation] + + + + + + + + + + +
+
+
Last Modified
+
2013-04-05 14:07:06 +0200
+ + +
Requires
+
+
    + +
  • yaml
  • + +
+
+ + + +
+
+ +
+ +
+

Description

+ +

> @todo take consideration of the cache_timeout :

+ +
-> create 2 files per key : one for the data storage (key.store ?)
+   and the other for the cache timeout (key.expiration, key.timeout ?)
+or 1 file for all timeouts ?
+-> 2 dirs : 1 for storage, the other for cache_timeout ?
+ +
+ +
+ + + diff --git a/doc/lib/common/collections/vulnerabilities/output_rb.html b/doc/lib/common/collections/vulnerabilities/output_rb.html new file mode 100644 index 00000000..1420343a --- /dev/null +++ b/doc/lib/common/collections/vulnerabilities/output_rb.html @@ -0,0 +1,52 @@ + + + + + + + + File: output.rb [RDoc Documentation] + + + + + + + + + + +
+
+
Last Modified
+
2013-04-05 14:07:06 +0200
+ + +
Requires
+
+
    + +
+
+ + + +
+
+ +
+ +
+

Description

+ +
+ +
+ + + diff --git a/doc/lib/common/collections/vulnerabilities_rb.html b/doc/lib/common/collections/vulnerabilities_rb.html new file mode 100644 index 00000000..415c5fc7 --- /dev/null +++ b/doc/lib/common/collections/vulnerabilities_rb.html @@ -0,0 +1,54 @@ + + + + + + + + File: vulnerabilities.rb [RDoc Documentation] + + + + + + + + + + +
+
+
Last Modified
+
2013-04-05 14:07:06 +0200
+ + +
Requires
+
+
    + +
  • common/collections/vulnerabilities/output
  • + +
+
+ + + +
+
+ +
+ +
+

Description

+ +
+ +
+ + + diff --git a/doc/lib/common/collections/wp_items/detectable_rb.html b/doc/lib/common/collections/wp_items/detectable_rb.html new file mode 100644 index 00000000..733650c9 --- /dev/null +++ b/doc/lib/common/collections/wp_items/detectable_rb.html @@ -0,0 +1,52 @@ + + + + + + + + File: detectable.rb [RDoc Documentation] + + + + + + + + + + +
+
+
Last Modified
+
2013-04-05 14:07:06 +0200
+ + +
Requires
+
+
    + +
+
+ + + +
+
+ +
+ +
+

Description

+ +
+ +
+ + + diff --git a/doc/lib/common/collections/wp_items/output_rb.html b/doc/lib/common/collections/wp_items/output_rb.html new file mode 100644 index 00000000..1420343a --- /dev/null +++ b/doc/lib/common/collections/wp_items/output_rb.html @@ -0,0 +1,52 @@ + + + + + + + + File: output.rb [RDoc Documentation] + + + + + + + + + + +
+
+
Last Modified
+
2013-04-05 14:07:06 +0200
+ + +
Requires
+
+
    + +
+
+ + + +
+
+ +
+ +
+

Description

+ +
+ +
+ + + diff --git a/doc/lib/common/collections/wp_items_rb.html b/doc/lib/common/collections/wp_items_rb.html new file mode 100644 index 00000000..00d9f48c --- /dev/null +++ b/doc/lib/common/collections/wp_items_rb.html @@ -0,0 +1,56 @@ + + + + + + + + File: wp_items.rb [RDoc Documentation] + + + + + + + + + + +
+
+
Last Modified
+
2013-04-05 14:07:06 +0200
+ + +
Requires
+
+
    + +
  • common/collections/wp_items/detectable
  • + +
  • common/collections/wp_items/output
  • + +
+
+ + + +
+
+ +
+ +
+

Description

+ +
+ +
+ + + diff --git a/doc/lib/common/collections/wp_plugins/detectable_rb.html b/doc/lib/common/collections/wp_plugins/detectable_rb.html new file mode 100644 index 00000000..733650c9 --- /dev/null +++ b/doc/lib/common/collections/wp_plugins/detectable_rb.html @@ -0,0 +1,52 @@ + + + + + + + + File: detectable.rb [RDoc Documentation] + + + + + + + + + + +
+
+
Last Modified
+
2013-04-05 14:07:06 +0200
+ + +
Requires
+
+
    + +
+
+ + + +
+
+ +
+ +
+

Description

+ +
+ +
+ + + diff --git a/doc/lib/common/collections/wp_plugins_rb.html b/doc/lib/common/collections/wp_plugins_rb.html new file mode 100644 index 00000000..52295cbd --- /dev/null +++ b/doc/lib/common/collections/wp_plugins_rb.html @@ -0,0 +1,54 @@ + + + + + + + + File: wp_plugins.rb [RDoc Documentation] + + + + + + + + + + +
+
+
Last Modified
+
2013-04-05 14:07:06 +0200
+ + +
Requires
+
+
    + +
  • common/collections/wp_plugins/detectable
  • + +
+
+ + + +
+
+ +
+ +
+

Description

+ +
+ +
+ + + diff --git a/doc/lib/common/collections/wp_themes/detectable_rb.html b/doc/lib/common/collections/wp_themes/detectable_rb.html new file mode 100644 index 00000000..733650c9 --- /dev/null +++ b/doc/lib/common/collections/wp_themes/detectable_rb.html @@ -0,0 +1,52 @@ + + + + + + + + File: detectable.rb [RDoc Documentation] + + + + + + + + + + +
+
+
Last Modified
+
2013-04-05 14:07:06 +0200
+ + +
Requires
+
+
    + +
+
+ + + +
+
+ +
+ +
+

Description

+ +
+ +
+ + + diff --git a/doc/lib/common/collections/wp_themes_rb.html b/doc/lib/common/collections/wp_themes_rb.html new file mode 100644 index 00000000..31e907b4 --- /dev/null +++ b/doc/lib/common/collections/wp_themes_rb.html @@ -0,0 +1,54 @@ + + + + + + + + File: wp_themes.rb [RDoc Documentation] + + + + + + + + + + +
+
+
Last Modified
+
2013-04-05 14:07:06 +0200
+ + +
Requires
+
+
    + +
  • common/collections/wp_themes/detectable
  • + +
+
+ + + +
+
+ +
+ +
+

Description

+ +
+ +
+ + + diff --git a/doc/lib/common/collections/wp_timthumbs/detectable_rb.html b/doc/lib/common/collections/wp_timthumbs/detectable_rb.html new file mode 100644 index 00000000..733650c9 --- /dev/null +++ b/doc/lib/common/collections/wp_timthumbs/detectable_rb.html @@ -0,0 +1,52 @@ + + + + + + + + File: detectable.rb [RDoc Documentation] + + + + + + + + + + +
+
+
Last Modified
+
2013-04-05 14:07:06 +0200
+ + +
Requires
+
+
    + +
+
+ + + +
+
+ +
+ +
+

Description

+ +
+ +
+ + + diff --git a/doc/lib/common/collections/wp_timthumbs_rb.html b/doc/lib/common/collections/wp_timthumbs_rb.html new file mode 100644 index 00000000..efb66d4a --- /dev/null +++ b/doc/lib/common/collections/wp_timthumbs_rb.html @@ -0,0 +1,54 @@ + + + + + + + + File: wp_timthumbs.rb [RDoc Documentation] + + + + + + + + + + +
+
+
Last Modified
+
2013-04-05 14:07:06 +0200
+ + +
Requires
+
+
    + +
  • common/collections/wp_timthumbs/detectable
  • + +
+
+ + + +
+
+ +
+ +
+

Description

+ +
+ +
+ + + diff --git a/doc/lib/common/collections/wp_users/detectable_rb.html b/doc/lib/common/collections/wp_users/detectable_rb.html new file mode 100644 index 00000000..733650c9 --- /dev/null +++ b/doc/lib/common/collections/wp_users/detectable_rb.html @@ -0,0 +1,52 @@ + + + + + + + + File: detectable.rb [RDoc Documentation] + + + + + + + + + + +
+
+
Last Modified
+
2013-04-05 14:07:06 +0200
+ + +
Requires
+
+
    + +
+
+ + + +
+
+ +
+ +
+

Description

+ +
+ +
+ + + diff --git a/doc/lib/common/collections/wp_users/output_rb.html b/doc/lib/common/collections/wp_users/output_rb.html new file mode 100644 index 00000000..1420343a --- /dev/null +++ b/doc/lib/common/collections/wp_users/output_rb.html @@ -0,0 +1,52 @@ + + + + + + + + File: output.rb [RDoc Documentation] + + + + + + + + + + +
+
+
Last Modified
+
2013-04-05 14:07:06 +0200
+ + +
Requires
+
+
    + +
+
+ + + +
+
+ +
+ +
+

Description

+ +
+ +
+ + + diff --git a/doc/lib/common/collections/wp_users_rb.html b/doc/lib/common/collections/wp_users_rb.html new file mode 100644 index 00000000..4933389d --- /dev/null +++ b/doc/lib/common/collections/wp_users_rb.html @@ -0,0 +1,56 @@ + + + + + + + + File: wp_users.rb [RDoc Documentation] + + + + + + + + + + +
+
+
Last Modified
+
2013-04-05 14:07:06 +0200
+ + +
Requires
+
+
    + +
  • common/collections/wp_users/detectable
  • + +
  • common/collections/wp_users/output
  • + +
+
+ + + +
+
+ +
+ +
+

Description

+ +
+ +
+ + + diff --git a/doc/lib/common/common_helper_rb.html b/doc/lib/common/common_helper_rb.html new file mode 100644 index 00000000..ba0998ee --- /dev/null +++ b/doc/lib/common/common_helper_rb.html @@ -0,0 +1,54 @@ + + + + + + + + File: common_helper.rb [RDoc Documentation] + + + + + + + + + + +
+
+
Last Modified
+
2013-04-05 14:07:06 +0200
+ + +
Requires
+
+
    + +
  • environment
  • + +
+
+ + + +
+
+ +
+ +
+

Description

+ +
+ +
+ + + diff --git a/doc/lib/common/custom_option_parser_rb.html b/doc/lib/common/custom_option_parser_rb.html new file mode 100644 index 00000000..ee06e11d --- /dev/null +++ b/doc/lib/common/custom_option_parser_rb.html @@ -0,0 +1,52 @@ + + + + + + + + File: custom_option_parser.rb [RDoc Documentation] + + + + + + + + + + +
+
+
Last Modified
+
2013-04-05 14:07:06 +0200
+ + +
Requires
+
+
    + +
+
+ + + +
+
+ +
+ +
+

Description

+ +
+ +
+ + + diff --git a/doc/lib/common/hacks_rb.html b/doc/lib/common/hacks_rb.html new file mode 100644 index 00000000..0ada9ebf --- /dev/null +++ b/doc/lib/common/hacks_rb.html @@ -0,0 +1,57 @@ + + + + + + + + File: hacks.rb [RDoc Documentation] + + + + + + + + + + +
+
+
Last Modified
+
2013-04-05 14:07:06 +0200
+ + +
Requires
+
+
    + +
+
+ + + +
+
+ +
+ +
+

Description

+ +

Since ruby 1.9.2, URI::escape is obsolete See rosettacode.org/wiki/URL_encoding#Ruby +and www.ruby-forum.com/topic/207489

+ +
+ +
+ + + diff --git a/doc/lib/common/models/vulnerability/output_rb.html b/doc/lib/common/models/vulnerability/output_rb.html new file mode 100644 index 00000000..1420343a --- /dev/null +++ b/doc/lib/common/models/vulnerability/output_rb.html @@ -0,0 +1,52 @@ + + + + + + + + File: output.rb [RDoc Documentation] + + + + + + + + + + +
+
+
Last Modified
+
2013-04-05 14:07:06 +0200
+ + +
Requires
+
+
    + +
+
+ + + +
+
+ +
+ +
+

Description

+ +
+ +
+ + + diff --git a/doc/lib/common/models/vulnerability_rb.html b/doc/lib/common/models/vulnerability_rb.html new file mode 100644 index 00000000..c33a9a64 --- /dev/null +++ b/doc/lib/common/models/vulnerability_rb.html @@ -0,0 +1,54 @@ + + + + + + + + File: vulnerability.rb [RDoc Documentation] + + + + + + + + + + +
+
+
Last Modified
+
2013-04-05 14:07:06 +0200
+ + +
Requires
+
+
    + +
  • vulnerability/output
  • + +
+
+ + + +
+
+ +
+ +
+

Description

+ +
+ +
+ + + diff --git a/doc/lib/common/models/wp_item/existable_rb.html b/doc/lib/common/models/wp_item/existable_rb.html new file mode 100644 index 00000000..c4ef7522 --- /dev/null +++ b/doc/lib/common/models/wp_item/existable_rb.html @@ -0,0 +1,52 @@ + + + + + + + + File: existable.rb [RDoc Documentation] + + + + + + + + + + +
+
+
Last Modified
+
2013-04-05 14:07:06 +0200
+ + +
Requires
+
+
    + +
+
+ + + +
+
+ +
+ +
+

Description

+ +
+ +
+ + + diff --git a/doc/lib/common/models/wp_item/findable_rb.html b/doc/lib/common/models/wp_item/findable_rb.html new file mode 100644 index 00000000..16e0ff9a --- /dev/null +++ b/doc/lib/common/models/wp_item/findable_rb.html @@ -0,0 +1,52 @@ + + + + + + + + File: findable.rb [RDoc Documentation] + + + + + + + + + + +
+
+
Last Modified
+
2013-04-05 14:07:06 +0200
+ + +
Requires
+
+
    + +
+
+ + + +
+
+ +
+ +
+

Description

+ +
+ +
+ + + diff --git a/doc/lib/common/models/wp_item/infos_rb.html b/doc/lib/common/models/wp_item/infos_rb.html new file mode 100644 index 00000000..9c3e483c --- /dev/null +++ b/doc/lib/common/models/wp_item/infos_rb.html @@ -0,0 +1,52 @@ + + + + + + + + File: infos.rb [RDoc Documentation] + + + + + + + + + + +
+
+
Last Modified
+
2013-04-05 14:07:06 +0200
+ + +
Requires
+
+
    + +
+
+ + + +
+
+ +
+ +
+

Description

+ +
+ +
+ + + diff --git a/doc/lib/common/models/wp_item/output_rb.html b/doc/lib/common/models/wp_item/output_rb.html new file mode 100644 index 00000000..1420343a --- /dev/null +++ b/doc/lib/common/models/wp_item/output_rb.html @@ -0,0 +1,52 @@ + + + + + + + + File: output.rb [RDoc Documentation] + + + + + + + + + + +
+
+
Last Modified
+
2013-04-05 14:07:06 +0200
+ + +
Requires
+
+
    + +
+
+ + + +
+
+ +
+ +
+

Description

+ +
+ +
+ + + diff --git a/doc/lib/common/models/wp_item/versionable_rb.html b/doc/lib/common/models/wp_item/versionable_rb.html new file mode 100644 index 00000000..e7a007b5 --- /dev/null +++ b/doc/lib/common/models/wp_item/versionable_rb.html @@ -0,0 +1,52 @@ + + + + + + + + File: versionable.rb [RDoc Documentation] + + + + + + + + + + +
+
+
Last Modified
+
2013-04-05 14:07:06 +0200
+ + +
Requires
+
+
    + +
+
+ + + +
+
+ +
+ +
+

Description

+ +
+ +
+ + + diff --git a/doc/lib/common/models/wp_item/vulnerable_rb.html b/doc/lib/common/models/wp_item/vulnerable_rb.html new file mode 100644 index 00000000..070bd0a0 --- /dev/null +++ b/doc/lib/common/models/wp_item/vulnerable_rb.html @@ -0,0 +1,52 @@ + + + + + + + + File: vulnerable.rb [RDoc Documentation] + + + + + + + + + + +
+
+
Last Modified
+
2013-04-05 14:07:07 +0200
+ + +
Requires
+
+
    + +
+
+ + + +
+
+ +
+ +
+

Description

+ +
+ +
+ + + diff --git a/doc/lib/common/models/wp_item_rb.html b/doc/lib/common/models/wp_item_rb.html new file mode 100644 index 00000000..d364a005 --- /dev/null +++ b/doc/lib/common/models/wp_item_rb.html @@ -0,0 +1,64 @@ + + + + + + + + File: wp_item.rb [RDoc Documentation] + + + + + + + + + + +
+
+
Last Modified
+
2013-04-05 14:07:06 +0200
+ + +
Requires
+
+
    + +
  • wp_item/findable
  • + +
  • wp_item/versionable
  • + +
  • wp_item/vulnerable
  • + +
  • wp_item/existable
  • + +
  • wp_item/infos
  • + +
  • wp_item/output
  • + +
+
+ + + +
+
+ +
+ +
+

Description

+ +
+ +
+ + + diff --git a/doc/lib/common/models/wp_plugin/vulnerable_rb.html b/doc/lib/common/models/wp_plugin/vulnerable_rb.html new file mode 100644 index 00000000..070bd0a0 --- /dev/null +++ b/doc/lib/common/models/wp_plugin/vulnerable_rb.html @@ -0,0 +1,52 @@ + + + + + + + + File: vulnerable.rb [RDoc Documentation] + + + + + + + + + + +
+
+
Last Modified
+
2013-04-05 14:07:07 +0200
+ + +
Requires
+
+
    + +
+
+ + + +
+
+ +
+ +
+

Description

+ +
+ +
+ + + diff --git a/doc/lib/common/models/wp_plugin_rb.html b/doc/lib/common/models/wp_plugin_rb.html new file mode 100644 index 00000000..93faee8a --- /dev/null +++ b/doc/lib/common/models/wp_plugin_rb.html @@ -0,0 +1,54 @@ + + + + + + + + File: wp_plugin.rb [RDoc Documentation] + + + + + + + + + + +
+
+
Last Modified
+
2013-04-05 14:07:07 +0200
+ + +
Requires
+
+
    + +
  • wp_plugin/vulnerable
  • + +
+
+ + + +
+
+ +
+ +
+

Description

+ +
+ +
+ + + diff --git a/doc/lib/common/models/wp_theme/findable_rb.html b/doc/lib/common/models/wp_theme/findable_rb.html new file mode 100644 index 00000000..9b430615 --- /dev/null +++ b/doc/lib/common/models/wp_theme/findable_rb.html @@ -0,0 +1,52 @@ + + + + + + + + File: findable.rb [RDoc Documentation] + + + + + + + + + + +
+
+
Last Modified
+
2013-04-05 14:07:07 +0200
+ + +
Requires
+
+
    + +
+
+ + + +
+
+ +
+ +
+

Description

+ +
+ +
+ + + diff --git a/doc/lib/common/models/wp_theme/versionable_rb.html b/doc/lib/common/models/wp_theme/versionable_rb.html new file mode 100644 index 00000000..07786356 --- /dev/null +++ b/doc/lib/common/models/wp_theme/versionable_rb.html @@ -0,0 +1,52 @@ + + + + + + + + File: versionable.rb [RDoc Documentation] + + + + + + + + + + +
+
+
Last Modified
+
2013-04-05 14:07:07 +0200
+ + +
Requires
+
+
    + +
+
+ + + +
+
+ +
+ +
+

Description

+ +
+ +
+ + + diff --git a/doc/lib/common/models/wp_theme/vulnerable_rb.html b/doc/lib/common/models/wp_theme/vulnerable_rb.html new file mode 100644 index 00000000..070bd0a0 --- /dev/null +++ b/doc/lib/common/models/wp_theme/vulnerable_rb.html @@ -0,0 +1,52 @@ + + + + + + + + File: vulnerable.rb [RDoc Documentation] + + + + + + + + + + +
+
+
Last Modified
+
2013-04-05 14:07:07 +0200
+ + +
Requires
+
+
    + +
+
+ + + +
+
+ +
+ +
+

Description

+ +
+ +
+ + + diff --git a/doc/lib/common/models/wp_theme_rb.html b/doc/lib/common/models/wp_theme_rb.html new file mode 100644 index 00000000..b5eb7093 --- /dev/null +++ b/doc/lib/common/models/wp_theme_rb.html @@ -0,0 +1,58 @@ + + + + + + + + File: wp_theme.rb [RDoc Documentation] + + + + + + + + + + +
+
+
Last Modified
+
2013-04-05 14:07:07 +0200
+ + +
Requires
+
+
    + +
  • wp_theme/findable
  • + +
  • wp_theme/versionable
  • + +
  • wp_theme/vulnerable
  • + +
+
+ + + +
+
+ +
+ +
+

Description

+ +
+ +
+ + + diff --git a/doc/lib/common/models/wp_timthumb/existable_rb.html b/doc/lib/common/models/wp_timthumb/existable_rb.html new file mode 100644 index 00000000..e16e9c50 --- /dev/null +++ b/doc/lib/common/models/wp_timthumb/existable_rb.html @@ -0,0 +1,52 @@ + + + + + + + + File: existable.rb [RDoc Documentation] + + + + + + + + + + +
+
+
Last Modified
+
2013-04-05 14:07:07 +0200
+ + +
Requires
+
+
    + +
+
+ + + +
+
+ +
+ +
+

Description

+ +
+ +
+ + + diff --git a/doc/lib/common/models/wp_timthumb/output_rb.html b/doc/lib/common/models/wp_timthumb/output_rb.html new file mode 100644 index 00000000..2d81b0f1 --- /dev/null +++ b/doc/lib/common/models/wp_timthumb/output_rb.html @@ -0,0 +1,52 @@ + + + + + + + + File: output.rb [RDoc Documentation] + + + + + + + + + + +
+
+
Last Modified
+
2013-04-05 14:07:07 +0200
+ + +
Requires
+
+
    + +
+
+ + + +
+
+ +
+ +
+

Description

+ +
+ +
+ + + diff --git a/doc/lib/common/models/wp_timthumb/versionable_rb.html b/doc/lib/common/models/wp_timthumb/versionable_rb.html new file mode 100644 index 00000000..07786356 --- /dev/null +++ b/doc/lib/common/models/wp_timthumb/versionable_rb.html @@ -0,0 +1,52 @@ + + + + + + + + File: versionable.rb [RDoc Documentation] + + + + + + + + + + +
+
+
Last Modified
+
2013-04-05 14:07:07 +0200
+ + +
Requires
+
+
    + +
+
+ + + +
+
+ +
+ +
+

Description

+ +
+ +
+ + + diff --git a/doc/lib/common/models/wp_timthumb_rb.html b/doc/lib/common/models/wp_timthumb_rb.html new file mode 100644 index 00000000..f3ded0a1 --- /dev/null +++ b/doc/lib/common/models/wp_timthumb_rb.html @@ -0,0 +1,58 @@ + + + + + + + + File: wp_timthumb.rb [RDoc Documentation] + + + + + + + + + + +
+
+
Last Modified
+
2013-04-05 14:07:07 +0200
+ + +
Requires
+
+
    + +
  • wp_timthumb/versionable
  • + +
  • wp_timthumb/existable
  • + +
  • wp_timthumb/output
  • + +
+
+ + + +
+
+ +
+ +
+

Description

+ +
+ +
+ + + diff --git a/doc/lib/common/models/wp_user/existable_rb.html b/doc/lib/common/models/wp_user/existable_rb.html new file mode 100644 index 00000000..e16e9c50 --- /dev/null +++ b/doc/lib/common/models/wp_user/existable_rb.html @@ -0,0 +1,52 @@ + + + + + + + + File: existable.rb [RDoc Documentation] + + + + + + + + + + +
+
+
Last Modified
+
2013-04-05 14:07:07 +0200
+ + +
Requires
+
+
    + +
+
+ + + +
+
+ +
+ +
+

Description

+ +
+ +
+ + + diff --git a/doc/lib/common/models/wp_user_rb.html b/doc/lib/common/models/wp_user_rb.html new file mode 100644 index 00000000..b1b034b3 --- /dev/null +++ b/doc/lib/common/models/wp_user_rb.html @@ -0,0 +1,54 @@ + + + + + + + + File: wp_user.rb [RDoc Documentation] + + + + + + + + + + +
+
+
Last Modified
+
2013-04-05 14:07:07 +0200
+ + +
Requires
+
+
    + +
  • wp_user/existable
  • + +
+
+ + + +
+
+ +
+ +
+

Description

+ +
+ +
+ + + diff --git a/doc/lib/common/models/wp_version/findable_rb.html b/doc/lib/common/models/wp_version/findable_rb.html new file mode 100644 index 00000000..9b430615 --- /dev/null +++ b/doc/lib/common/models/wp_version/findable_rb.html @@ -0,0 +1,52 @@ + + + + + + + + File: findable.rb [RDoc Documentation] + + + + + + + + + + +
+
+
Last Modified
+
2013-04-05 14:07:07 +0200
+ + +
Requires
+
+
    + +
+
+ + + +
+
+ +
+ +
+

Description

+ +
+ +
+ + + diff --git a/doc/lib/common/models/wp_version/output_rb.html b/doc/lib/common/models/wp_version/output_rb.html new file mode 100644 index 00000000..2d81b0f1 --- /dev/null +++ b/doc/lib/common/models/wp_version/output_rb.html @@ -0,0 +1,52 @@ + + + + + + + + File: output.rb [RDoc Documentation] + + + + + + + + + + +
+
+
Last Modified
+
2013-04-05 14:07:07 +0200
+ + +
Requires
+
+
    + +
+
+ + + +
+
+ +
+ +
+

Description

+ +
+ +
+ + + diff --git a/doc/lib/common/models/wp_version/vulnerable_rb.html b/doc/lib/common/models/wp_version/vulnerable_rb.html new file mode 100644 index 00000000..070bd0a0 --- /dev/null +++ b/doc/lib/common/models/wp_version/vulnerable_rb.html @@ -0,0 +1,52 @@ + + + + + + + + File: vulnerable.rb [RDoc Documentation] + + + + + + + + + + +
+
+
Last Modified
+
2013-04-05 14:07:07 +0200
+ + +
Requires
+
+
    + +
+
+ + + +
+
+ +
+ +
+

Description

+ +
+ +
+ + + diff --git a/doc/lib/common/models/wp_version_rb.html b/doc/lib/common/models/wp_version_rb.html new file mode 100644 index 00000000..d3d661f9 --- /dev/null +++ b/doc/lib/common/models/wp_version_rb.html @@ -0,0 +1,58 @@ + + + + + + + + File: wp_version.rb [RDoc Documentation] + + + + + + + + + + +
+
+
Last Modified
+
2013-04-05 14:07:07 +0200
+ + +
Requires
+
+
    + +
  • wp_version/findable
  • + +
  • wp_version/vulnerable
  • + +
  • wp_version/output
  • + +
+
+ + + +
+
+ +
+ +
+

Description

+ +
+ +
+ + + diff --git a/doc/lib/common/plugins/plugin_rb.html b/doc/lib/common/plugins/plugin_rb.html new file mode 100644 index 00000000..d9983c0a --- /dev/null +++ b/doc/lib/common/plugins/plugin_rb.html @@ -0,0 +1,52 @@ + + + + + + + + File: plugin.rb [RDoc Documentation] + + + + + + + + + + +
+
+
Last Modified
+
2013-04-05 14:07:07 +0200
+ + +
Requires
+
+
    + +
+
+ + + +
+
+ +
+ +
+

Description

+ +
+ +
+ + + diff --git a/doc/lib/common/plugins/plugins_rb.html b/doc/lib/common/plugins/plugins_rb.html new file mode 100644 index 00000000..7024699a --- /dev/null +++ b/doc/lib/common/plugins/plugins_rb.html @@ -0,0 +1,52 @@ + + + + + + + + File: plugins.rb [RDoc Documentation] + + + + + + + + + + +
+
+
Last Modified
+
2013-04-05 14:07:07 +0200
+ + +
Requires
+
+
    + +
+
+ + + +
+
+ +
+ +
+

Description

+ +
+ +
+ + + diff --git a/doc/lib/common/typhoeus_cache_rb.html b/doc/lib/common/typhoeus_cache_rb.html new file mode 100644 index 00000000..6c033c11 --- /dev/null +++ b/doc/lib/common/typhoeus_cache_rb.html @@ -0,0 +1,54 @@ + + + + + + + + File: typhoeus_cache.rb [RDoc Documentation] + + + + + + + + + + +
+
+
Last Modified
+
2013-04-05 14:07:07 +0200
+ + +
Requires
+
+
    + +
  • common/cache_file_store
  • + +
+
+ + + +
+
+ +
+ +
+

Description

+ +
+ +
+ + + diff --git a/doc/lib/common/updater/git_updater_rb.html b/doc/lib/common/updater/git_updater_rb.html new file mode 100644 index 00000000..50da581c --- /dev/null +++ b/doc/lib/common/updater/git_updater_rb.html @@ -0,0 +1,54 @@ + + + + + + + + File: git_updater.rb [RDoc Documentation] + + + + + + + + + + +
+
+
Last Modified
+
2013-04-05 14:07:07 +0200
+ + +
Requires
+
+
    + +
  • common/updater/updater
  • + +
+
+ + + +
+
+ +
+ +
+

Description

+ +
+ +
+ + + diff --git a/doc/lib/common/updater/svn_updater_rb.html b/doc/lib/common/updater/svn_updater_rb.html new file mode 100644 index 00000000..7d071b3f --- /dev/null +++ b/doc/lib/common/updater/svn_updater_rb.html @@ -0,0 +1,54 @@ + + + + + + + + File: svn_updater.rb [RDoc Documentation] + + + + + + + + + + +
+
+
Last Modified
+
2013-04-05 14:07:07 +0200
+ + +
Requires
+
+
    + +
  • common/updater/updater
  • + +
+
+ + + +
+
+ +
+ +
+

Description

+ +
+ +
+ + + diff --git a/doc/lib/common/updater/updater_factory_rb.html b/doc/lib/common/updater/updater_factory_rb.html new file mode 100644 index 00000000..629c8120 --- /dev/null +++ b/doc/lib/common/updater/updater_factory_rb.html @@ -0,0 +1,52 @@ + + + + + + + + File: updater_factory.rb [RDoc Documentation] + + + + + + + + + + +
+
+
Last Modified
+
2013-04-05 14:07:07 +0200
+ + +
Requires
+
+
    + +
+
+ + + +
+
+ +
+ +
+

Description

+ +
+ +
+ + + diff --git a/doc/lib/common/updater/updater_rb.html b/doc/lib/common/updater/updater_rb.html new file mode 100644 index 00000000..0d9175a5 --- /dev/null +++ b/doc/lib/common/updater/updater_rb.html @@ -0,0 +1,54 @@ + + + + + + + + File: updater.rb [RDoc Documentation] + + + + + + + + + + +
+
+
Last Modified
+
2013-04-05 14:07:07 +0200
+ + +
Requires
+
+
    + +
+
+ + + +
+
+ +
+ +
+

Description

+ +

This class act as an absract one

+ +
+ +
+ + + diff --git a/doc/lib/environment_rb.html b/doc/lib/environment_rb.html new file mode 100644 index 00000000..9591a23b --- /dev/null +++ b/doc/lib/environment_rb.html @@ -0,0 +1,90 @@ + + + + + + + + File: environment.rb [RDoc Documentation] + + + + + + + + + + +
+
+
Last Modified
+
2013-04-05 14:07:07 +0200
+ + +
Requires
+
+
    + +
  • rubygems
  • + +
  • bundler/setup
  • + +
  • getoptlong
  • + +
  • optparse
  • + +
  • uri
  • + +
  • time
  • + +
  • resolv
  • + +
  • xmlrpc/client
  • + +
  • digest/md5
  • + +
  • digest/sha1
  • + +
  • readline
  • + +
  • base64
  • + +
  • rbconfig
  • + +
  • pp
  • + +
  • typhoeus
  • + +
  • json
  • + +
  • nokogiri
  • + +
  • common/browser
  • + +
  • common/custom_option_parser
  • + +
+
+ + + +
+
+ +
+ +
+

Description

+ +
+ +
+ + + diff --git a/doc/lib/wpscan/modules/brute_force_rb.html b/doc/lib/wpscan/modules/brute_force_rb.html new file mode 100644 index 00000000..004404c8 --- /dev/null +++ b/doc/lib/wpscan/modules/brute_force_rb.html @@ -0,0 +1,52 @@ + + + + + + + + File: brute_force.rb [RDoc Documentation] + + + + + + + + + + +
+
+
Last Modified
+
2013-04-05 14:07:07 +0200
+ + +
Requires
+
+
    + +
+
+ + + +
+
+ +
+ +
+

Description

+ +
+ +
+ + + diff --git a/doc/lib/wpscan/modules/malwares_rb.html b/doc/lib/wpscan/modules/malwares_rb.html new file mode 100644 index 00000000..153a9346 --- /dev/null +++ b/doc/lib/wpscan/modules/malwares_rb.html @@ -0,0 +1,52 @@ + + + + + + + + File: malwares.rb [RDoc Documentation] + + + + + + + + + + +
+
+
Last Modified
+
2013-04-05 14:07:07 +0200
+ + +
Requires
+
+
    + +
+
+ + + +
+
+ +
+ +
+

Description

+ +
+ +
+ + + diff --git a/doc/lib/wpscan/modules/wp_config_backup_rb.html b/doc/lib/wpscan/modules/wp_config_backup_rb.html new file mode 100644 index 00000000..428e1810 --- /dev/null +++ b/doc/lib/wpscan/modules/wp_config_backup_rb.html @@ -0,0 +1,52 @@ + + + + + + + + File: wp_config_backup.rb [RDoc Documentation] + + + + + + + + + + +
+
+
Last Modified
+
2013-04-05 14:07:07 +0200
+ + +
Requires
+
+
    + +
+
+ + + +
+
+ +
+ +
+

Description

+ +
+ +
+ + + diff --git a/doc/lib/wpscan/modules/wp_full_path_disclosure_rb.html b/doc/lib/wpscan/modules/wp_full_path_disclosure_rb.html new file mode 100644 index 00000000..9e7b6bb5 --- /dev/null +++ b/doc/lib/wpscan/modules/wp_full_path_disclosure_rb.html @@ -0,0 +1,52 @@ + + + + + + + + File: wp_full_path_disclosure.rb [RDoc Documentation] + + + + + + + + + + +
+
+
Last Modified
+
2013-04-05 14:07:07 +0200
+ + +
Requires
+
+
    + +
+
+ + + +
+
+ +
+ +
+

Description

+ +
+ +
+ + + diff --git a/doc/lib/wpscan/modules/wp_login_protection_rb.html b/doc/lib/wpscan/modules/wp_login_protection_rb.html new file mode 100644 index 00000000..d5de8ad1 --- /dev/null +++ b/doc/lib/wpscan/modules/wp_login_protection_rb.html @@ -0,0 +1,52 @@ + + + + + + + + File: wp_login_protection.rb [RDoc Documentation] + + + + + + + + + + +
+
+
Last Modified
+
2013-04-05 14:07:07 +0200
+ + +
Requires
+
+
    + +
+
+ + + +
+
+ +
+ +
+

Description

+ +
+ +
+ + + diff --git a/doc/lib/wpscan/modules/wp_readme_rb.html b/doc/lib/wpscan/modules/wp_readme_rb.html new file mode 100644 index 00000000..4d08c9ab --- /dev/null +++ b/doc/lib/wpscan/modules/wp_readme_rb.html @@ -0,0 +1,52 @@ + + + + + + + + File: wp_readme.rb [RDoc Documentation] + + + + + + + + + + +
+
+
Last Modified
+
2013-04-05 14:07:07 +0200
+ + +
Requires
+
+
    + +
+
+ + + +
+
+ +
+ +
+

Description

+ +
+ +
+ + + diff --git a/doc/lib/wpscan/web_site_rb.html b/doc/lib/wpscan/web_site_rb.html new file mode 100644 index 00000000..db606991 --- /dev/null +++ b/doc/lib/wpscan/web_site_rb.html @@ -0,0 +1,52 @@ + + + + + + + + File: web_site.rb [RDoc Documentation] + + + + + + + + + + +
+
+
Last Modified
+
2013-04-05 14:07:07 +0200
+ + +
Requires
+
+
    + +
+
+ + + +
+
+ +
+ +
+

Description

+ +
+ +
+ + + diff --git a/doc/lib/wpscan/wp_target_rb.html b/doc/lib/wpscan/wp_target_rb.html new file mode 100644 index 00000000..f7c41db9 --- /dev/null +++ b/doc/lib/wpscan/wp_target_rb.html @@ -0,0 +1,66 @@ + + + + + + + + File: wp_target.rb [RDoc Documentation] + + + + + + + + + + +
+
+
Last Modified
+
2013-04-05 14:07:07 +0200
+ + +
Requires
+
+
    + +
  • web_site
  • + +
  • modules/wp_readme
  • + +
  • modules/wp_full_path_disclosure
  • + +
  • modules/wp_config_backup
  • + +
  • modules/wp_login_protection
  • + +
  • modules/malwares
  • + +
  • modules/brute_force
  • + +
+
+ + + +
+
+ +
+ +
+

Description

+ +
+ +
+ + + diff --git a/doc/lib/wpscan/wpscan_helper_rb.html b/doc/lib/wpscan/wpscan_helper_rb.html new file mode 100644 index 00000000..2d80fd53 --- /dev/null +++ b/doc/lib/wpscan/wpscan_helper_rb.html @@ -0,0 +1,52 @@ + + + + + + + + File: wpscan_helper.rb [RDoc Documentation] + + + + + + + + + + +
+
+
Last Modified
+
2013-04-05 14:07:07 +0200
+ + +
Requires
+
+
    + +
+
+ + + +
+
+ +
+ +
+

Description

+ +
+ +
+ + + diff --git a/doc/lib/wpscan/wpscan_options_rb.html b/doc/lib/wpscan/wpscan_options_rb.html new file mode 100644 index 00000000..714416ce --- /dev/null +++ b/doc/lib/wpscan/wpscan_options_rb.html @@ -0,0 +1,52 @@ + + + + + + + + File: wpscan_options.rb [RDoc Documentation] + + + + + + + + + + +
+
+
Last Modified
+
2013-04-05 14:07:07 +0200
+ + +
Requires
+
+
    + +
+
+ + + +
+
+ +
+ +
+

Description

+ +
+ +
+ + + diff --git a/doc/lib/wpstools/plugins/checker/checker_plugin_rb.html b/doc/lib/wpstools/plugins/checker/checker_plugin_rb.html new file mode 100644 index 00000000..8e9b08cf --- /dev/null +++ b/doc/lib/wpstools/plugins/checker/checker_plugin_rb.html @@ -0,0 +1,52 @@ + + + + + + + + File: checker_plugin.rb [RDoc Documentation] + + + + + + + + + + +
+
+
Last Modified
+
2013-04-05 14:07:07 +0200
+ + +
Requires
+
+
    + +
+
+ + + +
+
+ +
+ +
+

Description

+ +
+ +
+ + + diff --git a/doc/lib/wpstools/plugins/list_generator/generate_list_rb.html b/doc/lib/wpstools/plugins/list_generator/generate_list_rb.html new file mode 100644 index 00000000..546c44ad --- /dev/null +++ b/doc/lib/wpstools/plugins/list_generator/generate_list_rb.html @@ -0,0 +1,54 @@ + + + + + + + + File: generate_list.rb [RDoc Documentation] + + + + + + + + + + +
+
+
Last Modified
+
2013-04-05 14:07:07 +0200
+ + +
Requires
+
+
    + +
+
+ + + +
+
+ +
+ +
+

Description

+ +

This tool generates a list to use for plugin and theme enumeration

+ +
+ +
+ + + diff --git a/doc/lib/wpstools/plugins/list_generator/list_generator_plugin_rb.html b/doc/lib/wpstools/plugins/list_generator/list_generator_plugin_rb.html new file mode 100644 index 00000000..7764cdf3 --- /dev/null +++ b/doc/lib/wpstools/plugins/list_generator/list_generator_plugin_rb.html @@ -0,0 +1,52 @@ + + + + + + + + File: list_generator_plugin.rb [RDoc Documentation] + + + + + + + + + + +
+
+
Last Modified
+
2013-04-05 14:07:07 +0200
+ + +
Requires
+
+
    + +
+
+ + + +
+
+ +
+ +
+

Description

+ +
+ +
+ + + diff --git a/doc/lib/wpstools/plugins/list_generator/svn_parser_rb.html b/doc/lib/wpstools/plugins/list_generator/svn_parser_rb.html new file mode 100644 index 00000000..fdcc1460 --- /dev/null +++ b/doc/lib/wpstools/plugins/list_generator/svn_parser_rb.html @@ -0,0 +1,54 @@ + + + + + + + + File: svn_parser.rb [RDoc Documentation] + + + + + + + + + + +
+
+
Last Modified
+
2013-04-05 14:07:07 +0200
+ + +
Requires
+
+
    + +
+
+ + + +
+
+ +
+ +
+

Description

+ +

This Class Parses SVN Repositories via HTTP

+ +
+ +
+ + + diff --git a/doc/lib/wpstools/plugins/stats/stats_plugin_rb.html b/doc/lib/wpstools/plugins/stats/stats_plugin_rb.html new file mode 100644 index 00000000..642aa208 --- /dev/null +++ b/doc/lib/wpstools/plugins/stats/stats_plugin_rb.html @@ -0,0 +1,52 @@ + + + + + + + + File: stats_plugin.rb [RDoc Documentation] + + + + + + + + + + +
+
+
Last Modified
+
2013-04-05 14:07:07 +0200
+ + +
Requires
+
+
    + +
+
+ + + +
+
+ +
+ +
+

Description

+ +
+ +
+ + + diff --git a/doc/lib/wpstools/wpstools_helper_rb.html b/doc/lib/wpstools/wpstools_helper_rb.html new file mode 100644 index 00000000..5ff73d6a --- /dev/null +++ b/doc/lib/wpstools/wpstools_helper_rb.html @@ -0,0 +1,52 @@ + + + + + + + + File: wpstools_helper.rb [RDoc Documentation] + + + + + + + + + + +
+
+
Last Modified
+
2013-04-05 14:07:07 +0200
+ + +
Requires
+
+
    + +
+
+ + + +
+
+ +
+ +
+

Description

+ +
+ +
+ + + diff --git a/doc/log_txt.html b/doc/log_txt.html deleted file mode 100644 index b57d25a1..00000000 --- a/doc/log_txt.html +++ /dev/null @@ -1,239 +0,0 @@ - - - - - - -log - RDoc Documentation - - - - - - - - - - - - - - - - -
- -

__

- -
__          _______   _____                  
-\ \        / /  __ \ / ____|                 
- \ \  /\  / /| |__) | (___   ___  __ _ _ __  
-  \ \/  \/ / |  ___/ \___ \ / __|/ _` | '_ \ 
-   \  /\  /  | |     ____) | (__| (_| | | | |
-    \/  \/   |_|    |_____/ \___|\__,_|_| |_| v2.0r60a6f16
-
-   WordPress Security Scanner by the WPScan Team
-Sponsored by the RandomStorm Open Source Initiative
- -

_

- -

Examples :

- -

-Further help … ruby /Users/firefart/Coding/wpscan_master/wpscan.rb –help

- -

-Do ‘non-intrusive’ checks … ruby -/Users/firefart/Coding/wpscan_master/wpscan.rb –url www.example.com

- -

-Do wordlist password brute force on enumerated users using 50 threads … -ruby /Users/firefart/Coding/wpscan_master/wpscan.rb –url www.example.com –wordlist darkc0de.lst -–threads 50

- -

-Do wordlist password brute force on the ‘admin’ username only … ruby -/Users/firefart/Coding/wpscan_master/wpscan.rb –url www.example.com –wordlist darkc0de.lst -–username admin

- -

-Enumerate installed plugins … ruby -/Users/firefart/Coding/wpscan_master/wpscan.rb –url www.example.com –enumerate p

- -

-Enumerate installed themes … ruby -/Users/firefart/Coding/wpscan_master/wpscan.rb –url www.example.com –enumerate t

- -

-Enumerate users … ruby /Users/firefart/Coding/wpscan_master/wpscan.rb –url -www.example.com –enumerate u

- -

-Enumerate installed timthumbs … ruby -/Users/firefart/Coding/wpscan_master/wpscan.rb –url www.example.com –enumerate tt

- -

-Use a HTTP proxy … ruby /Users/firefart/Coding/wpscan_master/wpscan.rb -–url www.example.com –proxy -127.0.0.1:8118

- -

-Use a SOCKS5 proxy … (cURL >= v7.21.7 needed) ruby -/Users/firefart/Coding/wpscan_master/wpscan.rb –url www.example.com –proxy -socks5://127.0.0.1:9000

- -

-Use custom content directory … ruby -/Users/firefart/Coding/wpscan_master/wpscan.rb -u www.example.com –wp-content-dir -custom-content

- -

-Use custom plugins directory … ruby -/Users/firefart/Coding/wpscan_master/wpscan.rb -u www.example.com –wp-plugins-dir -wp-content/custom-plugins

- -

-Update … ruby /Users/firefart/Coding/wpscan_master/wpscan.rb –update

- -

See README for further information.

- -

 No argument supplied  Trace : -/Users/firefart/Coding/wpscan_master/wpscan.rb:46:in `<main>‘ -Coverage report generated for RSpec to -/Users/firefart/Coding/wpscan_master/coverage. 1040 / 1113 LOC (93.44%) -covered.

- -
- - - - - diff --git a/doc/rdoc.css b/doc/rdoc.css index 755b5464..ea914218 100644 --- a/doc/rdoc.css +++ b/doc/rdoc.css @@ -8,11 +8,13 @@ /* Base Green is: #6C8C22 */ -* { padding: 0; margin: 0; } +*{ padding: 0; margin: 0; } body { background: #efefef; font: 14px "Helvetica Neue", Helvetica, Tahoma, sans-serif; +} +body.class, body.module, body.file { margin-left: 40px; } body.file-popup { @@ -42,27 +44,23 @@ pre { padding: 0.5em 0; } + /* @group Generic Classes */ .initially-hidden { display: none; } -#search-field { +.quicksearch-field { width: 98%; - background: #eee; - border: none; + background: #ddd; + border: 1px solid #aaa; height: 1.5em; -webkit-border-radius: 4px; } -#search-field:focus { +.quicksearch-field:focus { background: #f1edba; } -#search-field:-moz-placeholder, -#search-field::-webkit-input-placeholder { - font-weight: bold; - color: #666; -} .missing-docs { font-size: 120%; @@ -88,8 +86,28 @@ pre { /* @end */ + /* @group Index Page, Standalone file pages */ -.indexpage ul { +body.indexpage { + margin: 1em 3em; +} +body.indexpage p, +body.indexpage div, +body.file p { + margin: 1em 0; +} + +.indexpage .rdoc-list p, .file .rdoc-list p { + margin: 0em 0; +} + +.indexpage ol, +.file #documentation ol { + line-height: 160%; +} + +.indexpage ul, +.file #documentation ul { line-height: 160%; list-style: none; } @@ -98,15 +116,24 @@ pre { font-size: 16px; } -.indexpage li { +.indexpage li, +.file #documentation li { padding-left: 20px; } -.indexpage ul > li { - background: url(images/bullet_black.png) no-repeat left 4px; +.indexpage ol, +.file #documentation ol { + margin-left: 20px; } -.indexpage li.method { - background: url(images/plugin.png) no-repeat left 4px; + +.indexpage ol > li, +.file #documentation ol > li { + padding-left: 0; +} + +.indexpage ul > li, +.file #documentation ul > li { + background: url(images/bullet_black.png) no-repeat left 4px; } .indexpage li.module { background: url(images/package.png) no-repeat left 4px; @@ -117,37 +144,36 @@ pre { .indexpage li.file { background: url(images/page_white_text.png) no-repeat left 4px; } -.indexpage li li { - background: url(images/tag_blue.png) no-repeat left 4px; -} -.indexpage li .toc-toggle { - width: 16px; - height: 16px; - background: url(images/add.png) no-repeat; -} - -.indexpage li .toc-toggle.open { - background: url(images/delete.png) no-repeat; +.file li p, +.indexpage li p { + margin: 0 0; } /* @end */ /* @group Top-Level Structure */ -#metadata { +.class #metadata, +.file #metadata, +.module #metadata { float: left; width: 260px; } -#documentation { +.class #documentation, +.file #documentation, +.module #documentation { margin: 2em 1em 5em 300px; min-width: 340px; } +.file #metadata { + margin: 0.8em; +} + #validator-badges { clear: both; margin: 1em 1em 2em; - font-size: smaller; } /* @end */ @@ -158,7 +184,7 @@ pre { -moz-border-radius: 5px; -webkit-border-radius: 5px; border: 1px solid #aaa; - margin: 0 8px 8px; + margin: 0 8px 16px; font-size: 90%; overflow: hidden; } @@ -184,10 +210,6 @@ pre { list-style: none; } -#file-metadata { - margin-top: 2em; -} - #file-metadata ul { padding-left: 28px; list-style-image: url(images/page_green.png); @@ -215,15 +237,14 @@ ul.link-list .type { /* @end */ -/* @group Class Metadata Section */ -#class-metadata { - margin-top: 2em; -} -/* @end */ /* @group Project Metadata Section */ #project-metadata { - margin-top: 2em; + margin-top: 3em; +} + +.file #project-metadata { + margin-top: 0em; } #project-metadata .section { @@ -233,14 +254,33 @@ ul.link-list .type { border-bottom: 1px solid #aaa; position: relative; } +#project-metadata h3.section-header .search-toggle { + position: absolute; + right: 5px; +} + #project-metadata form { color: #777; background: #ccc; + padding: 8px 8px 16px; + border-bottom: 1px solid #bbb; +} +#project-metadata fieldset { + border: 0; +} + +#no-class-search-results { + margin: 0 auto 1em; + text-align: center; + font-size: 14px; + font-weight: bold; + color: #aaa; } /* @end */ + /* @group Documentation Section */ .description { font-size: 100%; @@ -255,44 +295,34 @@ ul.link-list .type { margin: 0; } -.description ol, .description ul { margin-left: 1.5em; } -.description ol li, .description ul li { line-height: 1.4em; } -.note-list { - margin: 8px 0; -} - -.label-list { +.description dl, +#documentation dl { margin: 8px 1.5em; border: 1px solid #ccc; } -.description .label-list { +.description dl { font-size: 14px; } -.note-list dt { - font-weight: bold; -} -.note-list dd { - padding: 0 12px; -} - -.label-list dt { +.description dt, +#documentation dt { padding: 2px 4px; font-weight: bold; background: #ddd; } -.label-list dd { +.description dd, +#documentation dd { padding: 2px 12px; } -.label-list dd + dt, -.note-list dd + dt { +.description dd + dt, +#documentation dd + dt { margin-top: 0.7em; } @@ -301,8 +331,8 @@ ul.link-list .type { } #documentation h2.section-header { - margin-top: 1em; - padding: 0.25em 0.5em; + margin-top: 2em; + padding: 0.75em 0.5em; background: #ccc; color: #333; font-size: 175%; @@ -311,25 +341,8 @@ ul.link-list .type { -webkit-border-radius: 3px; } -.documentation-section-title { - position: relative; -} -.documentation-section-title .section-click-top { - position: absolute; - top: 6px; - right: 12px; - font-size: 10px; - color: #9b9877; - visibility: hidden; - padding-right: 0.5px; -} - -.documentation-section-title:hover .section-click-top { - visibility: visible; -} - #documentation h3.section-header { - margin-top: 1em; + margin-top: 2em; padding: 0.25em 0.5em; background-color: #dedede; color: #333; @@ -416,7 +429,7 @@ ul.link-list .type { line-height: 20px; background: url(images/zoom.png) no-repeat right top; } -#documentation .method-heading:hover .method-click-advice { +#documentation .method-detail:hover .method-click-advice { visibility: visible; } @@ -442,14 +455,14 @@ ul.link-list .type { cursor: default; } #documentation .method-description p { + padding: 0; +} +#documentation .method-description p + p { margin-bottom: 0.5em; } #documentation .method-description ul { margin-left: 1.5em; } -pre { - margin: 0.5em 0; -} #documentation .attribute-method-heading { background: url(images/tag_green.png) no-repeat left bottom; @@ -468,76 +481,283 @@ pre { /* @end */ + + /* @group Source Code */ -pre { - overflow: auto; +div.method-source-code { background: #262626; - color: white; - border: 1px dashed #999; + color: #efefef; + margin: 1em; padding: 0.5em; + border: 1px dashed #999; + overflow: hidden; } -.description pre { - margin: 0 0.4em; +div.method-source-code pre { + background: inherit; + padding: 0; + color: white; + overflow: auto; } +/* @group Ruby keyword styles */ + .ruby-constant { color: #7fffd4; background: transparent; } .ruby-keyword { color: #00ffff; background: transparent; } .ruby-ivar { color: #eedd82; background: transparent; } .ruby-operator { color: #00ffee; background: transparent; } .ruby-identifier { color: #ffdead; background: transparent; } .ruby-node { color: #ffa07a; background: transparent; } -.ruby-comment { color: #dc0000; font-weight: bold; background: transparent; } +.ruby-comment { color: #b22222; font-weight: bold; background: transparent; } .ruby-regexp { color: #ffa07a; background: transparent; } .ruby-value { color: #7fffd4; background: transparent; } /* @end */ +/* @end */ -/* @group search results */ -#search-results h1 { - font-size: 1em; - font-weight: normal; - text-shadow: none; +/* @group File Popup Contents */ + +.file #metadata, +.file-popup #metadata { } -#search-results .current { - background: #ccc; - border-bottom: 1px solid transparent; +.file-popup dl { + font-size: 80%; + padding: 0.75em; + background-color: #dedede; + color: #333; + border: 1px solid #bbb; + -moz-border-radius: 3px; + -webkit-border-radius: 3px; } - -#search-results li { - list-style: none; - border-bottom: 1px solid #aaa; - -moz-border-radius: 4px; - -webkit-border-radius: 4px; - border-radius: 4px; - margin-bottom: 0.5em; -} - -#search-results li:last-child { - border-bottom: none; - margin-bottom: 0; -} - -#search-results li p { - padding: 0; - margin: 0.5em; -} - -#search-results .search-namespace { +.file dt { font-weight: bold; + padding-left: 22px; + line-height: 20px; + background: url(images/page_white_width.png) no-repeat left top; +} +.file dt.modified-date { + background: url(images/date.png) no-repeat left top; +} +.file dt.requires { + background: url(images/plugin.png) no-repeat left top; +} +.file dt.scs-url { + background: url(images/wrench.png) no-repeat left top; } -#search-results li em { - background: yellow; - font-style: normal; +.file dl dd { + margin: 0 0 1em 0; +} +.file #metadata dl dd ul { + list-style: circle; + margin-left: 20px; + padding-top: 0; +} +.file #metadata dl dd ul li { } -#search-results pre { - margin: 0.5em; + +.file h2 { + margin-top: 2em; + padding: 0.75em 0.5em; + background-color: #dedede; + color: #333; + font-size: 120%; + border: 1px solid #bbb; + -moz-border-radius: 3px; + -webkit-border-radius: 3px; } /* @end */ + + + +/* @group ThickBox Styles */ +#TB_window { + font: 12px Arial, Helvetica, sans-serif; + color: #333333; +} + +#TB_secondLine { + font: 10px Arial, Helvetica, sans-serif; + color:#666666; +} + +#TB_window :link, +#TB_window :visited { color: #666666; } +#TB_window :link:hover, +#TB_window :visited:hover { color: #000; } +#TB_window :link:active, +#TB_window :visited:active { color: #666666; } +#TB_window :link:focus, +#TB_window :visited:focus { color: #666666; } + +#TB_overlay { + position: fixed; + z-index:100; + top: 0px; + left: 0px; + height:100%; + width:100%; +} + +.TB_overlayMacFFBGHack {background: url(images/macFFBgHack.png) repeat;} +.TB_overlayBG { + background-color:#000; + filter:alpha(opacity=75); + -moz-opacity: 0.75; + opacity: 0.75; +} + +* html #TB_overlay { /* ie6 hack */ + position: absolute; + height: expression(document.body.scrollHeight > document.body.offsetHeight ? document.body.scrollHeight : document.body.offsetHeight + 'px'); +} + +#TB_window { + position: fixed; + background: #ffffff; + z-index: 102; + color:#000000; + display:none; + border: 4px solid #525252; + text-align:left; + top:50%; + left:50%; +} + +* html #TB_window { /* ie6 hack */ + position: absolute; + margin-top: expression(0 - parseInt(this.offsetHeight / 2) + (TBWindowMargin = document.documentElement && document.documentElement.scrollTop || document.body.scrollTop) + 'px'); +} + +#TB_window img#TB_Image { + display:block; + margin: 15px 0 0 15px; + border-right: 1px solid #ccc; + border-bottom: 1px solid #ccc; + border-top: 1px solid #666; + border-left: 1px solid #666; +} + +#TB_caption{ + height:25px; + padding:7px 30px 10px 25px; + float:left; +} + +#TB_closeWindow{ + height:25px; + padding:11px 25px 10px 0; + float:right; +} + +#TB_closeAjaxWindow{ + padding:7px 10px 5px 0; + margin-bottom:1px; + text-align:right; + float:right; +} + +#TB_ajaxWindowTitle{ + float:left; + padding:7px 0 5px 10px; + margin-bottom:1px; + font-size: 22px; +} + +#TB_title{ + background-color: #6C8C22; + color: #dedede; + height:40px; +} +#TB_title :link, +#TB_title :visited { + color: white !important; + border-bottom: 1px dotted #dedede; +} + +#TB_ajaxContent{ + clear:both; + padding:2px 15px 15px 15px; + overflow:auto; + text-align:left; + line-height:1.4em; +} + +#TB_ajaxContent.TB_modal{ + padding:15px; +} + +#TB_ajaxContent p{ + padding:5px 0px 5px 0px; +} + +#TB_load{ + position: fixed; + display:none; + height:13px; + width:208px; + z-index:103; + top: 50%; + left: 50%; + margin: -6px 0 0 -104px; /* -height/2 0 0 -width/2 */ +} + +* html #TB_load { /* ie6 hack */ + position: absolute; + margin-top: expression(0 - parseInt(this.offsetHeight / 2) + (TBWindowMargin = document.documentElement && document.documentElement.scrollTop || document.body.scrollTop) + 'px'); +} + +#TB_HideSelect{ + z-index:99; + position:fixed; + top: 0; + left: 0; + background-color:#fff; + border:none; + filter:alpha(opacity=0); + -moz-opacity: 0; + opacity: 0; + height:100%; + width:100%; +} + +* html #TB_HideSelect { /* ie6 hack */ + position: absolute; + height: expression(document.body.scrollHeight > document.body.offsetHeight ? document.body.scrollHeight : document.body.offsetHeight + 'px'); +} + +#TB_iframeContent{ + clear:both; + border:none; + margin-bottom:-1px; + margin-top:1px; + _margin-bottom:1px; +} + +/* @end */ + +/* @group Debugging Section */ + +#debugging-toggle { + text-align: center; +} +#debugging-toggle img { + cursor: pointer; +} + +#rdoc-debugging-section-dump { + display: none; + margin: 0 2em 2em; + background: #ccc; + border: 1px solid #999; +} + + + +/* @end */ diff --git a/doc/table_of_contents.html b/doc/table_of_contents.html deleted file mode 100644 index a838c566..00000000 --- a/doc/table_of_contents.html +++ /dev/null @@ -1,622 +0,0 @@ - - - - - - -Table of Contents - RDoc Documentation - - - - - - - - - - - - - - -

Table of Contents - RDoc Documentation

- -

Pages

- - -

Classes/Modules

- - -

Methods

- - - - - diff --git a/doc/wpscan_rb.html b/doc/wpscan_rb.html new file mode 100644 index 00000000..44bcc648 --- /dev/null +++ b/doc/wpscan_rb.html @@ -0,0 +1,52 @@ + + + + + + + + File: wpscan.rb [RDoc Documentation] + + + + + + + + + + +
+
+
Last Modified
+
2013-04-05 14:15:07 +0200
+ + +
Requires
+
+
    + +
+
+ + + +
+
+ +
+ +
+

Description

+ +
+ +
+ + + diff --git a/doc/wpstools_rb.html b/doc/wpstools_rb.html new file mode 100644 index 00000000..a8efe370 --- /dev/null +++ b/doc/wpstools_rb.html @@ -0,0 +1,52 @@ + + + + + + + + File: wpstools.rb [RDoc Documentation] + + + + + + + + + + +
+
+
Last Modified
+
2013-04-05 14:07:07 +0200
+ + +
Requires
+
+
    + +
+
+ + + +
+
+ +
+ +
+

Description

+ +
+ +
+ + + diff --git a/generate_rdoc.sh b/generate_rdoc.sh index 39a043bd..5a0df581 100755 --- a/generate_rdoc.sh +++ b/generate_rdoc.sh @@ -1,2 +1,2 @@ #!/bin/bash -rdoc -x cache/ -x spec/ -x data/ -x coverage/ -x doc/ +rdoc -x cache/ -x spec/ -x data/ -x coverage/ -x doc/ -x log.txt