diff --git a/doc/Array.html b/doc/Array.html index 7beab4b6..cb65651c 100644 --- a/doc/Array.html +++ b/doc/Array.html @@ -1,238 +1,224 @@ - - - + + + - + - Class: Array +class Array - RDoc Documentation - + + + + + + + + + + - - - - - + -
- - -
-

Parent

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

Methods

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

Files

- -
- - -
-

Class/Module Index - [+]

-
-
- Quicksearch - -
-
- - - -
- - -
+
-
-

Array

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

Public Instance Methods

+ +
+ + +
+

class Array

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

Public Instance Methods

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

Fix for grep with symbols in ruby <= 1.8.7

-
- -

Fix for grep with symbols in ruby <= 1.8.7

- - - -
-
-# File lib/common_helper.rb, line 88
+          
+          
+
# File lib/common_helper.rb, line 88
 def _grep_(regexp)
   matches = []
   self.each do |value|
@@ -241,62 +227,57 @@
   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 ac5d341c..e3e9edba 100644 --- a/doc/Browser.html +++ b/doc/Browser.html @@ -1,458 +1,432 @@ - - - + + + - + - Class: Browser +class Browser - RDoc Documentation - + + + + + + + + + + - - - - - + -
- - -
-

Parent

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

Files

- -
- - -
-

Class/Module Index - [+]

-
-
- Quicksearch - -
-
- - - -
- - -
+
-
-

Browser

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

class Browser

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

Constants

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

Attributes

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

Constants

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

Attributes

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

Public Class Methods

+ + +
+ +
+ instance(options = {}) + click to toggle source
-
- - -
- hydra[R] -
-
+
-
-
- -
- - - - -
-

Public Class Methods

- - -
- -
- instance(options = {}) - click to toggle source -
- - -
- - - - - -
-
-# File lib/browser.rb, line 58
+          
+
# File lib/browser.rb, line 59
 def self.instance(options = {})
   unless @@instance
     @@instance = new(options)
   end
   @@instance
 end
-
- -
+
+ +
+ + + +
+ + +
+ +
+ reset() + click to toggle source +
+ + +
+ + -
- - -
- - - -
- reset() - click to toggle source -
- - -
- - - - - -
-
-# File lib/browser.rb, line 65
+          
+
# File lib/browser.rb, line 66
 def self.reset
   @@instance = nil
 end
-
- -
- +
+
- -
+ + + +
- -
-
-

Public Instance Methods

+ + +
+

Public Instance Methods

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

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

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 102
+          
+          
+
# File lib/browser.rb, line 126
 def load_config(config_file = nil)
   @config_file = config_file || @config_file
 
@@ -464,75 +438,73 @@ 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 +
+ + +
+ + -
- - -
- - - -
- max_threads=(max_threads) - click to toggle source -
- - -
- - - - - -
-
-# File lib/browser.rb, line 94
+          
+
# File lib/browser.rb, line 95
 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 +
+ + +
+ + -
- - -
- - - -
- merge_request_params(params = {}) - click to toggle source -
- - -
- - - - - -
-
-# File lib/browser.rb, line 149
+          
+
# File lib/browser.rb, line 173
 def merge_request_params(params = {})
   if @proxy
     params = params.merge(:proxy => @proxy)
+
+    if @proxy_auth
+      params = params.merge(@proxy_auth)
+    end
   end
 
   unless params.has_key?(:disable_ssl_host_verification)
@@ -556,71 +528,140 @@ browser object, hydra will not have the new @max_threads and
 
   params
 end
-
- -
+
+ +
+ + + +
+ + +
+ +
+ post(url, params = {}) + click to toggle source +
+ + +
+ + -
- - -
- - - -
- post(url, params = {}) - click to toggle source -
- - -
- - - - - -
-
-# File lib/browser.rb, line 136
+          
+
# File lib/browser.rb, line 160
 def post(url, params = {})
   run_request(
       forge_request(url, params.merge(:method => :post))
   )
 end
-
- -
+
+ +
+ + + +
+ + +
+ +
+ proxy_auth=(auth) + click to toggle source +
+ + +
+ + -
- - -
- - +
+
# File lib/browser.rb, line 102
+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
+      @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_format()
+      end
+    else
+      raise_invalid_proxy_format()
+    end
+  end
+end
+
+ +
+ + + + +
+ + +
+ +
+ raise_invalid_proxy_format() + click to toggle source +
+ + +
+ -
- user_agent() - click to toggle source -
-
- -

return the user agent, according to the user_agent_mode

- + +
+
# File lib/browser.rb, line 121
+def raise_invalid_proxy_format
+  raise "Invalid proxy auth format, expected username:password or {:proxy_username => username, :proxy_password => password}"
+end
+
+ +
- -
-
-# File lib/browser.rb, line 82
+        
+
+        
+      
+ + +
+ +
+ user_agent() + click to toggle source +
+ + +
+ +

return the user agent, according to the user_agent_mode

+ + + +
+
# File lib/browser.rb, line 83
 def user_agent
   case @user_agent_mode
     when "semi-static"
@@ -632,36 +673,33 @@ browser object, hydra will not have the new @max_threads and
   end
   @user_agent
 end
-
- -
+
+ +
+ + + +
+ + +
+ +
+ user_agent_mode=(ua_mode) + click to toggle source +
+ + +
+ + -
- - -
- - - -
- user_agent_mode=(ua_mode) - click to toggle source -
- - -
- - - - - -
-
-# File lib/browser.rb, line 69
+          
+
# File lib/browser.rb, line 70
 def user_agent_mode=(ua_mode)
   ua_mode ||= "static"
 
@@ -673,29 +711,26 @@ 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 a6484f93..8f66c736 100644 --- a/doc/BruteForce.html +++ b/doc/BruteForce.html @@ -1,272 +1,257 @@ - - - + + + - + - Module: BruteForce +module BruteForce - RDoc Documentation - + + + + + + + + + + - - - - - + -
- - +
+ - - - - -
-

Methods

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

Files

- -
- - -
-

Class/Module Index - [+]

-
-
- Quicksearch - -
-
- - - -
- - -
+
-
-

BruteForce

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

module BruteForce

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

Public Class Methods

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

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

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 114
+          
+          
+
# File lib/wpscan/modules/brute_force.rb, line 114
 def self.lines_in_file(file_path)
   lines = 0
   File.open(file_path, 'r').each { || lines += 1 }
   lines
 end
-
- -
- +
+
- -
+ + + +
- -
-
-

Public Instance Methods

+ + +
+

Public Instance Methods

- -
- + +
+ +
+ brute_force(logins, wordlist_path) + click to toggle source +
+ +
-
- brute_force(logins, wordlist_path) - click to toggle source -
+

param array of string logins param string wordlist_path

-
- -

param array of string logins param string wordlist_path

- - - -
-
-# File lib/wpscan/modules/brute_force.rb, line 23
+          
+          
+
# File lib/wpscan/modules/brute_force.rb, line 23
 def brute_force(logins, wordlist_path)
   hydra               = Browser.instance.hydra
   number_of_passwords = BruteForce.lines_in_file(wordlist_path)
@@ -305,7 +290,7 @@ on large wordlists, although bareable.

puts "\n Trying Username : #{username} Password : #{password}" if @verbose - if response.body =~ /login_error/ + if response.body =~ %rlogin_error/ puts "\nIncorrect username and/or password." if @verbose elsif response.code == 302 puts "\n " + green("[SUCCESS]") + " Username : #{username} Password : #{password}\n" @@ -316,7 +301,7 @@ on large wordlists, although bareable.

elsif response.code == 0 puts red("ERROR:") + " No response from remote server. WAF/IPS?" # code is a fixnum, needs a string for regex - elsif response.code.to_s =~ /^50/ + elsif response.code.to_s =~ %r^50/ puts red("ERROR:") + " Server error, try reducing the number of threads." else puts "\n" + red("ERROR:") + " We recieved an unknown response for #{password}..." @@ -354,29 +339,26 @@ 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 f58faa9e..0ae7ea72 100644 --- a/doc/CREDITS.html +++ b/doc/CREDITS.html @@ -1,152 +1,149 @@ - - + - + - + - File: CREDITS [RDoc Documentation] +CREDITS - RDoc Documentation - + + + + + + + + + + - - - - - -
-
-
-

- Home - Classes - Methods -

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

*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.

@@ -165,13 +162,13 @@ reports. Melvin Lammerts - Reported a couple of fake vulnerabilities - melvin at 12k.nl Christian Mehlmauer - @FireFart - Theme enumeration

-
+
-
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - + + + diff --git a/doc/CacheFileStore.html b/doc/CacheFileStore.html index 4c6fb242..780cd12c 100644 --- a/doc/CacheFileStore.html +++ b/doc/CacheFileStore.html @@ -1,283 +1,265 @@ - - - + + + - + - Class: CacheFileStore +class CacheFileStore - RDoc Documentation - + + + + + + + + + + - - - - - + -
- - -
-

Parent

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

Methods

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

Files

- -
- - -
-

Class/Module Index - [+]

-
-
- Quicksearch - -
-
- - - -
- - -
+
-
-

CacheFileStore

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

class CacheFileStore

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

Attributes

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

Attributes

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

Public Class Methods

+ + +
+ +
+ new(storage_path, serializer = Marshal) + click to toggle source
-
- - -
- 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 +

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 34
+          
+          
+
# File lib/cache_file_store.rb, line 34
 def initialize(storage_path, serializer = Marshal)
   @storage_path = File.expand_path(storage_path)
   @serializer = serializer
@@ -287,110 +269,101 @@ binary format Marshal does not need any “require”

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

Public Instance Methods

+ + +
+

Public Instance Methods

- -
- + +
+ +
+ clean() + click to toggle source +
+ +
+ -
- clean() - click to toggle source -
-
- - - - - -
-
-# File lib/cache_file_store.rb, line 44
+          
+          
+
# File lib/cache_file_store.rb, line 44
 def clean
   Dir[File.join(@storage_path, '*')].each do |f|
     File.delete(f)
   end
 end
-
- -
+
+ +
+ + + +
+ + +
+ +
+ get_entry_file_path(key) + click to toggle source +
+ + +
+ + -
- - -
- - - -
- get_entry_file_path(key) - click to toggle source -
- - -
- - - - - -
-
-# File lib/cache_file_store.rb, line 66
+          
+
# File lib/cache_file_store.rb, line 66
 def get_entry_file_path(key)
   @storage_path + '/' + key
 end
-
- -
+
+ +
+ + + +
+ + +
+ +
+ read_entry(key) + click to toggle source +
+ + +
+ + -
- - -
- - - -
- read_entry(key) - click to toggle source -
- - -
- - - - - -
-
-# File lib/cache_file_store.rb, line 50
+          
+
# File lib/cache_file_store.rb, line 50
 def read_entry(key)
   entry_file_path = get_entry_file_path(key)
 
@@ -398,36 +371,33 @@ binary format 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 +
+ + +
+ + -
- - -
- - - -
- write_entry(key, data_to_store, cache_timeout) - click to toggle source -
- - -
- - - - - -
-
-# File lib/cache_file_store.rb, line 58
+          
+
# File lib/cache_file_store.rb, line 58
 def write_entry(key, data_to_store, cache_timeout)
   if cache_timeout > 0
     File.open(get_entry_file_path(key), 'w') do |f|
@@ -435,29 +405,26 @@ binary format Marshal does not need any “require”

end end end
-
- -
- +
+
- -
+ + + +
- -
-
+ + - + -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - + diff --git a/doc/Exploit.html b/doc/Exploit.html index 8d35308e..bf4f1c00 100644 --- a/doc/Exploit.html +++ b/doc/Exploit.html @@ -1,339 +1,309 @@ - - - + + + - + - Class: Exploit +class Exploit - RDoc Documentation - + + + + + + + + + + - - - - - + -
- - -
-

Parent

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

Files

- -
- - -
-

Class/Module Index - [+]

-
-
- Quicksearch - -
-
- - - -
- - -
+
-
-

Exploit

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

class Exploit

+ +
+

This library should contain all methods for exploitation.

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

Attributes

+
+
+ postdata[RW] +
- - - - -
-

Attributes

- +
-
- - - - -
- postdata[RW] -
+ + +
+
+ +
+
+ rhost[RW] +
-
- - - -
+
+ + + +
+
+ +
+
+ type[RW] +
+ +
+ + + +
+
+ +
+
+ uri[RW] +
+ +
+ + + +
+
+ +
+ + + + +
+

Public Class Methods

+ + +
+ +
+ new(wp_url, type, uri, postdata, use_proxy, proxy_addr, proxy_port) + click to toggle source
-
- - - - -
- rhost[RW] -
-
+
-
-
- -
- - - - -
- type[RW] -
- -
- - - -
-
- -
- - - - -
- uri[RW] -
- -
- - - -
-
- -
- - - - -
-

Public Class Methods

- - -
- -
- new(wp_url, type, uri, postdata, use_proxy, proxy_addr, proxy_port) - click to toggle source -
- - -
- - - - - -
-
-# File lib/wpscan/exploit.rb, line 27
+          
+
# File lib/wpscan/exploit.rb, line 27
 def initialize(wp_url, type, uri, postdata, use_proxy, proxy_addr, proxy_port)
   @wp_url = URI.parse(wp_url.to_s)
   @rhost = @wp_url.host
@@ -347,42 +317,39 @@
   @proxy_port = proxy_port
   start()
 end
-
- -
- +
+
- -
+ + + +
- -
-
-

Public Instance Methods

+
+ +
+

Public Instance Methods

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

if there is more than 1 session, allow the user to choose one.

-
- -

if there is more than 1 session, allow the user to choose one.

- - - -
-
-# File lib/wpscan/exploit.rb, line 148
+          
+          
+
# File lib/wpscan/exploit.rb, line 148
 def choose_session()
   if session_count() >= 2
     puts "[?] We have " + session_count().to_s + " sessions running. Please choose one by id."
@@ -399,36 +366,33 @@
     @session_in_use = last_session_id()
   end
 end
-
- -
+
+ +
+ + + +
+ + +
+ +
+ exploit(msf_module, payload) + click to toggle source +
+ + +
+ +

exploit

-
- - -
- - - -
- exploit(msf_module, payload) - click to toggle source -
- - -
- -

exploit

- - - -
-
-# File lib/wpscan/exploit.rb, line 61
+          
+
# File lib/wpscan/exploit.rb, line 61
 def exploit(msf_module, payload)
 
   exploit_info(msf_module,payload)
@@ -470,36 +434,33 @@
     return false
   end
 end
-
- -
+
+ +
+ + + +
+ + +
+ +
+ exploit_info(msf_module,payload) + click to toggle source +
+ + +
+ +

output our exploit data

-
- - -
- - - -
- exploit_info(msf_module,payload) - click to toggle source -
- - -
- -

output our exploit data

- - - -
-
-# File lib/wpscan/exploit.rb, line 105
+          
+
# File lib/wpscan/exploit.rb, line 105
 def exploit_info(msf_module,payload)
   info = RpcClient.new.get_exploit_info(msf_module)
   puts
@@ -514,70 +475,64 @@
   puts "| Payload: " + payload
   puts
 end
-
- -
+
+ +
+ + + +
+ + +
+ +
+ job_id() + click to toggle source +
+ + +
+ +

not sure if this is needed?! not used.

-
- - -
- - - -
- job_id() - click to toggle source -
- - -
- -

not sure if this is needed?! not used.

- - - -
-
-# File lib/wpscan/exploit.rb, line 122
+          
+
# File lib/wpscan/exploit.rb, line 122
 def job_id()
   jobs = RpcClient.new.jobs()
   puts jobs
 end
-
- -
+
+ +
+ + + +
+ + +
+ +
+ kill_session(id) + click to toggle source +
+ + +
+ +

kill a session by session id

-
- - -
- - - -
- kill_session(id) - click to toggle source -
- - -
- -

kill a session by session id

- - - -
-
-# File lib/wpscan/exploit.rb, line 167
+          
+
# File lib/wpscan/exploit.rb, line 167
 def kill_session(id)
   begin
     killed = RpcClient.new.kill_session(id)
@@ -589,240 +544,219 @@
     return false
   end
 end
-
- -
+
+ +
+ + + +
+ + +
+ +
+ last_session_id() + click to toggle source +
+ + +
+ +

the last active session id created

-
- - -
- - - -
- last_session_id() - click to toggle source -
- - -
- -

the last active session id created

- - - -
-
-# File lib/wpscan/exploit.rb, line 135
+          
+
# File lib/wpscan/exploit.rb, line 135
 def last_session_id()
   sessions.keys.last
 end
-
- -
+
+ +
+ + + +
+ + +
+ +
+ meterpreter_read(id) + click to toggle source +
+ + +
+ +

read data from a meterpreter session data must be base64 decoded.

-
- - -
- - - -
- meterpreter_read(id) - click to toggle source -
- - -
- -

read data from a meterpreter session data must be base64 decoded.

- - - -
-
-# File lib/wpscan/exploit.rb, line 196
+          
+
# File lib/wpscan/exploit.rb, line 196
 def meterpreter_read(id)
   Base64.decode64(RpcClient.new.meterpreter_read(id)['data'])
 end
-
- -
+
+ +
+ + + +
+ + +
+ +
+ meterpreter_write(id, data) + click to toggle source +
+ + +
+ +

write data to a meterpreter session data must be base64 encoded.

-
- - -
- - - -
- meterpreter_write(id, data) - click to toggle source -
- - -
- -

write data to a meterpreter session data must be base64 encoded.

- - - -
-
-# File lib/wpscan/exploit.rb, line 203
+          
+
# File lib/wpscan/exploit.rb, line 203
 def meterpreter_write(id, data)
   RpcClient.new.meterpreter_write(id, Base64.encode64(data))
 end
-
- -
+
+ +
+ + + +
+ + +
+ +
+ read_shell(id) + click to toggle source +
+ + +
+ +

read data from a shell, meterpreter is not classed as a shell.

-
- - -
- - - -
- read_shell(id) - click to toggle source -
- - -
- -

read data from a shell, meterpreter is not classed as a shell.

- - - -
-
-# File lib/wpscan/exploit.rb, line 182
+          
+
# File lib/wpscan/exploit.rb, line 182
 def read_shell(id)
   RpcClient.new.read_shell(id)['data']
 end
-
- -
+
+ +
+ + + +
+ + +
+ +
+ session_count() + click to toggle source +
+ + +
+ +

a count of the amount of active sessions

-
- - -
- - - -
- session_count() - click to toggle source -
- - -
- -

a count of the amount of active sessions

- - - -
-
-# File lib/wpscan/exploit.rb, line 141
+          
+
# File lib/wpscan/exploit.rb, line 141
 def session_count()
   sessions().size
 end
-
- -
+
+ +
+ + + +
+ + +
+ +
+ sessions() + click to toggle source +
+ + +
+ +

all sessions and related session data

-
- - -
- - - -
- sessions() - click to toggle source -
- - -
- -

all sessions and related session data

- - - -
-
-# File lib/wpscan/exploit.rb, line 129
+          
+
# File lib/wpscan/exploit.rb, line 129
 def sessions()
   sessions = RpcClient.new.sessions()
 end
-
- -
+
+ +
+ + + +
+ + +
+ +
+ start() + click to toggle source +
+ + +
+ +

figure out what to exploit

-
- - -
- - - -
- start() - click to toggle source -
- - -
- -

figure out what to exploit

- - - -
-
-# File lib/wpscan/exploit.rb, line 43
+          
+
# File lib/wpscan/exploit.rb, line 43
 def start()
   if @type == "RFI"
     puts
     puts "[?] Exploit? [y/n]"
     answer = Readline.readline
-    if answer =~ /^y/
+    if answer =~ %r^y/
       msf_module = "exploit/unix/webapp/php_include"
       payload = "php/meterpreter/bind_tcp"
       exploit(msf_module, payload)
@@ -832,62 +766,56 @@
   elsif @type == "SQLI"
   end
 end
-
- -
+
+ +
+ + + +
+ + +
+ +
+ write_shell(id, data) + click to toggle source +
+ + +
+ +

write data to a shell, meterpreter is not classed as a shell.

-
- - -
- - - -
- write_shell(id, data) - click to toggle source -
- - -
- -

write data to a shell, meterpreter is not classed as a shell.

- - - -
-
-# File lib/wpscan/exploit.rb, line 189
+          
+
# File lib/wpscan/exploit.rb, line 189
 def write_shell(id, data)
   RpcClient.new.write_shell(id, data)
 end
-
- -
- +
+
- -
+ + + +
- -
-
+ + - + -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - + diff --git a/doc/Generate_List.html b/doc/Generate_List.html index f8c6c078..83973aea 100644 --- a/doc/Generate_List.html +++ b/doc/Generate_List.html @@ -1,283 +1,265 @@ - - - + + + - + - Class: Generate_List +class Generate_List - RDoc Documentation - + + + + + + + + + + - - - - - + -
- - -
-

Parent

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

Files

- -
- - -
-

Class/Module Index - [+]

-
-
- Quicksearch - -
-
- - - -
- - -
+
-
-

Generate_List

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

class Generate_List

+ +
+

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

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

Attributes

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

Attributes

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

Public Class Methods

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

Public Class Methods

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

type = themes | plugins

-
- -

type = themes | plugins

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

Public Instance Methods

+
+ +
+

Public Instance Methods

- -
- + +
+ +
+ generate_full_list() + click to toggle source +
+ +
+ -
- generate_full_list() - click to toggle source -
-
- - - - - -
-
-# File lib/wpstools/generate_list.rb, line 48
+          
+          
+
# File lib/wpstools/generate_list.rb, line 48
 def generate_full_list
   items = Svn_Parser.new(@svn_url, @verbose).parse
   save items
 end
-
- -
+
+ +
+ + + +
+ + + + + + + + +
+ +
+ save(items) + click to toggle source +
+ + +
+ +

Save the file

-
- - -
- - - -
- save(items) - click to toggle source -
- - -
- -

Save the file

- - - -
-
-# File lib/wpstools/generate_list.rb, line 99
+          
+
# File lib/wpstools/generate_list.rb, line 99
 def save(items)
   items.sort!
   items.uniq!
@@ -463,29 +433,26 @@ parse the response for the names.

File.open(@file_name, 'w') { |f| f.puts(items) } puts "New #{@file_name} file created" end
-
- -
- +
+
- -
+ + + +
- -
-
+ + - + -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - + diff --git a/doc/GitUpdater.html b/doc/GitUpdater.html index c8366a27..be273420 100644 --- a/doc/GitUpdater.html +++ b/doc/GitUpdater.html @@ -1,377 +1,351 @@ - - - + + + - + - Class: GitUpdater +class GitUpdater - RDoc Documentation - + + + + + + + + + + - - - - - + -
- - -
-

Parent

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

Files

- -
- - -
-

Class/Module Index - [+]

-
-
- Quicksearch - -
-
- - - -
- - -
+
-
-

GitUpdater

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

Public Instance Methods

+ +
+ + +
+

class GitUpdater

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

Public Instance Methods

+ + +
+ +
+ is_installed?() + click to toggle source +
+ + +
+ -
- is_installed?() - click to toggle source -
-
- - - - - -
-
-# File lib/updater/git_updater.rb, line 23
+          
+          
+
# File lib/updater/git_updater.rb, line 23
 def is_installed?
-  %[git #{repo_directory_arguments()} status 2>&1] =~ /On branch/ ? true : false
+  %x[git #{repo_directory_arguments()} status 2>&1] =~ %rOn 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 -the last commit hash

- - - -
-
-# File lib/updater/git_updater.rb, line 28
-def local_revision_number
-  git_log = %[git #{repo_directory_arguments()} log -1 2>&1]
-  git_log[/commit ([0-9a-z]{7})/, 1].to_s
-end
-
- -
- - - - -
- - -
- - - -
- update() - click to toggle source -
- - -
- - - - - -
-
-# File lib/updater/git_updater.rb, line 33
-def update
-  %[git #{repo_directory_arguments()} pull]
-end
-
- -
- - - - -
- - -
-
-

Protected Instance Methods

- - -
- +
+ +
+ local_revision_number() + click to toggle source +
+ +
-
- repo_directory_arguments() - 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 28
+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
+end
+
+ +
- -
-
-# File lib/updater/git_updater.rb, line 38
+        
+
+        
+      
+ + +
+ +
+ update() + click to toggle source +
+ + +
+ + + + + +
+
# File lib/updater/git_updater.rb, line 33
+def update
+  %x[git #{repo_directory_arguments()} pull]
+end
+
+ +
+ + + + +
+ + + + +
+

Protected Instance Methods

+ + +
+ +
+ repo_directory_arguments() + click to toggle source +
+ + +
+ + + + + +
+
# File lib/updater/git_updater.rb, line 38
 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/Malwares.html b/doc/Malwares.html index 3fab9ede..7cee2845 100644 --- a/doc/Malwares.html +++ b/doc/Malwares.html @@ -1,340 +1,319 @@ - - - + + + - + - Module: Malwares +module Malwares - RDoc Documentation - + + + + + + + + + + - - - - - + -
- - +
+ - - - - -
-

Methods

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

Files

- -
- - -
-

Class/Module Index - [+]

-
-
- Quicksearch - -
-
- - - -
- - -
+
-
-

Malwares

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

module Malwares

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

Public Class Methods

+ + +
+ +
+ malware_pattern(url_regex) + click to toggle source +
+ + +
+ -
- malware_pattern(url_regex) - click to toggle source -
-
- - - - - -
-
-# File lib/wpscan/modules/malwares.rb, line 56
+          
+          
+
# File lib/wpscan/modules/malwares.rb, line 56
 def self.malware_pattern(url_regex)
   # no need to escape regex here, because malware.txt contains regex
-  %{<(?:script|iframe).* src=(?:"|')(#{url_regex}[^"']*)(?:"|')[^>]*>}
+  %r{<(?:script|iframe).* src=(?:"|')(#{url_regex}[^"']*)(?:"|')[^>]*>}
 end
-
- -
+
+ +
+ + + +
+ + +
+ +
+ malwares_file(malwares_file_path) + click to toggle source +
+ + +
+ + -
- - -
- - - -
- malwares_file(malwares_file_path) - click to toggle source -
- - -
- - - - - -
-
-# File lib/wpscan/modules/malwares.rb, line 52
+          
+
# File lib/wpscan/modules/malwares.rb, line 52
 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 +
+ +
+ -
- has_malwares?(malwares_file_path = nil) - click to toggle source -
-
- - - - - -
-
-# File lib/wpscan/modules/malwares.rb, line 23
+          
+          
+
# File lib/wpscan/modules/malwares.rb, line 23
 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)

-
- - -
- - - -
- malwares(malwares_file_path = nil) - click to toggle source -
- - -
- -

return array of string (url of malwares found)

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

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - + diff --git a/doc/Object.html b/doc/Object.html index 54146448..0df52af6 100644 --- a/doc/Object.html +++ b/doc/Object.html @@ -1,384 +1,360 @@ - - - + + + - + - Class: Object +class Object - RDoc Documentation - + + + + + + + + + + - - - - - + -
- - -
-

Parent

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

Files

- -
- - -
-

Class/Module Index - [+]

-
-
- Quicksearch - -
-
- - - -
- - -
+
-
-

Object

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

class Object

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

Constants

+
- +
CACHE_DIR + +
+ - +
CONF_DIR + +
+ - -
-

Constants

-
+
DATA_DIR -
CACHE_DIR
- -
- +
-
CONF_DIR
- -
- - -
DATA_DIR
- -
- - -
LIB_DIR
- -
- - -
REVISION
- -
- - -
ROOT_DIR
- -
- - -
UPDATER_LIB_DIR
- -
- - -
WPSCAN_LIB_DIR
- -
- - -
WPSCAN_VERSION
- -
- - -
WPSTOOLS_LIB_DIR
- -
- - -
-
- +
LIB_DIR + +
+ - - +
REVISION + +
+ -
-

Public Instance Methods

- +
ROOT_DIR + +
+ -
- +
UPDATER_LIB_DIR + +
+ + +
WPSCAN_LIB_DIR + +
+ + +
WPSCAN_VERSION + +
+ + +
WPSTOOLS_LIB_DIR + +
+ + +
+
+ + + + + +
+

Public Instance Methods

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

Add protocol

-
- -

Add protocol

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

our 1337 banner

-
- - - + + + +
+ + +
+ +
+ colorize(text, color_code) + click to toggle source +
+ + +
+ + -
- - -
- - - -
- colorize(text, color_code) - click to toggle source -
- - -
- - - - - -
-
-# File lib/common_helper.rb, line 131
+          
+
# File lib/common_helper.rb, line 131
 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

-
- - -
- - - -
- get_equal_string_end(stringarray = [""]) - click to toggle source -
- - -
- -

Gets the string all elements in stringarray ends with

- - - -
-
-# File lib/common_helper.rb, line 51
+          
+
# File lib/common_helper.rb, line 51
 def get_equal_string_end(stringarray = [""])
   already_found = ""
   looping = true
@@ -483,149 +453,156 @@
   end
   already_found
 end
-
- -
+
+ +
+ + + +
+ + +
+ +
+ green(text) + click to toggle source +
+ + +
+ + -
- - -
- - - -
- green(text) - click to toggle source -
- - -
- - - - - -
-
-# File lib/common_helper.rb, line 139
+          
+
# File lib/common_helper.rb, line 139
 def green(text)
   colorize(text, 32)
 end
-
- -
+
+ +
+ + + +
+ + +
+ +
+ help() + click to toggle source +
+ + +
+ +

command help

-
- - -
- - - -
- help() - click to toggle source -
- - -
- - - - - -
-
-# File lib/wpstools/wpstools_helper.rb, line 46
+          
+
# File lib/wpscan/wpscan_helper.rb, line 73
 def help()
   puts "Help :"
   puts
-  puts "--help    | -h   This help screen."
-  puts "--Verbose | -v   Verbose output."
-  puts "--update  | -u   Update to the latest revision."
-  puts "--generate_plugin_list [number of pages]  Generate a new data/plugins.txt file. (supply number of *pages* to parse, default : 150)"
-  puts "--gpl  Alias for --generate_plugin_list"
-  puts "--generate_full_plugin_list  Generate a new full data/plugins.txt file"
-  puts "--gfpl  Alias for --generate_full_plugin_list"
-
-  puts "--generate_theme_list [number of pages]  Generate a new data/themes.txt file. (supply number of *pages* to parse, default : 150)"
-  puts "--gtl  Alias for --generate_theme_list"
-  puts "--generate_full_theme_list  Generate a new full data/themes.txt file"
-  puts "--gftl  Alias for --generate_full_theme_list"
+  puts "Some values are settable in conf/browser.conf.json :"
+  puts "  user-agent, proxy, threads, cache timeout and request timeout"
+  puts
+  puts "--update   Update to the latest revision"
+  puts "--url   | -u <target url>  The WordPress URL/domain to scan."
+  puts "--force | -f Forces WPScan to not check if the remote site is running WordPress."
+  puts "--enumerate | -e [option(s)]  Enumeration."
+  puts "  option :"
+  puts "    u        usernames from id 1 to 10"
+  puts "    u[10-20] usernames from id 10 to 20 (you must write [] chars)"
+  puts "    p        plugins"
+  puts "    vp       only vulnerable plugins"
+  puts "    ap       all plugins (can take a long time)"
+  puts "    tt       timthumbs"
+  puts "    t        themes"
+  puts "    vt       only vulnerable themes"
+  puts "    at       all themes (can take a long time)"
+  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 "--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"
+  puts "--wp-content-dir <wp content dir>  WPScan try to find the content directory (ie wp-content) by scanning the index page, however you can specified it. Subdirectories are allowed"
+  puts "--wp-plugins-dir <wp plugins dir>  Same thing than --wp-content-dir but for the plugins directory. If not supplied, WPScan will use wp-content-dir/plugins. Subdirectories are allowed"
+  puts "--proxy  Supply a proxy in the format host:port or protocol://host:port (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 "--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."
+  puts "--help     | -h This help screen."
+  puts "--verbose  | -v Verbose output."
   puts
 end
-
- -
+
+ +
+ + + +
+ + +
+ +
+ red(text) + click to toggle source +
+ + +
+ + -
- - -
- - - -
- red(text) - click to toggle source -
- - -
- - - - - -
-
-# File lib/common_helper.rb, line 135
+          
+
# File lib/common_helper.rb, line 135
 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 ?

-
- - -
- - - -
- 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 33
+          
+
# File lib/common_helper.rb, line 33
 def require_files_from_directory(absolute_dir_path, files_pattern = "*.rb")
   Dir[File.join(absolute_dir_path, files_pattern)].sort.each do |f|
     f = File.expand_path(f)
@@ -633,81 +610,100 @@
     #puts "require #{f}" # Used for debug
   end
 end
-
- -
+
+ +
+ + + +
+ + +
+ +
+ usage() + click to toggle source +
+ + +
+ +

wpscan usage

-
- - -
- - - -
- usage() - click to toggle source -
- - -
- - - - - -
-
-# File lib/wpstools/wpstools_helper.rb, line 23
+          
+
# File lib/wpscan/wpscan_helper.rb, line 24
 def usage()
   script_name = $0
   puts
-  puts "-h for further help."
+  puts "Examples :"
   puts
-  puts "Examples:"
+  puts "-Further help ..."
+  puts "ruby #{script_name} --help"
   puts
-  puts "- Generate a new 'most popular' plugin list, up to 150 pages ..."
-  puts "ruby " + script_name + " --generate_plugin_list 150"
+  puts "-Do 'non-intrusive' checks ..."
+  puts "ruby #{script_name} --url www.example.com"
   puts
-  puts "- Generate a new full plugin list"
-  puts "ruby " + script_name + " --generate_full_plugin_list"
+  puts "-Do wordlist password brute force on enumerated users using 50 threads ..."
+  puts "ruby #{script_name} --url www.example.com --wordlist darkc0de.lst --threads 50"
   puts
-  puts "- Generate a new 'most popular' theme list, up to 150 pages ..."
-  puts "ruby " + script_name + " --generate_theme_list 150"
+  puts "-Do wordlist password brute force on the 'admin' username only ..."
+  puts "ruby #{script_name} --url www.example.com --wordlist darkc0de.lst --username admin"
   puts
-  puts "- Generate a new full theme list"
-  puts "ruby " + script_name + " --generate_full_theme_list"
+  puts "-Enumerate installed plugins ..."
+  puts "ruby #{script_name} --url www.example.com --enumerate p"
+  puts
+  puts "-Enumerate installed themes ..."
+  puts "ruby #{script_name} --url www.example.com --enumerate t"
+  puts
+  puts "-Enumerate users ..."
+  puts "ruby #{script_name} --url www.example.com --enumerate u"
+  puts
+  puts "-Enumerate installed timthumbs ..."
+  puts "ruby #{script_name} --url www.example.com --enumerate tt"
+  puts
+  puts "-Use a HTTP proxy ..."
+  puts "ruby #{script_name} --url www.example.com --proxy 127.0.0.1:8118"
+  puts
+  puts "-Use a SOCKS5 proxy ... (cURL >= v7.21.7 needed)"
+  puts "ruby #{script_name} --url www.example.com --proxy socks5://127.0.0.1:9000"
+  puts
+  puts "-Use custom content directory ..."
+  puts "ruby #{script_name} -u www.example.com --wp-content-dir custom-content"
+  puts
+  puts "-Use custom plugins directory ..."
+  puts "ruby #{script_name} -u www.example.com --wp-plugins-dir wp-content/custom-plugins"
+  puts
+  puts "-Update ..."
+  puts "ruby #{script_name} --update"
   puts
   puts "See README for further information."
   puts
 end
-
- -
- +
+
- -
+ + + +
- -
- + + - + -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - + diff --git a/doc/README.html b/doc/README.html index d8d4d3ab..90f73dd8 100644 --- a/doc/README.html +++ b/doc/README.html @@ -1,151 +1,148 @@ - - + - + - + - File: README [RDoc Documentation] +README - RDoc Documentation - + + + + + + + + + + - - - - - -
-
-
-

- Home - Classes - Methods -

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

__

__          _______   _____
@@ -157,10 +154,10 @@
 
 

__

-

LICENSE==

+

LICENSE==

-

WPScan - WordPress Security Scanner Copyright (C) 2011 Ryan Dewhurst AKA -ethicalhack3r

+

WPScan - WordPress Security Scanner Copyright (C) 2011-2012 Ryan Dewhurst +AKA ethicalhack3r

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 @@ -178,44 +175,58 @@ href="http://www.gnu.org/licenses/">www.gnu.org/licenses/>.

ryandewhurst at gmail

-

INSTALL==

+

INSTALL==

-

WPScan comes pre-installed on BackTrack5 R1 in the /pentest/web/wpscan -directory. WPScan only supports Ruby => 1.9.

+
WPScan comes pre-installed on the following Linux distributions:
 
-
-> Installing on Backtrack5 Gnome/KDE 32bit :
+ * BackBox Linux
+ * BackTrack Linux (outdated WPScan installed, update needed)
+ * Pentoo
+ * SamuraiWTF
 
-  sudo apt-get install libcurl4-gnutls-dev libxml2 libxml2-dev libxslt1-dev
-  sudo gem install --user-install mime-types typhoeus nokogiri json
+Prerequisites:
 
--> Installing on Debian/Ubuntu :
+ * Windows not supported
+ * Ruby => 1.9
+ * RubyGems
+ * Git
 
-  sudo apt-get install libcurl4-gnutls-dev libopenssl-ruby libxml2 libxml2-dev libxslt1-dev
-  sudo gem install typhoeus nokogiri json
+-> Installing on Debian/Ubuntu:
 
--> Installing on other nix : (not tested)
+  sudo apt-get install libcurl4-gnutls-dev libopenssl-ruby libxml2 libxml2-dev libxslt1-dev
+  git clone https:/%rgithub.com/wpscanteam/wpscan.git
+  cd wpscan
+  sudo gem install bundler && bundle install
 
-  sudo gem install typhoeus nokogiri json
+-> Installing on Fedora:
 
--> Installing on Windows : (not tested)
+  sudo yum install libcurl-devel
+  git clone https:/%rgithub.com/wpscanteam/wpscan.git
+  cd wpscan
+  sudo gem install bundler && bundle install
 
-  gem install typhoeus ("Windows is not officially supported")
-  gem install nokogiri json
+-> Installing on Mac OS X:
 
--> Installing on Mac OSX :
+  git clone https:/%rgithub.com/wpscanteam/wpscan.git
+  cd wpscan
+  sudo gem install bundler && bundle install
+
- sudo gem install typhoeus nokogiri json
+

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 at least v7.21 (you may have to install it from sources)
-    See http://code.google.com/p/wpscan/issues/detail?id=81
+- If you have one the following errors: "-bash: !t: event not found", "-bash: !u: event not found" 
+    It happens with enumeration : just put the 't' or 'u' before the 'p!' : '-e tp!' instead of '-e p!t'
 
-- If you have one the following errors : "-bash: !t: event not found", "-bash: !u: event not found"
-    It happens with enumeration : just put the 't' or 'u' before the 'p!' : '-e tp!' instead of '-e p!t'
+- Proxy not working: + Update cURL to version => 7.21.7 (may have to install from source) + See https:/%rgithub.com/wpscanteam/wpscan/issues/7 +
-

WPSCAN ARGUMENTS==

+

WPSCAN ARGUMENTS==

–update Update to the latest revision

@@ -230,12 +241,12 @@ WordPress.

u usernames from id 1 to 10 u[10-20] usernames from id 10 to 20 (you must write [] chars) p plugins - p! only vulnerable plugins - t timthumbs - T themes - T! only vulnerable themes -Multiple values are allowed : '-e tp' will enumerate timthumbs and plugins -If no option is supplied, the default is 'tup!'
+ vp only vulnerable plugins + tt timthumbs + t themes + vp only vulnerable themes +Multiple values are allowed : '-e tt,p' will enumerate timthumbs and plugins +If no option is supplied, the default is 'vt,tt,u,vp'

–config-file | -c <config file> Use the specified config file

@@ -268,7 +279,7 @@ conf/browser.conf.json)

–verbose | -v Verbose output.

-

WPSCAN EXAMPLES==

+

WPSCAN EXAMPLES==

Do ‘non-intrusive’ checks…

@@ -286,48 +297,49 @@ conf/browser.conf.json)

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

+pages to parse, default : 150) –gpl Alias for +–generate_plugin_list

-

WPSTOOLS EXAMPLES==

+

WPSTOOLS EXAMPLES==

-

ruby wpstools.rb –generate_plugin_list 150

+

ruby wpstools.rb –generate_plugin_list 150

-

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/RpcClient.html b/doc/RpcClient.html index 26753652..a76bf81b 100644 --- a/doc/RpcClient.html +++ b/doc/RpcClient.html @@ -1,266 +1,252 @@ - - - + + + - + - Class: RpcClient +class RpcClient - RDoc Documentation - + + + + + + + + + + - - - - - + -
- - -
-

Parent

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

Files

- -
- - -
-

Class/Module Index - [+]

-
-
- Quicksearch - -
-
- - - -
- - -
+
-
-

RpcClient

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

class RpcClient

+ +
+

This library should contain all methods to communicate with msfrpc. See framework/documentation/msfrpc.txt for further information. msfrpcd -S -U wpscan -P wpscan -f -t Web -u /RPC2 name = exploit/unix/webapp/php_include

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

Public Class Methods

- - - - - - -
-

Public Class Methods

- - -
- + +
+ +
+ new() + click to toggle source +
+ +
+ -
- new() - click to toggle source -
-
- - - - - -
-
-# File lib/wpscan/msfrpc_client.rb, line 28
+          
+          
+
# File lib/wpscan/msfrpc_client.rb, line 28
 def initialize
   @config = {}
   @config['host'] = "127.0.0.1"
@@ -279,280 +265,256 @@ wpscan -P wpscan -f -t Web -u /RPC2 name = exploit/unix/webapp/php_include

puts e.faultString end end
-
- -
- +
+
- -
+ + + +
- -
-
-

Public Instance Methods

+
+ +
+

Public Instance Methods

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

check authentication

-
- -

check authentication

- - - -
-
-# File lib/wpscan/msfrpc_client.rb, line 65
+          
+          
+
# File lib/wpscan/msfrpc_client.rb, line 65
 def authenticate()
   login() if @auth_token.nil?
   login() if (Time.now - @last_auth > 600)
 end
-
- -
+
+ +
+ + + +
+ + +
+ +
+ exploit(name, opts) + click to toggle source +
+ + +
+ +

execute exploit

-
- - -
- - - -
- exploit(name, opts) - click to toggle source -
- - -
- -

execute exploit

- - - -
-
-# File lib/wpscan/msfrpc_client.rb, line 93
+          
+
# File lib/wpscan/msfrpc_client.rb, line 93
 def exploit(name, opts)
   authenticate()
   @server.call('module.execute', @auth_token, 'exploit', name, opts)
 end
-
- -
+
+ +
+ + + +
+ + +
+ +
+ get_exploit_info(name) + click to toggle source +
+ + +
+ +

retrieve information about the exploit

-
- - -
- - - -
- get_exploit_info(name) - click to toggle source -
- - -
- -

retrieve information about the exploit

- - - -
-
-# File lib/wpscan/msfrpc_client.rb, line 72
+          
+
# File lib/wpscan/msfrpc_client.rb, line 72
 def get_exploit_info(name)
   authenticate()
   @server.call('module.info', @auth_token, 'exploit', name)
 end
-
- -
+
+ +
+ + + +
+ + +
+ +
+ get_options(name) + click to toggle source +
+ + +
+ +

retrieve exploit options

-
- - -
- - - -
- get_options(name) - click to toggle source -
- - -
- -

retrieve exploit options

- - - -
-
-# File lib/wpscan/msfrpc_client.rb, line 79
+          
+
# File lib/wpscan/msfrpc_client.rb, line 79
 def get_options(name)
   authenticate()
   @server.call('module.options', @auth_token, 'exploit',name)
 end
-
- -
+
+ +
+ + + +
+ + +
+ +
+ get_payloads(name) + click to toggle source +
+ + +
+ +

retrieve the exploit payloads

-
- - -
- - - -
- get_payloads(name) - click to toggle source -
- - -
- -

retrieve the exploit payloads

- - - -
-
-# File lib/wpscan/msfrpc_client.rb, line 86
+          
+
# File lib/wpscan/msfrpc_client.rb, line 86
 def get_payloads(name)
   authenticate()
   @server.call('module.compatible_payloads', @auth_token, name)
 end
-
- -
+
+ +
+ + + +
+ + +
+ +
+ jobs() + click to toggle source +
+ + +
+ +

list msf jobs

-
- - -
- - - -
- jobs() - click to toggle source -
- - -
- -

list msf jobs

- - - -
-
-# File lib/wpscan/msfrpc_client.rb, line 100
+          
+
# File lib/wpscan/msfrpc_client.rb, line 100
 def jobs()
   authenticate()
   @server.call('job.list', @auth_token)
 end
-
- -
+
+ +
+ + + +
+ + +
+ +
+ kill_session(id) + click to toggle source +
+ + +
+ +

kill msf session

-
- - -
- - - -
- kill_session(id) - click to toggle source -
- - -
- -

kill msf session

- - - -
-
-# File lib/wpscan/msfrpc_client.rb, line 114
+          
+
# File lib/wpscan/msfrpc_client.rb, line 114
 def kill_session(id)
   authenticate()
   @server.call('session.stop', @auth_token, id)
 end
-
- -
+
+ +
+ + + +
+ + +
+ +
+ login() + click to toggle source +
+ + +
+ +

login to msfrpcd

-
- - -
- - - -
- login() - click to toggle source -
- - -
- -

login to msfrpcd

- - - -
-
-# File lib/wpscan/msfrpc_client.rb, line 49
+          
+
# File lib/wpscan/msfrpc_client.rb, line 49
 def login()
   result = @server.call("auth.login", @config['user'], @config['pass'])
 
@@ -566,199 +528,181 @@ wpscan -P wpscan -f -t Web -u /RPC2 name = exploit/unix/webapp/php_include

end end
-
- -
+
+ +
+ + + +
+ + +
+ +
+ meterpreter_read(id) + click to toggle source +
+ + +
+ + -
- - -
- - - -
- meterpreter_read(id) - click to toggle source -
- - -
- - - - - -
-
-# File lib/wpscan/msfrpc_client.rb, line 133
+          
+
# File lib/wpscan/msfrpc_client.rb, line 133
 def meterpreter_read(id)
   authenticate()
   @server.call('session.meterpreter_read', @auth_token, id)
 end
-
- -
+
+ +
+ + + +
+ + +
+ +
+ meterpreter_write(id, data) + click to toggle source +
+ + +
+ + -
- - -
- - - -
- meterpreter_write(id, data) - click to toggle source -
- - -
- - - - - -
-
-# File lib/wpscan/msfrpc_client.rb, line 138
+          
+
# File lib/wpscan/msfrpc_client.rb, line 138
 def meterpreter_write(id, data)
   authenticate()
   @server.call('session.meterpreter_write', @auth_token, id, data)
 end
-
- -
+
+ +
+ + + +
+ + +
+ +
+ read_shell(id) + click to toggle source +
+ + +
+ +

reads any pending output from session

-
- - -
- - - -
- read_shell(id) - click to toggle source -
- - -
- -

reads any pending output from session

- - - -
-
-# File lib/wpscan/msfrpc_client.rb, line 121
+          
+
# File lib/wpscan/msfrpc_client.rb, line 121
 def read_shell(id)
   authenticate()
   @server.call('session.shell_read', @auth_token, id)
 end
-
- -
+
+ +
+ + + +
+ + +
+ +
+ sessions() + click to toggle source +
+ + +
+ +

list msf sessions

-
- - -
- - - -
- sessions() - click to toggle source -
- - -
- -

list msf sessions

- - - -
-
-# File lib/wpscan/msfrpc_client.rb, line 107
+          
+
# File lib/wpscan/msfrpc_client.rb, line 107
 def sessions()
   authenticate()
   @server.call('session.list', @auth_token)
 end
-
- -
+
+ +
+ + + +
+ + +
+ +
+ write_shell(id, data) + click to toggle source +
+ + +
+ +

writes the specified input into the session

-
- - -
- - - -
- write_shell(id, data) - click to toggle source -
- - -
- -

writes the specified input into the session

- - - -
-
-# File lib/wpscan/msfrpc_client.rb, line 128
+          
+
# File lib/wpscan/msfrpc_client.rb, line 128
 def write_shell(id, data)
   authenticate()
   @server.call('session.shell_write', @auth_token, id, data)
 end
-
- -
- +
+
- -
+ + + +
- -
-
+ + -
+ -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - + diff --git a/doc/SvnUpdater.html b/doc/SvnUpdater.html index 4dc42843..e20c2e27 100644 --- a/doc/SvnUpdater.html +++ b/doc/SvnUpdater.html @@ -1,351 +1,328 @@ - - - + + + - + - Class: SvnUpdater +class SvnUpdater - RDoc Documentation - + + + + + + + + + + - - - - - + -
- - -
-

Parent

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

Methods

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

Files

- -
- - -
-

Class/Module Index - [+]

-
-
- Quicksearch - -
-
- - - -
- - -
+
-
-

SvnUpdater

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

class SvnUpdater

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

Constants

+
- -
-

Constants

-
+
REVISION_PATTERN -
REVISION_PATTERN
- -
- +
-
TRUNK_URL
- -
- + +
TRUNK_URL + +
-
-
+
+
+ - + - - -
-

Public Instance Methods

+ + +
+

Public Instance Methods

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

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - + diff --git a/doc/Svn_Parser.html b/doc/Svn_Parser.html index 899038e7..190013c2 100644 --- a/doc/Svn_Parser.html +++ b/doc/Svn_Parser.html @@ -1,298 +1,272 @@ - - - + + + - + - Class: Svn_Parser +class Svn_Parser - RDoc Documentation - + + + + + + + + + + - - - - - + -
- - -
-

Parent

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

Methods

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

Files

- -
- - -
-

Class/Module Index - [+]

-
-
- Quicksearch - -
-
- - - -
- - -
+
-
-

Svn_Parser

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

class Svn_Parser

+ +
+

This Class Parses SVN Repositories via HTTP

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

Attributes

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

Attributes

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

Public Class Methods

+ + +
+ +
+ new(svn_root, verbose, keep_empty_dirs = false) + click to toggle source
-
- - - - -
- svn_root[RW] -
-
+
-
-
- -
- - - - -
- verbose[RW] -
- -
- - - -
-
- -
- - - - -
-

Public Class Methods

- - -
- -
- new(svn_root, verbose, keep_empty_dirs = false) - click to toggle source -
- - -
- - - - - -
-
-# File lib/wpstools/parse_svn.rb, line 26
+          
+
# File lib/wpstools/parse_svn.rb, line 26
 def initialize(svn_root, verbose, keep_empty_dirs = false)
   @svn_root         = svn_root
   @verbose          = verbose
@@ -300,42 +274,39 @@
   @svn_browser      = Browser.instance
   @svn_hydra        = @svn_browser.hydra
 end
-
- -
- +
+
- -
+ + + +
- -
-
-

Public Instance Methods

+
+ +
+

Public Instance Methods

- -
- + +
+ +
+ parse(dirs=nil) + click to toggle source +
+ +
+ -
- parse(dirs=nil) - click to toggle source -
-
- - - - - -
-
-# File lib/wpstools/parse_svn.rb, line 34
+          
+          
+
# File lib/wpstools/parse_svn.rb, line 34
 def parse(dirs=nil)
   if dirs == nil
     dirs = get_root_directories
@@ -343,29 +314,26 @@
   urls = get_svn_project_urls(dirs)
   get_svn_file_entries(urls)
 end
-
- -
- +
+
- -
+ + + +
- -
-
+ + - + -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - + diff --git a/doc/URI.html b/doc/URI.html index b6775b6b..6c4ed92e 100644 --- a/doc/URI.html +++ b/doc/URI.html @@ -1,254 +1,239 @@ - - - + + + - + - Module: URI +module URI - RDoc Documentation - + + + + + + + + + + - - - - - + -
- - +
+ - - - - -
-

Methods

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

Files

- -
- - -
-

Class/Module Index - [+]

-
-
- Quicksearch - -
-
- - - -
- - -
+
-
-

URI

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

module URI

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

Public Class Methods

+ + +
+ +
+ escape(str) + click to toggle source +
+ + +
+ -
- escape(str) - click to toggle source -
-
- - - - - -
-
-# File lib/common_helper.rb, line 79
+          
+          
+
# File lib/common_helper.rb, line 79
 def self.escape(str)
   URI.encode_www_form_component(str).gsub("+", "%20")
 end
-
- -
- +
+
- -
+ + + +
- -
-
+ + -
+ -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - + diff --git a/doc/Updater.html b/doc/Updater.html index 79895e03..6fc2d033 100644 --- a/doc/Updater.html +++ b/doc/Updater.html @@ -1,440 +1,409 @@ - - - + + + - + - Class: Updater +class Updater - RDoc Documentation - + + + + + + + + + + - - - - - + -
- - -
-

Parent

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

Files

- -
- - -
-

Class/Module Index - [+]

-
-
- Quicksearch - -
-
- - - -
- - -
+
-
-

Updater

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

class Updater

+ +
+

This class act as an absract one

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

Attributes

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

Attributes

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

Public Class Methods

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

Public Class Methods

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

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

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

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

Public Instance Methods

+
+ +
+

Public Instance Methods

- -
- + +
+ +
+ is_installed?() + click to toggle source +
+ +
+ -
- is_installed?() - click to toggle source -
-
- - - - - -
-
-# File lib/updater/updater.rb, line 29
+          
+          
+
# File lib/updater/updater.rb, line 29
 def is_installed?
   raise_must_be_implemented()
 end
-
- -
+
+ +
+ + + +
+ + +
+ +
+ local_revision_number() + click to toggle source +
+ + +
+ + -
- - -
- - - -
- local_revision_number() - click to toggle source -
- - -
- - - - - -
-
-# File lib/updater/updater.rb, line 33
+          
+
# File lib/updater/updater.rb, line 33
 def local_revision_number
   raise_must_be_implemented()
 end
-
- -
+
+ +
+ + + +
+ + +
+ +
+ update() + click to toggle source +
+ + +
+ + -
- - -
- - - -
- update() - click to toggle source -
- - -
- - - - - -
-
-# File lib/updater/updater.rb, line 37
+          
+
# File lib/updater/updater.rb, line 37
 def update
   raise_must_be_implemented()
 end
-
- -
- +
+
- -
+ + + +
- -
-
-

Protected Instance Methods

+ + +
+

Protected Instance Methods

- -
- + +
+ +
+ raise_must_be_implemented() + click to toggle source +
+ +
+ -
- raise_must_be_implemented() - click to toggle source -
-
- - - - - -
-
-# File lib/updater/updater.rb, line 43
+          
+          
+
# File lib/updater/updater.rb, line 43
 def raise_must_be_implemented
   raise "The method must be implemented"
 end
-
- -
- +
+
- -
+ + + +
- -
-
+ + - + -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - + diff --git a/doc/UpdaterFactory.html b/doc/UpdaterFactory.html index 6b4c4cc7..4417e666 100644 --- a/doc/UpdaterFactory.html +++ b/doc/UpdaterFactory.html @@ -1,238 +1,224 @@ - - - + + + - + - Class: UpdaterFactory +class UpdaterFactory - RDoc Documentation - + + + + + + + + + + - - - - - + -
- - -
-

Parent

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

Methods

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

Files

- -
- - -
-

Class/Module Index - [+]

-
-
- Quicksearch - -
-
- - - -
- - -
+
-
-

UpdaterFactory

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

Public Class Methods

+ +
+ + +
+

class UpdaterFactory

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

Public Class Methods

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

Protected Class Methods

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

return array of class symbols

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

Protected Class Methods

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

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
+
+ +

return array of class symbols

+ - - + +
+
# File lib/updater/updater_factory.rb, line 35
+def self.available_updaters_classes
+  Object.constants.grep(%r^.+Updater$/)
+end
+
+ +
+ + + + +
+ + +
+ + + + + + + diff --git a/doc/Vulnerable.html b/doc/Vulnerable.html index dc56b760..2c130d94 100644 --- a/doc/Vulnerable.html +++ b/doc/Vulnerable.html @@ -1,274 +1,256 @@ - - - + + + - + - Class: Vulnerable +class Vulnerable - RDoc Documentation - + + + + + + + + + + - - - - - + -
- - -
-

Parent

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

Methods

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

Files

- -
- - -
-

Class/Module Index - [+]

-
-
- Quicksearch - -
-
- - - -
- - -
+
-
-

Vulnerable

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

class Vulnerable

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

Attributes

+
+
+ vulns_file[R] +
- - - - -
-

Attributes

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

Public Instance Methods

+ + +
+ +
+ vulnerabilities() + click to toggle source
-
- - -
- vulns_xpath[R] -
-
+
- - -
-
- -
- - - - -
-

Public Instance Methods

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

@return an array of WpVulnerability (can +

@return an array of WpVulnerability (can be empty)

- + - -
-
-# File lib/wpscan/vulnerable.rb, line 24
+          
+          
+
# File lib/wpscan/vulnerable.rb, line 24
 def vulnerabilities
   vulnerabilities = []
 
@@ -285,29 +267,26 @@ be empty)

end vulnerabilities end
-
- -
- +
+
- -
+ + + +
- -
-
+ + - + -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - + diff --git a/doc/WebSite.html b/doc/WebSite.html index 920741b7..0b4d4e8b 100644 --- a/doc/WebSite.html +++ b/doc/WebSite.html @@ -1,267 +1,252 @@ - - - + + + - + - Module: WebSite +module WebSite - RDoc Documentation - + + + + + + + + + + - - - - - + -
- - +
+ - - - - -
-

Methods

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

Files

- -
- - -
-

Class/Module Index - [+]

-
-
- Quicksearch - -
-
- - - -
- - -
+
-
-

WebSite

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

module WebSite

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

Public Instance Methods

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

Checks if the remote website is up.

-
- -

Checks if the remote website is up.

- - - -
-
-# File lib/wpscan/modules/web_site.rb, line 52
+          
+          
+
# File lib/wpscan/modules/web_site.rb, line 52
 def is_online?
   Browser.instance.get(@uri.to_s).code != 0
 end
-
- -
+
+ +
+ + + +
+ + +
+ +
+ is_wordpress?() + click to toggle source +
+ + +
+ +

check if the remote website is actually running wordpress.

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

check if the remote website is actually running wordpress.

- - - -
-
-# File lib/wpscan/modules/web_site.rb, line 23
+          
+
# File lib/wpscan/modules/web_site.rb, line 23
 def is_wordpress?
   wordpress = false
 
@@ -270,7 +255,7 @@
       {:follow_location => true, :max_redirects => 2}
   )
 
-  if response.body =~ %{WordPress}
+  if response.body =~ %r{WordPress}
     wordpress = true
   else
     response = Browser.instance.get(
@@ -278,44 +263,41 @@
         {:follow_location => true, :max_redirects => 2}
     )
 
-    if response.body =~ %{XML-RPC server accepts POST requests only}
+    if response.body =~ %r{XML-RPC server accepts POST requests only}
       wordpress = true
     end
   end
 
   wordpress
 end
-
- -
- +
+
+ + + +
+ + +
+ +
+ redirection(url = nil) + click to toggle source +
+ + +
-
- - -
- - - -
- redirection(url = nil) - click to toggle source -
- - -
- -

see if the remote url returns 30x redirect return a string with the +

see if the remote url returns 30x redirect return a string with the redirection or nil

- + - -
-
-# File lib/wpscan/modules/web_site.rb, line 58
+          
+          
+
# File lib/wpscan/modules/web_site.rb, line 58
 def redirection(url = nil)
   redirection = nil
   url ||= @uri.to_s
@@ -327,62 +309,56 @@ redirection or nil

redirection end
-
- -
+
+ +
+ + + +
+ + +
+ +
+ xmlrpc_url() + click to toggle source +
+ + +
+ + -
- - -
- - - -
- xmlrpc_url() - click to toggle source -
- - -
- - - - - -
-
-# File lib/wpscan/modules/web_site.rb, line 47
+          
+
# File lib/wpscan/modules/web_site.rb, line 47
 def xmlrpc_url
   @uri.merge("xmlrpc.php").to_s
 end
-
- -
- +
+
- -
+ + + +
- -
-
+ + -
+ -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - + diff --git a/doc/WpConfigBackup.html b/doc/WpConfigBackup.html index b60309f3..1487b6f0 100644 --- a/doc/WpConfigBackup.html +++ b/doc/WpConfigBackup.html @@ -1,275 +1,260 @@ - - - + + + - + - Module: WpConfigBackup +module WpConfigBackup - RDoc Documentation - + + + + + + + + + + - - - - - + -
- - +
+ - - - - -
-

Methods

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

Files

- -
- - -
-

Class/Module Index - [+]

-
-
- Quicksearch - -
-
- - - -
- - -
+
-
-

WpConfigBackup

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

module WpConfigBackup

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

Public Class Methods

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

@return Array

-
- -

@return Array

- - - -
-
-# File lib/wpscan/modules/wp_config_backup.rb, line 49
+          
+          
+
# File lib/wpscan/modules/wp_config_backup.rb, line 49
 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

+ + +
+

Public Instance Methods

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

Checks to see if wp-config.php has a backup See 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 24
 def config_backup
   found = []
   backups = WpConfigBackup.config_backup_files
@@ -281,7 +266,7 @@ an array of backup config files url

request = browser.forge_request(file_url) request.on_complete do |response| - if response.body[%{define}] and not response.body[%{<\s?html}] + if response.body[%r{define}] and not response.body[%r{<\s?html}] found << file_url end end @@ -293,29 +278,26 @@ an array of backup config files url

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

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - + diff --git a/doc/WpDetector.html b/doc/WpDetector.html index 7ffb4949..eea7e7c2 100644 --- a/doc/WpDetector.html +++ b/doc/WpDetector.html @@ -1,238 +1,224 @@ - - - + + + - + - Class: WpDetector +class WpDetector - RDoc Documentation - + + + + + + + + + + - - - - - + -
- - -
-

Parent

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

Methods

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

Files

- -
- - -
-

Class/Module Index - [+]

-
-
- Quicksearch - -
-
- - - -
- - -
+
-
-

WpDetector

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

Public Class Methods

+ +
+ + +
+

class WpDetector

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

Public Class Methods

+ + +
+ +
+ aggressive_detection(options, items = []) + click to toggle source +
+ + +
+ -
- aggressive_detection(options, items = []) - click to toggle source -
-
- - - - - -
-
-# File lib/wpscan/wp_detector.rb, line 21
+          
+          
+
# File lib/wpscan/wp_detector.rb, line 21
 def self.aggressive_detection(options, items = [])
   WpOptions.check_options(options)
 
@@ -257,48 +243,45 @@
   end
   result
 end
-
- -
- +
+
+ + + +
+ + +
+ +
+ passive_detection(url, type, wp_content_dir) + click to toggle source +
+ + +
-
- - -
- - - -
- passive_detection(url, type, wp_content_dir) - click to toggle source -
- - -
- -

plugins and themes can be found in the source code :

+

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 50
+          
+          
+
# File lib/wpscan/wp_detector.rb, line 50
 def self.passive_detection(url, type, wp_content_dir)
   items         = []
   response      = Browser.instance.get(url)
-  regex1        = %{(?:[^=:]+)\s?(?:=|:)\s?(?:"|')[^"']+\\?/}
-  regex2        = %{\\?/}
-  regex3        = %{\\?/([^/\\"']+)\\?(?:/|"|')}
+  regex1        = %r{(?:[^=:]+)\s?(?:=|:)\s?(?:"|')[^"']+\\?/}
+  regex2        = %r{\\?/}
+  regex3        = %r{\\?/([^/\\"']+)\\?(?:/|"|')}
   # Custom wp-content dir is now used in this regex
-  names = response.body.scan(/#{regex1}#{Regexp.escape(wp_content_dir)}#{regex2}#{Regexp.escape(type)}#{regex3}/)
+  names = response.body.scan(%r#{regex1}#{Regexp.escape(wp_content_dir)}#{regex2}#{Regexp.escape(type)}#{regex3}/)
 
   names.flatten!
   names.uniq!
@@ -315,29 +298,26 @@
   end
   items
 end
-
- -
- +
+
- -
+ + + +
- -
-
+ + - + -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - + diff --git a/doc/WpEnumerator.html b/doc/WpEnumerator.html index 28d21739..209955a6 100644 --- a/doc/WpEnumerator.html +++ b/doc/WpEnumerator.html @@ -1,260 +1,246 @@ - - - + + + - + - Class: WpEnumerator +class WpEnumerator - RDoc Documentation - + + + + + + + + + + - - - - - + -
- - -
-

Parent

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

Methods

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

Files

- -
- - -
-

Class/Module Index - [+]

-
-
- Quicksearch - -
-
- - - -
- - -
+
-
-

WpEnumerator

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

class WpEnumerator

+ +
+

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

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

Public Class Methods

- - - - - - -
-

Public Class Methods

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

Enumerate the given Targets

-
- -

Enumerate the given Targets

- -

Attributes

+

Attributes

  • -

    targets - targets to enumerate

    +

    targets - targets to enumerate

    • -

      :base_url - Base URL

      +

      :base_url - Base URL

    • -

      :wp_content - wp-content directory

      +

      :wp_content - wp-content directory

    • -

      :path - Path to plugin

      +

      :path - Path to plugin

  • -

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

    +

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

  • -

    filename - filename in the data directory with paths

    +

    filename - filename in the data directory with paths

  • -

    show_progress_bar - Show a progress bar during enumeration

    +

    show_progress_bar - Show a progress bar during enumeration

- + - -
-
-# File lib/wpscan/wp_enumerator.rb, line 33
+          
+          
+
# File lib/wpscan/wp_enumerator.rb, line 33
 def self.enumerate(options = {}, items = nil)
 
   WpOptions.check_options(options)
@@ -303,42 +289,39 @@
   enum_hydra.run
   found
 end
-
- -
- +
+
- -
+ + + +
- -
-
-

Protected Class Methods

+
+ +
+

Protected Class Methods

- -
- + +
+ +
+ generate_items(options = {}) + click to toggle source +
+ +
+ -
- generate_items(options = {}) - click to toggle source -
-
- - - - - -
-
-# File lib/wpscan/wp_enumerator.rb, line 84
+          
+          
+
# File lib/wpscan/wp_enumerator.rb, line 84
 def self.generate_items(options = {})
   only_vulnerable   = options[:only_vulnerable_ones]
   file              = options[:file]
@@ -367,7 +350,7 @@
   end
 
   # Timthumbs have no XML file
-  unless type =~ /timthumbs/
+  unless type =~ %rtimthumbs/
     xml = Nokogiri::XML(File.open(vulns_file)) do |config|
       config.noblanks
     end
@@ -392,29 +375,26 @@
   # randomize the plugins array to *maybe* help in some crappy IDS/IPS/WAF detection
   targets_url.sort_by! { rand }
 end
-
- -
- +
+
- -
+ + + +
- -
-
+ + -
+ -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - + diff --git a/doc/WpFullPathDisclosure.html b/doc/WpFullPathDisclosure.html index a188c45e..4e71d706 100644 --- a/doc/WpFullPathDisclosure.html +++ b/doc/WpFullPathDisclosure.html @@ -1,290 +1,272 @@ - - - + + + - + - Module: WpFullPathDisclosure +module WpFullPathDisclosure - RDoc Documentation - + + + + + + + + + + - - - - - + -
- - +
+ - - - - - - - - -
- -
- - -
-

Files

- -
- - -
-

Class/Module Index - [+]

-
-
- Quicksearch - -
-
- - - -
- - -
+
-
-

WpFullPathDisclosure

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

module WpFullPathDisclosure

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

Public Instance Methods

+ + +
+ +
+ full_path_disclosure_url() + click to toggle source +
+ + +
+ -
- full_path_disclosure_url() - click to toggle source -
-
- - - - - -
-
-# File lib/wpscan/modules/wp_full_path_disclosure.rb, line 27
+          
+          
+
# File lib/wpscan/modules/wp_full_path_disclosure.rb, line 27
 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)

-
- - -
- - - -
- 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
+          
+
# File lib/wpscan/modules/wp_full_path_disclosure.rb, line 22
 def has_full_path_disclosure?
   response = Browser.instance.get(full_path_disclosure_url())
-  response.body[%{Fatal error}]
+  response.body[%r{Fatal error}]
 end
-
- -
- +
+
- -
+ + + +
- -
-
+ + -
+ -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - + diff --git a/doc/WpItem.html b/doc/WpItem.html index f95ca7ca..78d8574e 100644 --- a/doc/WpItem.html +++ b/doc/WpItem.html @@ -1,400 +1,370 @@ - - - + + + - + - Class: WpItem +class WpItem - RDoc Documentation - + + + + + + + + + + - - - - - + -
- - -
-

Parent

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

Files

- -
- - -
-

Class/Module Index - [+]

-
-
- Quicksearch - -
-
- - - -
- - -
+
-
-

WpItem

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

class WpItem

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

Attributes

+
+
+ base_url[R] +
+
+ + + +
+
+
+
+ name[R] +
+
+ + + +
+
- -
-

Attributes

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

Public Class Methods

+
+
+ vulns_file[R] +
+
+ + + +
+
-
- +
+
+ vulns_xpath[R] +
+
+ + + +
+
+ +
+
+ wp_content_dir[R] +
+ +
+ + + +
+
+ +
+
+ wp_plugins_dir[R] +
+ +
+ + + +
+
+ +
+ + + + +
+

Public Class Methods

+ + +
+ +
+ new(options) + click to toggle source +
+ + +
+ -
- new(options) - click to toggle source -
-
- - - - - -
-
-# File lib/wpscan/wp_item.rb, line 25
+          
+          
+
# 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(/^\//, "").sub(/\/$/, "") : "wp-content"
+  @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(/\$name\$/, @name) unless options[:vulns_xpath] == nil
+  @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
@@ -403,288 +373,264 @@
   raise("vulns_file not set")     unless @vulns_file
   raise("type not set")           unless @type
 end
-
- -
- +
+
- -
+ + + +
- -
-
-

Public Instance Methods

+ + +
+

Public Instance Methods

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

Compare

-
- -

Compare

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

Compare

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

Compare

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

Compare

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

Compare

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

Url for changelog.txt

-
- - -
- - - -
- changelog_url() - click to toggle source -
- - -
- -

Url for changelog.txt

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

Is directory listing enabled?

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

Is directory listing enabled?

- - - -
-
-# File lib/wpscan/wp_item.rb, line 95
+          
+
# File lib/wpscan/wp_item.rb, line 95
 def directory_listing?
   # Need to remove to file part from the url
-  Browser.instance.get(get_url_without_filename).body[%{<title>Index of}] ? true : false
+  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

-
- - -
- - - -
- extract_name_from_url() - click to toggle source -
- - -
- -

Extract item name from a url

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

Get the full url for this item

-
- - -
- - - -
- get_full_url() - click to toggle source -
- - -
- -

Get the full url for this item

- - - -
-
-# File lib/wpscan/wp_item.rb, line 57
+          
+
# File lib/wpscan/wp_item.rb, line 57
 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(/^\//, "").sub(/\/$/, "")
+  wp_content_dir = @wp_content_dir.sub(%r^\//, "").sub(%r\/$/, "")
   # remove first /
-  path = @path.sub(/^\//, "")
+  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("#{url}#@wp_plugins_dir/#{path}")
+    ret = URI.parse(URI.encode("#{url}#@wp_plugins_dir/#{path}"))
   elsif type == "timthumbs"
     # timthumbs have folder in path variable
-    ret = URI.parse("#{url}#{wp_content_dir}/#{path}")
+    ret = URI.parse(URI.encode("#{url}#{wp_content_dir}/#{path}"))
   else
-    ret = URI.parse("#{url}#{wp_content_dir}/#{get_sub_folder}/#{path}")
+    ret = URI.parse(URI.encode("#{url}#{wp_content_dir}/#{get_sub_folder}/#{path}"))
   end
   ret
 end
-
- -
+
+ +
+ + + +
+ + +
+ +
+ get_sub_folder() + click to toggle source +
+ + +
+ + -
- - -
- - - -
- get_sub_folder() - click to toggle source -
- - -
- - - - - -
-
-# File lib/wpscan/wp_item.rb, line 43
+          
+
# File lib/wpscan/wp_item.rb, line 43
 def get_sub_folder
   case @type
     when "themes"
@@ -697,74 +643,68 @@
   end
   folder
 end
-
- -
+
+ +
+ + + +
+ + +
+ +
+ get_url_without_filename() + click to toggle source +
+ + +
+ +

Gets the full url for this item without filenames

-
- - -
- - - -
- get_url_without_filename() - click to toggle source -
- - -
- -

Gets the full url for this item without filenames

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

changelog.txt present?

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

changelog.txt present?

- - - -
-
-# File lib/wpscan/wp_item.rb, line 146
+          
+
# File lib/wpscan/wp_item.rb, line 146
 def has_changelog?
   unless @changelog
     status = Browser.instance.get(changelog_url).code
@@ -772,36 +712,33 @@
   end
   @changelog
 end
-
- -
+
+ +
+ + + +
+ + +
+ +
+ has_readme?() + click to toggle source +
+ + +
+ +

readme.txt present?

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

readme.txt present?

- - - -
-
-# File lib/wpscan/wp_item.rb, line 137
+          
+
# File lib/wpscan/wp_item.rb, line 137
 def has_readme?
   unless @readme
     status = Browser.instance.get(readme_url).code
@@ -809,133 +746,121 @@
   end
   @readme
 end
-
- -
+
+ +
+ + + +
+ + +
+ +
+ readme_url() + click to toggle source +
+ + +
+ +

Url for readme.txt

-
- - -
- - - -
- readme_url() - click to toggle source -
- - -
- -

Url for readme.txt

- - - -
-
-# File lib/wpscan/wp_item.rb, line 127
+          
+
# File lib/wpscan/wp_item.rb, line 127
 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

-
- - -
- - - -
- to_s() - click to toggle source -
- - -
- -

To string. Adds a version number if detected

- - - -
-
-# File lib/wpscan/wp_item.rb, line 106
+          
+
# File lib/wpscan/wp_item.rb, line 106
 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

-
- - -
- - - -
- version() - click to toggle source -
- - -
- -

Returns version number from readme.txt if it exists

- - - -
-
-# File lib/wpscan/wp_item.rb, line 86
+          
+
# File lib/wpscan/wp_item.rb, line 86
 def version
   unless @version
     response = Browser.instance.get(get_full_url.merge("readme.txt").to_s)
-    @version = response.body[%{stable tag: #{WpVersion.version_pattern}}, 1]
+    @version = response.body[%r{stable tag: #{WpVersion.version_pattern}}, 1]
   end
   @version
 end
-
- -
- +
+
- -
+ + + +
- -
- + + - + -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - + diff --git a/doc/WpLoginProtection.html b/doc/WpLoginProtection.html index 78dc3bec..4499e066 100644 --- a/doc/WpLoginProtection.html +++ b/doc/WpLoginProtection.html @@ -1,303 +1,288 @@ - - - + + + - + - Module: WpLoginProtection +module WpLoginProtection - RDoc Documentation - + + + + + + + + + + - - - - - + -
- - +
+ - - - - - - - - -
- -
- - -
-

Files

- -
- - -
-

Class/Module Index - [+]

-
-
- Quicksearch - -
-
- - - -
- - -
+
-
-

WpLoginProtection

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

module WpLoginProtection

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

Constants

+
- -
-

Constants

-
+
LOGIN_PROTECTION_METHOD_PATTERN -
LOGIN_PROTECTION_METHOD_PATTERN
- -
- +
-
-
+
+
+ - + - - -
-

Public Instance Methods

+ + +
+

Public Instance Methods

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

Checks if a login protection plugin is enabled 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 32
 def login_protection_plugin
   unless @login_protection_plugin
     protected_methods.grep(LOGIN_PROTECTION_METHOD_PATTERN).each do |symbol_to_call|
@@ -317,42 +302,39 @@ found

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

Protected Instance Methods

+
+ +
+

Protected Instance Methods

- -
- + +
+ +
+ better_wp_security_url() + click to toggle source +
+ +
+ -
- better_wp_security_url() - click to toggle source -
-
- - - - - -
-
-# File lib/wpscan/modules/wp_login_protection.rb, line 69
+          
+          
+
# File lib/wpscan/modules/wp_login_protection.rb, line 69
 def better_wp_security_url
   WpPlugin.new(:wp_content_dir  => @wp_content_dir,
                :base_url        => @uri,
@@ -360,36 +342,33 @@ found

:name => "better-wp-security" ).get_url_without_filename end
-
- -
+
+ +
+ + + +
+ + +
+ +
+ bluetrait_event_viewer_url() + click to toggle source +
+ + +
+ + -
- - -
- - - -
- bluetrait_event_viewer_url() - click to toggle source -
- - -
- - - - - -
-
-# File lib/wpscan/modules/wp_login_protection.rb, line 121
+          
+
# File lib/wpscan/modules/wp_login_protection.rb, line 121
 def bluetrait_event_viewer_url
   WpPlugin.new(:wp_content_dir  => @wp_content_dir,
                :base_url        => @uri,
@@ -397,274 +376,250 @@ found

:name => "bluetrait-event-viewer" ).get_url_without_filename 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 65
 def has_better_wp_security_protection?
   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 117
 def has_bluetrait_event_viewer_protection?
   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 104
 def has_limit_login_attempts_protection?
   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 60
 def has_login_lock_protection?
-  Browser.instance.get(login_url()).body =~ %{LOGIN LOCK} ? true : false
+  Browser.instance.get(login_url()).body =~ %r{LOGIN LOCK} ? true : false
 end
-
- -
- +
+
+ + + +
+ + +
+ +
+ has_login_lockdown_protection?() + click to toggle source +
+ + +
-
- - -
- - - -
- has_login_lockdown_protection?() - click to toggle source -
- - -
- -

Thanks to Alip Aswalid for providing this method. 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 55
 def has_login_lockdown_protection?
-  Browser.instance.get(login_url()).body =~ %{Login LockDown} ? true : false
+  Browser.instance.get(login_url()).body =~ %r{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 91
 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 78
 def has_simple_login_lockdown_protection?
   Browser.instance.get(simple_login_lockdown_url()).code != 404
 end
-
- -
+
+ +
+ + + +
+ + +
+ +
+ limit_login_attempts_url() + click to toggle source +
+ + +
+ + -
- - -
- - - -
- limit_login_attempts_url() - click to toggle source -
- - -
- - - - - -
-
-# File lib/wpscan/modules/wp_login_protection.rb, line 108
+          
+
# File lib/wpscan/modules/wp_login_protection.rb, line 108
 def limit_login_attempts_url
   WpPlugin.new(:wp_content_dir  => @wp_content_dir,
                :base_url        => @uri,
@@ -672,36 +627,33 @@ href="http://wordpress.org/extend/plugins/simple-login-lockdown/">wordpress.org/
                :name            => "limit-login-attempts"
   ).get_url_without_filename
 end
-
- -
+
+ +
+ + + +
+ + +
+ +
+ login_security_solution_url() + click to toggle source +
+ + +
+ + -
- - -
- - - -
- login_security_solution_url() - click to toggle source -
- - -
- - - - - -
-
-# File lib/wpscan/modules/wp_login_protection.rb, line 95
+          
+
# File lib/wpscan/modules/wp_login_protection.rb, line 95
 def login_security_solution_url
   WpPlugin.new(:wp_content_dir  => @wp_content_dir,
                :base_url        => @uri,
@@ -709,36 +661,33 @@ href="http://wordpress.org/extend/plugins/simple-login-lockdown/">wordpress.org/
                :name            => "login-security-solution"
   ).get_url_without_filename
 end
-
- -
+
+ +
+ + + +
+ + +
+ +
+ simple_login_lockdown_url() + click to toggle source +
+ + +
+ + -
- - -
- - - -
- simple_login_lockdown_url() - click to toggle source -
- - -
- - - - - -
-
-# File lib/wpscan/modules/wp_login_protection.rb, line 82
+          
+
# File lib/wpscan/modules/wp_login_protection.rb, line 82
 def simple_login_lockdown_url
   WpPlugin.new(:wp_content_dir  => @wp_content_dir,
                :base_url        => @uri,
@@ -746,29 +695,26 @@ href="http://wordpress.org/extend/plugins/simple-login-lockdown/">wordpress.org/
                :name            => "simple-login-lockdown"
   ).get_url_without_filename
 end
-
- -
- +
+
- -
+ + + +
- -
-
+ + -
+ -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - + diff --git a/doc/WpOptions.html b/doc/WpOptions.html index a3f8411c..5f32724a 100644 --- a/doc/WpOptions.html +++ b/doc/WpOptions.html @@ -1,261 +1,247 @@ - - - + + + - + - Class: WpOptions +class WpOptions - RDoc Documentation - + + + + + + + + + + - - - - - + -
- - -
-

Parent

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

Methods

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

Files

- -
- - -
-

Class/Module Index - [+]

-
-
- Quicksearch - -
-
- - - -
- - -
+
-
-

WpOptions

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

class WpOptions

+ +
+

Options Hash

-

Options

+

Options

  • -

    url - The base URL of the WordPress site

    +

    url - The base URL of the WordPress site

  • -

    only_vulnerable_ones - Only detect vulnerable items

    +

    only_vulnerable_ones - Only detect vulnerable items

  • -

    file - Filename with items to detect

    +

    file - Filename with items to detect

  • -

    vulns_file - XML file with vulnerabilities

    +

    vulns_file - XML file with vulnerabilities

  • -

    vulns_xpath - XPath for vulnerability XML file

    +

    vulns_xpath - XPath for vulnerability XML file

  • -

    vulns_xpath_2 - XPath for vulnerability XML file

    +

    vulns_xpath_2 - XPath for vulnerability XML file

  • -

    wp_content_dir - Name of the wp-content directory

    +

    wp_content_dir - Name of the wp-content directory

  • -

    show_progress_bar - Show a progress bar during enumeration

    +

    show_progress_bar - Show a progress bar during enumeration

  • -

    error_404_hash - MD5 hash of a 404 page

    +

    error_404_hash - MD5 hash of a 404 page

  • -

    type - Type: plugins, themes

    +

    type - Type: plugins, themes

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

Public Class Methods

- - - - - - -
-

Public Class Methods

- - -
- + +
+ +
+ check_options(options) + click to toggle source +
+ +
+ -
- check_options(options) - click to toggle source -
-
- - - - - -
-
-# File lib/wpscan/wp_options.rb, line 34
+          
+          
+
# 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
@@ -268,33 +254,30 @@
   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] =~ /plugins/ or options[:type] =~ /themes/ or options[:type] =~ /timthumbs/
+  unless options[:type] =~ %rplugins/ or options[:type] =~ %rthemes/ or options[:type] =~ %rtimthumbs/
     raise("Unknown type #{options[:type]}")
   end
 end
-
- -
- +
+
- -
+ + + +
- -
-
+
+ -
+
-
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - + diff --git a/doc/WpPlugin.html b/doc/WpPlugin.html index 05bdee8f..77888833 100644 --- a/doc/WpPlugin.html +++ b/doc/WpPlugin.html @@ -1,240 +1,226 @@ - - - + + + - + - Class: WpPlugin +class WpPlugin - RDoc Documentation - + + + + + + + + + + - - - - - + -
- - -
-

Parent

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

Methods

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

Files

- -
- - -
-

Class/Module Index - [+]

-
-
- Quicksearch - -
-
- - - -
- - -
+
-
-

WpPlugin

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

Public Class Methods

+ +
+ + +
+

class WpPlugin

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

Public Class Methods

+ + +
+ +
+ new(options = {}) + click to toggle source +
+ + +
+ -
- new(options = {}) - click to toggle source -
-
- - - - - -
-
-# File lib/wpscan/wp_plugin.rb, line 20
+          
+          
+
# File lib/wpscan/wp_plugin.rb, line 20
 def initialize(options = {})
   options[:vulns_file]    = (options[:vulns_file] != nil and options[:vulns_file] != "") ?
       options[:vulns_file] : DATA_DIR + "/plugin_vulns.xml"
@@ -243,105 +229,96 @@
   options[:type]          = "plugins"
   super(options)
 end
-
- -
- +
+
- -
+ + + +
- -
-
-

Public Instance Methods

+ + +
+

Public Instance Methods

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

Discover any error_log files created by WordPress These are created by the +

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 34
+          
+          
+
# File lib/wpscan/wp_plugin.rb, line 34
 def error_log?
   response_body = Browser.instance.get(error_log_url(), :headers => {"range" => "bytes=0-700"}).body
-  response_body[%{PHP Fatal error}] ? true : false
+  response_body[%r{PHP Fatal error}] ? true : false
 end
-
- -
+
+ +
+ + + +
+ + +
+ +
+ error_log_url() + click to toggle source +
+ + +
+ + -
- - -
- - - -
- error_log_url() - click to toggle source -
- - -
- - - - - -
-
-# File lib/wpscan/wp_plugin.rb, line 39
+          
+
# File lib/wpscan/wp_plugin.rb, line 39
 def error_log_url
   get_full_url.merge("error_log").to_s
 end
-
- -
- +
+
- -
+ + + +
- -
-
+ + - + -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - + diff --git a/doc/WpPlugins.html b/doc/WpPlugins.html index 86dd9c48..3c68341f 100644 --- a/doc/WpPlugins.html +++ b/doc/WpPlugins.html @@ -1,235 +1,224 @@ - - - + + + - + - Module: WpPlugins +module WpPlugins - RDoc Documentation - + + + + + + + + + + - - - - - + -
- - +
+ - - - - - - - - -
- -
- - -
-

Files

- -
- - -
-

Class/Module Index - [+]

-
-
- Quicksearch - -
-
- - - -
- - -
+
-
-

WpPlugins

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

module WpPlugins

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

Public Instance Methods

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

Enumerate installed plugins.

+

Enumerate installed plugins.

return array of WpPlugin

- + - -
-
-# File lib/wpscan/modules/wp_plugins.rb, line 24
+          
+          
+
# File lib/wpscan/modules/wp_plugins.rb, line 24
 def plugins_from_aggressive_detection(options)
-  options[:file]          = options[:file] || "#{DATA_DIR}/plugins.txt"
-  options[:vulns_file]    = options[:vulns_file] || "#{DATA_DIR}/plugin_vulns.xml"
+  options[:file]          = options[:file] || (options[:full] ? "#{DATA_DIR}/plugins_full.txt" : "#{DATA_DIR}/plugins.txt")
+  options[:vulns_file]    = (options[:vulns_file] != nil and options[:vulns_file] != "") ?
+      options[:vulns_file] : DATA_DIR + "/plugin_vulns.xml"
   options[:vulns_xpath]   = "//plugin[@name='#{@name}']/vulnerability"
   options[:vulns_xpath_2] = "//plugin"
   options[:type]          = "plugins"
@@ -247,30 +236,28 @@
   end
   plugins.sort_by { |p| p.name }
 end
-
- -
- +
+
+ + + +
+ + +
+ +
+ plugins_from_passive_detection(options) + click to toggle source +
+ + +
-
- - -
- - - -
- 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 :

@@ -279,12 +266,11 @@ plugins can be found in the source code :

...

return array of WpPlugin

- + - -
-
-# File lib/wpscan/modules/wp_plugins.rb, line 51
+          
+          
+
# File lib/wpscan/modules/wp_plugins.rb, line 52
 def plugins_from_passive_detection(options)
   plugins = []
   temp = WpDetector.passive_detection(options[:base_url], "plugins", options[:wp_content_dir])
@@ -301,29 +287,26 @@ plugins can be found in the source code :

end plugins.sort_by { |p| p.name } end
-
- -
- +
+
- -
+ + + +
- -
-
+ + -
+ -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - + diff --git a/doc/WpReadme.html b/doc/WpReadme.html index bb4cea15..1234db6b 100644 --- a/doc/WpReadme.html +++ b/doc/WpReadme.html @@ -1,296 +1,278 @@ - - - + + + - + - Module: WpReadme +module WpReadme - RDoc Documentation - + + + + + + + + + + - - - - - + -
- - +
+ - - - - -
-

Methods

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

Files

- -
- - -
-

Class/Module Index - [+]

-
-
- Quicksearch - -
-
- - - -
- - -
+
-
-

WpReadme

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

module WpReadme

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

Public Instance Methods

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

Checks to see if the readme.html file exists

+

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 25
 def has_readme?
   response = Browser.instance.get(readme_url())
 
   unless response.code == 404
-    response.body =~ %{wordpress}
+    response.body =~ %r{wordpress}
   end
 end
-
- -
+
+ +
+ + + +
+ + +
+ +
+ readme_url() + click to toggle source +
+ + +
+ + -
- - -
- - - -
- readme_url() - click to toggle source -
- - -
- - - - - -
-
-# File lib/wpscan/modules/wp_readme.rb, line 33
+          
+
# File lib/wpscan/modules/wp_readme.rb, line 33
 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 2a28d1ed..385a4a6e 100644 --- a/doc/WpTarget.html +++ b/doc/WpTarget.html @@ -1,357 +1,339 @@ - - - + + + - + - Class: WpTarget +class WpTarget - RDoc Documentation - + + + + + + + + + + - - - - - + -
- - -
-

Parent

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

Included Modules

- -
- -
- -
- - -
-

Files

- -
- - -
-

Class/Module Index - [+]

-
-
- Quicksearch - -
-
- - - -
- - -
+
-
-

WpTarget

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

class WpTarget

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

Attributes

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

Attributes

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

Public Class Methods

+ + +
+ +
+ new(target_url, options = {}) + click to toggle source
-
- - -
- verbose[R] -
-
+
-
-
- -
- - - - -
-

Public Class Methods

- - -
- -
- new(target_url, options = {}) - click to toggle source -
- - -
- - - - - -
-
-# File lib/wpscan/wp_target.rb, line 36
+          
+
# File lib/wpscan/wp_target.rb, line 36
 def initialize(target_url, options = {})
   @uri            = URI.parse(add_trailing_slash(add_http_protocol(target_url)))
   @verbose        = options[:verbose]
@@ -361,108 +343,99 @@
 
   Browser.instance(options.merge(:max_threads => options[:threads]))
 end
-
- -
+
+ +
+ + + +
+ + +
+ +
+ valid_response_codes() + click to toggle source +
+ + +
+ +

Valid HTTP return codes

-
- - -
- - - -
- valid_response_codes() - click to toggle source -
- - -
- -

Valid HTTP return codes

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

Public Instance Methods

+
+ +
+

Public Instance Methods

- -
- + +
+ +
+ debug_log_url() + click to toggle source +
+ +
+ -
- debug_log_url() - click to toggle source -
-
- - - - - -
-
-# File lib/wpscan/wp_target.rb, line 123
+          
+          
+
# File lib/wpscan/wp_target.rb, line 123
 def debug_log_url
   @uri.merge("#{wp_content_dir()}/debug.log").to_s
 end
-
- -
+
+ +
+ + + +
+ + +
+ +
+ error_404_hash() + click to toggle source +
+ + +
+ +

Return the MD5 hash of a 404 page

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

Return the MD5 hash of a 404 page

- - - -
-
-# File lib/wpscan/wp_target.rb, line 64
+          
+
# File lib/wpscan/wp_target.rb, line 64
 def error_404_hash
   unless @error_404_hash
     non_existant_page = Digest::MD5.hexdigest(rand(9999999999).to_s) + ".html"
@@ -474,80 +447,74 @@
 
   @error_404_hash
 end
-
- -
+
+ +
+ + + +
+ + +
+ +
+ has_debug_log?() + click to toggle source +
+ + +
+ + -
- - -
- - - -
- has_debug_log?() - click to toggle source -
- - -
- - - - - -
-
-# File lib/wpscan/wp_target.rb, line 117
+          
+
# File lib/wpscan/wp_target.rb, line 117
 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[%{\[[^\]]+\] PHP (?:Warning|Error|Notice):}] ? true : false
+  response_body[%r{\[[^\]]+\] PHP (?:Warning|Error|Notice):}] ? true : false
 end
-
- -
+
+ +
+ + + +
+ + +
+ +
+ is_multisite?() + click to toggle source +
+ + +
+ + -
- - -
- - - -
- is_multisite?() - click to toggle source -
- - -
- - - - - -
-
-# File lib/wpscan/wp_target.rb, line 162
+          
+
# File lib/wpscan/wp_target.rb, line 162
 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"] =~ /wp-login\.php\?action=register/
+    if resp.code == 302 and resp.headers_hash["location"] =~ %rwp-login\.php\?action=register/
       @multisite = false
-    elsif resp.code == 302 and resp.headers_hash["location"] =~ /wp-signup\.php/
+    elsif resp.code == 302 and resp.headers_hash["location"] =~ %rwp-signup\.php/
       @multisite = true
     elsif resp.code == 200
       @multisite = true
@@ -557,36 +524,33 @@
   end
   @multisite
 end
-
- -
+
+ +
+ + + +
+ + +
+ +
+ login_url() + click to toggle source +
+ + +
+ + -
- - -
- - - -
- login_url() - click to toggle source -
- - -
- - - - - -
-
-# File lib/wpscan/wp_target.rb, line 51
+          
+
# File lib/wpscan/wp_target.rb, line 51
 def login_url
   url = @uri.merge("wp-login.php").to_s
 
@@ -598,46 +562,43 @@
 
   url
 end
-
- -
+
+ +
+ + + +
+ + +
+ +
+ registration_enabled?() + click to toggle source +
+ + +
+ +

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

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

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

- - - -
-
-# File lib/wpscan/wp_target.rb, line 140
+          
+
# File lib/wpscan/wp_target.rb, line 140
 def registration_enabled?
   resp = Browser.instance.get(registration_url)
   # redirect only on non multi sites
-  if resp.code == 302 and resp.headers_hash["location"] =~ /wp-login\.php\?registration=disabled/
+  if resp.code == 302 and resp.headers_hash["location"] =~ %rwp-login\.php\?registration=disabled/
     enabled = false
   # multi site registration form
-  elsif resp.code == 200 and resp.body =~ /<form id="setupform" method="post" action="[^"]*wp-signup\.php[^"]*">/
+  elsif resp.code == 200 and resp.body =~ %r<form id="setupform" method="post" action="[^"]*wp-signup\.php[^"]*">/
     enabled = true
   # normal registration form
-  elsif resp.code == 200 and resp.body =~ /<form name="registerform" id="registerform" action="[^"]*wp-login\.php[^"]*"/
+  elsif resp.code == 200 and resp.body =~ %r<form name="registerform" id="registerform" action="[^"]*wp-login\.php[^"]*"/
     enabled = true
   # registration disabled
   else
@@ -645,343 +606,313 @@
   end
   enabled
 end
-
- -
+
+ +
+ + + +
+ + +
+ +
+ registration_url() + click to toggle source +
+ + +
+ + -
- - -
- - - -
- registration_url() - click to toggle source -
- - -
- - - - - -
-
-# File lib/wpscan/wp_target.rb, line 158
+          
+
# File lib/wpscan/wp_target.rb, line 158
 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 +
+ + +
+ + -
- - -
- - - -
- search_replace_db_2_exists?() - click to toggle source -
- - -
- - - - - -
-
-# File lib/wpscan/wp_target.rb, line 134
+          
+
# File lib/wpscan/wp_target.rb, line 134
 def search_replace_db_2_exists?
   resp = Browser.instance.get(search_replace_db_2_url)
-  resp.code == 200 && resp.body[%{by interconnect}]
+  resp.code == 200 && resp.body[%r{by interconnect}]
 end
-
- -
- +
+
+ + + +
+ + +
+ +
+ search_replace_db_2_url() + click to toggle source +
+ + +
-
- - -
- - - -
- search_replace_db_2_url() - click to toggle source -
- - -
- -

Script for replacing strings in wordpress databases reveals databse +

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 130
+          
+          
+
# File lib/wpscan/wp_target.rb, line 130
 def search_replace_db_2_url
   @uri.merge("searchreplacedb2.php").to_s
 end
-
- -
+
+ +
+ + + +
+ + +
+ +
+ theme() + click to toggle source +
+ + +
+ +

return WpTheme

-
- - -
- - - -
- theme() - click to toggle source -
- - -
- -

return WpTheme

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

Alias of @uri.to_s

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

Alias of @uri.to_s

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

return WpVersion

-
- - -
- - - -
- version() - click to toggle source -
- - -
- -

return WpVersion

- - - -
-
-# File lib/wpscan/wp_target.rb, line 87
+          
+
# File lib/wpscan/wp_target.rb, line 87
 def version
   WpVersion.find(@uri, wp_content_dir)
 end
-
- -
+
+ +
+ + + +
+ + +
+ +
+ wp_content_dir() + click to toggle source +
+ + +
+ + -
- - -
- - - -
- wp_content_dir() - click to toggle source -
- - -
- - - - - -
-
-# File lib/wpscan/wp_target.rb, line 91
+          
+
# File lib/wpscan/wp_target.rb, line 91
 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
 
-    if index_body[/\/wp-content\/(?:themes|plugins)\//]
+    if index_body[%r\/wp-content\/(?:themes|plugins)\//]
       @wp_content_dir = "wp-content"
     else
-      @wp_content_dir = index_body[/(?:href|src)\s*=\s*(?:"|').+#{Regexp.escape(uri_path)}([^"']+)\/(?:themes|plugins)\/.*(?:"|')/, 1]
+      @wp_content_dir = index_body[%r(?:href|src)\s*=\s*(?:"|').+#{Regexp.escape(uri_path)}([^"']+)\/(?:themes|plugins)\/.*(?:"|')/, 1]
     end
   end
   @wp_content_dir
 end
-
- -
+
+ +
+ + + +
+ + +
+ +
+ wp_plugins_dir() + click to toggle source +
+ + +
+ + -
- - -
- - - -
- wp_plugins_dir() - click to toggle source -
- - -
- - - - - -
-
-# File lib/wpscan/wp_target.rb, line 106
+          
+
# File lib/wpscan/wp_target.rb, line 106
 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 +
+ + +
+ + -
- - -
- - - -
- wp_plugins_dir_exists?() - click to toggle source -
- - -
- - - - - -
-
-# File lib/wpscan/wp_target.rb, line 113
+          
+
# File lib/wpscan/wp_target.rb, line 113
 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 df7ec69c..2497bdad 100644 --- a/doc/WpTheme.html +++ b/doc/WpTheme.html @@ -1,319 +1,298 @@ - - - + + + - + - Class: WpTheme +class WpTheme - RDoc Documentation - + + + + + + + + + + - - - - - + -
- - -
-

Parent

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

Methods

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

Files

- -
- - -
-

Class/Module Index - [+]

-
-
- Quicksearch - -
-
- - - -
- - -
+
-
-

WpTheme

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

class WpTheme

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

Attributes

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

Attributes

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

Public Class Methods

+ + +
+ +
+ find(target_uri) + click to toggle source
-
- - -
- version[R] -
-
+
-
-
- -
- - - - -
-

Public Class Methods

- - -
- -
- find(target_uri) - click to toggle source -
- - -
- - - - - -
-
-# File lib/wpscan/wp_theme.rb, line 44
+          
+
# File lib/wpscan/wp_theme.rb, line 44
 def self.find(target_uri)
-  self.methods.grep(/find_from_/).each do |method_to_call|
+  self.methods.grep(%rfind_from_/).each do |method_to_call|
     theme = self.send(method_to_call, target_uri)
 
     return theme if theme
   end
   nil
 end
-
- -
+
+ +
+ + + +
+ + +
+ +
+ new(options = {}) + click to toggle source +
+ + +
+ + -
- - -
- - - -
- new(options = {}) - click to toggle source -
- - -
- - - - - -
-
-# File lib/wpscan/wp_theme.rb, line 25
+          
+
# File lib/wpscan/wp_theme.rb, line 25
 def initialize(options = {})
   options[:vulns_file]    = (options[:vulns_file] != nil and options[:vulns_file] != "") ?
       options[:vulns_file] : DATA_DIR + "/wp_theme_vulns.xml"
@@ -323,46 +302,43 @@
   @style_url            = options[:style_url]
   super(options)
 end
-
- -
- +
+
- -
+ + + +
- -
-
-

Protected Class Methods

+ + +
+

Protected Class Methods

- - - -
-
-

Public Instance Methods

+ + +
+

Public Instance Methods

- -
- + +
+ +
+ ===(wp_theme) + click to toggle source +
+ +
+ -
- ===(wp_theme) - click to toggle source -
-
- - - - - -
-
-# File lib/wpscan/wp_theme.rb, line 53
+          
+          
+
# File lib/wpscan/wp_theme.rb, line 53
 def ===(wp_theme)
   wp_theme.name === @name and wp_theme.version === @version
 end
-
- -
- +
+
- -
+ + + +
- -
-
+ + - + -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - + diff --git a/doc/WpThemes.html b/doc/WpThemes.html index edfe82a9..28a9c6e6 100644 --- a/doc/WpThemes.html +++ b/doc/WpThemes.html @@ -1,232 +1,220 @@ - - - + + + - + - Module: WpThemes +module WpThemes - RDoc Documentation - + + + + + + + + + + - - - - - + -
- - +
+ - - - - - - - - -
- -
- - -
-

Files

- -
- - -
-

Class/Module Index - [+]

-
-
- Quicksearch - -
-
- - - -
- - -
+
-
-

WpThemes

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

module WpThemes

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

Public Instance Methods

+ + +
+ +
+ themes_from_aggressive_detection(options) + click to toggle source +
+ + +
+ -
- themes_from_aggressive_detection(options) - click to toggle source -
-
- - - - - -
-
-# File lib/wpscan/modules/wp_themes.rb, line 21
+          
+          
+
# File lib/wpscan/modules/wp_themes.rb, line 21
 def themes_from_aggressive_detection(options)
-  options[:file]          = options[:file] || "#{DATA_DIR}/themes.txt"
+  options[:file]          = options[:file] || (options[:full] ? "#{DATA_DIR}/themes_full.txt" : "#{DATA_DIR}/themes.txt")
   options[:vulns_file]    = (options[:vulns_file] != nil and options[:vulns_file] != "") ?
       options[:vulns_file] : DATA_DIR + "/wp_theme_vulns.xml"
   options[:vulns_xpath]   = "//theme[@name='#{@name}']/vulnerability"
@@ -244,36 +232,33 @@
   end
   themes.sort_by { |t| t.name }
 end
-
- -
+
+ +
+ + + +
+ + +
+ +
+ themes_from_passive_detection(options) + click to toggle source +
+ + +
+ + -
- - -
- - - -
- themes_from_passive_detection(options) - click to toggle source -
- - -
- - - - - -
-
-# File lib/wpscan/modules/wp_themes.rb, line 41
+          
+
# File lib/wpscan/modules/wp_themes.rb, line 41
 def themes_from_passive_detection(options)
   themes = []
   temp = WpDetector.passive_detection(options[:base_url], "themes", options[:wp_content_dir])
@@ -288,29 +273,26 @@
   end
   themes.sort_by { |t| t.name }
 end
-
- -
- +
+
- -
+ + + +
- -
-
+ + -
+ -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - + diff --git a/doc/WpTimthumbs.html b/doc/WpTimthumbs.html index 4ee88faf..8487b73a 100644 --- a/doc/WpTimthumbs.html +++ b/doc/WpTimthumbs.html @@ -1,265 +1,250 @@ - - - + + + - + - Module: WpTimthumbs +module WpTimthumbs - RDoc Documentation - + + + + + + + + + + - - - - - + -
- - +
+ - - - - -
-

Methods

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

Files

- -
- - -
-

Class/Module Index - [+]

-
-
- Quicksearch - -
-
- - - -
- - -
+
-
-

WpTimthumbs

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

module WpTimthumbs

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

Public Instance Methods

+ + +
+ +
+ has_timthumbs?(theme_name, options = {}) + click to toggle source +
+ + +
+ -
- has_timthumbs?(theme_name, options = {}) - click to toggle source -
-
- - - - - -
-
-# File lib/wpscan/modules/wp_timthumbs.rb, line 24
+          
+          
+
# File lib/wpscan/modules/wp_timthumbs.rb, line 24
 def has_timthumbs?(theme_name, options = {})
   !timthumbs(theme_name, options).empty?
 end
-
- -
+
+ +
+ + + +
+ + +
+ +
+ timthumbs(theme_name = nil, options = {}) + click to toggle source +
+ + +
+ + -
- - -
- - - -
- timthumbs(theme_name = nil, options = {}) - click to toggle source -
- - -
- - - - - -
-
-# File lib/wpscan/modules/wp_timthumbs.rb, line 28
+          
+
# File lib/wpscan/modules/wp_timthumbs.rb, line 28
 def timthumbs(theme_name = nil, options = {})
   if @wp_timthumbs.nil?
     options[:type]                  = "timthumbs"
@@ -279,47 +264,44 @@
   end
   @wp_timthumbs
 end
-
- -
- +
+
- -
+ + + +
- -
-
-

Protected Instance Methods

+ + +
+

Protected Instance Methods

- -
- + +
+ +
+ targets_url_from_theme(theme_name, options) + click to toggle source +
+ +
+ -
- targets_url_from_theme(theme_name, options) - click to toggle source -
-
- - - - - -
-
-# File lib/wpscan/modules/wp_timthumbs.rb, line 49
+          
+          
+
# File lib/wpscan/modules/wp_timthumbs.rb, line 49
 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|
@@ -335,29 +317,26 @@
   end
   targets
 end
-
- -
- +
+
- -
+ + + +
- -
-
+ + -
+ -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - + diff --git a/doc/WpUser.html b/doc/WpUser.html index 4bf648a1..5e70e741 100644 --- a/doc/WpUser.html +++ b/doc/WpUser.html @@ -1,433 +1,395 @@ - - - + + + - + - Class: WpUser +class WpUser - RDoc Documentation - + + + + + + + + + + - - - - - + -
- - -
-

Parent

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

Methods

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

Files

- -
- - -
-

Class/Module Index - [+]

-
-
- Quicksearch - -
-
- - - -
- - -
+
-
-

WpUser

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

class WpUser

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

Attributes

+
+
+ id[RW] +
- - - - -
-

Attributes

- +
-
- - - - -
- id[RW] -
+ + +
+
+ +
+
+ name[RW] +
-
- - - -
+
+ + + +
+
+ +
+
+ nickname[RW] +
+ +
+ + + +
+
+ +
+ + + + +
+

Public Class Methods

+ + +
+ +
+ new(name, id, nickname) + click to toggle source
-
- - - - -
- name[RW] -
-
+
-
-
- -
- - - - -
- nickname[RW] -
- -
- - - -
-
- -
- - - - -
-

Public Class Methods

- - -
- -
- new(name, id, nickname) - click to toggle source -
- - -
- - - - - -
-
-# File lib/wpscan/wp_user.rb, line 22
+          
+
# File lib/wpscan/wp_user.rb, line 22
 def initialize(name, id, nickname)
   @name     = name ? name : "empty"
   @id       = id ? id : "empty"
   @nickname = nickname ? nickname : "empty"
 end
-
- -
- +
+
- -
+ + + +
- -
-
-

Public Instance Methods

+ + +
+

Public Instance Methods

- -
- + +
+ +
+ <=>(item) + click to toggle source +
+ +
+ -
- <=>(item) - click to toggle source -
-
- - - - - -
-
-# File lib/wpscan/wp_user.rb, line 28
+          
+          
+
# File lib/wpscan/wp_user.rb, line 28
 def <=>(item)
   item.name <=> @name
 end
-
- -
+
+ +
+ + + +
+ + +
+ +
+ ===(item) + click to toggle source +
+ + +
+ + -
- - -
- - - -
- ===(item) - click to toggle source -
- - -
- - - - - -
-
-# File lib/wpscan/wp_user.rb, line 32
+          
+
# File lib/wpscan/wp_user.rb, line 32
 def ===(item)
   item.name === @name and item.id === @id and item.nickname === @nickname
 end
-
- -
+
+ +
+ + + +
+ + +
+ +
+ eql?(item) + click to toggle source +
+ + +
+ + -
- - -
- - - -
- eql?(item) - click to toggle source -
- - -
- - - - - -
-
-# File lib/wpscan/wp_user.rb, line 36
+          
+
# File lib/wpscan/wp_user.rb, line 36
 def eql?(item)
   item.name === @name and item.id === @id and item.nickname === @nickname
 end
-
- -
- +
+
- -
+ + + +
- -
-
+ + - + -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - + diff --git a/doc/WpUsernames.html b/doc/WpUsernames.html index fb7a4cc1..85c71826 100644 --- a/doc/WpUsernames.html +++ b/doc/WpUsernames.html @@ -1,304 +1,286 @@ - - - + + + - + - Module: WpUsernames +module WpUsernames - RDoc Documentation - + + + + + + + + + + - - - - - + -
- - +
+ - - - - - - - - -
- -
- - -
-

Files

- -
- - -
-

Class/Module Index - [+]

-
-
- Quicksearch - -
-
- - - -
- - -
+
-
-

WpUsernames

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

module WpUsernames

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

Public Instance Methods

+ + +
+ +
+ author_url(author_id) + click to toggle source +
+ + +
+ -
- author_url(author_id) - click to toggle source -
-
- - - - - -
-
-# File lib/wpscan/modules/wp_usernames.rb, line 102
+          
+          
+
# 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 +
+ + +
+ + -
- - -
- - - -
- extract_nickname_from_body(body) - click to toggle source -
- - -
- - - - - -
-
-# File lib/wpscan/modules/wp_usernames.rb, line 77
+          
+
# File lib/wpscan/modules/wp_usernames.rb, line 77
 def extract_nickname_from_body(body)
-  body[%{<title>([^<]*)</title>}, 1]
+  body[%r{<title>([^<]*)</title>}, 1]
 end
-
- -
+
+ +
+ + + +
+ + +
+ +
+ get_nickname_from_response(resp) + click to toggle source +
+ + +
+ + -
- - -
- - - -
- get_nickname_from_response(resp) - click to toggle source -
- - -
- - - - - -
-
-# File lib/wpscan/modules/wp_usernames.rb, line 69
+          
+
# File lib/wpscan/modules/wp_usernames.rb, line 69
 def get_nickname_from_response(resp)
   nickname = nil
   if resp.code == 200
@@ -306,36 +288,33 @@
   end
   nickname
 end
-
- -
+
+ +
+ + + +
+ + +
+ +
+ get_nickname_from_url(url) + click to toggle source +
+ + +
+ + -
- - -
- - - -
- get_nickname_from_url(url) - click to toggle source -
- - -
- - - - - -
-
-# File lib/wpscan/modules/wp_usernames.rb, line 60
+          
+
# 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
@@ -344,36 +323,33 @@
   end
   nickname
 end
-
- -
+
+ +
+ + + +
+ + +
+ +
+ remove_junk_from_nickname(usernames) + click to toggle source +
+ + +
+ + -
- - -
- - - -
- remove_junk_from_nickname(usernames) - click to toggle source -
- - -
- - - - - -
-
-# File lib/wpscan/modules/wp_usernames.rb, line 81
+          
+
# 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")
@@ -390,34 +366,32 @@
   end
   junk = get_equal_string_end(nicknames)
   usernames.each do |u|
-    u.nickname = u.nickname.sub(/#{Regexp.escape(junk)}$/, "")
+    u.nickname = u.nickname.sub(%r#{Regexp.escape(junk)}$/, "")
   end
   usernames
 end
-
- -
- +
+
+ + + +
+ + +
+ +
+ usernames(options = {}) + click to toggle source +
+ + +
-
- - -
- - - -
- usernames(options = {}) - click to toggle source -
- - -
- -

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

Available options :

@@ -425,12 +399,11 @@ href="http://seclists.org/fulldisclosure/2011/May/493">seclists.org/fulldisclosu
:range - default : 1..10

returns an array of WpUser (can be empty)

- + - -
-
-# File lib/wpscan/modules/wp_usernames.rb, line 28
+          
+          
+
# File lib/wpscan/modules/wp_usernames.rb, line 28
 def usernames(options = {})
   range = options[:range] || (1..10)
   browser = Browser.instance
@@ -443,11 +416,11 @@ href="http://seclists.org/fulldisclosure/2011/May/493">seclists.org/fulldisclosu
     username = nil
     nickname = nil
     if response.code == 301 # username in location?
-      username = response.headers_hash['location'][%{/author/([^/]+)/}, 1]
+      username = response.headers_hash['location'][%r{/author/([^/]+)/}, 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[%{posts by (.*) feed}, 1]
+      username = response.body[%r{posts by (.*) feed}, 1]
       nickname = get_nickname_from_response(response)
     end
 
@@ -462,29 +435,26 @@ href="http://seclists.org/fulldisclosure/2011/May/493">seclists.org/fulldisclosu
   usernames.compact!
   usernames.uniq
 end
-
- -
- +
+
- -
+ + + +
- -
-
+ + -
+ -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - + diff --git a/doc/WpVersion.html b/doc/WpVersion.html index 1e3d4dc4..b88ea410 100644 --- a/doc/WpVersion.html +++ b/doc/WpVersion.html @@ -1,283 +1,270 @@ - - - + + + - + - Class: WpVersion +class WpVersion - RDoc Documentation - + + + + + + + + + + - - - - - + -
- - -
-

Parent

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

Files

- -
- - -
-

Class/Module Index - [+]

-
-
- Quicksearch - -
-
- - - -
- - -
+
-
-

WpVersion

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

class WpVersion

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

Attributes

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

Attributes

- +
-
- - -
- discovery_method[R] -
+ + +
+
+ +
+
+ number[R] +
-
- - - -
+
+ + + +
+
+ +
+ + + + +
+

Public Class Methods

+ + +
+ +
+ find(target_uri, wp_content_dir) + click to toggle source
-
- - -
- number[R] -
-
+
- - -
-
- -
- - - - -
-

Public Class Methods

- - -
- - - -
- find(target_uri, wp_content_dir) - click to toggle source -
- - -
- -

Will use all method self.find_from_* to try to detect the version Once the +

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 @@ -285,96 +272,90 @@ found, nil is returned

The order in which the find_from_* methods are is important, they will be called in the same order (find_from_meta_generator, +href="WpVersion.html#method-c-find_from_meta_generator">::find_from_meta_generator, find_from_rss_generator +href="WpVersion.html#method-c-find_from_rss_generator">::find_from_rss_generator etc)

- + - -
-
-# File lib/wpscan/wp_version.rb, line 39
+          
+          
+
# 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(/find_from_/).each do |method_to_call|
+  self.methods.grep(%rfind_from_/).each do |method_to_call|
     version = self.send(method_to_call, options)
 
     if version
-      return new(version, :discovery_method => method_to_call[%{find_from_(.*)}, 1].gsub('_', ' '))
+      return new(version, :discovery_method => method_to_call[%r{find_from_(.*)}, 1].gsub('_', ' '))
     end
   end
   nil
 end
-
- -
+
+ +
+ + + +
+ + +
+ +
+ new(number, options = {}) + click to toggle source +
+ + +
+ + -
- - -
- - - -
- new(number, options = {}) - click to toggle source -
- - -
- - - - - -
-
-# File lib/wpscan/wp_version.rb, line 25
+          
+
# File lib/wpscan/wp_version.rb, line 25
 def initialize(number, options = {})
   @number           = number
   @discovery_method = options[:discovery_method]
   @vulns_file       = options[:vulns_file] || DATA_DIR + '/wp_vulns.xml'
   @vulns_xpath      = "//wordpress[@version='#{@number}']/vulnerability"
 end
-
- -
- +
+
- -
+ + + +
- -
-
-

Protected Class Methods

+ + +
+

Protected Class Methods

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

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

+

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

It does this by using client side file hashing with a scoring system.

@@ -390,12 +371,11 @@ file across all versions of wordpress.

3 - 3f03bce84d1d2a169b4bf4d8a0126e38 - /wp-includes/js/autosave.js - 2.9.2,2.9.1,2.9 /!\ 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 94
+          
+          
+
# File lib/wpscan/wp_version.rb, line 136
 def self.find_from_advanced_fingerprinting(options)
   target_uri = options[:base_url]
   # needed for rpsec tests
@@ -408,7 +388,7 @@ file across all versions of wordpress.

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(/\$wp-plugins\$/, wp_plugins).gsub(/\$wp-content\$/, wp_content) + 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) @@ -420,241 +400,291 @@ file across all versions of wordpress.

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.

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

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

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
+          
+          
+
# 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[%{name="generator" content="wordpress ([^"]+)"}, 1]
+  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 -
+
+ + + + +
+ + +
+ +
+ 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 119
+          
+          
+
# File lib/wpscan/wp_version.rb, line 162
 def self.find_from_readme(options)
   target_uri = options[:base_url]
-  Browser.instance.get(target_uri.merge("readme.html").to_s).body[%{<br />\sversion #{WpVersion.version_pattern}}, 1]
+  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.

-
- - -
- - - -
- find_from_rss_generator(options) - click to toggle source -
- - -
- - - - - -
-
-# File lib/wpscan/wp_version.rb, line 68
+          
+
# 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[%{<generator>http://wordpress.org/\?v=([^<]+)</generator>}, 1]
+  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.

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

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

- + - -
-
-# File lib/wpscan/wp_version.rb, line 125
+          
+          
+
# File lib/wpscan/wp_version.rb, line 170
 def self.find_from_sitemap_generator(options)
   target_uri = options[:base_url]
-  Browser.instance.get(target_uri.merge("sitemap.xml").to_s).body[%{generator="wordpress/#{WpVersion.version_pattern}"}, 1]
+  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.

-
- - -
- - - -
- version_pattern() - click to toggle source -
- - -
- -

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

- - - -
-
-# File lib/wpscan/wp_version.rb, line 136
+          
+
# File lib/wpscan/wp_version.rb, line 182
 def self.version_pattern
   '([^\r\n]+[\.][^\r\n]+)'
 end
-
- -
- +
+
- -
+ + + +
- -
-
+ + - + -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - + diff --git a/doc/WpVulnerability.html b/doc/WpVulnerability.html index 76baeded..c5920ded 100644 --- a/doc/WpVulnerability.html +++ b/doc/WpVulnerability.html @@ -1,322 +1,293 @@ - - - + + + - + - Class: WpVulnerability +class WpVulnerability - RDoc Documentation - + + + + + + + + + + - - - - - + -
- - -
-

Parent

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

Methods

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

Files

- -
- - -
-

Class/Module Index - [+]

-
-
- Quicksearch - -
-
- - - -
- - -
+
-
-

WpVulnerability

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

class WpVulnerability

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

Attributes

+
+
+ reference[RW] +
- - - - -
-

Attributes

- +
-
- - - - -
- reference[RW] -
+ + +
+
+ +
+
+ title[RW] +
-
- - - -
+
+ + + +
+
+ +
+
+ type[RW] +
+ +
+ + + +
+
+ +
+ + + + +
+

Public Class Methods

+ + +
+ +
+ new(title, reference, type) + click to toggle source
-
- - - - -
- title[RW] -
-
+
-
-
- -
- - - - -
- type[RW] -
- -
- - - -
-
- -
- - - - -
-

Public Class Methods

- - -
- -
- new(title, reference, type) - click to toggle source -
- - -
- - - - - -
-
-# File lib/wpscan/wp_vulnerability.rb, line 22
+          
+
# File lib/wpscan/wp_vulnerability.rb, line 22
 def initialize(title, reference, type)
   @title      = title
   @reference  = reference
   @type       = type
 end
-
- -
- +
+
- -
+ + + +
- -
-
+ + - + -
-

[Validate]

-

Generated with the Darkfish - Rdoc Generator 2.

-
- - + diff --git a/doc/WpscanOptions.html b/doc/WpscanOptions.html index bdc44541..b7e794c8 100644 --- a/doc/WpscanOptions.html +++ b/doc/WpscanOptions.html @@ -1,284 +1,276 @@ - - - + + + - + - Class: WpscanOptions +class WpscanOptions - RDoc Documentation - + + + + + + + + + + - - - - - + -
- - -
-

Parent

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

Files

- -
- - -
-

Class/Module Index - [+]

-
-
- Quicksearch - -
-
- - - -
- - -
+
-
-

WpscanOptions

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

class WpscanOptions

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

Constants

+
- -
-

Constants

-
+
ACCESSOR_OPTIONS -
ACCESSOR_OPTIONS
- -
- +
-
-
+
+
+ - + - - -
-

Public Class Methods

+ + +
+

Public Class Methods

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

Will load the options from ARGV return Will load the options from ARGV return WpscanOptions

- + - -
-
-# File lib/wpscan/wpscan_options.rb, line 131
+          
+          
+
# File lib/wpscan/wpscan_options.rb, line 158
 def self.load_from_arguments
   wpscan_options = WpscanOptions.new
 
@@ -290,115 +282,106 @@ href="WpscanOptions.html">WpscanOptions

wpscan_options end
-
- -
+
+ +
+ + + +
+ + +
+ +
+ new() + click to toggle source +
+ + +
+ + -
- - -
- - - -
- new() - click to toggle source -
- - -
- - - - - -
-
-# File lib/wpscan/wpscan_options.rb, line 47
+          
+
# File lib/wpscan/wpscan_options.rb, line 50
 def initialize
   ACCESSOR_OPTIONS.each do |option|
     instance_variable_set("@#{option}", nil)
   end
 end
-
- -
- +
+
- -
+ + + +
- -
-
-

Protected Class Methods

+
+ +
+

Protected Class Methods

- -
- + +
+ +
+ clean_option(option) + click to toggle source +
+ +
-
- clean_option(option) - click to toggle source -
- - -
- -

Will removed the ‘-’ or ‘–’ chars at the beginning of option and replace +

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 219
+          
+          
+
# File lib/wpscan/wpscan_options.rb, line 254
 def self.clean_option(option)
-  cleaned_option = option.gsub(/^--?/, '')
-  cleaned_option.gsub(/-/, '_')
+  cleaned_option = option.gsub(%r^--?/, '')
+  cleaned_option.gsub(%r-/, '_')
 end
-
- -
- +
+
+ + + +
+ + +
+ +
+ get_opt_long() + click to toggle source +
+ + +
-
- - -
- - - -
- get_opt_long() - click to toggle source -
- - -
- -

Even if a short option is given (IE : -u), the long one will be returned +

Even if a short option is given (IE : -u), the long one will be returned (IE : –url)

- + - -
-
-# File lib/wpscan/wpscan_options.rb, line 191
+          
+          
+
# File lib/wpscan/wpscan_options.rb, line 225
 def self.get_opt_long
   GetoptLong.new(
       ["--url", "-u", GetoptLong::REQUIRED_ARGUMENT],
@@ -409,7 +392,8 @@ any remaining ‘-’ by ‘_’

["--force", "-f", GetoptLong::NO_ARGUMENT], ["--help", "-h", GetoptLong::NO_ARGUMENT], ["--verbose", "-v", GetoptLong::NO_ARGUMENT], - ["--proxy", GetoptLong::OPTIONAL_ARGUMENT], + ["--proxy", GetoptLong::REQUIRED_ARGUMENT], + ["--proxy-auth", GetoptLong::REQUIRED_ARGUMENT], ["--update", GetoptLong::NO_ARGUMENT], ["--follow-redirection", GetoptLong::NO_ARGUMENT], ["--wp-content-dir", GetoptLong::REQUIRED_ARGUMENT], @@ -417,348 +401,396 @@ any remaining ‘-’ by ‘_’

["--config-file", "-c", GetoptLong::REQUIRED_ARGUMENT] ) end
-
- -
+
+ +
+ + + +
+ + +
+ +
+ is_long_option?(option) + click to toggle source +
+ + +
+ + -
- - -
- - - -
- is_long_option?(option) - click to toggle source -
- - -
- - - - - -
-
-# File lib/wpscan/wpscan_options.rb, line 210
+          
+
# File lib/wpscan/wpscan_options.rb, line 245
 def self.is_long_option?(option)
   ACCESSOR_OPTIONS.include?(:"#{WpscanOptions.clean_option(option)}")
 end
-
- -
+
+ +
+ + + +
+ + +
+ +
+ option_to_instance_variable_setter(option) + click to toggle source +
+ + +
+ + -
- - -
- - - -
- option_to_instance_variable_setter(option) - click to toggle source -
- - -
- - - - - -
-
-# File lib/wpscan/wpscan_options.rb, line 224
+          
+
# File lib/wpscan/wpscan_options.rb, line 259
 def self.option_to_instance_variable_setter(option)
   cleaned_option = WpscanOptions.clean_option(option)
-  option_syms = ACCESSOR_OPTIONS.grep(%{^#{cleaned_option}})
+  option_syms = ACCESSOR_OPTIONS.grep(%r{^#{cleaned_option}$})
 
   option_syms.length == 1 ? :"#{option_syms.at(0)}=" : nil
 end
-
- -
- +
+
- -
+ + + +
- -
-
-

Public Instance Methods

+ + +
+

Public Instance Methods

- -
- + +
+ +
+ enumerate_all_plugins=(enumerate_all_plugins) + click to toggle source +
+ +
+ -
- enumerate_only_vulnerable_plugins=(enumerate_only_vulnerable_plugins) - click to toggle source -
-
- - - + +
+
# File lib/wpscan/wpscan_options.rb, line 106
+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"
+  else
+    @enumerate_all_plugins = enumerate_all_plugins
+  end
+end
+
+ +
- -
-
-# File lib/wpscan/wpscan_options.rb, line 87
+        
+
+        
+      
+ + +
+ +
+ enumerate_all_themes=(enumerate_all_themes) + click to toggle source +
+ + +
+ + + + + +
+
# File lib/wpscan/wpscan_options.rb, line 130
+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"
+  else
+    @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 98
 def enumerate_only_vulnerable_plugins=(enumerate_only_vulnerable_plugins)
-  if enumerate_only_vulnerable_plugins === true and @enumerate_plugins === true
-    raise "You can't enumerate plugins and only vulnerable plugins at the same time, please choose only one"
+  if enumerate_only_vulnerable_plugins === true and (@enumerate_all_plugins === true or @enumerate_plugins === true)
+    raise "Please choose only one plugin enumeration option"
   else
     @enumerate_only_vulnerable_plugins = enumerate_only_vulnerable_plugins
   end
 end
-
- -
+
+ +
+ + + +
+ + +
+ +
+ enumerate_only_vulnerable_themes=(enumerate_only_vulnerable_themes) + click to toggle source +
+ + +
+ + -
- - -
- - - -
- enumerate_only_vulnerable_themes=(enumerate_only_vulnerable_themes) - click to toggle source -
- - -
- - - - - -
-
-# File lib/wpscan/wpscan_options.rb, line 103
+          
+
# File lib/wpscan/wpscan_options.rb, line 122
 def enumerate_only_vulnerable_themes=(enumerate_only_vulnerable_themes)
-  if enumerate_only_vulnerable_themes === true and @enumerate_themes === true
-    raise "You can't enumerate themes and only vulnerable themes at the same time, please choose only one"
+  if enumerate_only_vulnerable_themes === true and (@enumerate_all_themes === true or @enumerate_themes === true)
+    raise "Please choose only one theme enumeration option"
   else
     @enumerate_only_vulnerable_themes = enumerate_only_vulnerable_themes
   end
 end
-
- -
- +
+
+ + + +
+ + +
+ +
+ enumerate_options_from_string(value) + click to toggle source +
+ + +
-
- - -
- - - -
- enumerate_options_from_string(value) - click to toggle source -
- - -
- -

Will set enumerate_* from the string value IE : if value = p! => +

Will set enumerate_* from the string value IE : if value = vp => :enumerate_only_vulnerable_plugins will be set to true multiple enumeration -are possible : ‘up’ => :enumerate_usernames and :enumerate_plugins +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 166
+          
+          
+
# File lib/wpscan/wpscan_options.rb, line 193
 def enumerate_options_from_string(value)
   # Usage of self is mandatory because there are overridden setters
-  self.enumerate_only_vulnerable_plugins = true if value =~ /p!/
 
-  self.enumerate_plugins = true if value =~ /p(?!!)/
+  value = value.split(',').map{ |c| c.downcase }
 
-  @enumerate_timthumbs = true if value =~ /t/
+  self.enumerate_only_vulnerable_plugins = true if value.include?('vp')
 
-  self.enumerate_only_vulnerable_themes = true if value =~ /T!/
+  self.enumerate_plugins = true if value.include?('p')
 
-  self.enumerate_themes = true if value =~ /T(?!!)/
+  self.enumerate_all_plugins = true if value.include?('ap')
 
-  if value =~ /u/
+  @enumerate_timthumbs = true if value.include?('tt')
+
+  self.enumerate_only_vulnerable_themes = true if value.include?('vt')
+
+  self.enumerate_themes = true if value.include?('t')
+
+  self.enumerate_all_themes = true if value.include?('at')
+
+  value.grep(%r^u/) do |username_enum_value|
     @enumerate_usernames = true
     # Check for usernames range
-    matches = %{\[([\d]+)-([\d]+)\]}.match(value)
+    matches = %r{\[([\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 +
+ + +
+ + -
- - -
- - - -
- enumerate_plugins=(enumerate_plugins) - click to toggle source -
- - -
- - - - - -
-
-# File lib/wpscan/wpscan_options.rb, line 79
+          
+
# File lib/wpscan/wpscan_options.rb, line 90
 def enumerate_plugins=(enumerate_plugins)
-  if enumerate_plugins === true and @enumerate_only_vulnerable_plugins === true
-    raise "You can't enumerate plugins and only vulnerable plugins at the same time, please choose only one"
+  if enumerate_plugins === true and (@enumerate_all_plugins === true or @enumerate_only_vulnerable_plugins === true)
+    raise "Please choose only one plugin enumeration option"
   else
     @enumerate_plugins = enumerate_plugins
   end
 end
-
- -
+
+ +
+ + + +
+ + +
+ +
+ enumerate_themes=(enumerate_themes) + click to toggle source +
+ + +
+ + -
- - -
- - - -
- enumerate_themes=(enumerate_themes) - click to toggle source -
- - -
- - - - - -
-
-# File lib/wpscan/wpscan_options.rb, line 95
+          
+
# File lib/wpscan/wpscan_options.rb, line 114
 def enumerate_themes=(enumerate_themes)
-  if enumerate_themes === true and @enumerate_only_vulnerable_themes === true
-    raise "You can't enumerate themes and only vulnerable themes at the same time, please choose only one"
+  if enumerate_themes === true and (@enumerate_all_themes === true or @enumerate_only_vulnerable_themes === true)
+    raise "Please choose only one theme enumeration option"
   else
     @enumerate_themes = enumerate_themes
   end
 end
-
- -
+
+ +
+ + + +
+ + +
+ +
+ has_options?() + click to toggle source +
+ + +
+ + -
- - -
- - - -
- has_options?() - click to toggle source -
- - -
- - - - - -
-
-# File lib/wpscan/wpscan_options.rb, line 111
+          
+
# File lib/wpscan/wpscan_options.rb, line 138
 def has_options?
   !to_h.empty?
 end
-
- -
+
+ +
+ + + +
+ + +
+ +
+ proxy=(proxy) + click to toggle source +
+ + +
+ + -
- - -
- - - -
- proxy=(proxy) - click to toggle source -
- - -
- - - - - -
-
-# File lib/wpscan/wpscan_options.rb, line 71
+          
+
# File lib/wpscan/wpscan_options.rb, line 74
 def proxy=(proxy)
   if proxy.index(':') == nil
     raise "Invalid proxy format. Should be host:port."
@@ -766,37 +798,68 @@ href="http://1-10">u will enumerate usernames from 1 to 10

@proxy = proxy end end
-
- -
+
+ +
+ + + +
+ + +
+ +
+ proxy_auth=(auth) + click to toggle source +
+ + +
+ + -
- - -
- - - -
- set_option_from_cli(cli_option, cli_value) - click to toggle source -
+
+
# File lib/wpscan/wpscan_options.rb, line 82
+def proxy_auth=(auth)
+  if auth.index(':') == nil
+    raise "Invalid proxy auth format, username:password expected"
+  else
+    @proxy_auth = auth
+  end
+end
+
+
-
- -

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 145
+          
+          
+
# File lib/wpscan/wpscan_options.rb, line 172
 def set_option_from_cli(cli_option, cli_value)
 
   if WpscanOptions.is_long_option?(cli_option)
@@ -805,77 +868,71 @@ value

cli_value ) elsif cli_option === "--enumerate" # Special cases - # Default value if no argument is given - cli_value = "T!tup!" if cli_value.length == 0 + # Default value if no argument is given + cli_value = "vt,tt,u,vp" if cli_value.length == 0 enumerate_options_from_string(cli_value) else raise "Unknow option : #{cli_option} with value #{cli_value}" end end
-
- -
+
+ +
+ + + +
+ + +
+ +
+ threads=(threads) + click to toggle source +
+ + +
+ + -
- - -
- - - -
- threads=(threads) - click to toggle source -
- - -
- - - - - -
-
-# File lib/wpscan/wpscan_options.rb, line 59
+          
+
# File lib/wpscan/wpscan_options.rb, line 62
 def threads=(threads)
   @threads = threads.is_a?(Integer) ? threads : threads.to_i
 end
-
- -
+
+ +
+ + + +
+ + +
+ +
+ to_h() + click to toggle source +
+ + +
+ +

return Hash

-
- - -
- - - -
- to_h() - click to toggle source -
- - -
- -

return Hash

- - - -
-
-# File lib/wpscan/wpscan_options.rb, line 116
+          
+
# File lib/wpscan/wpscan_options.rb, line 143
 def to_h
   options = {}
 
@@ -888,71 +945,65 @@ value

end options end
-
- -
+
+ +
+ + + +
+ + +
+ +
+ url=(url) + click to toggle source +
+ + +
+ + -
- - -
- - - -
- url=(url) - click to toggle source -
- - -
- - - - - -
-
-# File lib/wpscan/wpscan_options.rb, line 53
+          
+
# File lib/wpscan/wpscan_options.rb, line 56
 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 +
+ + +
+ + -
- - -
- - - -
- wordlist=(wordlist) - click to toggle source -
- - -
- - - - - -
-
-# File lib/wpscan/wpscan_options.rb, line 63
+          
+
# File lib/wpscan/wpscan_options.rb, line 66
 def wordlist=(wordlist)
   if File.exists?(wordlist)
     @wordlist = wordlist
@@ -960,29 +1011,26 @@ 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 0fff15ca..b370e875 100644 --- a/doc/created.rid +++ b/doc/created.rid @@ -1,43 +1,43 @@ -Tue, 23 Oct 2012 18:39:03 +0200 -./lib/environment.rb Tue, 23 Oct 2012 12:20:01 +0200 -./lib/updater/updater.rb Tue, 23 Oct 2012 12:20:01 +0200 -./lib/updater/svn_updater.rb Tue, 23 Oct 2012 12:20:01 +0200 -./lib/updater/git_updater.rb Tue, 23 Oct 2012 12:20:01 +0200 -./lib/updater/updater_factory.rb Tue, 23 Oct 2012 12:20:01 +0200 -./lib/cache_file_store.rb Tue, 23 Oct 2012 12:20:01 +0200 -./lib/browser.rb Tue, 23 Oct 2012 12:20:01 +0200 -./lib/wpstools/parse_svn.rb Tue, 23 Oct 2012 12:20:01 +0200 -./lib/wpstools/wpstools_helper.rb Tue, 23 Oct 2012 12:20:01 +0200 -./lib/wpstools/generate_list.rb Tue, 23 Oct 2012 12:20:01 +0200 -./lib/wpscan/wp_user.rb Tue, 23 Oct 2012 12:20:01 +0200 -./lib/wpscan/modules/malwares.rb Tue, 23 Oct 2012 16:21:49 +0200 -./lib/wpscan/modules/wp_full_path_disclosure.rb Tue, 23 Oct 2012 12:20:01 +0200 -./lib/wpscan/modules/wp_config_backup.rb Tue, 23 Oct 2012 16:18:23 +0200 -./lib/wpscan/modules/wp_themes.rb Tue, 23 Oct 2012 12:20:01 +0200 -./lib/wpscan/modules/web_site.rb Tue, 23 Oct 2012 12:20:01 +0200 -./lib/wpscan/modules/wp_plugins.rb Tue, 23 Oct 2012 12:20:01 +0200 -./lib/wpscan/modules/brute_force.rb Tue, 23 Oct 2012 12:20:01 +0200 -./lib/wpscan/modules/wp_readme.rb Tue, 23 Oct 2012 12:20:01 +0200 -./lib/wpscan/modules/wp_usernames.rb Tue, 23 Oct 2012 12:20:01 +0200 -./lib/wpscan/modules/wp_login_protection.rb Tue, 23 Oct 2012 12:20:01 +0200 -./lib/wpscan/modules/wp_timthumbs.rb Tue, 23 Oct 2012 12:20:01 +0200 -./lib/wpscan/wp_enumerator.rb Tue, 23 Oct 2012 12:20:01 +0200 -./lib/wpscan/wp_item.rb Tue, 23 Oct 2012 12:20:01 +0200 -./lib/wpscan/vulnerable.rb Tue, 23 Oct 2012 12:20:01 +0200 -./lib/wpscan/wp_options.rb Tue, 23 Oct 2012 12:20:01 +0200 -./lib/wpscan/wp_theme.rb Tue, 23 Oct 2012 12:20:01 +0200 -./lib/wpscan/wpscan_helper.rb Tue, 23 Oct 2012 12:20:01 +0200 -./lib/wpscan/wp_vulnerability.rb Tue, 23 Oct 2012 12:20:01 +0200 -./lib/wpscan/msfrpc_client.rb Tue, 23 Oct 2012 12:20:01 +0200 -./lib/wpscan/wp_detector.rb Tue, 23 Oct 2012 12:20:01 +0200 -./lib/wpscan/exploit.rb Tue, 23 Oct 2012 12:20:01 +0200 -./lib/wpscan/wp_plugin.rb Tue, 23 Oct 2012 12:20:01 +0200 -./lib/wpscan/wp_version.rb Tue, 23 Oct 2012 12:20:01 +0200 -./lib/wpscan/wp_target.rb Tue, 23 Oct 2012 16:19:38 +0200 -./lib/wpscan/wpscan_options.rb Tue, 23 Oct 2012 15:45:42 +0200 -./lib/common_helper.rb Tue, 23 Oct 2012 18:38:13 +0200 -./README Tue, 23 Oct 2012 12:20:01 +0200 -./Gemfile Tue, 23 Oct 2012 15:34:39 +0200 -./wpscan.rb Tue, 23 Oct 2012 12:20:01 +0200 -./wpstools.rb Tue, 23 Oct 2012 12:20:01 +0200 -./CREDITS Tue, 23 Oct 2012 12:20:01 +0200 +Mon, 26 Nov 2012 22:36:17 +0100 +./CREDITS Tue, 25 Sep 2012 20:37:12 +0200 +./Gemfile Sat, 10 Nov 2012 09:50:17 +0100 +./lib/browser.rb Fri, 23 Nov 2012 18:46:41 +0100 +./lib/cache_file_store.rb Tue, 25 Sep 2012 20:37:12 +0200 +./lib/common_helper.rb Sat, 10 Nov 2012 09:50:17 +0100 +./lib/environment.rb Fri, 23 Nov 2012 18:46:41 +0100 +./lib/updater/git_updater.rb Tue, 25 Sep 2012 20:37:12 +0200 +./lib/updater/svn_updater.rb Tue, 25 Sep 2012 20:37:12 +0200 +./lib/updater/updater.rb Tue, 25 Sep 2012 20:37:12 +0200 +./lib/updater/updater_factory.rb Tue, 25 Sep 2012 20:37:12 +0200 +./lib/wpscan/exploit.rb Tue, 25 Sep 2012 20:37:12 +0200 +./lib/wpscan/modules/brute_force.rb Tue, 25 Sep 2012 20:37:12 +0200 +./lib/wpscan/modules/malwares.rb Sat, 10 Nov 2012 09:50:17 +0100 +./lib/wpscan/modules/web_site.rb Tue, 25 Sep 2012 20:37:12 +0200 +./lib/wpscan/modules/wp_config_backup.rb Tue, 16 Oct 2012 22:00:10 +0200 +./lib/wpscan/modules/wp_full_path_disclosure.rb Tue, 25 Sep 2012 20:37:12 +0200 +./lib/wpscan/modules/wp_login_protection.rb Tue, 25 Sep 2012 20:37:12 +0200 +./lib/wpscan/modules/wp_plugins.rb Mon, 26 Nov 2012 22:28:31 +0100 +./lib/wpscan/modules/wp_readme.rb Tue, 25 Sep 2012 20:37:12 +0200 +./lib/wpscan/modules/wp_themes.rb Mon, 26 Nov 2012 22:27:25 +0100 +./lib/wpscan/modules/wp_timthumbs.rb Tue, 25 Sep 2012 20:37:12 +0200 +./lib/wpscan/modules/wp_usernames.rb Tue, 25 Sep 2012 20:37:12 +0200 +./lib/wpscan/msfrpc_client.rb Tue, 25 Sep 2012 20:37:12 +0200 +./lib/wpscan/vulnerable.rb Tue, 25 Sep 2012 20:37:12 +0200 +./lib/wpscan/wp_detector.rb Tue, 25 Sep 2012 20:37:12 +0200 +./lib/wpscan/wp_enumerator.rb Sat, 10 Nov 2012 09:50:17 +0100 +./lib/wpscan/wp_item.rb Sat, 10 Nov 2012 09:50:17 +0100 +./lib/wpscan/wp_options.rb Tue, 25 Sep 2012 20:37:12 +0200 +./lib/wpscan/wp_plugin.rb Tue, 25 Sep 2012 20:37:12 +0200 +./lib/wpscan/wp_target.rb Sat, 10 Nov 2012 09:50:17 +0100 +./lib/wpscan/wp_theme.rb Tue, 25 Sep 2012 20:37:12 +0200 +./lib/wpscan/wp_user.rb Tue, 25 Sep 2012 20:37:12 +0200 +./lib/wpscan/wp_version.rb Sat, 10 Nov 2012 09:50:17 +0100 +./lib/wpscan/wp_vulnerability.rb Tue, 25 Sep 2012 20:37:12 +0200 +./lib/wpscan/wpscan_helper.rb Mon, 26 Nov 2012 22:13:34 +0100 +./lib/wpscan/wpscan_options.rb Mon, 26 Nov 2012 22:34:40 +0100 +./lib/wpstools/generate_list.rb Sun, 25 Nov 2012 18:41:55 +0100 +./lib/wpstools/parse_svn.rb Sat, 10 Nov 2012 09:50:17 +0100 +./lib/wpstools/wpstools_helper.rb Sun, 25 Nov 2012 18:41:55 +0100 +./README Fri, 23 Nov 2012 18:46:41 +0100 +./wpscan.rb Mon, 26 Nov 2012 22:16:04 +0100 +./wpstools.rb Sun, 25 Nov 2012 18:41:55 +0100 diff --git a/doc/index.html b/doc/index.html index 4e478009..092e3d42 100644 --- a/doc/index.html +++ b/doc/index.html @@ -1,526 +1,152 @@ - - + - + - + - RDoc Documentation +RDoc Documentation - + - - - - + - - + + + + + + - -

RDoc Documentation

- -

This is the API documentation for 'RDoc Documentation'.

- + + + +

This is the API documentation for RDoc Documentation. + + +

+ diff --git a/doc/js/darkfish.js b/doc/js/darkfish.js index 84565c1e..4be722fa 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,94 +23,131 @@ 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-description,.method-heading').click( showSource ); + $('.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 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 ); +function hookTableOfContentsToggle() { + $('.indexpage li .toc-toggle').each( function() { + $(this).click( function() { + $(this).toggleClass('open'); + }); - $(this).quicksearch( this, searchElems, { - noSearchResultsIndicator: 'no-class-search-results', - focusOnLoad: false - }); - $(toggle).click( function() { - // console.debug( "Toggling qsbox: %o", qsbox ); - $(qsbox).toggle(); - }); - }); + 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