diff --git a/CHANGELOG.md b/CHANGELOG.md
deleted file mode 100644
index 17bc7d0d..00000000
--- a/CHANGELOG.md
+++ /dev/null
@@ -1,587 +0,0 @@
-# Changelog
-## Master
-[Work in progress](https://github.com/wpscanteam/wpscan/compare/2.9.4...master)
-
-## Version 2.9.4
-Released: 2018-06-15
-
-* Updated dependencies and required ruby version
-* Improved CLI output
-* Only show readme.html output when wp <= 4.8 #1127
-* Cleanup README.md
-* Fix bug "undefined method 'identifier' for nil:NilClass" #1149
-* Since WP 4.7 readme.html only shows major version #1152
-* Add checks for humans.txt and security.text (Thank you @g0tmi1k!)
-* Add offline database update support (Thank you @g0tmi1k!)
-* Check for API access and /wp-json/'s users output (Thank you @g0tmi1k!)
-* Add RSS author information (Thank you @g0tmi1k!)
-* Check HTTP status of each value in /robots.txt (Thank you @g0tmi1k!)
-* Follow any redirections (e.g. http -> https) (Thank you @g0tmi1k!)
-* Lots of other enhancements by @g0tmi1k & WPScan Team
-* Database export file enumeration.
-
-WPScan Database Statistics:
-* Total tracked wordpresses: 319
-* Total tracked plugins: 74896
-* Total tracked themes: 16666
-* Total vulnerable wordpresses: 305
-* Total vulnerable plugins: 1645
-* Total vulnerable themes: 286
-* Total wordpress vulnerabilities: 8327
-* Total plugin vulnerabilities: 2603
-* Total theme vulnerabilities: 352
-
-## Version 2.9.3
-Released: 2017-07-19
-
-* Updated dependencies and required ruby version
-* Made some changes so wpscan works in ruby 2.4
-* Added a Gemfile.lock to lock all dependencies
-* You can now pass a wordlist from stdin via "--wordlist -"
-* Improved version detection regexes
-* Added an optional paramter to --log to specify a filename
-
-WPScan Database Statistics:
-* Total tracked wordpresses: 251
-* Total tracked plugins: 68818
-* Total tracked themes: 15132
-* Total vulnerable wordpresses: 243
-* Total vulnerable plugins: 1527
-* Total vulnerable themes: 280
-* Total wordpress vulnerabilities: 5263
-* Total plugin vulnerabilities: 2406
-* Total theme vulnerabilities: 349
-
-## Version 2.9.2
-Released: 2016-11-15
-
-* Fixed error when detecting plugins with UTF-8 characters
-* Use all possible finders to verify a detected version
-* Fix error when detecting a WordPress version not in our database
-* Added some additional clarification on error messages
-* Upgrade terminal-table gem
-* Add --cache-dir option
-* Add --disable-tls-checks options
-* Improve/add additional plugin passive detections
-* Remove scripts when calculating page hashes
-* Many other small bug fixes.
-
-WPScan Database Statistics:
-* Total tracked wordpresses: 194
-* Total tracked plugins: 63703
-* Total tracked themes: 13835
-* Total vulnerable wordpresses: 177
-* Total vulnerable plugins: 1382
-* Total vulnerable themes: 379
-* Total wordpress vulnerabilities: 2617
-* Total plugin vulnerabilities: 2190
-* Total theme vulnerabilities: 452
-
-## Version 2.9.1
-Released: 2016-05-06
-
-* Update to Ruby 2.3.1, drop older ruby support
-* New data file location
-* Added experimental Windows support
-* Display WordPress metadata on the detected version
-* Several small fixes
-
-WPScan Database Statistics:
-* Total vulnerable versions: 156
-* Total vulnerable plugins: 1324
-* Total vulnerable themes: 376
-* Total version vulnerabilities: 1998
-* Total plugin vulnerabilities: 2057
-* Total theme vulnerabilities: 449
-
-## Version 2.9
-Released: 2015-10-15
-
-New
-* GZIP Encoding in updater
-* Adds --throttle option to throttle requests
-* Uses new API and local database file structure
-* Adds last updated and latest version to plugins and themes
-
-Removed
-* ArchAssault from README
-* APIv1 local databases
-
-General core
-* Update to Ruby 2.2.3
-* Use yajl-ruby as JSON parser
-* New dependancy for Ubuntu 14.04 (libgmp-dev)
-* Use Travis container based infra and caching
-
-Fixed issues
-* Fix #835 - Readme requests to wp root dir
-* Fix #836 - Critical icon output twice when the site is not running WP
-* Fix #839 - Terminal-table dependency is broken
-* Fix #841 - error: undefined method `cells' for #
-* Fix #852 - GZIP Encoding in updater
-* Fix #853 - APIv2 integration
-* Fix #858 - Detection FP
-* Fix #873 - false positive "site has Must Use Plugins"
-
-WPScan Database Statistics:
-* Total vulnerable versions: 132
-* Total vulnerable plugins: 1170
-* Total vulnerable themes: 368
-* Total version vulnerabilities: 1476
-* Total plugin vulnerabilities: 1913
-* Total theme vulnerabilities: 450
-
-## Version 2.8
-Released: 2015-06-22
-
-New
-* Warn the user to update his DB files
-* Added last db update to --version option (see #815)
-* Add db checksum to verbose logging during update
-* Option to hide banner
-* Continue if user chooses not to update + db exists
-* Don't update if user chooses default + no DBs exist
-* Updates request timeout values to realistic ones (and in seconds)
-
-Removed
-* Removed `Time.parse('2000-01-01')` expedient
-* Removed unnecessary 'return' and '()'
-* Removed debug output
-* Removed wpstools
-
-General core
-* Update to Ruby 2.2.2
-* Switch to mitre
-* Install bundler gem README
-* Switch from gnutls to openssl
-
-Fixed issues
-* Fix #789 - Add blackarch to readme
-* Fix #790 - Consider the target down after 30 requests timed out requests instead of 10
-* Fix #791 - Rogue character causing the scan of non-wordpress site to crash
-* Fix #792 - Adds the HttpError exception
-* Fix #795 - Remove GHOST warning
-* Fix #796 - Do not swallow exit code
-* Fix #797 - Increases the timeout values
-* Fix #801 - Forces UTF-8 encoding when enumerating usernames
-* Fix #803 - Increases default connect-timeout to 10s
-* Fix #804 - Updates the Theme detection pattern
-* Fix #816 - Ignores potential non version chars in theme version detection
-* Fix #819 - Removes potential spaces in robots.txt entries
-
-WPScan Database Statistics:
-* Total vulnerable versions: 98
-* Total vulnerable plugins: 1076
-* Total vulnerable themes: 361
-* Total version vulnerabilities: 1104
-* Total plugin vulnerabilities: 1763
-* Total theme vulnerabilities: 443
-
-## Version 2.7
-Released: 2015-03-16
-
-New
-* Detects version in release date format
-* Copyrights updated
-* WP version detection from stylesheets
-* New license
-* Global HTTP request counter
-* Add security-protection plugin detection
-* Add GHOST warning if XMLRPC enabled
-* Update databases from wpvulndb.com
-* Enumerate usernames from WP <= 3.0 (thanks berotti3)
-
-Removed
-* README.txt
-
-General core
-* Update to Ruby 2.2.1
-* Update to Ruby 2.2.0
-* Add addressable gem
-* Update Typhoeus gem to 0.7.0
-* IDN support: encode non-ascii domain names (thanks dctabuyz)
-* Improve page hash calculation (thanks dctabuyz)
-* Version detection regex improved
-
-Fixed issues
-* Fix #745 - Plugin version pattern in readme.txt file not detected
-* Fix #746 - Add a global counter for all active requests to server.
-* Fix #747 - Add 'security-protection' plugin to wp_login_protection module
-* Fix #753 - undefined method `round' for "10":String for request or connect timeouts
-* Fix #760 - typhoeus issue (infinite loop)
-
-WPScan Database Statistics:
-* Total vulnerable versions: 89
-* Total vulnerable plugins: 953
-* Total vulnerable themes: 329
-* Total version vulnerabilities: 1070
-* Total plugin vulnerabilities: 1451
-* Total theme vulnerabilities: 378
-
-## Version 2.6
-Released: 2014-12-19
-
-New
-* Updates the readmes to reflect the new --usernames option
-* Improves plugin/theme version detection by looking at the "Version:"
-* Solution to avoid mandatory blank newline at the end of the wordlist
-* Add check for valid credentials
-* Add Sucuri sponsor to banner
-* Add protocol to sucuri url in banner
-* Add response code to proxy error output
-* Add a statement about mandatory newlines at the end of list
-* Give warning if default username 'admin' is still used
-* License amendment to make it more clear about value added usage
-
-Removed
-* remove malwares
-* remove malware folder
-* Removes the theme version check from the readme, unrealistic scenario
-
-General core
-* Update to Ruby 2.1.5 and travis
-* Prevent parent theme infinite loop
-* Fixes the progressbar being overriden by next brute forcing attempts
-
-Fixed issues
-* Fix UTF-8 encode on security db file download
-* Fix #703 - Disable logging by default. Implement log option.
-* Fix #705 - Installation instructions for Ubuntu < 14.04 apparently incomplete
-* Fix #717 - Expand on readme.html finding output
-* Fix #716 - Adds the --version in the help
-* Fix #715 - Add new updating info to docs
-* Fix #727 - WpItems detection: Perform the passive check and filter only vulnerable results at the end if required
-* Fix #737 - Adds some readme files to check for plugin versions
-* Fix #739 - Adds the --usernames option
-
-WPScan Database Statistics:
-* Total vulnerable versions: 88
-* Total vulnerable plugins: 901
-* Total vulnerable themes: 313
-* Total version vulnerabilities: 1050
-* Total plugin vulnerabilities: 1355
-* Total theme vulnerabilities: 349
-
-## Version 2.5.1
-Released: 2014-09-29
-
-Fixes reference URL to WPVDB
-
-## Version 2.5
-Released: 2014-09-26 (@ BruCON 2014)
-
-New
-* Exit program after --update
-* Detect directory listing in upload folder
-* Be more verbose when no version can be detected
-* Added detection for Yoast Wordpress SEO plugin
-* Also ensure to not process empty Location headers
-* Ensures a nil location is not processed when enumerating usernames
-* Fix #626 - Detect 'Must_Use_Plugins'
-* better username extraction
-* Add a --cookie option. Ref #485
-* Add a --no-color option
-* Output: Give 'Fixed in' an informational tag
-* Added ArchAssault distro - WPScan comes pre-installed with this distro
-* Layout changes with new colors
-
-Removed
-* Removes the source code updaters
-* Removes the ListGenerator plugin from WPStools
-* Removes all files from data/
-
-General core
-* Update docs to reflect new updating logic
-* Little output change and coloring
-* Adds a missing verbose output
-* Re-build redirection url if begin with slash '/'
-* Fixes the remove_conditional_comments function
-* Ensures to give a string to Typhoeus
-* Fix wpstools check-vuln-ref-urls
-* Fix rspecs for new json
-* Only output if different from style_url
-* Add exception so 'ruby wpscan.rb http://domain.com' is detected
-* Added make to Debian installation, which is needed in minimal installation.
-* Add build-essentials requirement to Ubuntu > 14.04
-* Updated installation instr. for GNU/Linux Debian.
-* Changes VersionCompare#is_newer_or_same? by lesser_or_equal?
-* Fixes the location of the robots.txt check
-* Updates the recommended ruby version
-* Rspec 3.0 support
-* Adds ruby 2.1.2 to Travis
-* Updated ruby-progressbar to 1.5.0
-
-WordPress Fingerprints
-* Adds WP 4.0 fingerprints
-* Adds WP 3.9.2, 3.8.4 & 3.7.4 fingerprints - Ref #652
-* Adds 3.9.1 fingerprints
-
-Fixed issues
-* Fix #689 - Adds config file to check
-* Fix #694 - Output Arrays
-* Fix #693 - Adds pathname require statement
-* Fix #657 - generate method
-* Fix #685 - Potenial fix for 'marshal data too short' error
-* Fix #686 - Adds specs for relative URI in Location headers
-* Fix #435 - Update license
-* Fix #674 - Improves the Plugins & Themes passive detection
-* Fix #673 - Problem with the output
-* Fix #661 - Don't hash directories named like a file
-* Fix #653 - Fix for infinite loop in wpstools
-* Fix #625 - Only parse styles when needed
-* Fix #481 - Fix for Jetpack plugin false positive
-* Fix #480 - Properly removes the colour sequence from log
-* Fix #472 - WPScan stops after redirection if not WordPress website
-* Fix #464 - Readmes updated to reflect recent changes about the config file & batch mode
-
-Vulnerabilities
-* geoplaces4 also uses name GeoPlaces4beta
-* Added metasploit module's
-* Added some timthumb detections
-
-WPScan Database Statistics:
-* Total vulnerable versions: 87
-* Total vulnerable plugins: 854
-* Total vulnerable themes: 303
-* Total version vulnerabilities: 752
-* Total plugin vulnerabilities: 1351
-* Total theme vulnerabilities: 345
-
-## Version 2.4
-Released: 2014-04-17
-
-New
-* '--batch' switch option added - Fix #454
-* Add random-agent
-* Added more CLI options
-* Switch over to nist - Fix #301
-* New choice added when a redirection is detected - Fix #438
-
-Removed
-* Removed 'Total WordPress Sites in the World' counter from stats
-* Old wpscan repo links removed - Fix #440
-* Fingerprinting Dev script removed
-* Useless code removed
-
-General core
-* Rspecs update
-* Forcing Travis notify the team
-* Ruby 2.1.1 added to Travis
-* Equal output layout for interaction questions
-* Only output error trace if verbose if enabled
-* Memory improvements during wp-items enumerations
-* Fixed broken link checker, fixed some broken links
-* Couple more 404s fixed
-* Themes & Plugins list updated
-
-WordPress Fingerprints
-* WP 3.8.2 & 3.7.2 Fingerprints added - Fix #448
-* WP 3.8.3 & 3.7.3 fingerprints
-* WP 3.9 fingerprints
-
-Fixed issues
-* Fix #380 - Redirects in WP 3.6-3.0
-* Fix #413 - Check the version of the Timthumbs files found
-* Fix #429 - Error WpScan Cache Browser
-* Fix #431 - Version number comparison between '2.3.3' and '0.42b'
-* Fix #439 - Detect if the target goes down during the scan
-* Fix #451 - Do not rely only on files in wp-content for fingerprinting
-* Fix #453 - Documentation or inplemention of option parameters
-* Fix #455 - Fails with a message if the target returns a 403 during the wordpress check
-
-Vulnerabilities
-* Update WordPress Vulnerabilities
-* Fixed some duplicate vulnerabilities
-
-WPScan Database Statistics:
-* Total vulnerable versions: 79; 1 is new
-* Total vulnerable plugins: 748; 55 are new
-* Total vulnerable themes: 292; 41 are new
-* Total version vulnerabilities: 617; 326 are new
-* Total plugin vulnerabilities: 1162; 146 are new
-* Total theme vulnerabilities: 330; 47 are new
-
-## Version 2.3
-Released: 2014-02-11
-
-New
-* Brute forcing over https!
-* Detect and output parent theme!
-* Complete fingerprint script & hash search
-* New spell checker!
-* Added database modification dates in status report
-* Added 'Total WordPress Sites in the World' statistics
-* Added separator between Name and Version in Item
-* Added a "Work in progress" URL in the CHANGELOG
-
-Removed
-* Removed "Exiting!" sentence
-* Removed Backtrack Linux. Not maintained anymore.
-
-General core
-* Ruby 2.1.0 added to Travis
-* Updated the version of WebMock required
-* Better string concatenation in code (improves speed)
-* Some modifications in the output of an item
-* Output cosmetics
-* rspec-mocks version constraint released
-* Tabs replaced by spaces
-* Rspecs update
-* Indent code cleanup
-* Themes & Plugins lists regenerated
-
-Vulnerabilities
-* Update WordPress Vulnerabilities
-* Disabled some fake reported vulnerabilities
-* Fixed some duplicate vulnerabilities
-
-WPScan Database Statistics:
-* Total vulnerable versions: 78; 2 are new
-* Total vulnerable plugins: 693; 83 are new
-* Total vulnerable themes: 251; 55 are new
-* Total version vulnerabilities: 291 17 are new
-* Total plugin vulnerabilities: 1016; 236 are new
-* Total theme vulnerabilities: 283; 79 are new
-
-WordPress Fingerprints
-* Better fingerprints
-* WP 3.8.1 Fingerprinting
-* WP 3.8 Fingerprinting
-
-Fixed issues
-* Fix #404 - Brute forcing issue over https
-* Fix #398 - Removed a fake vuln in WP Super Cache
-* Fix #393 - sudo added to the bundle install cmd for Mac OSX
-* Fix #228, #327 - Infinite loop when self-redirect
-* Fix #201 - Incorrect Paramter Parsing when no url was supplied
-
-## Version 2.2
-Released: 2013-11-12
-
-New
-* Output the vulnerability fix if available
-* Added 'WordPress Version Vulnerability' statistics
-* Added Kali Linux on the list of pre-installed Linux distributions
-* Added hosted wordpress detection. See issue #343.
-* Add detection for all-in-one-seo-pack
-* Use less memory when brute forcing with a large wordlist
-* Memory Usage output
-* Added cve tag to xml file
-* Add documentation to readme
-* Add --version switch
-* Parse robots.txt
-* Show twitter usernames
-* Clean logfile on wpstools too
-* Added pingback header
-* Request_timeout and connect_timeout implemented
-* Output interesting http-headers
-* Kali Linux detection
-* Ensure that brute forcing results are output even if an error occurs or the user exits
-* Added debug output
-* Fixed Version compare for issue #179
-* Added ruby-progressbar version to Gemfile
-* Use the redirect_to parameter on bruteforce
-* Readded "junk removal" from usernames before output
-* Add license file
-* Output the timthumb version if found
-* New enumeration system
-* More error details for XSD checks
-* Added default wp-content dir detection, see Issue #141.
-* Added checks for well formed xml
-
-Changed
-* Trying a fix for Kali Linux
-* Make a seperator between plugin name and vulnerability name
-* It's WordPress, not Wordpress
-* Changed wordpress.com scanning error to warning. See issue #343.
-* Make output lines consistent
-* Replace packetstormsecurity.org to packetstormsecurity.com
-* Same URL syntax for all Packet Storm Security URL's
-* Packet Storm Security URL's don't need the 'friendly part' of the URL. So it can be neglected.
-* Use online documentation
-* User prompt on same line
-* Don't skip passwords that start with a hash. This is fairly common (see RockYou list for example).
-* Updated Fedora install instructions as per Issue #92
-* Slight update to security plugin warning. Issue #212.
-* Ruby-progressbar Gemfile version bump
-* Fix error with the -U option (undefined method 'merge' for #WpTarget:)
-* Banner artwork
-* Fix hacks.rb conflict
-* Handle when there are 2 headers of the same name
-* Releasing the Typhoeus version constraint
-* Amended Arch Linux install instructions. See issue #183.
-
-Updated
-* Plugins & Themes updated
-* Update README.md
-* Updated documentation
-
-Removed
-* Removed 'smileys' in output messages
-* Removed 'for WordPress' and 'plugin' in title strings.
-* Removed reference
-* Removed useless code
-* Removed duplicate vulnerabilities
-
-General core
-* Code cleaning
-* Fix typo's
-* Clean up rspecs
-* Themes & Plugins lists regenerated
-* Rspecs update
-* Code Factoring
-* Added checks for old ruby. Otherwise there will be syntax errors
-
-Vulnerabilities
-* Update WordPress Vulnerabilities
-* Update timthumb due to Secunia #54801
-* Added WP vuln: 3.4 - 3.5.1 wp-admin/users.php FPD
-
-WPScan Database Statistics:
-* Total vulnerable versions: 76; 4 are new
-* Total vulnerable plugins: 610; 201 are new
-* Total vulnerable themes: 196; 47 are new
-* Total version vulnerabilities: 274; 53 are new
-* Total plugin vulnerabilities: 780; 286 are new
-* Total theme vulnerabilities: 204; 52 are new
-
-Add WP Fingerprints
-* WP 3.7.1 Fingerprinting
-* WP 3.7 Fingerprinting
-* Ref #280 WP 3.6.1 fingerprint
-* Added WP 3.6 advanced fingerprint hash. See Issue #255.
-* Updated MD5 hash of WP 3.6 detection. See Issue #277.
-* WP 3.5.2 Fingerprint
-* Bug Fix : Wp 3.5 & 3.5.1 not detected from advanced fingerprinting.
-
-Fixed issues
-* Fix #249 - [ERROR] "\xF1" on US-ASCII
-* Fix #275 - [ERROR] "\xC3" on US-ASCII
-* Fix #271 - Further Instructions added to the Mac Install
-* Fix #266 - passive detection regex
-* Fix #265 - remove base64 images before passive detection
-* Fix #262 - [ERROR] bad component(expected absolute path component)
-* Fix #260 - Fixes Travis Fail, due to rspec-mock v2.14.3
-* Fix #208 - Fixed vulnerable plugins still appear in the results
-* Fix #245 - all theme enumeration error
-* Fix #241 - Cant convert array to string
-* Fix #232 - Crash while enumerating usernames
-* Fix #223 - New wordpress urls for most popular plugins & themes
-* Fix #177 - Passive Cache plugins detection (no spec)
-* Fix #169 - False reports
-* Fix #182 - Remove the progress-bar static length (120), and let it to automatic
-* Fix #181 - Don't exit if no usernames found during a simple enumeration (but exit if a brute force is asked)
-* Fix #200 - Log file not recording the list of username retireved
-* Fix #164 - README.txt detection
-* Fix #166 - ListGenerator using the old Browser#get method for full generation
-* Fix #153 - Disable error trace when it's from the main script
-* Fix #163 - in the proper way
-* Fix #144 - Use cookie jar to prevent infinite redirections loop
-* Fix #158 - Add the solution to 'no such file to load -- rubygems' in the README
-* Fix #152 - invalid ssl_certificate - response code 0
-* Fix #147 - can't modify frozen string
-* Fix #140 - xml_rpc_url in the body
-* Fix #153 - No error trace when 'No argument supplied'
-
-## Version 2.1
-Released 2013-3-4
diff --git a/DISCLAIMER.md b/DISCLAIMER.md
deleted file mode 100644
index 0d7199ab..00000000
--- a/DISCLAIMER.md
+++ /dev/null
@@ -1,2 +0,0 @@
-WPScan is not responsible for misuse or for any damage that you may cause!
-You agree that you use this software at your own risk.
diff --git a/Dockerfile b/Dockerfile
deleted file mode 100644
index 4af7010b..00000000
--- a/Dockerfile
+++ /dev/null
@@ -1,37 +0,0 @@
-FROM ruby:2.5-alpine
-LABEL maintainer="WPScan Team "
-
-ARG BUNDLER_ARGS="--jobs=8 --without test"
-
-# Add a new user
-RUN adduser -h /wpscan -g WPScan -D wpscan
-
-# Setup gems
-RUN echo "gem: --no-ri --no-rdoc" > /etc/gemrc
-
-COPY Gemfile /wpscan
-COPY Gemfile.lock /wpscan
-
-# Runtime dependencies
-RUN apk add --no-cache libcurl procps && \
- # build dependencies
- apk add --no-cache --virtual build-deps alpine-sdk ruby-dev libffi-dev zlib-dev && \
- bundle install --system --gemfile=/wpscan/Gemfile $BUNDLER_ARGS && \
- apk del --no-cache build-deps
-
-# Copy over data & set permissions
-COPY . /wpscan
-RUN chown -R wpscan:wpscan /wpscan
-
-# Switch directory
-WORKDIR /wpscan
-
-# Switch users
-USER wpscan
-
-# Update WPScan
-RUN /wpscan/wpscan.rb --update --verbose --no-color
-
-# Run WPScan
-ENTRYPOINT ["/wpscan/wpscan.rb"]
-CMD ["--help"]
diff --git a/Gemfile b/Gemfile
deleted file mode 100644
index 03bc4df5..00000000
--- a/Gemfile
+++ /dev/null
@@ -1,16 +0,0 @@
-source 'https://rubygems.org'
-
-gem 'addressable', '>=2.5.0'
-gem 'nokogiri', '>=1.7.0.1'
-gem 'ruby-progressbar', '>=1.8.1'
-gem 'rubyzip', '>=1.2.1'
-gem 'terminal-table', '>=1.6.0'
-gem 'typhoeus', '>=1.1.2'
-gem 'yajl-ruby', '>=1.3.0' # Better JSON parser regarding memory usage
-
-group :test do
- gem 'webmock', '>=2.3.2'
- gem 'simplecov', '>=0.13.0'
- gem 'rspec', '>=3.5.0'
- gem 'rspec-its', '>=1.2.0'
-end
diff --git a/Gemfile.lock b/Gemfile.lock
deleted file mode 100644
index aeb6e493..00000000
--- a/Gemfile.lock
+++ /dev/null
@@ -1,71 +0,0 @@
-GEM
- remote: https://rubygems.org/
- specs:
- addressable (2.5.2)
- public_suffix (>= 2.0.2, < 4.0)
- crack (0.4.3)
- safe_yaml (~> 1.0.0)
- diff-lcs (1.3)
- docile (1.3.1)
- ethon (0.11.0)
- ffi (>= 1.3.0)
- ffi (1.9.25)
- hashdiff (0.3.7)
- json (2.1.0)
- mini_portile2 (2.3.0)
- nokogiri (1.8.4)
- mini_portile2 (~> 2.3.0)
- public_suffix (3.0.2)
- rspec (3.7.0)
- rspec-core (~> 3.7.0)
- rspec-expectations (~> 3.7.0)
- rspec-mocks (~> 3.7.0)
- rspec-core (3.7.1)
- rspec-support (~> 3.7.0)
- rspec-expectations (3.7.0)
- diff-lcs (>= 1.2.0, < 2.0)
- rspec-support (~> 3.7.0)
- rspec-its (1.2.0)
- rspec-core (>= 3.0.0)
- rspec-expectations (>= 3.0.0)
- rspec-mocks (3.7.0)
- diff-lcs (>= 1.2.0, < 2.0)
- rspec-support (~> 3.7.0)
- rspec-support (3.7.1)
- ruby-progressbar (1.9.0)
- rubyzip (1.2.1)
- safe_yaml (1.0.4)
- simplecov (0.16.1)
- docile (~> 1.1)
- json (>= 1.8, < 3)
- simplecov-html (~> 0.10.0)
- simplecov-html (0.10.2)
- terminal-table (1.8.0)
- unicode-display_width (~> 1.1, >= 1.1.1)
- typhoeus (1.3.0)
- ethon (>= 0.9.0)
- unicode-display_width (1.4.0)
- webmock (3.4.2)
- addressable (>= 2.3.6)
- crack (>= 0.3.2)
- hashdiff
- yajl-ruby (1.4.0)
-
-PLATFORMS
- ruby
-
-DEPENDENCIES
- addressable (>= 2.5.0)
- nokogiri (>= 1.7.0.1)
- rspec (>= 3.5.0)
- rspec-its (>= 1.2.0)
- ruby-progressbar (>= 1.8.1)
- rubyzip (>= 1.2.1)
- simplecov (>= 0.13.0)
- terminal-table (>= 1.6.0)
- typhoeus (>= 1.1.2)
- webmock (>= 2.3.2)
- yajl-ruby (>= 1.3.0)
-
-BUNDLED WITH
- 1.16.3
diff --git a/LICENSE b/LICENSE
deleted file mode 100644
index 4cf675c9..00000000
--- a/LICENSE
+++ /dev/null
@@ -1,74 +0,0 @@
-WPScan Public Source License
-
-The WPScan software (henceforth referred to simply as "WPScan") is dual-licensed - Copyright 2011-2018 WPScan Team.
-
-Cases that include commercialization of WPScan require a commercial, non-free license. Otherwise, WPScan can be used without charge under the terms set out below.
-
-1. Definitions
-
-1.1 “License” means this document.
-1.2 “Contributor” means each individual or legal entity that creates, contributes to the creation of, or owns WPScan.
-1.3 “WPScan Team” means WPScan’s core developers.
-
-2. Commercialization
-
-A commercial use is one intended for commercial advantage or monetary compensation.
-
-Example cases of commercialization are:
-
- - Using WPScan to provide commercial managed/Software-as-a-Service services.
- - Distributing WPScan as a commercial product or as part of one.
- - Using WPScan as a value added service/product.
-
-Example cases which do not require a commercial license, and thus fall under the terms set out below, include (but are not limited to):
-
- - Penetration testers (or penetration testing organizations) using WPScan as part of their assessment toolkit.
- - Penetration Testing Linux Distributions including but not limited to Kali Linux, SamuraiWTF, BackBox Linux.
- - Using WPScan to test your own systems.
- - Any non-commercial use of WPScan.
-
-If you need to purchase a commercial license or are unsure whether you need to purchase a commercial license contact us - team@wpscan.org.
-
-We may grant commercial licenses at no monetary cost at our own discretion if the commercial usage is deemed by the WPScan Team to significantly benefit WPScan.
-
-Free-use Terms and Conditions;
-
-3. Redistribution
-
-Redistribution is permitted under the following conditions:
-
- - Unmodified License is provided with WPScan.
- - Unmodified Copyright notices are provided with WPScan.
- - Does not conflict with the commercialization clause.
-
-4. Copying
-
-Copying is permitted so long as it does not conflict with the Redistribution clause.
-
-5. Modification
-
-Modification is permitted so long as it does not conflict with the Redistribution clause.
-
-6. Contributions
-
-Any Contributions assume the Contributor grants the WPScan Team the unlimited, non-exclusive right to reuse, modify and relicense the Contributor's content.
-
-7. Support
-
-WPScan is provided under an AS-IS basis and without any support, updates or maintenance. Support, updates and maintenance may be given according to the sole discretion of the WPScan Team.
-
-8. Disclaimer of Warranty
-
-WPScan is provided under this License on an “as is” basis, without warranty of any kind, either expressed, implied, or statutory, including, without limitation, warranties that the WPScan is free of defects, merchantable, fit for a particular purpose or non-infringing.
-
-9. Limitation of Liability
-
-To the extent permitted under Law, WPScan is provided under an AS-IS basis. The WPScan Team shall never, and without any limit, be liable for any damage, cost, expense or any other payment incurred as a result of WPScan's actions, failure, bugs and/or any other interaction between WPScan and end-equipment, computers, other software or any 3rd party, end-equipment, computer or services.
-
-10. Disclaimer
-
-Running WPScan against websites without prior mutual consent may be illegal in your country. The WPScan Team accept no liability and are not responsible for any misuse or damage caused by WPScan.
-
-11. Trademark
-
-The "wpscan" term is a registered trademark. This License does not grant the use of the "wpscan" trademark or the use of the WPScan logo.
diff --git a/README.md b/README.md
deleted file mode 100644
index b3aa0129..00000000
--- a/README.md
+++ /dev/null
@@ -1,318 +0,0 @@
-
-
-[](https://travis-ci.org/wpscanteam/wpscan)
-[](https://codeclimate.com/github/wpscanteam/wpscan)
-[](https://hub.docker.com/r/wpscanteam/wpscan/)
-[](https://www.patreon.com/wpscan)
-
-
-
-# LICENSE
-
-## WPScan Public Source License
-
-The WPScan software (henceforth referred to simply as "WPScan") is dual-licensed - Copyright 2011-2018 WPScan Team.
-
-Cases that include commercialization of WPScan require a commercial, non-free license. Otherwise, WPScan can be used without charge under the terms set out below.
-
-### 1. Definitions
-
-1.1 "License" means this document.
-
-1.2 "Contributor" means each individual or legal entity that creates, contributes to the creation of, or owns WPScan.
-
-1.3 "WPScan Team" means WPScan’s core developers, an updated list of whom can be found within the CREDITS file.
-
-### 2. Commercialization
-
-A commercial use is one intended for commercial advantage or monetary compensation.
-
-Example cases of commercialization are:
-
- - Using WPScan to provide commercial managed/Software-as-a-Service services.
- - Distributing WPScan as a commercial product or as part of one.
- - Using WPScan as a value added service/product.
-
-Example cases which do not require a commercial license, and thus fall under the terms set out below, include (but are not limited to):
-
- - Penetration testers (or penetration testing organizations) using WPScan as part of their assessment toolkit.
- - Penetration Testing Linux Distributions including but not limited to Kali Linux, SamuraiWTF, BackBox Linux.
- - Using WPScan to test your own systems.
- - Any non-commercial use of WPScan.
-
-If you need to purchase a commercial license or are unsure whether you need to purchase a commercial license contact us - team@wpscan.org.
-
-We may grant commercial licenses at no monetary cost at our own discretion if the commercial usage is deemed by the WPScan Team to significantly benefit WPScan.
-
-Free-use Terms and Conditions;
-
-### 3. Redistribution
-
-Redistribution is permitted under the following conditions:
-
- - Unmodified License is provided with WPScan.
- - Unmodified Copyright notices are provided with WPScan.
- - Does not conflict with the commercialization clause.
-
-### 4. Copying
-
-Copying is permitted so long as it does not conflict with the Redistribution clause.
-
-### 5. Modification
-
-Modification is permitted so long as it does not conflict with the Redistribution clause.
-
-### 6. Contributions
-
-Any Contributions assume the Contributor grants the WPScan Team the unlimited, non-exclusive right to reuse, modify and relicense the Contributor's content.
-
-### 7. Support
-
-WPScan is provided under an AS-IS basis and without any support, updates or maintenance. Support, updates and maintenance may be given according to the sole discretion of the WPScan Team.
-
-### 8. Disclaimer of Warranty
-
-WPScan is provided under this License on an “as is” basis, without warranty of any kind, either expressed, implied, or statutory, including, without limitation, warranties that the WPScan is free of defects, merchantable, fit for a particular purpose or non-infringing.
-
-### 9. Limitation of Liability
-
-To the extent permitted under Law, WPScan is provided under an AS-IS basis. The WPScan Team shall never, and without any limit, be liable for any damage, cost, expense or any other payment incurred as a result of WPScan's actions, failure, bugs and/or any other interaction between WPScan and end-equipment, computers, other software or any 3rd party, end-equipment, computer or services.
-
-### 10. Disclaimer
-
-Running WPScan against websites without prior mutual consent may be illegal in your country. The WPScan Team accept no liability and are not responsible for any misuse or damage caused by WPScan.
-
-### 11. Trademark
-
-The "wpscan" term is a registered trademark. This License does not grant the use of the "wpscan" trademark or the use of the WPScan logo.
-
-# INSTALL
-
-WPScan comes pre-installed on the following Linux distributions:
-
-- [BackBox Linux](http://www.backbox.org/)
-- [Kali Linux](http://www.kali.org/)
-- [Pentoo](http://www.pentoo.ch/)
-- [SamuraiWTF](http://samurai.inguardians.com/)
-- [BlackArch](http://blackarch.org/)
-
-On macOS WPScan is packaged by [Homebrew](https://brew.sh/) as [`wpscan`](http://braumeister.org/formula/wpscan).
-
-Windows is not supported
-
-We suggest you use our official Docker image from https://hub.docker.com/r/wpscanteam/wpscan/ to avoid installation problems.
-
-# DOCKER
-## Install Docker
-[https://docs.docker.com/engine/installation/](https://docs.docker.com/engine/installation/)
-
-## Get the image
-Pull the repo with `docker pull wpscanteam/wpscan`
-
-## Start WPScan
-
-```
-docker run -it --rm wpscanteam/wpscan -u https://yourblog.com [options]
-```
-
-For the available Options, please see https://github.com/wpscanteam/wpscan#wpscan-arguments
-
-If you run the git version of wpscan we included some binstubs in ./bin for easier start of wpscan.
-
-## Examples
-
-Mount a local wordlist to the docker container and start a bruteforce attack for user admin
-
-```
-docker run -it --rm -v ~/wordlists:/wordlists wpscanteam/wpscan --url https://yourblog.com --wordlist /wordlists/crackstation.txt --username admin
-```
-
-(This mounts the host directory `~/wordlists` to the container in the path `/wordlists`)
-
-Use logfile option
-```
-# the file must exist prior to starting the container, otherwise docker will create a directory with the filename
-touch ~/FILENAME
-docker run -it --rm -v ~/FILENAME:/wpscan/output.txt wpscanteam/wpscan --url https://yourblog.com --log /wpscan/output.txt
-```
-
-Published on https://hub.docker.com/r/wpscanteam/wpscan/
-
-# Manual install
-
-## Prerequisites
-
-- Ruby >= 2.1.9 - Recommended: 2.5.1
-- Curl >= 7.21 - Recommended: latest - FYI the 7.29 has a segfault
-- RubyGems - Recommended: latest
-- Git
-
-### Installing dependencies on Ubuntu
-
- sudo apt-get install libcurl4-openssl-dev libxml2 libxml2-dev libxslt1-dev ruby-dev build-essential libgmp-dev zlib1g-dev
-
-### Installing dependencies on Debian
-
- sudo apt-get install gcc git ruby ruby-dev libcurl4-openssl-dev make zlib1g-dev
-
-### Installing dependencies on Fedora
-
- sudo dnf install gcc ruby-devel libxml2 libxml2-devel libxslt libxslt-devel libcurl-devel patch rpm-build
-
-### Installing dependencies on Arch Linux
-
- pacman -Syu ruby
- pacman -Syu libyaml
-
-### Installing dependencies on macOS
-
-Apple Xcode, Command Line Tools and the libffi are needed (to be able to install the FFI gem), See [http://stackoverflow.com/questions/17775115/cant-setup-ruby-environment-installing-fii-gem-error](http://stackoverflow.com/questions/17775115/cant-setup-ruby-environment-installing-fii-gem-error)
-
-## Installing with RVM (recommended when doing a manual install)
-
-If you are using GNOME Terminal, there are some steps required before executing the commands. See here for more information:
-https://rvm.io/integration/gnome-terminal#integrating-rvm-with-gnome-terminal
-
- # Install all prerequisites for your OS (look above)
- cd ~
- curl -sSL https://rvm.io/mpapis.asc | gpg --import -
- curl -sSL https://get.rvm.io | bash -s stable
- source ~/.rvm/scripts/rvm
- echo "source ~/.rvm/scripts/rvm" >> ~/.bashrc
- rvm install 2.5.1
- rvm use 2.5.1 --default
- echo "gem: --no-ri --no-rdoc" > ~/.gemrc
- git clone https://github.com/wpscanteam/wpscan.git
- cd wpscan
- gem install bundler
- bundle install --without test
-
-## Installing manually (not recommended)
-
- git clone https://github.com/wpscanteam/wpscan.git
- cd wpscan
- sudo gem install bundler && bundle install --without test
-
-# KNOWN ISSUES
-
- - no such file to load -- rubygems
-
- ```update-alternatives --config ruby```
-
- And select your ruby version
-
- See [https://github.com/wpscanteam/wpscan/issues/148](https://github.com/wpscanteam/wpscan/issues/148)
-
-# WPSCAN ARGUMENTS
-
- --update Update the database to the latest version.
- --url | -u The WordPress URL/domain to scan.
- --force | -f Forces WPScan to not check if the remote site is running WordPress.
- --enumerate | -e [option(s)] Enumeration.
- option :
- u usernames from id 1 to 10
- u[10-20] usernames from id 10 to 20 (you must write [] chars)
- p plugins
- vp only vulnerable plugins
- ap all plugins (can take a long time)
- tt timthumbs
- t themes
- vt only vulnerable themes
- at all themes (can take a long time)
- Multiple values are allowed : "-e tt,p" will enumerate timthumbs and plugins
- If no option is supplied, the default is "vt,tt,u,vp"
-
- --exclude-content-based ""
- Used with the enumeration option, will exclude all occurrences based on the regexp or string supplied.
- You do not need to provide the regexp delimiters, but you must write the quotes (simple or double).
- --config-file | -c Use the specified config file, see the example.conf.json.
- --user-agent | -a Use the specified User-Agent.
- --cookie String to read cookies from.
- --random-agent | -r Use a random User-Agent.
- --follow-redirection If the target url has a redirection, it will be followed without asking if you wanted to do so or not
- --batch Never ask for user input, use the default behaviour.
- --no-color Do not use colors in the output.
- --log [filename] Creates a log.txt file with WPScan's output if no filename is supplied. Otherwise the filename is used for logging.
- --no-banner Prevents the WPScan banner from being displayed.
- --disable-accept-header Prevents WPScan sending the Accept HTTP header.
- --disable-referer Prevents setting the Referer header.
- --disable-tls-checks Disables SSL/TLS certificate verification.
- --wp-content-dir WPScan try to find the content directory (ie wp-content) by scanning the index page, however you can specify it.
- Subdirectories are allowed.
- --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
- --proxy <[protocol://]host:port> Supply a proxy. HTTP, SOCKS4 SOCKS4A and SOCKS5 are supported.
- If no protocol is given (format host:port), HTTP will be used.
- --proxy-auth Supply the proxy login credentials.
- --basic-auth Set the HTTP Basic authentication.
- --wordlist | -w Supply a wordlist for the password brute forcer.
- If the "-" option is supplied, the wordlist is expected via STDIN.
- --username | -U Only brute force the supplied username.
- --usernames Only brute force the usernames from the file.
- --cache-dir Set the cache directory.
- --cache-ttl Typhoeus cache TTL.
- --request-timeout Request Timeout.
- --connect-timeout Connect Timeout.
- --threads | -t The number of threads to use when multi-threading requests.
- --throttle Milliseconds to wait before doing another web request. If used, the --threads should be set to 1.
- --help | -h This help screen.
- --verbose | -v Verbose output.
- --version Output the current version and exit.
-
-# WPSCAN EXAMPLES
-
-Do 'non-intrusive' checks...
-
-```ruby wpscan.rb --url www.example.com```
-
-Do wordlist password brute force on enumerated users using 50 threads...
-
-```ruby wpscan.rb --url www.example.com --wordlist darkc0de.lst --threads 50```
-
-Do wordlist password brute force on enumerated users using STDIN as the wordlist...
-
-```crunch 5 13 -f charset.lst mixalpha | ruby wpscan.rb --url www.example.com --wordlist -```
-
-Do wordlist password brute force on the 'admin' username only...
-
-```ruby wpscan.rb --url www.example.com --wordlist darkc0de.lst --username admin```
-
-Enumerate installed plugins...
-
-```ruby wpscan.rb --url www.example.com --enumerate p```
-
-Run all enumeration tools...
-
-```ruby wpscan.rb --url www.example.com --enumerate```
-
-Use custom content directory...
-
-```ruby wpscan.rb -u www.example.com --wp-content-dir custom-content```
-
-Update WPScan's databases...
-
-```ruby wpscan.rb --update```
-
-Debug output...
-
-```ruby wpscan.rb --url www.example.com --debug-output 2>debug.log```
-
-# PROJECT HOME
-
-[http://www.wpscan.org](http://www.wpscan.org)
-
-# VULNERABILITY DATABASE
-
-[https://wpvulndb.com](https://wpvulndb.com)
-
-# GIT REPOSITORY
-
-[https://github.com/wpscanteam/wpscan](https://github.com/wpscanteam/wpscan)
-
-# ISSUES
-
-[https://github.com/wpscanteam/wpscan/issues](https://github.com/wpscanteam/wpscan/issues)
-
-# DEVELOPER DOCUMENTATION
-
-[http://rdoc.info/github/wpscanteam/wpscan/frames](http://rdoc.info/github/wpscanteam/wpscan/frames)
diff --git a/bin/rspec b/bin/rspec
deleted file mode 100755
index d8614a43..00000000
--- a/bin/rspec
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/bin/bash
-
-SOURCE="${BASH_SOURCE[0]}"
-while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink
- DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
- SOURCE="$(readlink "$SOURCE")"
- [[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located
-done
-DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
-
-cd $DIR/../
-# always rebuild and include all GEMs
-docker build --build-arg "BUNDLER_ARGS=--jobs=8" -t wpscan:rspec .
-# update all gems (this updates Gemfile.lock on the host)
-# this also needs some build dependencies
-docker run --rm -u root -v $DIR/../Gemfile.lock:/wpscan/Gemfile.lock --entrypoint "" wpscan:rspec sh -c 'apk add --no-cache alpine-sdk ruby-dev libffi-dev zlib-dev && bundle update'
-# rebuild image with latest GEMs
-docker build --build-arg "BUNDLER_ARGS=--jobs=8" -t wpscan:rspec .
-# run spec
-docker run --rm -v $DIR/../:/wpscan --entrypoint "" wpscan:rspec rspec
-
diff --git a/bin/update_gems b/bin/update_gems
deleted file mode 100755
index 85749b18..00000000
--- a/bin/update_gems
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/bin/bash
-
-SOURCE="${BASH_SOURCE[0]}"
-while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink
- DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
- SOURCE="$(readlink "$SOURCE")"
- [[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located
-done
-DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
-
-cd $DIR/../
-docker run --rm -v "$DIR/../":/usr/src/app -w /usr/src/app ruby:2.5-alpine /bin/sh -c "gem install bundler; bundle lock --update"
diff --git a/bin/wpscan b/bin/wpscan
deleted file mode 100755
index 59a68c5c..00000000
--- a/bin/wpscan
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/bin/bash
-
-SOURCE="${BASH_SOURCE[0]}"
-while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink
- DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
- SOURCE="$(readlink "$SOURCE")"
- [[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located
-done
-DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
-
-cd $DIR/../
-docker build -q -t wpscan:git .
-docker run -it --rm wpscan:git "$@"
-
diff --git a/bin/wpscan-dev b/bin/wpscan-dev
deleted file mode 100755
index 4da39084..00000000
--- a/bin/wpscan-dev
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/bin/bash
-
-SOURCE="${BASH_SOURCE[0]}"
-while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink
- DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
- SOURCE="$(readlink "$SOURCE")"
- [[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located
-done
-DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
-
-cd $DIR/../
-if [[ -n "$WPSCAN_BUILD" ]]; then
- docker build -q -t wpscan:git .
-fi
-docker run -it --rm -v $DIR/../:/wpscan wpscan:git "$@"
-
diff --git a/data.zip b/data.zip
deleted file mode 100644
index ecea07bf..00000000
Binary files a/data.zip and /dev/null differ
diff --git a/dev/pre-commit-hook.rb b/dev/pre-commit-hook.rb
deleted file mode 100755
index 5da0c583..00000000
--- a/dev/pre-commit-hook.rb
+++ /dev/null
@@ -1,41 +0,0 @@
-#!/usr/bin/env ruby
-
-# from the top level dir:
-# ln -sf ../../dev/pre-commit-hook.rb .git/hooks/pre-commit
-
-require 'pty'
-html_path = 'rspec_results.html'
-
-begin
- PTY.spawn( "rspec spec --format h > #{html_path}" ) do |stdin, stdout, pid|
- begin
- stdin.each { |line| print line }
- rescue Errno::EIO => e
- puts "Error: #{e.to.s}"
- return 1
- end
- end
-rescue PTY::ChildExited
- puts 'Child process exit!'
-end
-
-# find out if there were any errors
-html = open(html_path).read
-examples = html.match(/(\d+) examples/)[0].to_i rescue 0
-errors = html.match(/(\d+) errors/)[0].to_i rescue 0
-if errors == 0
- errors = html.match(/(\d+) failure/)[0].to_i rescue 0
-end
-pending = html.match(/(\d+) pending/)[0].to_i rescue 0
-
-if errors.zero?
- puts "0 failed! #{examples} run, #{pending} pending"
- sleep 1
- exit 0
-else
- puts "\aCOMMIT FAILED!!"
- puts "View your rspec results at #{File.expand_path(html_path)}"
- puts
- puts "#{errors} failed! #{examples} run, #{pending} pending"
- exit 1
-end
diff --git a/dev/stats.rb b/dev/stats.rb
deleted file mode 100755
index f7183599..00000000
--- a/dev/stats.rb
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/usr/bin/env ruby
-# encoding: UTF-8
-
-require File.expand_path(File.join(__dir__, '..', 'lib', 'wpscan', 'wpscan_helper'))
-
-wordpress_json = json(WORDPRESSES_FILE)
-plugins_json = json(PLUGINS_FILE)
-themes_json = json(THEMES_FILE)
-
-puts 'WPScan Database Statistics:'
-puts "* Total tracked wordpresses: #{wordpress_json.count}"
-puts "* Total tracked plugins: #{plugins_json.count}"
-puts "* Total tracked themes: #{themes_json.count}"
-puts "* Total vulnerable wordpresses: #{wordpress_json.select { |item| !wordpress_json[item]['vulnerabilities'].empty? }.count}"
-puts "* Total vulnerable plugins: #{plugins_json.select { |item| !plugins_json[item]['vulnerabilities'].empty? }.count}"
-puts "* Total vulnerable themes: #{themes_json.select { |item| !themes_json[item]['vulnerabilities'].empty? }.count}"
-puts "* Total wordpress vulnerabilities: #{wordpress_json.map {|k,v| v['vulnerabilities'].count}.inject(:+)}"
-puts "* Total plugin vulnerabilities: #{plugins_json.map {|k,v| v['vulnerabilities'].count}.inject(:+)}"
-puts "* Total theme vulnerabilities: #{themes_json.map {|k,v| v['vulnerabilities'].count}.inject(:+)}"
diff --git a/example.conf.json b/example.conf.json
deleted file mode 100644
index a4533544..00000000
--- a/example.conf.json
+++ /dev/null
@@ -1,18 +0,0 @@
-{
- "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:9.0) Gecko/20100101 Firefox/9.0",
-
- /* Uncomment the "proxy" line to use the proxy
- SOCKS proxies (4, 4A, 5) are supported, ie : "proxy": "socks5://127.0.0.1:9000"
- If you do not specify the protocol, http will be used
- */
- //"proxy": "127.0.0.1:3128",
- //"proxy_auth": "username:password",
-
- "cache_ttl": 600, // 10 minutes, at this time the cache is cleaned before each scan. If this value is set to 0, the cache will be disabled
-
- "request_timeout": 60, // 1min
-
- "connect_timeout": 10, // 10s
-
- "max_threads": 20
-}
diff --git a/lib/common/browser.rb b/lib/common/browser.rb
deleted file mode 100644
index 8f595acf..00000000
--- a/lib/common/browser.rb
+++ /dev/null
@@ -1,204 +0,0 @@
-# encoding: UTF-8
-
-require 'common/typhoeus_cache'
-require 'common/browser/actions'
-require 'common/browser/options'
-
-class Browser
- extend Browser::Actions
- include Browser::Options
-
- OPTIONS = [
- :basic_auth,
- :cache_ttl,
- :max_threads,
- :user_agent,
- :proxy,
- :proxy_auth,
- :request_timeout,
- :connect_timeout,
- :cookie,
- :throttle,
- :disable_accept_header,
- :disable_referer,
- :disable_tls_checks
- ]
-
- @@instance = nil
-
- attr_reader :hydra, :cache_dir
-
- attr_accessor :referer, :cookie, :vhost
-
- # @param [ Hash ] options
- #
- # @return [ Browser ]
- def initialize(options = {})
- @cache_dir = options[:cache_dir] || CACHE_DIR + '/browser'
-
- # sets browser defaults
- browser_defaults
- # load config file
- conf = options[:config_file]
- load_config(conf) if conf
- # overrides defaults with user supplied values (overwrite values from config)
- override_config(options)
-
- unless @hydra
- @hydra = Typhoeus::Hydra.new(max_concurrency: self.max_threads)
- end
-
- @cache = TyphoeusCache.new(@cache_dir)
- @cache.clean
-
- Typhoeus::Config.cache = @cache
- end
-
- private_class_method :new
-
- # @param [ Hash ] options
- #
- # @return [ Browser ]
- def self.instance(options = {})
- unless @@instance
- @@instance = new(options)
- end
- @@instance
- end
-
- def self.reset
- @@instance = nil
- end
-
- # Override for setting the User-Agent
- # @param [ String ] user_agent
- def user_agent=(user_agent)
- Typhoeus::Config.user_agent = user_agent
- end
-
- #
- # sets browser default values
- #
- def browser_defaults
- Typhoeus::Config.user_agent = "WPScan v#{WPSCAN_VERSION} (http://wpscan.org)"
- @max_threads = 20
- # 10 minutes, at this time the cache is cleaned before each scan.
- # If this value is set to 0, the cache will be disabled
- @cache_ttl = 600
- @request_timeout = 60 # 60s
- @connect_timeout = 10 # 10s
- @throttle = 0
- end
-
- #
- # If an option was set but is not in the new config_file
- # it's value is kept
- #
- # @param [ String ] config_file
- #
- # @return [ void ]
- def load_config(config_file = nil)
- if File.symlink?(config_file)
- raise '[ERROR] Config file is a symlink.'
- else
- data = JSON.parse(File.read(config_file))
- end
-
- OPTIONS.each do |option|
- option_name = option.to_s
- unless data[option_name].nil?
- self.send(:"#{option_name}=", data[option_name])
- end
- end
- end
-
- # @param [ String ] url
- # @param [ Hash ] params
- #
- # @return [ Typhoeus::Request ]
- def forge_request(url, params = {})
- Typhoeus::Request.new(url, merge_request_params(params))
- end
-
- # @param [ Hash ] params
- #
- # @return [ Hash ]
- def merge_request_params(params = {})
- if @proxy
- params.merge!(proxy: @proxy)
- params.merge!(proxyuserpwd: @proxy_auth) if @proxy_auth
- end
-
- if @basic_auth
- params = Browser.append_params_header_field(
- params,
- 'Authorization',
- @basic_auth
- )
- end
-
- if vhost
- params = Browser.append_params_header_field(
- params,
- 'Host',
- vhost
- )
- end
-
- params.merge!(referer: referer)
- params.merge!(timeout: @request_timeout) if @request_timeout && !params.key?(:timeout)
- params.merge!(connecttimeout: @connect_timeout) if @connect_timeout && !params.key?(:connecttimeout)
-
- # Used to enable the cache system if :cache_ttl > 0
- params.merge!(cache_ttl: @cache_ttl) unless params.key?(:cache_ttl)
-
- # Prevent infinite self redirection
- params.merge!(maxredirs: 3) unless params.key?(:maxredirs)
-
- # Disable SSL-Certificate checks
- if @disable_tls_checks
- # Cert validity check
- params.merge!(ssl_verifypeer: 0) unless params.key?(:ssl_verifypeer)
- # Cert hostname check
- params.merge!(ssl_verifyhost: 0) unless params.key?(:ssl_verifyhost)
- end
-
- params.merge!(cookiejar: @cache_dir + '/cookie-jar')
- params.merge!(cookiefile: @cache_dir + '/cookie-jar')
- params.merge!(cookie: @cookie) if @cookie
- params = Browser.remove_params_header_field(params, 'Accept') if @disable_accept_header
- params = Browser.remove_params_header_field(params, 'Referer') if @disable_referer
-
- params
- end
-
- private
-
- # @param [ Hash ] params
- # @param [ String ] field
- # @param [ Mixed ] field_value
- #
- # @return [ Array ]
- def self.append_params_header_field(params = {}, field, field_value)
- if !params.has_key?(:headers)
- params = params.merge(:headers => { field => field_value })
- elsif !params[:headers].has_key?(field)
- params[:headers][field] = field_value
- end
- params
- end
-
- # @param [ Hash ] params
- # @param [ String ] field
- # @param [ Mixed ] field_value
- #
- # @return [ Array ]
- def self.remove_params_header_field(params = {}, field)
- if !params.has_key?(:headers)
- params = params.merge(:headers => { field => nil })
- elsif !params[:headers].has_key?(field)
- params[:headers][field] = nil
- end
- params
- end
-end
diff --git a/lib/common/browser/actions.rb b/lib/common/browser/actions.rb
deleted file mode 100644
index 13d4f158..00000000
--- a/lib/common/browser/actions.rb
+++ /dev/null
@@ -1,51 +0,0 @@
-# encoding: UTF-8
-
-class Browser
- module Actions
-
- # @param [ String ] url
- # @param [ Hash ] params
- #
- # @return [ Typhoeus::Response ]
- def get(url, params = {})
- process(url, params.merge(method: :get))
- end
-
- # @param [ String ] url
- # @param [ Hash ] params
- #
- # @return [ Typhoeus::Response ]
- def post(url, params = {})
- process(url, params.merge(method: :post))
- end
-
- # @param [ String ] url
- # @param [ Hash ] params
- #
- # @return [ Typhoeus::Response ]
- def head(url, params = {})
- process(url, params.merge(method: :head))
- end
-
- # @param [ String ] url
- # @param [ Hash ] params
- #
- # @return [ Typhoeus::Response ]
- def get_and_follow_location(url, params = {})
- params[:maxredirs] ||= 2
-
- get(url, params.merge(followlocation: true))
- end
-
- protected
-
- # @param [ String ] url
- # @param [ Hash ] params
- #
- # @return [ Typhoeus::Response ]
- def process(url, params)
- Typhoeus::Request.new(url, Browser.instance.merge_request_params(params)).run
- end
-
- end
-end
diff --git a/lib/common/browser/options.rb b/lib/common/browser/options.rb
deleted file mode 100644
index 84641b2a..00000000
--- a/lib/common/browser/options.rb
+++ /dev/null
@@ -1,122 +0,0 @@
-# encoding: UTF-8
-
-class Browser
- module Options
-
- attr_accessor :request_timeout, :connect_timeout, :user_agent, :disable_accept_header, :disable_referer, :disable_tls_checks
- attr_reader :basic_auth, :cache_ttl, :proxy, :proxy_auth, :throttle
-
- # Sets the Basic Authentification credentials
- # Accepted format:
- # login:password
- # Basic base_64_encoded
- #
- # @param [ String ] auth
- #
- # @return [ void ]
- def basic_auth=(auth)
- if auth.index(':')
- @basic_auth = "Basic #{Base64.encode64(auth).chomp}"
- elsif auth =~ /\ABasic [a-zA-Z0-9=]+\z/
- @basic_auth = auth
- else
- raise "Invalid basic authentication format, \"login:password\" or \"Basic base_64_encoded\" expected. Your input: #{auth}"
- end
- end
-
- def cache_ttl=(ttl)
- @cache_ttl = ttl.to_i
- end
-
- # @return [ Integer ]
- def max_threads
- @max_threads || 1
- end
-
- def max_threads=(threads)
- if threads.is_a?(Integer) && threads > 0
- @max_threads = threads
- @hydra = Typhoeus::Hydra.new(max_concurrency: threads)
- else
- raise 'max_threads must be an Integer > 0'
- end
- end
-
- # Sets the proxy
- # Accepted format:
- # [protocol://]host:post
- #
- # Supported protocols:
- # Depends on the curl protocols, See curl --version
- #
- # @param [ String ] proxy
- #
- # @return [ void ]
- def proxy=(proxy)
- if proxy.index(':')
- @proxy = proxy
- else
- raise 'Invalid proxy format. Should be [protocol://]host:port.'
- end
- end
-
- # Sets the proxy credentials
- # Accepted format:
- # username:password
- # { proxy_username: username, :proxy_password: password }
- #
- # @param [ String ] auth
- #
- # @return [ void ]
- def proxy_auth=(auth)
- unless auth.nil?
- if auth.is_a?(Hash) && auth.include?(:proxy_username) && auth.include?(:proxy_password)
- @proxy_auth = auth[:proxy_username] + ':' + auth[:proxy_password]
- elsif auth.is_a?(String) && auth.index(':') != nil
- @proxy_auth = auth
- else
- raise invalid_proxy_auth_format
- end
- end
- end
-
- # Sets the request timeout
- # @param [ Integer ] timeout Timeout in ms
- #
- # @return [ void ]
- def request_timeout=(timeout)
- @request_timeout = timeout.to_i
- end
-
- # Sets the connect timeout
- # @param [ Integer ] timeout Timeout in ms
- #
- # @return [ void ]
- def connect_timeout=(timeout)
- @connect_timeout = timeout.to_i
- end
-
- # @param [ String, Integer ] throttle
- def throttle=(throttle)
- @throttle = throttle.to_i.abs / 1000.0
- end
-
- protected
-
- def invalid_proxy_auth_format
- 'Invalid proxy auth format, expected username:password or {proxy_username: username, proxy_password: password}'
- end
-
- # Override with the options if they are set
- # @param [ Hash ] options
- #
- # @return [ void ]
- def override_config(options = {})
- options.each do |option, value|
- if value != nil and OPTIONS.include?(option)
- self.send(:"#{option}=", value)
- end
- end
- end
- end
-end
diff --git a/lib/common/cache_file_store.rb b/lib/common/cache_file_store.rb
deleted file mode 100644
index 98c0f331..00000000
--- a/lib/common/cache_file_store.rb
+++ /dev/null
@@ -1,78 +0,0 @@
-# encoding: UTF-8
-
-#
-# => @todo take consideration of the cache_timeout :
-# -> create 2 files per key : one for the data storage (key.store ?)
-# and the other for the cache timeout (key.expiration, key.timeout ?)
-# or 1 file for all timeouts ?
-# -> 2 dirs : 1 for storage, the other for cache_timeout ?
-#
-
-require 'yaml'
-require 'fileutils'
-
-class CacheFileStore
- attr_reader :storage_path, :cache_dir, :serializer
-
- # 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"
- def initialize(storage_path, serializer = Marshal)
- @cache_dir = File.expand_path(storage_path)
- @storage_path = File.expand_path(File.join(storage_path, storage_dir))
- @serializer = serializer
-
- unless Dir.exist?(@storage_path)
- FileUtils.mkdir_p(@storage_path)
- end
-
- unless Pathname.new(@storage_path).writable?
- fail "#{@storage_path} is not writable"
- end
- end
-
- def clean
- # clean old directories
- Dir[File.join(@cache_dir, '*')].each do |f|
- if File.directory?(f)
- # delete directory if create time is older than 4 hours
- FileUtils.rm_rf(f) if File.mtime(f) < (Time.now - (60*240))
- else
- File.delete(f) unless File.symlink?(f)
- end
- end
- end
-
- def read_entry(key)
- begin
- @serializer.load(File.read(get_entry_file_path(key)))
- rescue
- nil
- end
- end
-
- def write_entry(key, data_to_store, cache_ttl)
- if cache_ttl && cache_ttl > 0
- File.open(get_entry_file_path(key), 'w') do |f|
- begin
- f.write(@serializer.dump(data_to_store))
- rescue
- nil # spec fix for "can't dump hash with default proc" when stub_request with response headers
- end
- end
- end
- end
-
- def get_entry_file_path(key)
- File::join(@storage_path, key)
- end
-
- def storage_dir
- time = Time.now
- random = (0...8).map { (65 + rand(26)).chr }.join
-
- Digest::MD5.hexdigest("#{time}#{random}")
- end
-
-end
diff --git a/lib/common/collections/vulnerabilities.rb b/lib/common/collections/vulnerabilities.rb
deleted file mode 100644
index a26868eb..00000000
--- a/lib/common/collections/vulnerabilities.rb
+++ /dev/null
@@ -1,8 +0,0 @@
-# encoding: UTF-8
-
-require 'common/collections/vulnerabilities/output'
-
-class Vulnerabilities < Array
- include Vulnerabilities::Output
-
-end
diff --git a/lib/common/collections/vulnerabilities/output.rb b/lib/common/collections/vulnerabilities/output.rb
deleted file mode 100644
index 632aed88..00000000
--- a/lib/common/collections/vulnerabilities/output.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-# encoding: UTF-8
-
-class Vulnerabilities < Array
- module Output
-
- def output(verbose = false)
- self.each do |v|
- v.output(verbose)
- end
- end
-
- end
-end
diff --git a/lib/common/collections/wp_items.rb b/lib/common/collections/wp_items.rb
deleted file mode 100644
index e7a24531..00000000
--- a/lib/common/collections/wp_items.rb
+++ /dev/null
@@ -1,75 +0,0 @@
-# encoding: UTF-8
-
-require 'common/collections/wp_items/detectable'
-require 'common/collections/wp_items/output'
-
-class WpItems < Array
- extend WpItems::Detectable
- include WpItems::Output
-
- attr_accessor :wp_target
-
- # @param [ WpTarget ] wp_target
- def initialize(wp_target = nil)
- self.wp_target = wp_target
- end
-
- # @param [String] args
- #
- # @return [ void ]
- def add(*args)
- index = 0
-
- until args[index].nil?
- arg = args[index]
-
- if arg.is_a?(String)
- if (next_arg = args[index + 1]).is_a?(Hash)
- item = create_item(arg, next_arg)
- index += 1
- else
- item = create_item(arg)
- end
- elsif arg.is_a?(Item)
- item = arg
- else
- raise 'Invalid arguments'
- end
-
- self << item
- index += 1
- end
- end
-
- # @param [ String ] name
- # @param [ Hash ] attrs
- #
- # @return [ WpItem ]
- def create_item(name, attrs = {})
- raise 'wp_target must be set' unless wp_target
-
- item_class.new(
- wp_target.uri,
- attrs.merge(
- name: name,
- wp_content_dir: wp_target.wp_content_dir,
- wp_plugins_dir: wp_target.wp_plugins_dir
- ) { |key, oldval, newval| oldval }
- )
- end
-
- # @param [ WpItems ] other
- #
- # @return [ self ]
- def +(other)
- other.each { |item| self << item }
- self
- end
-
- protected
-
- # @return [ Class ]
- def item_class
- Object.const_get(self.class.to_s.gsub(/.$/, ''))
- end
-end
diff --git a/lib/common/collections/wp_items/detectable.rb b/lib/common/collections/wp_items/detectable.rb
deleted file mode 100644
index bca5cd6c..00000000
--- a/lib/common/collections/wp_items/detectable.rb
+++ /dev/null
@@ -1,240 +0,0 @@
-# encoding: UTF-8
-
-class WpItems < Array
- module Detectable
-
- attr_reader :vulns_file, :item_xpath
-
- # @param [ WpTarget ] wp_target
- # @param [ Hash ] options
- # @option options [ Boolean ] :show_progression Whether or not output the progress bar
- # @option options [ Boolean ] :only_vulnerable Only check for vulnerable items
- # @option options [ String ] :exclude_content
- #
- # @return [ WpItems ]
- def aggressive_detection(wp_target, options = {})
- browser = Browser.instance
- hydra = browser.hydra
- targets = targets_items(wp_target, options)
- progress_bar = progress_bar(targets.size, options)
- queue_count = 0
- exist_options = {
- error_404_hash: wp_target.error_404_hash,
- homepage_hash: wp_target.homepage_hash,
- exclude_content: options[:exclude_content] ? %r{#{options[:exclude_content]}} : nil
- }
- results = passive_detection(wp_target, options)
-
- targets.each do |target_item|
- request = browser.forge_request(target_item.url, request_params)
-
- request.on_complete do |response|
- progress_bar.progress += 1 if options[:show_progression]
-
- if target_item.exists?(exist_options, response)
- results << target_item unless results.include?(target_item)
- end
- end
-
- hydra.queue(request)
- queue_count += 1
-
- if queue_count >= browser.max_threads
- hydra.run
- queue_count = 0
- puts "Sent #{browser.max_threads} requests ..." if options[:verbose]
- end
- end
-
- # run the remaining requests
- hydra.run
-
- results.select!(&:vulnerable?) if options[:type] == :vulnerable
- results.sort!
-
- results # can't just return results.sort as it would return an array, and we want a WpItems
- end
-
- # @param [ Integer ] targets_size
- # @param [ Hash ] options
- #
- # @return [ ProgressBar ]
- # :nocov:
- def progress_bar(targets_size, options)
- if options[:show_progression]
- ProgressBar.create(
- format: '%t %a <%B> (%c / %C) %P%% %e',
- title: ' ', # Used to craete a left margin
- total: targets_size
- )
- end
- end
- # :nocov:
-
- # @param [ WpTarget ] wp_target
- # @param [ Hash ] options
- #
- # @return [ WpItems ]
- def passive_detection(wp_target, options = {})
- results = new(wp_target)
- # improves speed
- body = remove_base64_images_from_html(Browser.get(wp_target.url).body)
- page = Nokogiri::HTML(body)
- names = []
-
- page.css('link,script,style').each do |tag|
- %w(href src).each do |attribute|
- attr_value = tag.attribute(attribute).to_s
- next unless attr_value
-
- names << Regexp.last_match[1] if attr_value.match(attribute_pattern(wp_target))
- end
-
- next unless tag.name == 'script' || tag.name == 'style'
-
- code = tag.text.to_s
- next if code.empty?
-
- if !code.valid_encoding?
- code = code.encode('UTF-16be', :invalid => :replace, :replace => '?').encode('UTF-8')
- end
-
- code.scan(code_pattern(wp_target)).flatten.uniq.each do |item_name|
- names << item_name
- end
- end
-
- names.uniq.each { |name| results.add(name) }
-
- results.sort!
- results
- end
-
- protected
-
- # @param [ WpTarget ] wp_target
- #
- # @return [ Regex ]
- def item_pattern(wp_target)
- type = to_s.gsub(/Wp/, '').downcase
- wp_content_dir = wp_target.wp_content_dir
- wp_content_url = wp_target.uri.merge(wp_content_dir).to_s
-
- url = wp_content_url.gsub(%r{\A(?:http|https)://}, '(?:https?:)?//').gsub('/', '\\\\\?\/')
- content_dir = %r{(?:#{url}|\\?\/\\?\/?#{wp_content_dir})}i
-
- %r{#{content_dir}\\?/#{type}\\?/}
- end
-
- # @param [ WpTarget ] wp_target
- #
- # @return [ Regex ]
- def attribute_pattern(wp_target)
- /\A#{item_pattern(wp_target)}([^\/]+)/i
- end
-
- # @param [ WpTarget ] wp_target
- #
- # @return [ Regex ]
- def code_pattern(wp_target)
- /["'\(]#{item_pattern(wp_target)}([^\\\/\)"']+)/i
- end
-
- # The default request parameters
- #
- # @return [ Hash ]
- def request_params; { cache_ttl: 0, followlocation: true } end
-
- # @param [ WpTarget ] wp_target
- # @param [ options ] options
- # @option options [ Boolean ] :only_vulnerable
- # @option options [ String ] :file The path to the file containing the targets
- #
- # @return [ Array ]
- def targets_items(wp_target, options = {})
- item_class = self.item_class
- vulns_file = self.vulns_file
-
- targets = target_items_from_type(wp_target, item_class, vulns_file, options[:type])
-
- targets.uniq! { |t| t.name }
- targets.sort_by { rand }
- end
-
- # @param [ WpTarget ] wp_target
- # @param [ Class ] item_class
- # @param [ String ] vulns_file
- #
- # @return [ Array ]
- def target_items_from_type(wp_target, item_class, vulns_file, type)
- targets = []
- json = json(vulns_file)
-
- case type
- when :vulnerable
- items = json.select { |item| !json[item]['vulnerabilities'].empty? }.keys
- when :popular
- items = json.select { |item| json[item]['popular'] == true }.keys
- when :all
- items = json.keys
- else
- raise "Unknown type #{type}"
- end
-
- items.each do |item|
- targets << create_item(
- item_class,
- item,
- wp_target,
- vulns_file
- )
- end
-
- targets
- end
-
- # @param [ Class ] klass
- # @param [ String ] name
- # @param [ WpTarget ] wp_target
- # @option [ String ] vulns_file
- #
- # @return [ WpItem ]
- def create_item(klass, name, wp_target, vulns_file = nil)
- klass.new(
- wp_target.uri,
- name: name,
- vulns_file: vulns_file,
- wp_content_dir: wp_target.wp_content_dir,
- wp_plugins_dir: wp_target.wp_plugins_dir
- )
- end
-
- # @param [ String ] file
- # @param [ WpTarget ] wp_target
- # @param [ Class ] item_class
- # @param [ String ] vulns_file
- #
- # @return [ Array ]
- def targets_items_from_file(file, wp_target, item_class, vulns_file)
- targets = []
-
- File.open(file, 'r') do |f|
- f.readlines.collect do |item_name|
- targets << create_item(
- item_class,
- item_name.strip,
- wp_target,
- vulns_file
- )
- end
- end
-
- targets
- end
-
- # @return [ Class ]
- def item_class
- Object.const_get(self.to_s.gsub(/.$/, ''))
- end
- end
-end
diff --git a/lib/common/collections/wp_items/output.rb b/lib/common/collections/wp_items/output.rb
deleted file mode 100644
index 6981c96a..00000000
--- a/lib/common/collections/wp_items/output.rb
+++ /dev/null
@@ -1,11 +0,0 @@
-# encoding: UTF-8
-
-class WpItems < Array
- module Output
-
- def output(verbose = false)
- self.each { |item| item.output(verbose) }
- end
-
- end
-end
diff --git a/lib/common/collections/wp_plugins.rb b/lib/common/collections/wp_plugins.rb
deleted file mode 100644
index 955259c4..00000000
--- a/lib/common/collections/wp_plugins.rb
+++ /dev/null
@@ -1,8 +0,0 @@
-# encoding: UTF-8
-
-require 'common/collections/wp_plugins/detectable'
-
-class WpPlugins < WpItems
- extend WpPlugins::Detectable
-
-end
diff --git a/lib/common/collections/wp_plugins/detectable.rb b/lib/common/collections/wp_plugins/detectable.rb
deleted file mode 100644
index 3f271610..00000000
--- a/lib/common/collections/wp_plugins/detectable.rb
+++ /dev/null
@@ -1,77 +0,0 @@
-# encoding: UTF-8
-
-class WpPlugins < WpItems
- module Detectable
- # @return [ String ]
- def vulns_file
- PLUGINS_FILE
- end
-
- # @param [ WpTarget ] wp_target
- # @param [ Hash ] options
- #
- # @return [ WpPlugins ]
- def passive_detection(wp_target, options = {})
- detected = super(wp_target, options)
-
- detected += from_header(wp_target)
- detected += from_content(wp_target)
-
- detected.uniq! { |i| i.name }
- detected
- end
-
- protected
-
- # X-Powered-By: W3 Total Cache/0.9.2.5
- # WP-Super-Cache: Served supercache file from PHP
- # @param [ WpTarget ] wp_target
- #
- # @return [ WpPlugins ]
- def from_header(wp_target)
- headers = Browser.get(wp_target.url).headers
- wp_plugins = WpPlugins.new(wp_target)
-
- if headers
- powered_by = headers['X-Powered-By'].to_s
- wp_super_cache = headers['wp-super-cache'].to_s
-
- if matches = /W3 Total Cache\/([0-9.]+)/i.match(powered_by)
- wp_plugins.add('w3-total-cache', version: matches[1])
- end
-
- wp_plugins.add('wp-super-cache') if wp_super_cache =~ /supercache/i
- end
-
- wp_plugins
- end
-
- #
- # /m, '')
- # remove javascript stuff
- page = page.gsub(/ there -->\nworld!"
- Typhoeus::Response.new(body: body)
- }
-
- it 'removes them' do
- @expected = "yolo\n\n\nworld!"
- end
- end
-
- context 'when there are scripts' do
- let(:page) {
- body = "yolo\n\n\nworld!"
- Typhoeus::Response.new(body: body)
- }
-
- it 'removes them' do
- @expected = "yolo\n\n\nworld!"
- end
- end
- end
-
- describe '#homepage_hash' do
- it 'returns the MD5 hash of the homepage' do
- body = 'Hello World'
-
- stub_request(:get, web_site.url).to_return(body: body)
- expect(web_site.homepage_hash).to be === Digest::MD5.hexdigest(body)
- end
- end
-
- describe '#error_404_hash' do
- it 'returns the md5sum of the 404 page' do
- stub_request(:any, /.*/).
- to_return(status: 404, body: '404 page !')
-
- expect(web_site.error_404_hash).to be === Digest::MD5.hexdigest('404 page !')
- end
- end
-
- describe '::has_log?' do
- let(:log_url) { web_site.uri.merge('log.txt').to_s }
- let(:pattern) { %r{PHP Fatal error} }
-
- after do
- stub_request_to_fixture(url: log_url, fixture: fixtures_dir + "/has_log/#{@file}")
- expect(WebSite.has_log?(log_url, pattern)).to eq @expected
- end
-
- context 'when the pattern does not match' do
- it 'returns false' do
- @file = 'no_match.txt'
- @expected = false
- end
- end
-
- context 'when the pattern matches' do
- it 'returns true' do
- @file = 'matches.txt'
- @expected = true
- end
- end
-
- # This doesn't work in rspec, WebMock or Typhoeus returns the whole file
- # See https://github.com/bblimke/webmock/issues/277
- #it 'only checks the first 700 bytes' do
- # @file = 'matches_after_700_bytes.txt'
- # @expected = false
- #end
- end
-end
diff --git a/spec/lib/wpscan/wp_target_spec.rb b/spec/lib/wpscan/wp_target_spec.rb
deleted file mode 100644
index 640fba5f..00000000
--- a/spec/lib/wpscan/wp_target_spec.rb
+++ /dev/null
@@ -1,218 +0,0 @@
-# encoding: UTF-8
-
-require File.expand_path(File.join(__dir__, 'wpscan_helper'))
-
-describe WpTarget do
- subject(:wp_target) { WpTarget.new(target_url, options) }
- subject(:wp_target_custom) { WpTarget.new(target_url, options_custom) }
- let(:target_url) { 'http://example.localhost/' }
- let(:fixtures_dir) { SPEC_FIXTURES_WPSCAN_WP_TARGET_DIR }
- let(:login_url) { wp_target.uri.merge('wp-login.php').to_s }
- let(:options) {
- {
- config_file: SPEC_FIXTURES_CONF_DIR + '/browser.conf.json',
- cache_ttl: 0,
- wp_content_dir: 'wp-content',
- wp_plugins_dir: 'wp-content/plugins'
- }
- }
- let(:options_custom) {
- {
- config_file: SPEC_FIXTURES_CONF_DIR + '/browser.conf.json',
- cache_ttl: 0,
- wp_content_dir: 'custom-content',
- wp_plugins_dir: 'custom-content/plugins'
- }
- }
-
- before { Browser::reset }
-
- it_behaves_like 'WpTarget::WpReadme'
- it_behaves_like 'WpTarget::WpRegistrable'
- it_behaves_like 'WpTarget::WpConfigBackup'
- it_behaves_like 'WpTarget::WpLoginProtection'
- it_behaves_like 'WpTarget::WpCustomDirectories'
- it_behaves_like 'WpTarget::WpFullPathDisclosure'
-
- describe '#initialize' do
- it 'should raise an error if the target_url is nil or empty' do
- expect { WpTarget.new(nil) }.to raise_error
- expect { Wptarget.new('') }.to raise_error
- end
- end
-
- describe '#login_url' do
- it 'returns the login url of the target' do
- stub_request(:get, login_url).to_return(status: 200, body: '')
-
- expect(wp_target.login_url).to be === login_url
- end
-
- it 'returns the redirection url if there is one (ie: for https)' do
- https_login_url = login_url.gsub(/^http:/, 'https:')
-
- stub_request(:get, login_url).to_return(status: 302, headers: { location: https_login_url })
- stub_request(:get, https_login_url).to_return(status: 200)
-
- expect(wp_target.login_url).to be === https_login_url
- end
- end
-
- describe '#wordpress?' do
- # each url (wp-login and xmlrpc) pointed to a 404
- before :each do
- stub_request(:get, wp_target.url).
- to_return(status: 200, body: '', headers: { 'X-Pingback' => wp_target.uri.merge('xmlrpc.php')})
-
- # Preventing redirection check from login_url()
- allow(wp_target).to receive_messages(redirection: nil)
-
- [wp_target.login_url, wp_target.xml_rpc_url].each do |url|
- stub_request(:get, url).to_return(status: 404, body: '')
- end
- end
-
- it 'returns true if there is a /wp-content/ detected in the index page source' do
- stub_request_to_fixture(url: wp_target.url, fixture: fixtures_dir + '/wp_content_dir/wordpress-3.4.1.htm')
-
- expect(wp_target).to be_wordpress
- end
-
- it 'returns true if a custom content directory is detected' do
- stub_request_to_fixture(url: wp_target_custom.url, fixture: fixtures_dir + '/wp_content_dir/wordpress-3.4.1-custom.htm')
- expect(wp_target_custom).to be_wordpress
- end
-
- it 'returns true if the xmlrpc is found' do
- stub_request(:get, wp_target.xml_rpc_url).
- to_return(status: 200, body: File.new(fixtures_dir + '/xmlrpc.php'))
-
- expect(wp_target).to be_wordpress
- end
-
- it 'returns true if the wp-login is found and is a valid wordpress one' do
- stub_request(:get, wp_target.login_url).
- to_return(status: 200, body: File.new(fixtures_dir + '/wp-login.php'))
-
- expect(wp_target).to be_wordpress
- end
-
- it 'returns false if both files are not found (404)' do
- expect(wp_target).not_to be_wordpress
- end
-
- context 'when the url contains "wordpress" and is a 404' do
- let(:target_url) { 'http://lamp/wordpress-3.5./' }
-
- it 'returns false' do
- stub_request(:get, wp_target.login_url).to_return(status: 404, body: 'The requested URL /wordpress-3.5. was not found on this server.')
-
- expect(wp_target).not_to be_wordpress
- end
- end
-
- context 'when the response is a 403' do
- before { stub_request(:any, /.*/).to_return(status: 403) }
-
- it 'raises an error' do
- expect { wp_target.wordpress? }.to raise_error
- end
- end
- end
-
- describe '#wordpress_hosted?' do
- it 'returns true if target url is a wordpress.com subdomain' do
- target = WpTarget.new('http://test.wordpress.com/')
- expect(target.wordpress_hosted?).to be_truthy
- end
-
- it 'returns true if target url is a wordpress.com subdomain and has querystring' do
- target = WpTarget.new('http://test.wordpress.com/path/file.php?a=b')
- expect(target.wordpress_hosted?).to be_truthy
- end
-
- it 'returns false if target url is not a wordpress.com subdomain' do
- target = WpTarget.new('http://test.example.com/')
- expect(target.wordpress_hosted?).to be_falsey
- end
- end
-
- describe '#debug_log_url' do
- it "returns 'http://example.localhost/wp-content/debug.log" do
- allow(wp_target).to receive_messages(wp_content_dir: 'wp-content')
- expect(wp_target.debug_log_url).to be === 'http://example.localhost/wp-content/debug.log'
- end
- end
-
- describe '#has_debug_log?' do
- let(:fixtures_dir) { SPEC_FIXTURES_WPSCAN_WP_TARGET_DIR + '/debug_log' }
-
- after :each do
- allow(wp_target).to receive_messages(wp_content_dir: 'wp-content')
- stub_request_to_fixture(url: wp_target.debug_log_url, fixture: @fixture)
- expect(wp_target.has_debug_log?).to be === @expected
- end
-
- it 'returns false' do
- @fixture = SPEC_FIXTURES_DIR + '/empty-file'
- @expected = false
- end
-
- it 'returns true' do
- @fixture = fixtures_dir + '/debug.log'
- @expected = true
- end
-
- it 'should also detect it if there are PHP notice' do
- @fixture = fixtures_dir + '/debug-notice.log'
- @expected = true
- end
- end
-
- describe '#search_replace_db_2_url' do
- it 'returns the correct url' do
- expect(wp_target.search_replace_db_2_url).to eq 'http://example.localhost/searchreplacedb2.php'
- end
- end
-
- describe '#search_replace_db_2_exists?' do
- it 'returns true' do
- stub_request(:any, wp_target.search_replace_db_2_url).to_return(status: 200, body: 'asdf by interconnect asdf')
- expect(wp_target.search_replace_db_2_exists?).to be_truthy
- end
-
- it 'returns false' do
- stub_request(:any, wp_target.search_replace_db_2_url).to_return(status: 500)
- expect(wp_target.search_replace_db_2_exists?).to be_falsey
- end
-
- it 'returns false' do
- stub_request(:any, wp_target.search_replace_db_2_url).to_return(status: 500, body: 'asdf by interconnect asdf')
- expect(wp_target.search_replace_db_2_exists?).to be_falsey
- end
- end
-
- describe '#emergency_url' do
- it 'returns the correct url' do
- expect(wp_target.emergency_url).to eq 'http://example.localhost/emergency.php'
- end
- end
-
- describe '#emergency_exists?' do
- it 'returns true' do
- stub_request(:any, wp_target.emergency_url).to_return(status: 200, body: 'enter your password here')
- expect(wp_target.emergency_exists?).to be_truthy
- end
-
- it 'returns false' do
- stub_request(:any, wp_target.emergency_url).to_return(status: 500)
- expect(wp_target.emergency_exists?).to be_falsey
- end
-
- it 'returns false' do
- stub_request(:any, wp_target.emergency_url).to_return(status: 500, body: 'enter your password here')
- expect(wp_target.emergency_exists?).to be_falsey
- end
- end
-
-end
diff --git a/spec/lib/wpscan/wpscan_helper.rb b/spec/lib/wpscan/wpscan_helper.rb
deleted file mode 100644
index 079eebd5..00000000
--- a/spec/lib/wpscan/wpscan_helper.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-# encoding: UTF-8
-
-require 'spec_helper'
-
-require WPSCAN_LIB_DIR + '/wpscan_helper'
-
-SPEC_FIXTURES_WPSCAN_DIR = SPEC_FIXTURES_DIR + '/wpscan'
-SPEC_FIXTURES_WPSCAN_WEB_SITE_DIR = SPEC_FIXTURES_WPSCAN_DIR + '/web_site'
-SPEC_FIXTURES_WPSCAN_WP_TARGET_DIR = SPEC_FIXTURES_WPSCAN_DIR + '/wp_target'
-SPEC_FIXTURES_WPSCAN_WPSCAN_OPTIONS_DIR = SPEC_FIXTURES_WPSCAN_DIR + '/wpscan_options'
-SPEC_FIXTURES_WPSCAN_WP_THEME_DIR = SPEC_FIXTURES_WPSCAN_DIR + '/wp_theme'
-SPEC_FIXTURES_WPSCAN_WP_PLUGIN_DIR = SPEC_FIXTURES_WPSCAN_DIR + '/wp_plugin'
-SPEC_FIXTURES_WPSCAN_WP_VERSION_DIR = SPEC_FIXTURES_WPSCAN_DIR + '/wp_version'
diff --git a/spec/lib/wpscan/wpscan_options_spec.rb b/spec/lib/wpscan/wpscan_options_spec.rb
deleted file mode 100644
index 62bc34cf..00000000
--- a/spec/lib/wpscan/wpscan_options_spec.rb
+++ /dev/null
@@ -1,392 +0,0 @@
-# encoding: UTF-8
-
-require File.expand_path(File.join(__dir__, 'wpscan_helper'))
-
-describe 'WpscanOptions' do
-
- before :each do
- @wpscan_options = WpscanOptions.new
- end
-
- describe '#initialize' do
- it 'should set all options to nil' do
- WpscanOptions::ACCESSOR_OPTIONS.each do |option|
- expect(@wpscan_options.send(option)).to be === nil
- end
- end
- end
-
- describe '#url=' do
- it 'should raise an error if en empty or nil url is supplied' do
- expect { @wpscan_options.url = '' }.to raise_error
- expect { @wpscan_options.url = nil }.to raise_error
- end
-
- it 'should add the http protocol if not present' do
- @wpscan_options.url = 'example.com'
- expect(@wpscan_options.url).to be === 'http://example.com'
- end
-
- it "should not add the http protocol if it's already present" do
- url = 'http://example.com'
- @wpscan_options.url = url
- expect(@wpscan_options.url).to be === url
- end
-
- it 'should encode IDN' do
- @wpscan_options.url = 'http://пример.испытание/'
- expect(@wpscan_options.url).to be === 'http://xn--e1afmkfd.xn--80akhbyknj4f/'
- end
- end
-
- describe '#threads=' do
- it 'should convert an integer in a string into an integr' do
- @wpscan_options.threads = '10'
- expect(@wpscan_options.threads).to be_an Integer
- expect(@wpscan_options.threads).to be === 10
- end
-
- it 'should set to correct number of threads' do
- @wpscan_options.threads = 15
- expect(@wpscan_options.threads).to be_an Integer
- expect(@wpscan_options.threads).to be === 15
- end
- end
-
- describe '#wordlist=' do
- it 'should raise an error if the wordlist file does not exist' do
- expect { @wpscan_options.wordlist = '/i/do/not/exist.txt' }.to raise_error
- end
-
- it 'should not raise an error' do
- wordlist_file = "#{SPEC_FIXTURES_WPSCAN_WPSCAN_OPTIONS_DIR}/wordlist.txt"
-
- @wpscan_options.wordlist = wordlist_file
- expect(@wpscan_options.wordlist).to be === wordlist_file
- end
- end
-
- describe '#proxy=' do
- it 'should raise an error' do
- expect { @wpscan_options.proxy = 'invalidproxy' }.to raise_error
- end
-
- it 'should not raise an error' do
- proxy = '127.0.0.1:3038'
- @wpscan_options.proxy = proxy
- expect(@wpscan_options.proxy).to be === proxy
- end
- end
-
- describe '#proxy_auth=' do
- it 'should raise an error if the format is not correct' do
- expect { @wpscan_options.proxy_auth = 'invalidauth' }.to raise_error
- end
-
- it 'should not raise en error' do
- proxy_auth = 'user:pass'
- @wpscan_options.proxy_auth = proxy_auth
- expect(@wpscan_options.proxy_auth).to be === proxy_auth
- end
- end
-
- describe '#enumerate_plugins=' do
- it 'should raise an error' do
- @wpscan_options.enumerate_only_vulnerable_plugins = true
- expect { @wpscan_options.enumerate_plugins = true }.to raise_error(
- RuntimeError, 'Please choose only one plugin enumeration option'
- )
- end
-
- it 'should not raise an error' do
- @wpscan_options.enumerate_only_vulnerable_plugins = false
- @wpscan_options.enumerate_plugins = true
-
- expect(@wpscan_options.enumerate_plugins).to be_truthy
- end
- end
-
- describe '#enumerate_themes=' do
- it 'should raise an error' do
- @wpscan_options.enumerate_only_vulnerable_themes = true
- expect { @wpscan_options.enumerate_themes = true }.to raise_error(
- RuntimeError, 'Please choose only one theme enumeration option'
- )
- end
-
- it 'should not raise an error' do
- @wpscan_options.enumerate_only_vulnerable_themes = false
- @wpscan_options.enumerate_themes = true
-
- expect(@wpscan_options.enumerate_themes).to be_truthy
- end
- end
-
- describe '#enumerate_only_vulnerable_plugins=' do
- it 'should raise an error' do
- @wpscan_options.enumerate_plugins = true
- expect { @wpscan_options.enumerate_only_vulnerable_plugins = true }.to raise_error(
- RuntimeError, 'Please choose only one plugin enumeration option'
- )
- end
-
- it 'should not raise an error' do
- @wpscan_options.enumerate_plugins = false
- @wpscan_options.enumerate_only_vulnerable_plugins = true
-
- expect(@wpscan_options.enumerate_only_vulnerable_plugins).to be_truthy
- end
- end
-
- describe '#enumerate_only_vulnerable_themes=' do
- it 'should raise an error' do
- @wpscan_options.enumerate_themes = true
- expect { @wpscan_options.enumerate_only_vulnerable_themes = true }.to raise_error(
- RuntimeError, 'Please choose only one theme enumeration option'
- )
- end
-
- it 'should not raise an error' do
- @wpscan_options.enumerate_themes = false
- @wpscan_options.enumerate_only_vulnerable_themes = true
-
- expect(@wpscan_options.enumerate_only_vulnerable_themes).to be_truthy
- end
- end
-
- describe '#enumerate_all_themes=' do
- it 'should raise an error' do
- @wpscan_options.enumerate_themes = true
- expect { @wpscan_options.enumerate_all_themes = true }.to raise_error(
- RuntimeError, 'Please choose only one theme enumeration option'
- )
- end
-
- it 'should not raise an error' do
- @wpscan_options.enumerate_themes = false
- @wpscan_options.enumerate_all_themes = true
-
- expect(@wpscan_options.enumerate_all_themes).to be_truthy
- end
- end
-
- describe '#enumerate_all_plugins=' do
- it 'should raise an error' do
- @wpscan_options.enumerate_plugins = true
- expect { @wpscan_options.enumerate_all_plugins = true }.to raise_error(
- RuntimeError, 'Please choose only one plugin enumeration option'
- )
- end
-
- it 'should not raise an error' do
- @wpscan_options.enumerate_plugins = false
- @wpscan_options.enumerate_all_plugins = true
-
- expect(@wpscan_options.enumerate_all_plugins).to be_truthy
- end
- end
-
- describe '#has_options?' do
- it 'should return false' do
- expect(@wpscan_options.has_options?).to be_falsey
- end
-
- it 'should return true' do
- @wpscan_options.verbose = false
- expect(@wpscan_options.has_options?).to be_truthy
- end
- end
-
- describe '#to_h' do
- it 'should return an empty hash' do
- expect(@wpscan_options.to_h).to be_a Hash
- expect(@wpscan_options.to_h).to be_empty
- end
-
- it 'should return a hash with :verbose = true' do
- expected = {verbose: true}
- @wpscan_options.verbose = true
-
- expect(@wpscan_options.to_h).to be === expected
- end
- end
-
- describe '#clean_option' do
- after :each do
- expect(WpscanOptions.clean_option(@option)).to be === @expected
- end
-
- it "should return 'url'" do
- @option = '--url'
- @expected = 'url'
- end
-
- it "should return 'u'" do
- @option = '-u'
- @expected = 'u'
- end
-
- it "should return 'follow_redirection'" do
- @option = '--follow-redirection'
- @expected = 'follow_redirection'
- end
- end
-
- describe '#option_to_instance_variable_setter' do
- after :each do
- expect(WpscanOptions.option_to_instance_variable_setter(@argument)).to be === @expected
- end
-
- it 'should return :url=' do
- @argument = '--url'
- @expected = :url=
- end
-
- it 'should return :verbose=' do
- @argument = '--verbose'
- @expected = :verbose=
- end
-
- it 'should return :proxy= for --proxy' do
- @argument = '--proxy'
- @expected = :proxy=
- end
-
- it 'should return nil for --enumerate' do
- @argument = '--enumerate'
- @expected = nil
- end
-
- it 'should return :proxy_auth= for --proxy_auth' do
- @argument = '--proxy_auth'
- @expected = :proxy_auth=
- end
- end
-
- describe '#is_long_option?' do
- it 'should return true' do
- expect(WpscanOptions.is_long_option?('--url')).to be_truthy
- end
-
- it 'should return false' do
- expect(WpscanOptions.is_long_option?('hello')).to be_falsey
- expect(WpscanOptions.is_long_option?('--enumerate')).to be_falsey
- end
- end
-
- describe '#enumerate_options_from_string' do
- after :each do
- if @argument
- wpscan_options = WpscanOptions.new
- wpscan_options.enumerate_options_from_string(@argument)
- expect(wpscan_options.to_h).to be === @expected_hash
- end
- end
-
- it 'should raise an error if p and p! are ' do
- expect { @wpscan_options.enumerate_options_from_string('p,vp') }.to raise_error
- end
-
- it 'should set enumerate_plugins to true' do
- @argument = 'p'
- @expected_hash = {enumerate_plugins: true}
- end
-
- it 'should set enumerate_only_vulnerable_plugins to tue' do
- @argument = 'vp'
- @expected_hash = {enumerate_only_vulnerable_plugins: true}
- end
-
- it 'should set enumerate_timthumbs to true' do
- @argument = 'tt'
- @expected_hash = {enumerate_timthumbs: true}
- end
-
- it 'should set enumerate_usernames to true' do
- @argument = 'u'
- @expected_hash = {enumerate_usernames: true}
- end
-
- it 'should set enumerate_usernames to true and enumerate_usernames_range to (1..20)' do
- @argument = 'u[1-20]'
- @expected_hash = {enumerate_usernames: true, enumerate_usernames_range: (1..20)}
- end
-
- # Let's try some multiple choices
- it 'should set enumerate_timthumbs to true, enumerate_usernames to true, enumerate_usernames_range to (1..2)' do
- @argument = 'u[1-2],tt'
- @expected_hash = {
- enumerate_usernames: true, enumerate_usernames_range: (1..2),
- enumerate_timthumbs: true
- }
- end
- end
-
- describe '#set_option_from_cli' do
- it 'should raise an error with unknow option' do
- expect { @wpscan_options.set_option_from_cli('hello', '') }.to raise_error
- end
-
- it 'should set @url to example.com' do
- @wpscan_options.set_option_from_cli('--url', 'example.com')
- expect(@wpscan_options.url).to be === 'http://example.com'
- end
-
- it 'should set @enumerate_plugins to true' do
- @wpscan_options.set_option_from_cli('--enumerate', 'p')
- expect(@wpscan_options.enumerate_plugins).to be_truthy
- expect(@wpscan_options.enumerate_only_vulnerable_plugins).to be_nil
- end
-
- it 'should set @enumerate_only_vulnerable_plugins, @enumerate_timthumbs and @enumerate_usernames to true if no argument is given' do
- @wpscan_options.set_option_from_cli('--enumerate', '')
- expect(@wpscan_options.enumerate_only_vulnerable_plugins).to be_truthy
- expect(@wpscan_options.enumerate_timthumbs).to be_truthy
- expect(@wpscan_options.enumerate_usernames).to be_truthy
- end
- end
-
- describe '#load_from_arguments' do
- after :each do
- set_argv(@argv)
- wpscan_options = WpscanOptions.load_from_arguments
- expect(wpscan_options.to_h).to be === @expected_hash
- end
-
- it 'should return {}' do
- @argv = ''
- @expected_hash = {}
- end
-
- it "should return {:url => 'example.com'}" do
- @argv = '--url example.com'
- @expected_hash = { url: 'http://example.com' }
- end
-
- it "should return {:url => 'example.com'}" do
- @argv = '-u example.com'
- @expected_hash = { url: 'http://example.com' }
- end
-
- it "should return {:username => 'admin'}" do
- @argv = '--username admin'
- @expected_hash = { username: 'admin' }
- end
-
- it "should return {:username => 'Youhou'}" do
- @argv = '-U Youhou'
- @expected_hash = { username: 'Youhou' }
- end
-
- it "should return {:url => 'example.com', :threads => 5, :force => ''}" do
- @argv = '-u example.com --force -t 5'
- @expected_hash = { url: 'http://example.com', threads: 5, force: '' }
- end
-
- it "should return {:url => 'example.com', :enumerate_plugins => true, :enumerate_timthumbs => true}" do
- @argv = '-u example.com -e p,tt'
- @expected_hash = { url: 'http://example.com', enumerate_plugins: true, enumerate_timthumbs: true }
- end
- end
-
-end
diff --git a/spec/samples/common/collections/wp_items/detectable/passive_detection.html b/spec/samples/common/collections/wp_items/detectable/passive_detection.html
deleted file mode 100644
index 06139300..00000000
--- a/spec/samples/common/collections/wp_items/detectable/passive_detection.html
+++ /dev/null
@@ -1,65 +0,0 @@
-
-
-
-
-
- example.com
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- http://example.com/wp-content/items/this-should-not-match/sub.css
- href="http://example.com/wp-content/items/this-should-not-match/sub.css"
- /wp-content/items/this-should-not-match/sub.css
- //wp-content/items/this-should-not-match/sub.css
- src='/wp-content/items/this-should-not-match/sub.css'
-
-
-
-
diff --git a/spec/samples/common/collections/wp_items/detectable/targets.txt b/spec/samples/common/collections/wp_items/detectable/targets.txt
deleted file mode 100644
index 98074375..00000000
--- a/spec/samples/common/collections/wp_items/detectable/targets.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-item1
-item-2
-mr-smith
diff --git a/spec/samples/common/collections/wp_items/detectable/vulns.json b/spec/samples/common/collections/wp_items/detectable/vulns.json
deleted file mode 100644
index 80ee2ba6..00000000
--- a/spec/samples/common/collections/wp_items/detectable/vulns.json
+++ /dev/null
@@ -1,64 +0,0 @@
-{
- "mr-smith": {
- "vulnerabilities":[
- {
- "id":2989,
- "title":"Administrator-exploitable blind SQLi in WordPress 1.0 - 3.8.1",
- "references": {
- "url": "https://security.dxw.com/advisories/sqli-in-wordpress-3-6-1/,http://www.example.com"
- },
- "created_at":"2014-07-28T12:10:07.000Z",
- "updated_at":"2014-07-28T12:43:41.000Z"
- },
- {
- "id":2990,
- "title":"Potential Authentication Cookie Forgery",
- "references": {
- "url": "https://labs.mwrinfosecurity.com/blog/2014/04/11/wordpress-auth-cookie-forgery/,https://github.com/WordPress/WordPress/commit/78a915e0e5927cf413aa6c2cef2fca3dc587f8be",
- "osvdb":"105620",
- "cve":"2014-0166"
- },
- "created_at":"2014-07-28T12:10:07.000Z",
- "updated_at":"2014-07-28T12:10:07.000Z",
- "fixed_in":"3.8.2"
- },
- {
- "id":2991,
- "title":"Privilege escalation: contributors publishing posts",
- "references": {
- "url": "https://github.com/wpscanteam/wpscan/wiki/CVE-2014-0165",
- "osvdb":"105630",
- "cve":"2014-0165"
- },
- "created_at":"2014-07-28T12:10:07.000Z",
- "updated_at":"2014-07-28T12:10:07.000Z",
- "fixed_in":"3.8.2"
- },
- {
- "id":2992,
- "title":"Plupload Unspecified XSS",
- "references": {
- "osvdb":"105622",
- "secunia":"57769"
- },
- "created_at":"2014-07-28T12:10:07.000Z",
- "updated_at":"2014-07-28T12:10:07.000Z",
- "fixed_in":"3.8.2"
- }
- ]
- },
- "neo": {
- "vulnerabilities":[
- {
- "id":2993,
- "title":"wp-admin/options-writing.php Cleartext Admin Credentials Disclosure",
- "references": {
- "url": "http://seclists.org/fulldisclosure/2013/Dec/135",
- "osvdb":"101101"
- },
- "created_at":"2014-07-28T12:10:07.000Z",
- "updated_at":"2014-07-28T12:10:07.000Z"
- }
- ]
- }
-}
diff --git a/spec/samples/common/collections/wp_plugins/detectable/passive_detection.html b/spec/samples/common/collections/wp_plugins/detectable/passive_detection.html
deleted file mode 100644
index 2ef3f5cb..00000000
--- a/spec/samples/common/collections/wp_plugins/detectable/passive_detection.html
+++ /dev/null
@@ -1,65 +0,0 @@
-
-
-
-
-
- Example.com
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Blablabla the following plugin should not match : /wp-content/plugins/this-plugin-should-not-match/sub.css
-
-
-
-
diff --git a/spec/samples/common/collections/wp_themes/detectable/targets.txt b/spec/samples/common/collections/wp_themes/detectable/targets.txt
deleted file mode 100644
index 5fc51166..00000000
--- a/spec/samples/common/collections/wp_themes/detectable/targets.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-3colours
-42k
-a-ri
diff --git a/spec/samples/common/collections/wp_themes/detectable/vulns.json b/spec/samples/common/collections/wp_themes/detectable/vulns.json
deleted file mode 100644
index 086ae752..00000000
--- a/spec/samples/common/collections/wp_themes/detectable/vulns.json
+++ /dev/null
@@ -1,65 +0,0 @@
-{
- "shopperpress": {
- "vulnerabilities":[
- {
- "id":2989,
- "title":"Administrator-exploitable blind SQLi in WordPress 1.0 - 3.8.1",
- "references": {
- "url": "https://security.dxw.com/advisories/sqli-in-wordpress-3-6-1/,http://www.example.com"
- },
- "created_at":"2014-07-28T12:10:07.000Z",
- "updated_at":"2014-07-28T12:43:41.000Z"
- },
- {
- "id":2990,
- "title":"Potential Authentication Cookie Forgery",
- "references": {
- "url": "https://labs.mwrinfosecurity.com/blog/2014/04/11/wordpress-auth-cookie-forgery/,https://github.com/WordPress/WordPress/commit/78a915e0e5927cf413aa6c2cef2fca3dc587f8be",
- "osvdb":"105620",
- "cve":"2014-0166"
- },
- "created_at":"2014-07-28T12:10:07.000Z",
- "updated_at":"2014-07-28T12:10:07.000Z",
- "fixed_in":"3.8.2"
- },
- {
- "id":2991,
- "title":"Privilege escalation: contributors publishing posts",
- "references": {
- "url": "https://github.com/wpscanteam/wpscan/wiki/CVE-2014-0165",
- "osvdb":"105630",
- "cve":"2014-0165"
- },
- "created_at":"2014-07-28T12:10:07.000Z",
- "updated_at":"2014-07-28T12:10:07.000Z",
- "fixed_in":"3.8.2"
- },
- {
- "id":2992,
- "title":"Plupload Unspecified XSS",
- "references": {
- "osvdb":"105622",
- "secunia":"57769"
- },
- "created_at":"2014-07-28T12:10:07.000Z",
- "updated_at":"2014-07-28T12:10:07.000Z",
- "fixed_in":"3.8.2"
- }
- ]
- },
- "webfolio": {
- "vulnerabilities":[
- {
- "id":2993,
- "title":"wp-admin/options-writing.php Cleartext Admin Credentials Disclosure",
- "references": {
- "url": "http://seclists.org/fulldisclosure/2013/Dec/135",
- "osvdb":"101101"
- },
- "created_at":"2014-07-28T12:10:07.000Z",
- "updated_at":"2014-07-28T12:10:07.000Z"
- }
- ]
- }
-}
-
diff --git a/spec/samples/common/collections/wp_timthumbs/detectable/targets.txt b/spec/samples/common/collections/wp_timthumbs/detectable/targets.txt
deleted file mode 100644
index 33f019f2..00000000
--- a/spec/samples/common/collections/wp_timthumbs/detectable/targets.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-timthumb.php
-$wp-content$/timthumb.php
-$wp-plugins$/a-gallery/timthumb.php
-$wp-content$/themes/theme-name/timthumb.php
diff --git a/spec/samples/common/models/vulnerability/json_item.json b/spec/samples/common/models/vulnerability/json_item.json
deleted file mode 100644
index 778d4ba5..00000000
--- a/spec/samples/common/models/vulnerability/json_item.json
+++ /dev/null
@@ -1,16 +0,0 @@
-{
- "id": "3911",
- "title": "Vuln Title",
- "references":{
- "url": "Ref 1,Ref 2",
- "secunia": "secunia",
- "osvdb": "osvdb",
- "cve": "2011-001",
- "metasploit": "exploit/ex1",
- "exploitdb": "exploitdb"
- },
- "created_at": "2014-07-28T12:10:45.000Z",
- "updated_at": "2014-07-28T12:10:45.000Z",
- "type": "CSRF",
- "fixed_in": "1.0"
-}
diff --git a/spec/samples/common/models/wp_item/error_log b/spec/samples/common/models/wp_item/error_log
deleted file mode 100644
index 5836f0c1..00000000
--- a/spec/samples/common/models/wp_item/error_log
+++ /dev/null
@@ -1,25 +0,0 @@
-[13-Jan-2009 01:53:25] PHP Fatal error: Class 'Log' not found in /home/****/public_html/svatba/wp-content/plugins/fbconnect/Log/null.php on line 19
-[13-Jan-2009 01:55:58] PHP Fatal error: Class 'Log' not found in /home/****/public_html/svatba/wp-content/plugins/fbconnect/Log/file.php on line 20
-[13-Jan-2009 02:13:34] PHP Fatal error: Class 'Log' not found in /home/****/public_html/svatba/wp-content/plugins/fbconnect/Log/error_log.php on line 19
-[15-Feb-2009 10:47:54] PHP Fatal error: Class 'Log' not found in /home/****/public_html/svatba/wp-content/plugins/fbconnect/Log/error_log.php on line 19
-[15-Feb-2009 11:36:15] PHP Fatal error: Class 'Log' not found in /home/****/public_html/svatba/wp-content/plugins/fbconnect/Log/null.php on line 19
-[15-Feb-2009 16:45:37] PHP Fatal error: Class 'Log' not found in /home/****/public_html/svatba/wp-content/plugins/fbconnect/Log/file.php on line 20
-[04-Mar-2009 18:54:31] PHP Fatal error: Class 'Log' not found in /home/****/public_html/svatba/wp-content/plugins/fbconnect/Log/file.php on line 20
-[21-Mar-2009 20:32:21] PHP Fatal error: Class 'Log' not found in /home/****/public_html/svatba/wp-content/plugins/fbconnect/Log/null.php on line 19
-[29-Mar-2009 16:25:40] PHP Fatal error: Class 'Log' not found in /home3/****/public_html/svatba/wp-content/plugins/fbconnect/Log/null.php on line 19
-[06-Apr-2009 01:17:56] PHP Fatal error: Class 'Log' not found in /home3/****/public_html/svatba/wp-content/plugins/fbconnect/Log/file.php on line 20
-[03-May-2009 00:07:57] PHP Fatal error: Class 'Log' not found in /home3/****/public_html/svatba/wp-content/plugins/fbconnect/Log/null.php on line 19
-[10-May-2009 05:57:57] PHP Fatal error: Class 'Log' not found in /home3/****/public_html/svatba/wp-content/plugins/fbconnect/Log/file.php on line 20
-[21-May-2009 01:23:52] PHP Fatal error: Class 'Log' not found in /home3/****/public_html/svatba/wp-content/plugins/fbconnect/Log/error_log.php on line 19
-[02-Jun-2009 23:10:20] PHP Fatal error: Class 'Log' not found in /home3/****/public_html/svatba/wp-content/plugins/fbconnect/Log/null.php on line 19
-[17-Jun-2009 13:49:05] PHP Fatal error: Class 'Log' not found in /home3/****/public_html/svatba/wp-content/plugins/fbconnect/Log/error_log.php on line 19
-[17-Jun-2009 14:57:33] PHP Fatal error: Class 'Log' not found in /home3/****/public_html/svatba/wp-content/plugins/fbconnect/Log/error_log.php on line 19
-[23-Jun-2009 01:55:21] PHP Fatal error: Class 'Log' not found in /home3/****/public_html/svatba/wp-content/plugins/fbconnect/Log/file.php on line 20
-[06-Aug-2009 09:27:53] PHP Fatal error: Class 'Log' not found in /home3/****/public_html/svatba/wp-content/plugins/fbconnect/Log/null.php on line 19
-[31-Aug-2009 22:13:54] PHP Fatal error: Class 'Log' not found in /home3/****/public_html/svatba/wp-content/plugins/fbconnect/Log/file.php on line 20
-[03-Sep-2009 15:20:03] PHP Fatal error: Class 'Log' not found in /home3/****/public_html/svatba/wp-content/plugins/fbconnect/Log/error_log.php on line 19
-[13-Sep-2009 07:49:45] PHP Fatal error: Class 'Log' not found in /home3/****/public_html/svatba/wp-content/plugins/fbconnect/Log/null.php on line 19
-[22-Sep-2009 19:46:47] PHP Fatal error: Class 'Log' not found in /home3/****/public_html/svatba/wp-content/plugins/fbconnect/Log/file.php on line 20
-[02-Feb-2010 15:52:56] PHP Fatal error: Class 'Log' not found in /home3/****/public_html/svatba/wp-content/plugins/fbconnect/Log/file.php on line 20
-[02-Feb-2010 16:05:19] PHP Fatal error: Class 'Log' not found in /home3/****/public_html/svatba/wp-content/plugins/fbconnect/Log/null.php on line 19
-
diff --git a/spec/samples/common/models/wp_item/existable/cache_generation.html b/spec/samples/common/models/wp_item/existable/cache_generation.html
deleted file mode 100644
index b02ff386..00000000
--- a/spec/samples/common/models/wp_item/existable/cache_generation.html
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
-
-
-
-
-Lamp Testing
-
-
-
-
-
-
Welcome to WordPress. This is your first post. Edit or delete it, then start blogging!
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/spec/samples/common/models/wp_version/findable/meta_generator/no_version.html b/spec/samples/common/models/wp_version/findable/meta_generator/no_version.html
deleted file mode 100644
index 7fef49fd..00000000
--- a/spec/samples/common/models/wp_version/findable/meta_generator/no_version.html
+++ /dev/null
@@ -1,38 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-Wordpress 3.3.2 | Just another WordPress site
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/spec/samples/common/models/wp_version/findable/rdf_generator/3.3.2.html b/spec/samples/common/models/wp_version/findable/rdf_generator/3.3.2.html
deleted file mode 100644
index 8bb588ff..00000000
--- a/spec/samples/common/models/wp_version/findable/rdf_generator/3.3.2.html
+++ /dev/null
@@ -1,57 +0,0 @@
-
-
- Matt Mullenweg
- http://ma.tt
- Unlucky in Cards
- 2012-10-26T18:25:32Z
- hourly
- 1
- 2000-01-01T12:00+00:00
-
-
-
-
-
-
-
-
-
-
- New Jetpack
- http://ma.tt/2012/10/new-jetpack/
- 2012-10-26T18:25:32Z
- Matt
-
- I’m really excited abou the new Jetpack, it includes toolbar notifications, mobile push for iOS, a new REST API, and fixes to the contact form.
- I’m really excited abou the new Jetpack, it includes toolbar notifications, mobile push for iOS, a new REST API, and fixes to the contact form.
-]]>
-
-
- Pandora and Artist Payments
- http://ma.tt/2012/10/pandora-and-artist-payments/
- 2012-10-09T22:55:07Z
- Matt
-
- Pandora and Artist Payments, about how Pandora is paying out millions of dollars to artists but is only 6.5% of the US radio listening audience, the fees the rest pay are far, far lower.
- Pandora and Artist Payments, about how Pandora is paying out millions of dollars to artists but is only 6.5% of the US radio listening audience, the fees the rest pay are far, far lower.
-]]>
-
-
- Bitcoin and decentralization
- http://ma.tt/2012/10/bitcoin-and-decentralization/
- 2012-10-06T19:53:54Z
- Matt
-
- The value of Bitcoin is in its decentralization.
- The value of Bitcoin is in its decentralization.
-]]>
-
-
-
\ No newline at end of file
diff --git a/spec/samples/common/models/wp_version/findable/rdf_generator/3.4-beta4.html b/spec/samples/common/models/wp_version/findable/rdf_generator/3.4-beta4.html
deleted file mode 100644
index c4fb1787..00000000
--- a/spec/samples/common/models/wp_version/findable/rdf_generator/3.4-beta4.html
+++ /dev/null
@@ -1,57 +0,0 @@
-
-
- Matt Mullenweg
- http://ma.tt
- Unlucky in Cards
- 2012-10-26T18:25:32Z
- hourly
- 1
- 2000-01-01T12:00+00:00
-
-
-
-
-
-
-
-
-
-
- New Jetpack
- http://ma.tt/2012/10/new-jetpack/
- 2012-10-26T18:25:32Z
- Matt
-
- I’m really excited abou the new Jetpack, it includes toolbar notifications, mobile push for iOS, a new REST API, and fixes to the contact form.
- I’m really excited abou the new Jetpack, it includes toolbar notifications, mobile push for iOS, a new REST API, and fixes to the contact form.
-]]>
-
-
- Pandora and Artist Payments
- http://ma.tt/2012/10/pandora-and-artist-payments/
- 2012-10-09T22:55:07Z
- Matt
-
- Pandora and Artist Payments, about how Pandora is paying out millions of dollars to artists but is only 6.5% of the US radio listening audience, the fees the rest pay are far, far lower.
- Pandora and Artist Payments, about how Pandora is paying out millions of dollars to artists but is only 6.5% of the US radio listening audience, the fees the rest pay are far, far lower.
-]]>
-
-
- Bitcoin and decentralization
- http://ma.tt/2012/10/bitcoin-and-decentralization/
- 2012-10-06T19:53:54Z
- Matt
-
- The value of Bitcoin is in its decentralization.
- The value of Bitcoin is in its decentralization.
-]]>
-
-
-
\ No newline at end of file
diff --git a/spec/samples/common/models/wp_version/findable/rdf_generator/invalid_version.html b/spec/samples/common/models/wp_version/findable/rdf_generator/invalid_version.html
deleted file mode 100644
index 2c3de494..00000000
--- a/spec/samples/common/models/wp_version/findable/rdf_generator/invalid_version.html
+++ /dev/null
@@ -1,57 +0,0 @@
-
-
- Matt Mullenweg
- http://ma.tt
- Unlucky in Cards
- 2012-10-26T18:25:32Z
- hourly
- 1
- 2000-01-01T12:00+00:00
-
-
-
-
-
-
-
-
-
-
- New Jetpack
- http://ma.tt/2012/10/new-jetpack/
- 2012-10-26T18:25:32Z
- Matt
-
- I’m really excited abou the new Jetpack, it includes toolbar notifications, mobile push for iOS, a new REST API, and fixes to the contact form.
- I’m really excited abou the new Jetpack, it includes toolbar notifications, mobile push for iOS, a new REST API, and fixes to the contact form.
-]]>
-
-
- Pandora and Artist Payments
- http://ma.tt/2012/10/pandora-and-artist-payments/
- 2012-10-09T22:55:07Z
- Matt
-
- Pandora and Artist Payments, about how Pandora is paying out millions of dollars to artists but is only 6.5% of the US radio listening audience, the fees the rest pay are far, far lower.
- Pandora and Artist Payments, about how Pandora is paying out millions of dollars to artists but is only 6.5% of the US radio listening audience, the fees the rest pay are far, far lower.
-]]>
-
-
- Bitcoin and decentralization
- http://ma.tt/2012/10/bitcoin-and-decentralization/
- 2012-10-06T19:53:54Z
- Matt
-
- The value of Bitcoin is in its decentralization.
- The value of Bitcoin is in its decentralization.
-]]>
-
-
-
\ No newline at end of file
diff --git a/spec/samples/common/models/wp_version/findable/rdf_generator/no_generator.html b/spec/samples/common/models/wp_version/findable/rdf_generator/no_generator.html
deleted file mode 100644
index 6bb1523c..00000000
--- a/spec/samples/common/models/wp_version/findable/rdf_generator/no_generator.html
+++ /dev/null
@@ -1,56 +0,0 @@
-
-
- Matt Mullenweg
- http://ma.tt
- Unlucky in Cards
- 2012-10-26T18:25:32Z
- hourly
- 1
- 2000-01-01T12:00+00:00
-
-
-
-
-
-
-
-
-
- New Jetpack
- http://ma.tt/2012/10/new-jetpack/
- 2012-10-26T18:25:32Z
- Matt
-
- I’m really excited abou the new Jetpack, it includes toolbar notifications, mobile push for iOS, a new REST API, and fixes to the contact form.
- I’m really excited abou the new Jetpack, it includes toolbar notifications, mobile push for iOS, a new REST API, and fixes to the contact form.
-]]>
-
-
- Pandora and Artist Payments
- http://ma.tt/2012/10/pandora-and-artist-payments/
- 2012-10-09T22:55:07Z
- Matt
-
- Pandora and Artist Payments, about how Pandora is paying out millions of dollars to artists but is only 6.5% of the US radio listening audience, the fees the rest pay are far, far lower.
- Pandora and Artist Payments, about how Pandora is paying out millions of dollars to artists but is only 6.5% of the US radio listening audience, the fees the rest pay are far, far lower.
-]]>
-
-
- Bitcoin and decentralization
- http://ma.tt/2012/10/bitcoin-and-decentralization/
- 2012-10-06T19:53:54Z
- Matt
-
- The value of Bitcoin is in its decentralization.
- The value of Bitcoin is in its decentralization.
-]]>
-
-
-
\ No newline at end of file
diff --git a/spec/samples/common/models/wp_version/findable/rdf_generator/no_version.html b/spec/samples/common/models/wp_version/findable/rdf_generator/no_version.html
deleted file mode 100644
index c7c0610b..00000000
--- a/spec/samples/common/models/wp_version/findable/rdf_generator/no_version.html
+++ /dev/null
@@ -1,57 +0,0 @@
-
-
- Matt Mullenweg
- http://ma.tt
- Unlucky in Cards
- 2012-10-26T18:25:32Z
- hourly
- 1
- 2000-01-01T12:00+00:00
-
-
-
-
-
-
-
-
-
-
- New Jetpack
- http://ma.tt/2012/10/new-jetpack/
- 2012-10-26T18:25:32Z
- Matt
-
- I’m really excited abou the new Jetpack, it includes toolbar notifications, mobile push for iOS, a new REST API, and fixes to the contact form.
- I’m really excited abou the new Jetpack, it includes toolbar notifications, mobile push for iOS, a new REST API, and fixes to the contact form.
-]]>
-
-
- Pandora and Artist Payments
- http://ma.tt/2012/10/pandora-and-artist-payments/
- 2012-10-09T22:55:07Z
- Matt
-
- Pandora and Artist Payments, about how Pandora is paying out millions of dollars to artists but is only 6.5% of the US radio listening audience, the fees the rest pay are far, far lower.
- Pandora and Artist Payments, about how Pandora is paying out millions of dollars to artists but is only 6.5% of the US radio listening audience, the fees the rest pay are far, far lower.
-]]>
-
-
- Bitcoin and decentralization
- http://ma.tt/2012/10/bitcoin-and-decentralization/
- 2012-10-06T19:53:54Z
- Matt
-
- The value of Bitcoin is in its decentralization.
- The value of Bitcoin is in its decentralization.
-]]>
-
-
-
\ No newline at end of file
diff --git a/spec/samples/common/models/wp_version/findable/readme/3.3.2.html b/spec/samples/common/models/wp_version/findable/readme/3.3.2.html
deleted file mode 100644
index 8980b379..00000000
--- a/spec/samples/common/models/wp_version/findable/readme/3.3.2.html
+++ /dev/null
@@ -1,109 +0,0 @@
-
-
-
-
- WordPress › ReadMe
-
-
-
-
-
- Version 3.3.2
-
-
Semantic Personal Publishing Platform
-
-
First Things First
-
Welcome. WordPress is a very special project to me. Every developer and contributor adds something unique to the mix, and together we create something beautiful that I'm proud to be a part of. Thousands of hours have gone into WordPress, and we're dedicated to making it better every day. Thank you for making it part of your world.
-
— Matt Mullenweg
-
-
Installation: Famous 5-minute install
-
-
Unzip the package in an empty directory and upload everything.
-
Open wp-admin/install.php in your browser. It will take you through the process to set up a wp-config.php file with your database connection details.
-
-
If for some reason this doesn't work, don't worry. It doesn't work on all web hosts. Open up wp-config-sample.php with a text editor like WordPad or similar and fill in your database connection details.
Once the configuration file is set up, the installer will set up the tables needed for your blog. If there is an error, double check your wp-config.php file, and try again. If it fails again, please go to the support forums with as much data as you can gather.
-
If you did not enter a password, note the password given to you. If you did not provide a username, it will be admin.
-
The installer should then send you to the login page. Sign in with the username and password you chose during the installation. If a password was generated for you, you can then click on 'Profile' to change the password.
-
-
-
Updating
-
Using the Automatic Updater
-
If you are updating from version 2.7 or higher, you can use the automatic updater:
If you've looked everywhere and still can't find an answer, the support forums are very active and have a large community ready to help. To help them help you be sure to use a descriptive thread title and describe your question in as much detail as possible.
There is an online chat channel that is used for discussion among people who use WordPress and occasionally support topics. The above wiki page should point you in the right direction. (irc.freenode.net #wordpress)
You can post from an email client! To set this up go to your "Writing" options screen and fill in the connection details for your secret POP3 account. Then you need to set up wp-mail.php to execute periodically to check the mailbox for new posts. You can do it with cron-jobs, or if your host doesn't support it you can look into the various website-monitoring services, and make them check your wp-mail.php URL.
-
Posting is easy: Any email sent to the address you specify will be posted, with the subject as the title. It is best to keep the address discrete. The script will delete emails that are successfully posted.
If you have any suggestions, ideas, or comments, or if you (gasp!) found a bug, join us in the Support Forums.
-
WordPress has a robust plugin API that makes extending the code easy. If you are a developer interested in utilizing this, see the plugin documentation in the Codex. You shouldn't modify any of the core code.
-
-
-
Share the Love
-
WordPress has no multi-million dollar marketing campaign or celebrity sponsors, but we do have something even better—you. If you enjoy WordPress please consider telling a friend, setting it up for someone less knowledgable than yourself, or writing the author of a media article that overlooks us.
-
-
WordPress is the official continuation of b2/cafélog, which came from Michel V. The work has been continued by the WordPress developers. If you would like to support WordPress, please consider donating.
-
-
License
-
WordPress is free software, and is released under the terms of the GPL version 2 or (at your option) any later version. See license.txt.
Welcome. WordPress is a very special project to me. Every developer and contributor adds something unique to the mix, and together we create something beautiful that I’m proud to be a part of. Thousands of hours have gone into WordPress, and we’re dedicated to making it better every day. Thank you for making it part of your world.
-
— Matt Mullenweg
-
-
Installation: Famous 5-minute install
-
-
Unzip the package in an empty directory and upload everything.
-
Open wp-admin/install.php in your browser. It will take you through the process to set up a wp-config.php file with your database connection details.
-
-
If for some reason this doesn’t work, don’t worry. It doesn’t work on all web hosts. Open up wp-config-sample.php with a text editor like WordPad or similar and fill in your database connection details.
Once the configuration file is set up, the installer will set up the tables needed for your blog. If there is an error, double check your wp-config.php file, and try again. If it fails again, please go to the support forums with as much data as you can gather.
-
If you did not enter a password, note the password given to you. If you did not provide a username, it will be admin.
-
The installer should then send you to the login page. Sign in with the username and password you chose during the installation. If a password was generated for you, you can then click on “Profile” to change the password.
-
-
-
Updating
-
Using the Automatic Updater
-
If you are updating from version 2.7 or higher, you can use the automatic updater:
If you’ve looked everywhere and still can’t find an answer, the support forums are very active and have a large community ready to help. To help them help you be sure to use a descriptive thread title and describe your question in as much detail as possible.
There is an online chat channel that is used for discussion among people who use WordPress and occasionally support topics. The above wiki page should point you in the right direction. (irc.freenode.net #wordpress)
-
-
-
Final Notes
-
-
If you have any suggestions, ideas, or comments, or if you (gasp!) found a bug, join us in the Support Forums.
-
WordPress has a robust plugin API that makes extending the code easy. If you are a developer interested in utilizing this, see the Plugin Developer Handbook. You shouldn’t modify any of the core code.
-
-
-
Share the Love
-
WordPress has no multi-million dollar marketing campaign or celebrity sponsors, but we do have something even better—you. If you enjoy WordPress please consider telling a friend, setting it up for someone less knowledgable than yourself, or writing the author of a media article that overlooks us.
-
-
WordPress is the official continuation of b2/cafélog, which came from Michel V. The work has been continued by the WordPress developers. If you would like to support WordPress, please consider donating.
-
-
License
-
WordPress is free software, and is released under the terms of the GPL version 2 or (at your option) any later version. See license.txt.
Welcome. WordPress is a very special project to me. Every developer and contributor adds something unique to the mix, and together we create something beautiful that I'm proud to be a part of. Thousands of hours have gone into WordPress, and we're dedicated to making it better every day. Thank you for making it part of your world.
-
— Matt Mullenweg
-
-
Installation: Famous 5-minute install
-
-
Unzip the package in an empty directory and upload everything.
-
Open wp-admin/install.php in your browser. It will take you through the process to set up a wp-config.php file with your database connection details.
-
-
If for some reason this doesn't work, don't worry. It doesn't work on all web hosts. Open up wp-config-sample.php with a text editor like WordPad or similar and fill in your database connection details.
Once the configuration file is set up, the installer will set up the tables needed for your blog. If there is an error, double check your wp-config.php file, and try again. If it fails again, please go to the support forums with as much data as you can gather.
-
If you did not enter a password, note the password given to you. If you did not provide a username, it will be admin.
-
The installer should then send you to the login page. Sign in with the username and password you chose during the installation. If a password was generated for you, you can then click on 'Profile' to change the password.
-
-
-
Updating
-
Using the Automatic Updater
-
If you are updating from version 2.7 or higher, you can use the automatic updater:
If you've looked everywhere and still can't find an answer, the support forums are very active and have a large community ready to help. To help them help you be sure to use a descriptive thread title and describe your question in as much detail as possible.
There is an online chat channel that is used for discussion among people who use WordPress and occasionally support topics. The above wiki page should point you in the right direction. (irc.freenode.net #wordpress)
You can post from an email client! To set this up go to your "Writing" options screen and fill in the connection details for your secret POP3 account. Then you need to set up wp-mail.php to execute periodically to check the mailbox for new posts. You can do it with cron-jobs, or if your host doesn't support it you can look into the various website-monitoring services, and make them check your wp-mail.php URL.
-
Posting is easy: Any email sent to the address you specify will be posted, with the subject as the title. It is best to keep the address discrete. The script will delete emails that are successfully posted.
If you have any suggestions, ideas, or comments, or if you (gasp!) found a bug, join us in the Support Forums.
-
WordPress has a robust plugin API that makes extending the code easy. If you are a developer interested in utilizing this, see the plugin documentation in the Codex. You shouldn't modify any of the core code.
-
-
-
Share the Love
-
WordPress has no multi-million dollar marketing campaign or celebrity sponsors, but we do have something even better—you. If you enjoy WordPress please consider telling a friend, setting it up for someone less knowledgable than yourself, or writing the author of a media article that overlooks us.
-
-
WordPress is the official continuation of b2/cafélog, which came from Michel V. The work has been continued by the WordPress developers. If you would like to support WordPress, please consider donating.
-
-
License
-
WordPress is free software, and is released under the terms of the GPL version 2 or (at your option) any later version. See license.txt.
Welcome. WordPress is a very special project to me. Every developer and contributor adds something unique to the mix, and together we create something beautiful that I'm proud to be a part of. Thousands of hours have gone into WordPress, and we're dedicated to making it better every day. Thank you for making it part of your world.
-
— Matt Mullenweg
-
-
Installation: Famous 5-minute install
-
-
Unzip the package in an empty directory and upload everything.
-
Open wp-admin/install.php in your browser. It will take you through the process to set up a wp-config.php file with your database connection details.
-
-
If for some reason this doesn't work, don't worry. It doesn't work on all web hosts. Open up wp-config-sample.php with a text editor like WordPad or similar and fill in your database connection details.
Once the configuration file is set up, the installer will set up the tables needed for your blog. If there is an error, double check your wp-config.php file, and try again. If it fails again, please go to the support forums with as much data as you can gather.
-
If you did not enter a password, note the password given to you. If you did not provide a username, it will be admin.
-
The installer should then send you to the login page. Sign in with the username and password you chose during the installation. If a password was generated for you, you can then click on 'Profile' to change the password.
-
-
-
Updating
-
Using the Automatic Updater
-
If you are updating from version 2.7 or higher, you can use the automatic updater:
If you've looked everywhere and still can't find an answer, the support forums are very active and have a large community ready to help. To help them help you be sure to use a descriptive thread title and describe your question in as much detail as possible.
There is an online chat channel that is used for discussion among people who use WordPress and occasionally support topics. The above wiki page should point you in the right direction. (irc.freenode.net #wordpress)
You can post from an email client! To set this up go to your "Writing" options screen and fill in the connection details for your secret POP3 account. Then you need to set up wp-mail.php to execute periodically to check the mailbox for new posts. You can do it with cron-jobs, or if your host doesn't support it you can look into the various website-monitoring services, and make them check your wp-mail.php URL.
-
Posting is easy: Any email sent to the address you specify will be posted, with the subject as the title. It is best to keep the address discrete. The script will delete emails that are successfully posted.
If you have any suggestions, ideas, or comments, or if you (gasp!) found a bug, join us in the Support Forums.
-
WordPress has a robust plugin API that makes extending the code easy. If you are a developer interested in utilizing this, see the plugin documentation in the Codex. You shouldn't modify any of the core code.
-
-
-
Share the Love
-
WordPress has no multi-million dollar marketing campaign or celebrity sponsors, but we do have something even better—you. If you enjoy WordPress please consider telling a friend, setting it up for someone less knowledgable than yourself, or writing the author of a media article that overlooks us.
-
-
WordPress is the official continuation of b2/cafélog, which came from Michel V. The work has been continued by the WordPress developers. If you would like to support WordPress, please consider donating.
-
-
License
-
WordPress is free software, and is released under the terms of the GPL version 2 or (at your option) any later version. See license.txt.
-
-
-
-
diff --git a/spec/samples/common/models/wp_version/findable/rss_generator/3.3.2.html b/spec/samples/common/models/wp_version/findable/rss_generator/3.3.2.html
deleted file mode 100644
index e730a810..00000000
--- a/spec/samples/common/models/wp_version/findable/rss_generator/3.3.2.html
+++ /dev/null
@@ -1,37 +0,0 @@
-
-
-
-
- Wordpress 3.3.2
-
- http://lamp/wordpress-3.3.2
- Just another WordPress site
- Wed, 02 May 2012 13:05:44 +0000
- en
- hourly
- 1
- http://wordpress.org/?v=3.3.2
-
- Hello world!
- http://lamp/wordpress-3.3.2/?p=1
- http://lamp/wordpress-3.3.2/?p=1#comments
- Wed, 02 May 2012 13:05:44 +0000
- admin
-
-
- http://lamp/wordpress-3.3.2/?p=1
-
- Welcome to WordPress. This is your first post. Edit or delete it, then start blogging!
-]]>
- http://lamp/wordpress-3.3.2/?feed=rss2&p=1
- 2
-
-
-
diff --git a/spec/samples/common/models/wp_version/findable/rss_generator/3.4-beta4.html b/spec/samples/common/models/wp_version/findable/rss_generator/3.4-beta4.html
deleted file mode 100644
index 1b5c16f0..00000000
--- a/spec/samples/common/models/wp_version/findable/rss_generator/3.4-beta4.html
+++ /dev/null
@@ -1,37 +0,0 @@
-
-
-
-
- Wordpress 3.4 beta 4
-
- http://lamp/wordpress-3.4-beta-4
- Just another WordPress site
- Wed, 09 May 2012 16:29:08 +0000
- en-US
- hourly
- 1
- http://wordpress.org/?v=3.4-beta4
-
- Hello world!
- http://lamp/wordpress-3.4-beta-4/?p=1
- http://lamp/wordpress-3.4-beta-4/?p=1#comments
- Wed, 09 May 2012 16:29:08 +0000
- admin
-
-
- http://lamp/wordpress-3.4-beta-4/?p=1
-
- Welcome to WordPress. This is your first post. Edit or delete it, then start blogging!
-]]>
- http://lamp/wordpress-3.4-beta-4/?feed=rss2&p=1
- 1
-
-
-
diff --git a/spec/samples/common/models/wp_version/findable/rss_generator/invalid_version.html b/spec/samples/common/models/wp_version/findable/rss_generator/invalid_version.html
deleted file mode 100644
index 76a87ec6..00000000
--- a/spec/samples/common/models/wp_version/findable/rss_generator/invalid_version.html
+++ /dev/null
@@ -1,37 +0,0 @@
-
-
-
-
- Wordpress 3.3.2
-
- http://lamp/wordpress-3.3.2
- Just another WordPress site
- Wed, 02 May 2012 13:05:44 +0000
- en
- hourly
- 1
- http://wordpress.org/?v=5506
-
- Hello world!
- http://lamp/wordpress-3.3.2/?p=1
- http://lamp/wordpress-3.3.2/?p=1#comments
- Wed, 02 May 2012 13:05:44 +0000
- admin
-
-
- http://lamp/wordpress-3.3.2/?p=1
-
- Welcome to WordPress. This is your first post. Edit or delete it, then start blogging!
-]]>
- http://lamp/wordpress-3.3.2/?feed=rss2&p=1
- 2
-
-
-
diff --git a/spec/samples/common/models/wp_version/findable/rss_generator/no_generator.html b/spec/samples/common/models/wp_version/findable/rss_generator/no_generator.html
deleted file mode 100644
index 38a23409..00000000
--- a/spec/samples/common/models/wp_version/findable/rss_generator/no_generator.html
+++ /dev/null
@@ -1,36 +0,0 @@
-
-
-
-
- Wordpress 3.4 beta 4
-
- http://lamp/wordpress-3.4-beta-4
- Just another WordPress site
- Wed, 09 May 2012 16:29:08 +0000
- en-US
- hourly
- 1
-
- Hello world!
- http://lamp/wordpress-3.4-beta-4/?p=1
- http://lamp/wordpress-3.4-beta-4/?p=1#comments
- Wed, 09 May 2012 16:29:08 +0000
- admin
-
-
- http://lamp/wordpress-3.4-beta-4/?p=1
-
- Welcome to WordPress. This is your first post. Edit or delete it, then start blogging!
-]]>
- http://lamp/wordpress-3.4-beta-4/?feed=rss2&p=1
- 1
-
-
-
diff --git a/spec/samples/common/models/wp_version/findable/rss_generator/no_version.html b/spec/samples/common/models/wp_version/findable/rss_generator/no_version.html
deleted file mode 100644
index 7a0d3112..00000000
--- a/spec/samples/common/models/wp_version/findable/rss_generator/no_version.html
+++ /dev/null
@@ -1,37 +0,0 @@
-
-
-
-
- Wordpress 3.3.2
-
- http://lamp/wordpress-3.3.2
- Just another WordPress site
- Wed, 02 May 2012 13:05:44 +0000
- en
- hourly
- 1
- http://wordpress.org/?v=
-
- Hello world!
- http://lamp/wordpress-3.3.2/?p=1
- http://lamp/wordpress-3.3.2/?p=1#comments
- Wed, 02 May 2012 13:05:44 +0000
- admin
-
-
- http://lamp/wordpress-3.3.2/?p=1
-
- Welcome to WordPress. This is your first post. Edit or delete it, then start blogging!
-]]>
- http://lamp/wordpress-3.3.2/?feed=rss2&p=1
- 2
-
-
-
diff --git a/spec/samples/common/models/wp_version/findable/sitemap_generator/3.3.2.html b/spec/samples/common/models/wp_version/findable/sitemap_generator/3.3.2.html
deleted file mode 100644
index 93cbf91a..00000000
--- a/spec/samples/common/models/wp_version/findable/sitemap_generator/3.3.2.html
+++ /dev/null
@@ -1,3 +0,0 @@
-
-
-
diff --git a/spec/samples/common/models/wp_version/findable/sitemap_generator/3.4-beta4.html b/spec/samples/common/models/wp_version/findable/sitemap_generator/3.4-beta4.html
deleted file mode 100644
index 9d7c35b0..00000000
--- a/spec/samples/common/models/wp_version/findable/sitemap_generator/3.4-beta4.html
+++ /dev/null
@@ -1,3 +0,0 @@
-
-
-
diff --git a/spec/samples/common/models/wp_version/findable/sitemap_generator/invalid_version.html b/spec/samples/common/models/wp_version/findable/sitemap_generator/invalid_version.html
deleted file mode 100644
index e6327ecc..00000000
--- a/spec/samples/common/models/wp_version/findable/sitemap_generator/invalid_version.html
+++ /dev/null
@@ -1,3 +0,0 @@
-
-
-
diff --git a/spec/samples/common/models/wp_version/findable/sitemap_generator/no_generator.html b/spec/samples/common/models/wp_version/findable/sitemap_generator/no_generator.html
deleted file mode 100644
index cf28468f..00000000
--- a/spec/samples/common/models/wp_version/findable/sitemap_generator/no_generator.html
+++ /dev/null
@@ -1,3 +0,0 @@
-
-
-
diff --git a/spec/samples/common/models/wp_version/findable/sitemap_generator/no_version.html b/spec/samples/common/models/wp_version/findable/sitemap_generator/no_version.html
deleted file mode 100644
index b4a404f3..00000000
--- a/spec/samples/common/models/wp_version/findable/sitemap_generator/no_version.html
+++ /dev/null
@@ -1,3 +0,0 @@
-
-
-
diff --git a/spec/samples/common/models/wp_version/findable/stylesheet_numbers/invalid_url.html b/spec/samples/common/models/wp_version/findable/stylesheet_numbers/invalid_url.html
deleted file mode 100644
index 04ccf538..00000000
--- a/spec/samples/common/models/wp_version/findable/stylesheet_numbers/invalid_url.html
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
diff --git a/spec/samples/common/models/wp_version/vulnerable/versions_vulns.json b/spec/samples/common/models/wp_version/vulnerable/versions_vulns.json
deleted file mode 100644
index 2d2407e4..00000000
--- a/spec/samples/common/models/wp_version/vulnerable/versions_vulns.json
+++ /dev/null
@@ -1,42 +0,0 @@
-{
- "3.5": {
- "vulnerabilities":[
- {
- "id":2989,
- "title":"I should not appear in the results",
- "references": {
- "url": ["Ref 1", "Ref 2"],
- "osvdb": ["osvdb"],
- "cve": ["2011-001"],
- "secunia": ["secunia"],
- "metasploit": ["exploit/ex1"],
- "exploitdb": ["exploitdb"]
- },
- "type":"XSS",
- "fixed_in":"",
- "created_at":"2014-07-28T12:10:07.000Z",
- "updated_at":"2014-07-28T12:10:07.000Z"
- }
- ]
- },
- "3.2": {
- "vulnerabilities":[
- {
- "id":2993,
- "title":"Here I Am",
- "references": {
- "url": ["Ref 1", "Ref 2"],
- "osvdb": ["osvdb"],
- "cve": ["2011-001"],
- "secunia": ["secunia"],
- "metasploit": ["exploit/ex1"],
- "exploitdb": ["exploitdb"]
- },
- "type":"SQLI",
- "fixed_in":"",
- "created_at":"2014-07-28T12:10:07.000Z",
- "updated_at":"2014-07-28T12:10:07.000Z"
- }
- ]
- }
-}
diff --git a/spec/samples/conf/browser.conf.json b/spec/samples/conf/browser.conf.json
deleted file mode 100644
index ab5d88de..00000000
--- a/spec/samples/conf/browser.conf.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:9.0) Gecko/20100101 Firefox/9.0",
- "cache_ttl": 600,
- "request_timeout": 60,
- "connect_timeout": 10,
- "max_threads": 20
-}
diff --git a/spec/samples/conf/browser.conf_proxy.json b/spec/samples/conf/browser.conf_proxy.json
deleted file mode 100644
index f60413db..00000000
--- a/spec/samples/conf/browser.conf_proxy.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:10.0) Gecko/20100101 Firefox/11.0",
- "proxy": "127.0.0.1:3038",
- "cache_ttl": 300,
- "request_timeout": 60,
- "connect_timeout": 10
-}
diff --git a/spec/samples/conf/browser.conf_proxy_auth.json b/spec/samples/conf/browser.conf_proxy_auth.json
deleted file mode 100644
index 898e8f3d..00000000
--- a/spec/samples/conf/browser.conf_proxy_auth.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:10.0) Gecko/20100101 Firefox/11.0",
- "proxy": "127.0.0.1:3038",
- "proxy_auth": "user:pass",
- "cache_ttl": 300,
- "request_timeout": 60,
- "connect_timeout": 10
-}
diff --git a/spec/samples/empty-file b/spec/samples/empty-file
deleted file mode 100644
index e69de29b..00000000
diff --git a/spec/samples/utf8.html b/spec/samples/utf8.html
deleted file mode 100644
index cef71739..00000000
--- a/spec/samples/utf8.html
+++ /dev/null
@@ -1,56 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-明镜博客
-
-
-
-
-
diff --git a/spec/samples/wpscan/web_site/has_log/matches.txt b/spec/samples/wpscan/web_site/has_log/matches.txt
deleted file mode 100644
index edfa5b17..00000000
--- a/spec/samples/wpscan/web_site/has_log/matches.txt
+++ /dev/null
@@ -1,2 +0,0 @@
-[13-Jan-2009 01:53:25] PHP Fatal error: Class 'Log' not found in /home/****/public_html/wp-content/plugins/fbconnect/Log/null.php on line 19
-[13-Jan-2009 01:55:58] PHP Fatal error: Class 'Log' not found in /home/****/public_html/wp-content/plugins/fbconnect/Log/file.php on line 20
diff --git a/spec/samples/wpscan/web_site/has_log/matches_after_700_bytes.txt b/spec/samples/wpscan/web_site/has_log/matches_after_700_bytes.txt
deleted file mode 100644
index 12f8ef7b..00000000
--- a/spec/samples/wpscan/web_site/has_log/matches_after_700_bytes.txt
+++ /dev/null
@@ -1,8 +0,0 @@
-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-[13-Jan-2009 01:53:25] PHP Fatal error: Class 'Log' not found in /home/****/public_html/wp-content/plugins/fbconnect/Log/null.php on line 19
diff --git a/spec/samples/wpscan/web_site/has_log/no_match.txt b/spec/samples/wpscan/web_site/has_log/no_match.txt
deleted file mode 100644
index edbf8dcc..00000000
--- a/spec/samples/wpscan/web_site/has_log/no_match.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
-ccccccccccccccccccccccccccccccccc
diff --git a/spec/samples/wpscan/web_site/robots_txt/empty_robots.txt b/spec/samples/wpscan/web_site/robots_txt/empty_robots.txt
deleted file mode 100644
index e69de29b..00000000
diff --git a/spec/samples/wpscan/web_site/robots_txt/invalid_robots.txt b/spec/samples/wpscan/web_site/robots_txt/invalid_robots.txt
deleted file mode 100644
index f7bc0aa4..00000000
--- a/spec/samples/wpscan/web_site/robots_txt/invalid_robots.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-ölhkdfys
-opihufgcasfa
-dsds
-fsdf
-s
-dtf
\ No newline at end of file
diff --git a/spec/samples/wpscan/web_site/robots_txt/invalid_robots_2.txt b/spec/samples/wpscan/web_site/robots_txt/invalid_robots_2.txt
deleted file mode 100644
index 19fa8dc5..00000000
--- a/spec/samples/wpscan/web_site/robots_txt/invalid_robots_2.txt
+++ /dev/null
@@ -1,8 +0,0 @@
-User-agent: *
-Disallow: /wp-admin/
-Disallow: http://10.0.0.0/wp-includes/
-Disallow: wooooza
-Disallow: /ÖÜ()=?
-Allow: /asdf/
-
-Sitemap: http://10.0.0.0/sitemap.xml.gz
diff --git a/spec/samples/wpscan/web_site/robots_txt/robots.txt b/spec/samples/wpscan/web_site/robots_txt/robots.txt
deleted file mode 100644
index 11d9942a..00000000
--- a/spec/samples/wpscan/web_site/robots_txt/robots.txt
+++ /dev/null
@@ -1,11 +0,0 @@
-User-agent: *
-Disallow: /wp-admin/
-Disallow: /wp-includes/
-Disallow: /wordpress/admin/
-Disallow: /wordpress/wp-admin/
-Disallow: /wordpress/secret/
-Disallow: /Wordpress/wp-admin/
-Disallow: /wp-admin/tralling-space/
-Allow: /asdf/
-
-Sitemap: http://10.0.0.0/sitemap.xml.gz
diff --git a/spec/samples/wpscan/web_site/robots_txt/robots_duplicate_1.txt b/spec/samples/wpscan/web_site/robots_txt/robots_duplicate_1.txt
deleted file mode 100644
index fe56eaf4..00000000
--- a/spec/samples/wpscan/web_site/robots_txt/robots_duplicate_1.txt
+++ /dev/null
@@ -1,17 +0,0 @@
-User-agent: *
-Disallow: /wp-admin/
-Disallow: /wp-admin/
-Disallow: /wp-admin/
-Disallow: /wp-admin/
-Disallow: /wp-includes/
-Disallow: /wordpress/admin/
-Disallow: /wordpress/wp-admin/
-Disallow: /wordpress/secret/
-Disallow: /wordpress/secret/
-Disallow: /wordpress/
-Disallow: /wordpress/secret/
-Disallow: /Wordpress/wp-admin/
-Disallow: /wp-admin/tralling-space/
-Allow: /asdf/
-
-Sitemap: http://10.0.0.0/sitemap.xml.gz
diff --git a/spec/samples/wpscan/web_site/robots_txt/robots_duplicate_2.txt b/spec/samples/wpscan/web_site/robots_txt/robots_duplicate_2.txt
deleted file mode 100644
index 91f19bfc..00000000
--- a/spec/samples/wpscan/web_site/robots_txt/robots_duplicate_2.txt
+++ /dev/null
@@ -1,9 +0,0 @@
-User-agent: *
-Disallow: /wp-admin/
-Disallow: /wp-admin/
-Disallow: /wp-admin/
-Disallow: /wp-admin/
-Disallow: /wp-admin/
-Disallow: /wp-admin/
-
-Sitemap: http://10.0.0.0/sitemap.xml.gz
diff --git a/spec/samples/wpscan/web_site/rss_url/wordpress-3.5.htm b/spec/samples/wpscan/web_site/rss_url/wordpress-3.5.htm
deleted file mode 100644
index aa68154c..00000000
--- a/spec/samples/wpscan/web_site/rss_url/wordpress-3.5.htm
+++ /dev/null
@@ -1,42 +0,0 @@
-
-
-
-
-
-
-
-
-
-Wordpress 3.5 | Just another WordPress site
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/spec/samples/wpscan/web_site/xml_rpc_url/body_dont_match.html b/spec/samples/wpscan/web_site/xml_rpc_url/body_dont_match.html
deleted file mode 100644
index b769e246..00000000
--- a/spec/samples/wpscan/web_site/xml_rpc_url/body_dont_match.html
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-Wordpress 3.5.1
-
-
-
-
-
-
-
-
diff --git a/spec/samples/wpscan/web_site/xml_rpc_url/body_match.html b/spec/samples/wpscan/web_site/xml_rpc_url/body_match.html
deleted file mode 100644
index 01ea1336..00000000
--- a/spec/samples/wpscan/web_site/xml_rpc_url/body_match.html
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
-
-Wordpress 3.5.1
-
-
-
-
-
-
-
-
-
diff --git a/spec/samples/wpscan/wp_target/debug_log/debug-notice.log b/spec/samples/wpscan/wp_target/debug_log/debug-notice.log
deleted file mode 100644
index 0e96ca47..00000000
--- a/spec/samples/wpscan/wp_target/debug_log/debug-notice.log
+++ /dev/null
@@ -1,2 +0,0 @@
-[11-Oct-2012 00:00:00] PHP Notice: Undefined index: ec_email in /var/www/wp/wp-content/plugins/easy-contact/econtact.php on line 33
-[11-Oct-2012 00:00:00] PHP Notice: Undefined index: ec_url in /var/www/wp/wp-content/plugins/easy-contact/econtact.php on line 34
diff --git a/spec/samples/wpscan/wp_target/debug_log/debug.log b/spec/samples/wpscan/wp_target/debug_log/debug.log
deleted file mode 100644
index c8cd1314..00000000
--- a/spec/samples/wpscan/wp_target/debug_log/debug.log
+++ /dev/null
@@ -1 +0,0 @@
-[29-Jul-2012 13:12:16] PHP Warning: fopen(http://lamp/wordpress-3.4.1-custom/wp-cron.php?doing_wp_cron=1343567536.4001460075378417968750): failed to open stream: HTTP request failed! in /var/www/wordpress-3.4.1-custom/wp-includes/class-http.php on line 923
diff --git a/spec/samples/wpscan/wp_target/wp-login.php b/spec/samples/wpscan/wp_target/wp-login.php
deleted file mode 100644
index 25d015e5..00000000
--- a/spec/samples/wpscan/wp_target/wp-login.php
+++ /dev/null
@@ -1,54 +0,0 @@
-
-
-
-
- Wordpress 3.3.2 › Log In
-
-
-
-
-
-
Welcome. WordPress is a very special project to me. Every developer and contributor adds something unique to the mix, and together we create something beautiful that I'm proud to be a part of. Thousands of hours have gone into WordPress, and we're dedicated to making it better every day. Thank you for making it part of your world.
-
— Matt Mullenweg
-
-
Installation: Famous 5-minute install
-
-
Unzip the package in an empty directory and upload everything.
-
Open wp-admin/install.php in your browser. It will take you through the process to set up a wp-config.php file with your database connection details.
-
-
If for some reason this doesn't work, don't worry. It doesn't work on all web hosts. Open up wp-config-sample.php with a text editor like WordPad or similar and fill in your database connection details.
Once the configuration file is set up, the installer will set up the tables needed for your blog. If there is an error, double check your wp-config.php file, and try again. If it fails again, please go to the support forums with as much data as you can gather.
-
If you did not enter a password, note the password given to you. If you did not provide a username, it will be admin.
-
The installer should then send you to the login page. Sign in with the username and password you chose during the installation. If a password was generated for you, you can then click on 'Profile' to change the password.
-
-
-
Updating
-
Using the Automatic Updater
-
If you are updating from version 2.7 or higher, you can use the automatic updater:
If you've looked everywhere and still can't find an answer, the support forums are very active and have a large community ready to help. To help them help you be sure to use a descriptive thread title and describe your question in as much detail as possible.
There is an online chat channel that is used for discussion among people who use WordPress and occasionally support topics. The above wiki page should point you in the right direction. (irc.freenode.net #wordpress)
You can post from an email client! To set this up go to your "Writing" options screen and fill in the connection details for your secret POP3 account. Then you need to set up wp-mail.php to execute periodically to check the mailbox for new posts. You can do it with cron-jobs, or if your host doesn't support it you can look into the various website-monitoring services, and make them check your wp-mail.php URL.
-
Posting is easy: Any email sent to the address you specify will be posted, with the subject as the title. It is best to keep the address discrete. The script will delete emails that are successfully posted.
If you have any suggestions, ideas, or comments, or if you (gasp!) found a bug, join us in the Support Forums.
-
WordPress has a robust plugin API that makes extending the code easy. If you are a developer interested in utilizing this, see the plugin documentation in the Codex. You shouldn't modify any of the core code.
-
-
-
Share the Love
-
WordPress has no multi-million dollar marketing campaign or celebrity sponsors, but we do have something even better—you. If you enjoy WordPress please consider telling a friend, setting it up for someone less knowledgable than yourself, or writing the author of a media article that overlooks us.
-
-
WordPress is the official continuation of b2/cafélog, which came from Michel V. The work has been continued by the WordPress developers. If you would like to support WordPress, please consider donating.
-
-
License
-
WordPress is free software, and is released under the terms of the GPL version 2 or (at your option) any later version. See license.txt.
Bienvenue. WordPress est un projet très spécial pour moi. Chaque développeur et contributeur ajoute quelque chose d'unique à ce projet, et ensemble nous créons quelque chose de beau, et dont je suis fier de faire partie. Nous avons passé des milliers d'heures sur le développement WordPress, et nous nous attachons tous les jours à vous faciliter la vie. Merci d'en faire une partie d'un morceau de votre monde.
-
— Matt Mullenweg
-
-
Installation : la fameuse installation en 5 minutes
-
-
Décompressez l'archive dans un dossier vide de votre ordinateur, puis mettez tous ces fichiers en ligne ;
-
Ouvrez le fichier wp-config-sample.php avec votre éditeur de texte préféré, comme WordPad ou similaire, et complétez les informations liées à votre base de données ;
-
Sauvegardez le fichier sous le nom wp-config.php ;
-
Envoyez le tout sur votre hébergement via un logiciel client FTP ;
-
Ouvrez le fichier /wp-admin/install.php dans votre navigateur. Celui-ci vous guidera dans la création du fichier wp-config.php, qui contient les détails de connexion à votre base de données ;
-
-
Si cela ne marchait pas, ne vous inquietez pas : certains hébergeurs n'autorisent pas la création de fichier. Ouvrez le fichier wp-config.php avec un éditeur de texte, et saissez-y directement les détails de connexion à votre base de données ;
-
Enregistrez le fichier sous le nom wp-config.php et mettez-le en ligne ;
Une fois le fichier de configuration correctement rempli, l'installateur met en place les tables nécessaires à votre blog. Si vous obtenez une erreur, vérifiez le contenu du fichier wp-config.php, et réessayez. Si cela échoue encore une fois, rendez-vous sur les forums d'entraide et soyez le plus précis possible dans vos explications. Si tout se passe bien, passez à l'étape suivante ;
-
Si vous n'avez pas précisé de mot de passe, notez bien celui qui vous est donné. Si vous n'avez pas précisé d'identifiant utilisateur, ce sera admin ;
-
Une fois l'installation terminée, le script d'installation vous renverra vers la page de connexion. Connectez-vous avec l'identifiant et le mot de passe précisés (ou générés) durant l'installation. Si le mot de passe a été généré pour vous, cliquez sur "Profil" pour le modifier.
-
-
-
Mise à jour
-
A l'aide de l'outil de mise à jour automatique
-
Si votre version de WordPress est égale ou supérieure à 2.7, vous pouvez utiliser l'outil de mise à jour automatique :
C'est ici que vous trouverez les dernières informations, les annonces et les nouveautés de WordPress. Les derniers articles de ce blog sont affichés dans le Tableau de Bord de WordPress par défaut.
Si vous avez cherché partout et que malgré cela vous n'avez trouvé aucune réponse, les forums sont très actifs et son immense communauté sera prête à vous aider. Pour un traitement efficace de votre problème, faites en sorte d'utiliser, lors de la création de votre sujet, un titre et une description aussi pertinents et clairs que possible.
Il existe un canal IRC qui est le rendez-vous des utilisateurs WordPress, et occasionnellement, propose son aide aux sujets liés au support. La page Wiki devrait vous indiquer la bonne direction.
Il vous est possible d'écrire directement vos articles à partir d'un logiciel de messagerie ! Pour cela, vous devez vous rendre sur la page d'options "Ecriture" et indiquer les détails de votre compte POP3 secret. Ensuite, vous devez faire en sorte que wp-mail.php s'exécute périodiquement, afin qu'il parcoure votre boite aux lettres à la recherche de nouveaux articles. Vous pouvez par exemple créer une tâche cron, ou si votre hébergeur ne supporte pas cette possibilité, il existe de nombreux sites proposant un service similaire de monitoring : il vous suffira d'indiquer l'adresse de votre fichier wp-mail.php
-
Publier devient facile : n'importe quel message envoyé à l'adresse que vous aurez précisée sera publié, le sujet du message étant le titre de l'article. Il est préférable de conserver cette adresse à l'abri des regards indiscrets. Le script effacera automatiquement les message qui auront été publiés avec succès
Si vous avez des suggestions, des idées, des commentaires ou si (oups !) avez trouvé un bug, venez nous rejoindre sur les forums anglophones .
-
WordPress possède une API d'extension robuste, qui permet d'étendre les possibilités de son code de manière simple. Si vous êtes un développeur intéressé par son utilisation, rendez-vous sur la documentation des extensions sur le Codex. Vous ne devriez pas avoir à modifier une partie du code original.
-
-
-
Faites connaître WordPress !
-
WordPress ne possède pas une kyrielle de millions de dollars pour s'offrir une campagne marketing, ni de célèbres sponsors, mais nous avons bien mieux : VOUS. Si vous appréciez WordPress, n'hésitez pas à en parler à votre entourage, vos amis, en aidant d'autres personnes ayant un niveau inférieur au vôtre, ou encore écrire un article faisant référence à notre travail.
-
-
WordPress est la reprise officielle de b2/cafélog, provenant de Michel V. Le travail a continué d'être assuré par les développeurs WordPress. Si vous voulez apporter votre soutien à WordPress, n'hésitez pas à faire un don.
-
-
Licence
-
WordPress est un logiciel libre, mis à disposition sous les termes de la licence GPL version 2, ou de toute version suivante, au choix (voir license.txt (en anglais)).
-
-
-
\ No newline at end of file
diff --git a/spec/samples/wpscan/wp_target/xmlrpc.php b/spec/samples/wpscan/wp_target/xmlrpc.php
deleted file mode 100644
index 3f908866..00000000
--- a/spec/samples/wpscan/wp_target/xmlrpc.php
+++ /dev/null
@@ -1 +0,0 @@
-XML-RPC server accepts POST requests only.
\ No newline at end of file
diff --git a/spec/samples/wpscan/wpscan_options/wordlist.txt b/spec/samples/wpscan/wpscan_options/wordlist.txt
deleted file mode 100644
index 3f97879f..00000000
--- a/spec/samples/wpscan/wpscan_options/wordlist.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-admin
-1234
-root
-toor
diff --git a/spec/shared_examples/browser/actions.rb b/spec/shared_examples/browser/actions.rb
deleted file mode 100644
index 376b91e6..00000000
--- a/spec/shared_examples/browser/actions.rb
+++ /dev/null
@@ -1,60 +0,0 @@
-# encoding: UTF-8
-
-shared_examples 'Browser::Actions' do
-
- describe '#post' do
- it 'returns a Typhoeus::Response wth body = "Welcome Master" if login=master&password=itsme!' do
- url = 'http://example.com/'
-
- stub_request(:post, url).with(body: { login: 'master', password: 'itsme!' }).
- to_return(status: 200, body: 'Welcome Master')
-
- response = Browser.post(
- url,
- body: 'login=master&password=itsme!'
- #body: { login: 'master', password: 'hello' } # It's should be this line, but it fails
- )
-
- expect(response).to be_a Typhoeus::Response
- expect(response.body).to eq 'Welcome Master'
- end
- end
-
- describe '#get' do
- it "returns a Typhoeus::Response with body = 'Hello World !'" do
- url = 'http://example.com/'
-
- stub_request(:get, url).
- to_return(status: 200, body: 'Hello World !')
-
- response = Browser.get(url)
-
- expect(response).to be_a Typhoeus::Response
- expect(response.body).to eq 'Hello World !'
- end
- end
-
- describe '#get_and_follow_location' do
- # Typhoeus does not follow the location with rspec
- # See https://github.com/typhoeus/typhoeus/issues/279
-
- #context 'whitout max_redirects params' do
- # context 'when multiples redirection' do
- # it 'returns the last redirection response' do
- # url = 'http://target.com'
- # first_redirection = 'www.first-redirection.com'
- # last_redirection = 'last-redirection.com'
-
- # stub_request(:get, url).to_return(status: 301, headers: { location: first_redirection })
- # stub_request(:get, first_redirection).to_return(status: 301, headers: { location: last_redirection })
- # stub_request(:get, last_redirection).to_return(status: 200, body: 'Hello World!')
-
- # response = Browser.get_and_follow_location(url)
-
- # response.body.should === 'Hellow World!'
- # end
- # end
- #end
- end
-
-end
diff --git a/spec/shared_examples/browser/options.rb b/spec/shared_examples/browser/options.rb
deleted file mode 100644
index 010e0991..00000000
--- a/spec/shared_examples/browser/options.rb
+++ /dev/null
@@ -1,199 +0,0 @@
-# encoding: UTF-8
-
-shared_examples 'Browser::Options' do
-
- describe '#basic_auth=' do
- let(:exception) { /^Invalid basic authentication format, "login:password" or "Basic base_64_encoded" expected. Your input: .+$/ }
-
- after do
- if @expected
- browser.basic_auth = @auth
- expect(browser.basic_auth).to eq @expected
- else
- expect { browser.basic_auth = @auth }.to raise_error(RuntimeError, exception)
- end
- end
-
- context 'when invalid format' do
- it 'raises an error' do
- @auth = 'invalid'
- end
- end
-
- context 'when login:password' do
- it 'sets the basic auth' do
- @auth = 'admin:weakpass'
- @expected = 'Basic YWRtaW46d2Vha3Bhc3M='
- end
- end
-
- context 'when Basic base_64_encoded' do
- context 'when invalid base_64_encoded' do
- it 'raises an error' do
- @auth = 'Basic '
- end
- end
-
- it 'sets the basic auth' do
- @auth = 'Basic dXNlcm5hbWU6dGhlYmlncGFzc3dvcmRzb3dlYWs='
- @expected = @auth
- end
- end
- end
-
- describe '#max_threads= & #max_threads' do
- let(:exception) { 'max_threads must be an Integer > 0' }
-
- after do
- if @expected
- browser.max_threads = @max_threads
- expect(browser.max_threads).to eq @expected
- else
- expect { browser.max_threads = @max_threads }.to raise_error(exception)
- end
- end
-
- context 'when the argument is not an Integer > 0' do
- it 'raises an error' do
- @max_thrads = nil
- end
-
- it 'raises an error' do
- @max_threads = -3
- end
- end
-
- context 'when the argument is an Integer' do
- it 'returns the @max_threads' do
- @max_threads = 10
- @expected = 10
- end
- end
- end
-
- describe 'proxy=' do
- let(:exception) { 'Invalid proxy format. Should be [protocol://]host:port.' }
-
- after do
- if @expected
- browser.proxy = @proxy
- expect(browser.proxy).to eq @expected
- else
- expect { browser.proxy = @proxy }.to raise_error(exception)
- end
- end
-
- context 'when invalid format' do
- it 'raises an error' do
- @proxy = 'yolo'
- end
- end
-
- context 'when valid format' do
- @proxy = '127.0.0.1:9050'
- @expected = @proxy
- end
- end
-
- describe 'proxy_auth=' do
- let(:exception) { 'Invalid proxy auth format, expected username:password or {proxy_username: username, proxy_password: password}' }
-
- after :each do
- if @expected
- browser.proxy_auth = @proxy_auth
- expect(browser.proxy_auth).to be === @expected
- else
- expect { browser.proxy_auth = @proxy_auth }.to raise_error
- end
- end
-
- context 'when the auth supplied is' do
- context 'not a String or a Hash' do
- it 'raises an error' do
- @proxy_auth = 10
- end
- end
-
- context 'a String with' do
- context 'invalid format' do
- it 'raises an error' do
- @proxy_auth = 'invaludauthformat'
- end
- end
-
- context 'valid format' do
- it 'sets the auth' do
- @proxy_auth = 'username:passwd'
- @expected = @proxy_auth
- end
- end
- end
-
- context 'a Hash with' do
- context 'only :proxy_username' do
- it 'raises an error' do
- @proxy_auth = { proxy_username: 'username' }
- end
- end
-
- context 'only :proxy_password' do
- it 'raises an error' do
- @proxy_auth = { proxy_password: 'hello' }
- end
- end
-
- context ':proxy_username and :proxy_password' do
- it 'sets the auth' do
- @proxy_auth = { proxy_username: 'user', proxy_password: 'pass' }
- @expected = 'user:pass'
- end
- end
- end
- end
- end
-
- describe '#override_config' do
- after do
- browser.send(:override_config, override_options)
- end
-
- let(:config) { JSON.parse(File.read(browser.config_file)) }
-
- context 'when an option value is nil' do
- let(:override_options) { { max_threads: nil } }
-
- it 'does not set it' do
- expect(browser).not_to receive(:max_threads=)
- end
- end
-
- context 'when an option is no allowed' do
- let(:override_options) { { not_allowed: 'owned' } }
-
- it 'does not set it' do
- expect(browser).not_to receive(:not_allowed=)
- end
- end
-
- context 'when valid option' do
- let(:override_options) { { max_threads: 30 } }
-
- it 'sets it' do
- expect(browser).to receive(:max_threads=).with(30)
- end
- end
-
- context 'when multiple options' do
- let(:override_options) {
- { max_threads: 10, not_allowed: 'owned', proxy: 'host:port' }
- }
-
- it 'sets @max_threads, @proxy' do
- expect(browser).not_to receive(:not_allowed=)
- expect(browser).to receive(:max_threads=).with(10)
- expect(browser).to receive(:proxy=).with('host:port')
- end
- end
- end
-
-end
diff --git a/spec/shared_examples/web_site/humans_txt.rb b/spec/shared_examples/web_site/humans_txt.rb
deleted file mode 100644
index b54d1ed5..00000000
--- a/spec/shared_examples/web_site/humans_txt.rb
+++ /dev/null
@@ -1,108 +0,0 @@
-# encoding: UTF-8
-
-shared_examples 'WebSite::HumansTxt' do
- let(:known_dirs) { WebSite::HumansTxt.known_dirs }
-
- describe '#humans_url' do
- it 'returns the correct url' do
- expect(web_site.humans_url).to eql 'http://example.localhost/humans.txt'
- end
- end
-
- describe '#has_humans?' do
- it 'returns true' do
- stub_request(:get, web_site.humans_url).to_return(status: 200)
- expect(web_site.has_humans?).to be_truthy
- end
-
- it 'returns false' do
- stub_request(:get, web_site.humans_url).to_return(status: 404)
- expect(web_site.has_humans?).to be_falsey
- end
- end
-
- describe '#parse_humans_txt' do
-
- context 'installed in root' do
- after :each do
- stub_request_to_fixture(url: web_site.humans_url, fixture: @fixture)
- humans = web_site.parse_humans_txt
- expect(humans).to match_array @expected
- end
-
- it 'returns an empty Array (empty humans.txt)' do
- @fixture = fixtures_dir + '/humans_txt/empty_humans.txt'
- @expected = []
- end
-
- it 'returns an empty Array (invalid humans.txt)' do
- @fixture = fixtures_dir + '/humans_txt/invalid_humans.txt'
- @expected = []
- end
-
- it 'returns some urls and some strings' do
- @fixture = fixtures_dir + '/humans_txt/invalid_humans_2.txt'
- @expected = %w(
- /ÖÜ()=?
- http://10.0.0.0/wp-includes/
- http://example.localhost/asdf/
- wooooza
- )
- end
-
- it 'returns an Array of urls (valid humans.txt)' do
- @fixture = fixtures_dir + '/humans_txt/humans.txt'
- @expected = %w(
- http://example.localhost/wordpress/admin/
- http://example.localhost/wordpress/wp-admin/
- http://example.localhost/wordpress/secret/
- http://example.localhost/Wordpress/wp-admin/
- http://example.localhost/wp-admin/tralling-space/
- http://example.localhost/asdf/
- )
- end
-
- it 'removes duplicate entries from humans.txt test 1' do
- @fixture = fixtures_dir + '/humans_txt/humans_duplicate_1.txt'
- @expected = %w(
- http://example.localhost/wordpress/
- http://example.localhost/wordpress/admin/
- http://example.localhost/wordpress/wp-admin/
- http://example.localhost/wordpress/secret/
- http://example.localhost/Wordpress/wp-admin/
- http://example.localhost/wp-admin/tralling-space/
- http://example.localhost/asdf/
- )
- end
-
- it 'removes duplicate entries from humans.txt test 2' do
- @fixture = fixtures_dir + '/humans_txt/humans_duplicate_2.txt'
- @expected = nil
- end
- end
-
- context 'installed in sub directory' do
- it 'returns an Array of urls (valid humans.txt, WP installed in subdir)' do
- web_site_sub = WebSite.new('http://example.localhost/wordpress/')
- fixture = fixtures_dir + '/humans_txt/humans.txt'
- expected = %w(
- http://example.localhost/wordpress/admin/
- http://example.localhost/wordpress/secret/
- http://example.localhost/Wordpress/wp-admin/
- http://example.localhost/wp-admin/tralling-space/
- http://example.localhost/asdf/
- )
- stub_request_to_fixture(url: web_site_sub.humans_url, fixture: fixture)
- humans = web_site_sub.parse_humans_txt
- expect(humans).to match_array expected
- end
- end
- end
-
- describe '#known_dirs' do
- it 'does not contain duplicates' do
- expect(known_dirs.flatten.uniq.length).to eq known_dirs.length
- end
- end
-
-end
diff --git a/spec/shared_examples/web_site/interesting_headers.rb b/spec/shared_examples/web_site/interesting_headers.rb
deleted file mode 100644
index 2ad92586..00000000
--- a/spec/shared_examples/web_site/interesting_headers.rb
+++ /dev/null
@@ -1,35 +0,0 @@
-# encoding: UTF-8
-
-shared_examples 'WebSite::InterestingHeaders' do
-
- let(:known_headers) { WebSite::InterestingHeaders.known_headers }
-
- describe '#interesting_headers' do
-
- it 'returns MyTestHeader' do
- stub_request(:head, web_site.url).
- to_return(status: 200, headers: { 'Mytestheader' => 'Mytestheadervalue' })
- expect(web_site.interesting_headers).to match_array [ [ 'MYTESTHEADER', 'Mytestheadervalue' ] ]
- end
-
- it 'removes known headers' do
- stub_request(:head, web_site.url).
- to_return(status: 200, headers: { 'Location' => 'a', 'Connection' => 'Close' })
- expect(web_site.interesting_headers).to be_empty
- end
-
- it 'returns nothing' do
- stub_request(:head, web_site.url).
- to_return(status: 200, headers: { })
- expect(web_site.interesting_headers).to be_empty
- end
-
- end
-
- describe '#known_headers' do
- it 'does not contain duplicates' do
- expect(known_headers.flatten.uniq.length).to eq known_headers.length
- end
- end
-
-end
diff --git a/spec/shared_examples/web_site/robots_txt.rb b/spec/shared_examples/web_site/robots_txt.rb
deleted file mode 100644
index 252762ab..00000000
--- a/spec/shared_examples/web_site/robots_txt.rb
+++ /dev/null
@@ -1,108 +0,0 @@
-# encoding: UTF-8
-
-shared_examples 'WebSite::RobotsTxt' do
- let(:known_dirs) { WebSite::RobotsTxt.known_dirs }
-
- describe '#robots_url' do
- it 'returns the correct url' do
- expect(web_site.robots_url).to eql 'http://example.localhost/robots.txt'
- end
- end
-
- describe '#has_robots?' do
- it 'returns true' do
- stub_request(:get, web_site.robots_url).to_return(status: 200)
- expect(web_site.has_robots?).to be_truthy
- end
-
- it 'returns false' do
- stub_request(:get, web_site.robots_url).to_return(status: 404)
- expect(web_site.has_robots?).to be_falsey
- end
- end
-
- describe '#parse_robots_txt' do
-
- context 'installed in root' do
- after :each do
- stub_request_to_fixture(url: web_site.robots_url, fixture: @fixture)
- robots = web_site.parse_robots_txt
- expect(robots).to match_array @expected
- end
-
- it 'returns an empty Array (empty robots.txt)' do
- @fixture = fixtures_dir + '/robots_txt/empty_robots.txt'
- @expected = []
- end
-
- it 'returns an empty Array (invalid robots.txt)' do
- @fixture = fixtures_dir + '/robots_txt/invalid_robots.txt'
- @expected = []
- end
-
- it 'returns some urls and some strings' do
- @fixture = fixtures_dir + '/robots_txt/invalid_robots_2.txt'
- @expected = %w(
- /ÖÜ()=?
- http://10.0.0.0/wp-includes/
- http://example.localhost/asdf/
- wooooza
- )
- end
-
- it 'returns an Array of urls (valid robots.txt)' do
- @fixture = fixtures_dir + '/robots_txt/robots.txt'
- @expected = %w(
- http://example.localhost/wordpress/admin/
- http://example.localhost/wordpress/wp-admin/
- http://example.localhost/wordpress/secret/
- http://example.localhost/Wordpress/wp-admin/
- http://example.localhost/wp-admin/tralling-space/
- http://example.localhost/asdf/
- )
- end
-
- it 'removes duplicate entries from robots.txt test 1' do
- @fixture = fixtures_dir + '/robots_txt/robots_duplicate_1.txt'
- @expected = %w(
- http://example.localhost/wordpress/
- http://example.localhost/wordpress/admin/
- http://example.localhost/wordpress/wp-admin/
- http://example.localhost/wordpress/secret/
- http://example.localhost/Wordpress/wp-admin/
- http://example.localhost/wp-admin/tralling-space/
- http://example.localhost/asdf/
- )
- end
-
- it 'removes duplicate entries from robots.txt test 2' do
- @fixture = fixtures_dir + '/robots_txt/robots_duplicate_2.txt'
- @expected = nil
- end
- end
-
- context 'installed in sub directory' do
- it 'returns an Array of urls (valid robots.txt, WP installed in subdir)' do
- web_site_sub = WebSite.new('http://example.localhost/wordpress/')
- fixture = fixtures_dir + '/robots_txt/robots.txt'
- expected = %w(
- http://example.localhost/wordpress/admin/
- http://example.localhost/wordpress/secret/
- http://example.localhost/Wordpress/wp-admin/
- http://example.localhost/wp-admin/tralling-space/
- http://example.localhost/asdf/
- )
- stub_request_to_fixture(url: web_site_sub.robots_url, fixture: fixture)
- robots = web_site_sub.parse_robots_txt
- expect(robots).to match_array expected
- end
- end
- end
-
- describe '#known_dirs' do
- it 'does not contain duplicates' do
- expect(known_dirs.flatten.uniq.length).to eq known_dirs.length
- end
- end
-
-end
diff --git a/spec/shared_examples/web_site/security_txt.rb b/spec/shared_examples/web_site/security_txt.rb
deleted file mode 100644
index 3bca86dd..00000000
--- a/spec/shared_examples/web_site/security_txt.rb
+++ /dev/null
@@ -1,108 +0,0 @@
-# encoding: UTF-8
-
-shared_examples 'WebSite::SecurityTxt' do
- let(:known_dirs) { WebSite::SecurityTxt.known_dirs }
-
- describe '#security_url' do
- it 'returns the correct url' do
- expect(web_site.security_url).to eql 'http://example.localhost/security.txt'
- end
- end
-
- describe '#has_security?' do
- it 'returns true' do
- stub_request(:get, web_site.security_url).to_return(status: 200)
- expect(web_site.has_security?).to be_truthy
- end
-
- it 'returns false' do
- stub_request(:get, web_site.security_url).to_return(status: 404)
- expect(web_site.has_security?).to be_falsey
- end
- end
-
- describe '#parse_security_txt' do
-
- context 'installed in root' do
- after :each do
- stub_request_to_fixture(url: web_site.security_url, fixture: @fixture)
- security = web_site.parse_security_txt
- expect(security).to match_array @expected
- end
-
- it 'returns an empty Array (empty security.txt)' do
- @fixture = fixtures_dir + '/security_txt/empty_security.txt'
- @expected = []
- end
-
- it 'returns an empty Array (invalid security.txt)' do
- @fixture = fixtures_dir + '/security_txt/invalid_security.txt'
- @expected = []
- end
-
- it 'returns some urls and some strings' do
- @fixture = fixtures_dir + '/security_txt/invalid_security_2.txt'
- @expected = %w(
- /ÖÜ()=?
- http://10.0.0.0/wp-includes/
- http://example.localhost/asdf/
- wooooza
- )
- end
-
- it 'returns an Array of urls (valid security.txt)' do
- @fixture = fixtures_dir + '/security_txt/security.txt'
- @expected = %w(
- http://example.localhost/wordpress/admin/
- http://example.localhost/wordpress/wp-admin/
- http://example.localhost/wordpress/secret/
- http://example.localhost/Wordpress/wp-admin/
- http://example.localhost/wp-admin/tralling-space/
- http://example.localhost/asdf/
- )
- end
-
- it 'removes duplicate entries from security.txt test 1' do
- @fixture = fixtures_dir + '/security_txt/security_duplicate_1.txt'
- @expected = %w(
- http://example.localhost/wordpress/
- http://example.localhost/wordpress/admin/
- http://example.localhost/wordpress/wp-admin/
- http://example.localhost/wordpress/secret/
- http://example.localhost/Wordpress/wp-admin/
- http://example.localhost/wp-admin/tralling-space/
- http://example.localhost/asdf/
- )
- end
-
- it 'removes duplicate entries from security.txt test 2' do
- @fixture = fixtures_dir + '/security_txt/security_duplicate_2.txt'
- @expected = nil
- end
- end
-
- context 'installed in sub directory' do
- it 'returns an Array of urls (valid security.txt, WP installed in subdir)' do
- web_site_sub = WebSite.new('http://example.localhost/wordpress/')
- fixture = fixtures_dir + '/security_txt/security.txt'
- expected = %w(
- http://example.localhost/wordpress/admin/
- http://example.localhost/wordpress/secret/
- http://example.localhost/Wordpress/wp-admin/
- http://example.localhost/wp-admin/tralling-space/
- http://example.localhost/asdf/
- )
- stub_request_to_fixture(url: web_site_sub.security_url, fixture: fixture)
- security = web_site_sub.parse_security_txt
- expect(security).to match_array expected
- end
- end
- end
-
- describe '#known_dirs' do
- it 'does not contain duplicates' do
- expect(known_dirs.flatten.uniq.length).to eq known_dirs.length
- end
- end
-
-end
diff --git a/spec/shared_examples/wp_item_existable.rb b/spec/shared_examples/wp_item_existable.rb
deleted file mode 100644
index e1f1c897..00000000
--- a/spec/shared_examples/wp_item_existable.rb
+++ /dev/null
@@ -1,94 +0,0 @@
-# encoding: UTF-8
-
-shared_examples 'WpItem::Existable' do
- let(:fixtures_dir) { MODELS_FIXTURES + '/wp_item/existable' }
-
- describe '#exists?' do
- context 'when the response is supplied' do
- let(:response) { Typhoeus::Response.new }
-
- it 'does not create a request' do
- expect(Browser).not_to receive(:get)
- allow(subject).to receive(:exists_from_response?).and_return(true)
-
- expect(subject.exists?({}, response)).to be_truthy
- end
- end
-
- context 'when the response is not supplied' do
- it 'creates a request' do
- expect(Browser).to receive(:get)
- allow(subject).to receive(:exists_from_response?).and_return(false)
-
- expect(subject.exists?).to be_falsey
- end
- end
- end
-
- describe '#exists_from_response?' do
- let(:exists_options) { {} }
- let(:body) { 'hello world!' }
-
- after do
- response = Typhoeus::Response.new(@resp_opt)
- expect(subject.send(:exists_from_response?, response, exists_options)).to eq @expected
- end
-
- context 'when invalid response.code' do
- it 'returns false' do
- @resp_opt = { code: 500 }
- @expected = false
- end
- end
-
- context 'when the body hash = homepage_hash or error_404_hash' do
- let(:exists_options) { { homepage_hash: Digest::MD5.hexdigest(body) } }
-
- it 'returns false' do
- @resp_opt = { code: 200, body: body }
- @expected = false
- end
- end
-
- context 'w/o exclude_content' do
- [200, 401, 403].each do |code|
- it "returns true on #{code}" do
- @resp_opt = { code: code, body: '' }
- @expected = true
- end
- end
- end
-
- context 'with exclude_content' do
- let(:exists_options) { { exclude_content: %r{world!} } }
-
- context 'when the body match' do
- it 'returns false' do
- @resp_opt = { code: 200, body: body }
- @expected = false
- end
- end
-
- context 'when the body does not match' do
- it 'returns true' do
- @resp_opt = { code: 200, body: 'hello dude!' }
- @expected = true
- end
- end
- end
-
- context 'when it\'s a redirect to the homepage' do
- context 'and the cache generation time is in comment tag' do
- let(:body) { File.new(fixtures_dir + '/cache_generation.html').read }
- let(:uncommented_body) { body.gsub(//m, '') }
- let(:exists_options) { { homepage_hash: Digest::MD5.hexdigest(uncommented_body) } }
-
- it 'returns false' do
- @resp_opt = { code: 200, body: body }
- @expected = false
- end
- end
- end
- end
-
-end
diff --git a/spec/shared_examples/wp_item_findable_found_from.rb b/spec/shared_examples/wp_item_findable_found_from.rb
deleted file mode 100644
index 14ea7388..00000000
--- a/spec/shared_examples/wp_item_findable_found_from.rb
+++ /dev/null
@@ -1,17 +0,0 @@
-# encoding: UTF-8
-
-shared_examples 'WpItem::Findable#Found_From=' do
-
- describe '#found_from=' do
- after do
- subject.found_from = @method
- expect(subject.found_from).to eq @expected
- end
-
- it 'replaces _ by space' do
- @method = 'find_from_some_detection_method'
- @expected = 'some detection method'
- end
- end
-
-end
diff --git a/spec/shared_examples/wp_item_infos.rb b/spec/shared_examples/wp_item_infos.rb
deleted file mode 100644
index dd83ca89..00000000
--- a/spec/shared_examples/wp_item_infos.rb
+++ /dev/null
@@ -1,142 +0,0 @@
-# encoding: UTF-8
-
-shared_examples 'WpItem::Infos' do
-
- # 2 expected urls have to be set in the described class (or subject)
- # e.g :
- # let(:changelog_url) { }
- # let(:error_log_url) { }
-
- describe '#readme_url' do
- after { expect(subject.readme_url).to eql @expected }
-
- it 'returns nil' do
- stub_request(:get, /.*/).to_return(status: 404)
- @expected = nil
- end
-
- context 'when the file exists' do
- %w{readme.txt readme.md}.each do |readme|
- it 'returns the correct url' do
- url = uri.merge(readme).to_s
- @expected = url
-
- stub_request(:get, %r{^(?!#{url})}).to_return(status: 404)
- stub_request(:get, url).to_return(status: 200)
- end
- end
- end
- end
-
- describe '#has_readme?' do
- after do
- allow(subject).to receive_messages(readme_url: @stub)
- expect(subject.has_readme?).to eql @expected
- end
-
- context 'when readme_url is nil'
- it 'returns false' do
- @stub = nil
- @expected = false
- end
-
- context 'when readme_url is not nil'
- it 'returns true' do
- @stub = uri.merge('readme.txt').to_s
- @expected = true
- end
- end
-
- describe '#changelog_url' do
- after { expect(subject.changelog_url).to eql @expected }
-
- it 'returns nil' do
- stub_request(:get, /.*/).to_return(status: 404)
- @expected = nil
- end
-
- context 'when the file exists' do
- %w{changelog.txt CHANGELOG.md}.each do |changelog|
- it 'returns the correct url' do
- url = uri.merge(changelog).to_s
- @expected = url
-
- stub_request(:get, %r{^(?!#{url})}).to_return(status: 404)
- stub_request(:get, url).to_return(status: 200)
- end
- end
- end
- end
-
- describe '#has_changelog?' do
- after do
- allow(subject).to receive_messages(changelog_url: @stub)
- expect(subject.has_changelog?).to eql @expected
- end
-
- context 'when changelog_url is nil'
- it 'returns false' do
- @stub = nil
- @expected = false
- end
-
- context 'when changelog_url is not nil'
- it 'returns true' do
- @stub = uri.merge('changelog.txt').to_s
- @expected = true
- end
- end
-
- describe '#has_directory_listing?' do
- after do
- stub_request(:get, subject.uri.to_s).to_return(@stub_return)
- expect(subject.has_directory_listing?).to eql @expected
- end
-
- context 'when the body contains Index of' do
- it 'returns true' do
- @stub_return = { status: 200, body: 'Index of asdf' }
- @expected = true
- end
- end
-
- it 'returns false otherwise' do
- @stub_return = { status: 200, body: 'My Wordpress Site' }
- @expected = false
- end
-
- it 'returns false on a 404' do
- @stub_return = { status: 404 }
- @expected = false
- end
- end
-
- describe '#error_log_url' do
- it 'returns the correct url' do
- expect(subject.error_log_url).to eq error_log_url
- end
- end
-
- describe '#has_error_log?' do
- after do
- stub_request(:get, subject.error_log_url).to_return(@stub_return)
- expect(subject.has_error_log?).to eql @expected
- end
-
- it 'returns true if the pattern is detected' do
- @stub_return = { status: 200, body: File.new(MODELS_FIXTURES + '/wp_item/error_log') }
- @expected = true
- end
-
- it 'returns false otherwise' do
- @stub_return = { status: 200, body: 'yolo' }
- @expected = false
- end
-
- it 'returns false on a 404' do
- @stub_return = { status: 404 }
- @expected = false
- end
- end
-
-end
diff --git a/spec/shared_examples/wp_item_versionable.rb b/spec/shared_examples/wp_item_versionable.rb
deleted file mode 100644
index d488231d..00000000
--- a/spec/shared_examples/wp_item_versionable.rb
+++ /dev/null
@@ -1,175 +0,0 @@
-# encoding: UTF-8
-
-shared_examples 'WpItem::Versionable' do
-
- describe '#version' do
- let(:fixtures_dir) { MODELS_FIXTURES + '/wp_item/versionable' }
- let(:readme_url) { subject.uri.merge('readme.txt').to_s }
-
- context 'when the version is already set' do
- it 'returns it' do
- subject.version = '1.2'
- expect(subject.version).to eq '1.2'
- end
- end
-
- context 'otherwise' do
- after do
- stub_request_to_fixture(url: readme_url, fixture: fixtures_dir + @file)
- expect(subject.version).to eq @expected
- end
-
- context 'when version is "trunk"' do
- it 'returns nil' do
- @file = '/trunk-version.txt'
- @expected = nil
- end
- end
-
- context 'when the version is valid' do
- context 'when leaked from the stable tag' do
- it 'returns it' do
- @file = '/simple-login-lockdown-0.4.txt'
- @expected = '0.4'
- end
- end
-
- context 'when leaked from the version' do
- it 'returns it' do
- @file = '/wp-photo-plus-5.1.15.txt'
- @expected = '5.1.15'
- end
- end
-
- context 'when version is in a release date format' do
- it 'detects and returns it' do
- @file = '/s2member.txt'
- @expected = '141007'
- end
- end
-
- context 'when version contains letters' do
- it 'returns it' do
- @file = '/beta1.txt'
- @expected = '2.0.0-beta1'
- end
- end
-
- context 'when parsing the changelog for version numbers' do
- it 'returns it' do
- @file = '/changelog_version.txt'
- @expected = '1.3'
- end
- end
-
- context 'when parsing the changelog for version numbers' do
- it 'returns it' do
- @file = '/wp_polls.txt'
- @expected = '2.64'
- end
- end
-
- context 'when parsing the changelog for version numbers' do
- it 'returns it' do
- @file = '/nextgen_gallery.txt'
- @expected = '2.0.66.33'
- end
- end
-
- context 'when parsing the changelog for version numbers' do
- it 'returns it' do
- @file = '/wp_user_frontend.txt'
- @expected = '1.2.3'
- end
- end
-
- context 'when parsing the changelog for version numbers' do
- it 'returns it' do
- @file = '/my_calendar.txt'
- @expected = '2.1.5'
- end
- end
-
- context 'when parsing the changelog for version numbers' do
- it 'returns it' do
- @file = '/nextgen_gallery_2.txt'
- @expected = '1.9.13'
- end
- end
-
- context 'when parsing the changelog for version numbers' do
- it 'returns it' do
- @file = '/advanced-most-recent-posts-mod.txt'
- @expected = '1.6.5.2'
- end
- end
-
- context 'when parsing the changelog for version numbers' do
- it 'returns it' do
- @file = '/a-lead-capture-contact-form-and-tab-button-by-awebvoicecom.txt'
- @expected = '3.1'
- end
- end
-
- context 'when parsing the changelog for version numbers' do
- it 'returns it' do
- @file = '/aa-health-calculator.txt'
- @expected = nil
- end
- end
-
- context 'when parsing the changelog for version numbers' do
- it 'returns it' do
- @file = '/all-in-one-facebook.txt'
- @expected = nil
- end
- end
-
- context 'when parsing the changelog for version numbers' do
- it 'returns it' do
- @file = '/backup-scheduler.txt'
- @expected = '1.5.9'
- end
- end
-
- context 'when parsing the changelog for version numbers' do
- it 'returns it' do
- @file = '/blog-reordering.txt'
- @expected = nil
- end
- end
-
- # context 'when parsing the changelog for version numbers with dates' do
- # it 'returns it' do
- # @file = '/wp-maintenance-mode.txt'
- # @expected = '2.0.9'
- # end
- # end
- end
- end
- end
-
- describe '#to_s' do
- after do
- allow(subject).to receive(:version).and_return(@version)
- subject.name = 'some-name'
-
- expect(subject.to_s).to eq @expected
- end
-
- context 'when the version does not exist' do
- it 'returns only the name' do
- @version = nil
- @expected = 'some-name'
- end
- end
-
- context 'when the version exists' do
- it 'returns the name and the version' do
- @version = '1.3'
- @expected = 'some-name - v1.3'
- end
- end
- end
-
-end
diff --git a/spec/shared_examples/wp_item_vulnerable.rb b/spec/shared_examples/wp_item_vulnerable.rb
deleted file mode 100644
index d582ac5e..00000000
--- a/spec/shared_examples/wp_item_vulnerable.rb
+++ /dev/null
@@ -1,109 +0,0 @@
-# encoding: UTF-8
-
-shared_examples 'WpItem::Vulnerable' do
-
- # 2 variables have to be set in the described class or subject:
- # let(:db_file) { }
- # let(:expected_vulns) { } The expected Vulnerabilities when using db_file and vulns_xpath
- #
- # 1 variable is optional, used if supplied, otherwise subject.vulns_xpath is used
- # let(:vulns_xpath) { }
-
- describe '#vulnerabilities' do
- let(:empty_file) { MODELS_FIXTURES + '/wp_item/vulnerable/empty.json' }
-
- before do
- stub_request(:get, /.*\/readme\.(?:txt|md)/i)
- stub_request(:get, /.*\/style\.css/i)
- end
-
- after do
- subject.db_file = @db_file
- subject.identifier = identifier if defined?(identifier)
-
- result = subject.vulnerabilities
- expect(result).to be_a Vulnerabilities
- expect(result).to eq @expected
- end
-
- context 'when the db_file is empty' do
- it 'returns an empty Vulnerabilities' do
- @db_file = empty_file
- @expected = Vulnerabilities.new
- end
- end
-
- it 'returns the expected vulnerabilities' do
- @db_file = db_file
- @expected = expected_vulns
- end
- end
-
- describe '#vulnerable?' do
- after do
- allow(subject).to receive(:vulnerabilities).and_return(@stub)
- expect(subject.vulnerable?).to eq @expected
- end
-
- it 'returns false when no vulnerabilities' do
- @stub = []
- @expected = false
- end
-
- it 'returns true when vulnerabilities' do
- @stub = ['not empty']
- @expected = true
- end
- end
-
- describe '#vulnerable_to?' do
- let(:version_orig) { '1.5.6' }
- let(:version_newer) { '1.6' }
- let(:version_older) { '1.0' }
- let(:newer) { Vulnerability.new('Newer', 'XSS', { :url => ['http://ref.com'] }, version_newer) }
- let(:older) { Vulnerability.new('Older', 'XSS', { :url => ['http://ref.com'] }, version_older) }
- let(:same) { Vulnerability.new('Same', 'XSS', { :url => ['http://ref.com'] }, version_orig) }
- let(:no_fixed_info) { Vulnerability.new('Same', 'XSS', { :url => ['http://ref.com'] }, nil) }
-
- before do
- stub_request(:get, /.*\/readme\.txt/i).to_return(status: 200, body: "Stable Tag: #{version_orig}")
- stub_request(:get, /.*\/style\.css/i).to_return(status: 200, body: "Version: #{version_orig}")
- end
-
- context 'check basic version comparing' do
- it 'returns true because checked version is newer' do
- expect(subject.version).to eq version_orig
- expect(subject.vulnerable_to?(newer)).to be_truthy
- end
-
- it 'returns false because checked version is older' do
- expect(subject.version).to eq version_orig
- expect(subject.vulnerable_to?(older)).to be_falsey
- end
-
- it 'returns false because checked version is the fixed version' do
- expect(subject.version).to eq version_orig
- expect(subject.vulnerable_to?(same)).to be_falsey
- end
-
- it 'returns true because no fixed_in version is provided' do
- expect(subject.version).to eq version_orig
- expect(subject.vulnerable_to?(no_fixed_info)).to be_truthy
- end
- end
-
- context 'no version found in wp_item' do
- before do
- stub_request(:get, /.*\/readme\.(?:txt|md)/i).to_return(status: 404)
- stub_request(:get, /.*\/style\.css/i).to_return(status: 404)
- end
-
- it 'returns true because no version can be detected' do
- expect(subject.vulnerable_to?(newer)).to be_truthy
- expect(subject.vulnerable_to?(older)).to be_truthy
- expect(subject.vulnerable_to?(same)).to be_truthy
- end
- end
- end
-
-end
diff --git a/spec/shared_examples/wp_items_detectable.rb b/spec/shared_examples/wp_items_detectable.rb
deleted file mode 100644
index 883f4a80..00000000
--- a/spec/shared_examples/wp_items_detectable.rb
+++ /dev/null
@@ -1,160 +0,0 @@
-# encoding: UTF-8
-
-require WPSCAN_LIB_DIR + '/wp_target'
-
-shared_examples 'WpItems::Detectable' do
- let(:vulns_file) { fixtures_dir + '/vulns.json' }
- let(:targets_items_file) { fixtures_dir + '/targets.txt' }
- let(:wp_content_dir) { 'wp-content' }
- let(:wp_plugins_dir) { wp_content_dir + '/plugins' }
- let(:wp_target) { WpTarget.new(url, wp_content_dir: wp_content_dir, wp_plugins_dir: wp_plugins_dir) }
- let(:url) { 'http://example.com/' }
- let(:uri) { URI.parse(url) }
- let(:empty_file) { SPEC_FIXTURES_DIR + '/empty-file' }
-
- before do
- if class_vulns_file = subject.vulns_file
- expect(class_vulns_file).to eq expected[:vulns_file]
- end
-
- allow(subject).to receive(:vulns_file).and_return(vulns_file)
-
- unless subject.item_xpath
- allow(subject).to receive(:item_xpath).and_return('//item')
- end
- end
-
- describe '::request_params' do
- it 'returns the default params' do
- expect(subject.send(:request_params)).to eq expected[:request_params]
- end
- end
-
- describe '::item_class' do
- it 'returns the correct item class' do
- klass = subject.send(:item_class)
-
- expect(klass).to be_a Class
- expect(klass).to eq item_class
- end
- end
-
- describe '::targets_items' do
- let(:options) { { type: :all } }
-
- after do
- if @expected
- results = subject.send(:targets_items, wp_target, options)
-
- expect(results.sort.map { |i| i.name }).to eq @expected.sort.map { |i| i.name }
- end
- end
-
- context 'when :type = :vulnerable' do
- let(:options) { { type: :vulnerable } }
-
- it 'returns the expected Array of WpItem' do
- @expected = expected[:vulnerable_targets_items]
- end
- end
- end
-
- describe '::passive_detection' do
- after do
- stub_request_to_fixture(url: wp_target.url, fixture: @fixture)
-
- results = subject.passive_detection(wp_target)
-
- expect(results).to be_a subject
- expect(results.map { |i| i.name }).to eq @expected.sort.map { |i| i.name }
- end
-
- context 'when the page is empty' do
- it 'return an empty WpItems' do
- @fixture = empty_file
- @expected = subject.new
- end
- end
-
- context 'when items are present' do
- it 'returns the expected items' do
- @fixture = fixtures_dir + '/passive_detection.html'
- @expected = expected[:passive_detection]
- end
- end
- end
-
- describe '::aggressive_detection' do
- def stub_targets_dont_exist(targets)
- targets.each { |t| allow(t).to receive(:exists?).and_return(false) }
- end
-
- let(:options) { {} }
-
- after do
- stub_request(:get, /.*/).to_return(status: 404)
-
- result = subject.aggressive_detection(wp_target, options)
-
- expect(result).to be_a subject
- expect(result.sort.map { |i| i.name }).to eq @expected.sort.map { |i| i.name }
- end
-
- context 'when :type = :vulnerable' do
- let(:options) { { type: :vulnerable } }
- let(:targets) { expected[:vulnerable_targets_items] }
-
- it 'only checks and return vulnerable targets' do
- samples = targets.sample(2)
- fixed_target = samples[0]
- vulnerable_target = samples[1]
-
- stub_targets_dont_exist(targets)
-
- allow(vulnerable_target).to receive(:exists?).and_return(true)
- allow(vulnerable_target).to receive(:vulnerable?).and_return(true)
-
- allow(fixed_target).to receive(:exists?).and_return(true)
- allow(fixed_target).to receive(:vulnerable?).and_return(false)
-
- @expected = subject.new << vulnerable_target
-
- expect(subject).to receive(:targets_items).and_return(targets)
- end
-
- context 'when all targets dont exist' do
- it 'returns an empty WpItems' do
- stub_targets_dont_exist(targets)
- expect(subject).to receive(:targets_items).and_return(targets)
- @expected = subject.new
- end
- end
- end
-
- context 'when no :type = :vulnerable' do
- let(:targets) { (expected[:vulnerable_targets_items] + expected[:targets_items_from_file]).uniq { |t| t.name } }
-
- it 'checks all targets, and merge the results with passive_detection' do
- target = targets.sample
- @expected = expected[:passive_detection] << target
-
- stub_targets_dont_exist(targets)
- allow(target).to receive(:exists?).and_return(true)
-
- expect(subject).to receive(:targets_items).and_return(targets)
- expect(subject).to receive(:passive_detection).and_return(expected[:passive_detection])
- end
-
- context 'when all targets dont exist' do
- it 'returns the result from passive_detection' do
- @expected = expected[:passive_detection]
-
- stub_targets_dont_exist(targets)
- expect(subject).to receive(:targets_items).and_return(targets)
- expect(subject).to receive(:passive_detection).and_return(@expected)
- end
- end
- end
- end
-
-end
diff --git a/spec/shared_examples/wp_plugin_vulnerable.rb b/spec/shared_examples/wp_plugin_vulnerable.rb
deleted file mode 100644
index 5569f603..00000000
--- a/spec/shared_examples/wp_plugin_vulnerable.rb
+++ /dev/null
@@ -1,26 +0,0 @@
-# encoding: UTF-8
-
-shared_examples 'WpPlugin::Vulnerable' do
-
- describe '#db_file' do
- after { expect(subject.db_file).to eq @expected }
-
- context 'when :db_file is no set' do
- it 'returns the default one' do
- @expected = PLUGINS_FILE
- end
- end
-
- context 'when the :db_file is already set' do
- it 'returns it' do
- @expected = 'test.json'
- subject.db_file = @expected
- end
- end
- end
-
- describe '#identifier' do
- its(:identifier) { should eq 'plugin-name' }
- end
-
-end
diff --git a/spec/shared_examples/wp_target/wp_config_backup.rb b/spec/shared_examples/wp_target/wp_config_backup.rb
deleted file mode 100644
index 0e1502fb..00000000
--- a/spec/shared_examples/wp_target/wp_config_backup.rb
+++ /dev/null
@@ -1,61 +0,0 @@
-# encoding: UTF-8
-
-shared_examples 'WpTarget::WpConfigBackup' do
-
- let(:fixtures_dir) { SPEC_FIXTURES_WPSCAN_WP_TARGET_DIR + '/wp_config_backup' }
- let(:config_backup_files) { WpTarget::WpConfigBackup.config_backup_files }
-
- describe '#config_backup' do
-
- # set all @config_backup_files to point to a 404
- before :each do
- config_backup_files.each do |backup_file|
- file_url = wp_target.uri.merge(url_encode(backup_file)).to_s
-
- stub_request(:get, file_url).to_return(status: 404)
- end
- end
-
- it 'shoud return an empty array if no config backup is present' do
- expect(wp_target.config_backup).to be_empty
- end
-
- it 'returns an array with 1 backup file' do
- expected = []
-
- config_backup_files.sample(1).each do |backup_file|
- file_url = wp_target.uri.merge(url_encode(backup_file)).to_s
- expected << file_url
-
- stub_request_to_fixture(url: file_url, fixture: fixtures_dir + '/wp-config.php')
- end
-
- wp_config_backup = wp_target.config_backup
- expect(wp_config_backup).not_to be_empty
- expect(wp_config_backup).to be === expected
- end
-
- # Is there a way to factorise that one with the previous test ?
- it 'returns an array with 2 backup file' do
- expected = []
-
- config_backup_files.sample(2).each do |backup_file|
- file_url = wp_target.uri.merge(url_encode(backup_file)).to_s
- expected << file_url
-
- stub_request_to_fixture(url: file_url, fixture: fixtures_dir + '/wp-config.php')
- end
-
- wp_config_backup = wp_target.config_backup
- expect(wp_config_backup).not_to be_empty
- expect(wp_config_backup.sort).to be === expected.sort
- end
- end
-
- describe '#config_backup_files' do
- it 'does not contain duplicates' do
- expect(config_backup_files.flatten.uniq.length).to eq config_backup_files.length
- end
- end
-
-end
diff --git a/spec/shared_examples/wp_target/wp_custom_directories.rb b/spec/shared_examples/wp_target/wp_custom_directories.rb
deleted file mode 100644
index 514f271a..00000000
--- a/spec/shared_examples/wp_target/wp_custom_directories.rb
+++ /dev/null
@@ -1,143 +0,0 @@
-# encoding: UTF-8
-
-shared_examples 'WpTarget::WpCustomDirectories' do
-
- describe '#wp_content_dir' do
- let(:fixtures_dir) { SPEC_FIXTURES_WPSCAN_WP_TARGET_DIR + '/wp_content_dir' }
-
- after :each do
- @wp_target = WpTarget.new(@target_url) if @target_url
-
- stub_request_to_fixture(url: @wp_target.url, fixture: @fixture) if @fixture
- stub_request(:get, /.*\/wp-content\/?$/).to_return(:status => 200, :body => '') # default dir request
- stub_request(:get, /.*\.html$/).to_return(:status => 200, :body => '') # 404 hash request
-
- expect(@wp_target.wp_content_dir).to be === @expected
- end
-
- it 'returns the string set in the initialize method' do
- @wp_target = WpTarget.new('http://example.localhost/', options.merge(wp_content_dir: 'hello-world'))
- @expected = 'hello-world'
- end
-
- it "returns 'wp-content'" do
- @target_url = 'http://lamp/wordpress-3.4.1'
- @fixture = fixtures_dir + '/wordpress-3.4.1.htm'
- @expected = 'wp-content'
- end
-
- it "returns 'wp-content' if url has trailing slash" do
- @target_url = 'http://lamp/wordpress-3.4.1/'
- @fixture = fixtures_dir + '/wordpress-3.4.1.htm'
- @expected = 'wp-content'
- end
-
- it "should find the default 'wp-content' dir even if the target_url is not the same (ie : the user supply an IP address and the url used in the code is a domain)" do
- @target_url = 'http://192.168.1.103/wordpress-3.4.1/'
- @fixture = fixtures_dir + '/wordpress-3.4.1.htm'
- @expected = 'wp-content'
- end
-
- it "returns 'custom-content'" do
- @target_url = 'http://lamp/wordpress-3.4.1-custom'
- @fixture = fixtures_dir + '/wordpress-3.4.1-custom.htm'
- @expected = 'custom-content'
- end
-
- it "returns 'custom content spaces'" do
- @target_url = 'http://lamp/wordpress-3.4.1-custom'
- @fixture = fixtures_dir + '/wordpress-3.4.1-custom-with-spaces.htm'
- @expected = 'custom content spaces'
- end
-
- it "returns 'custom-dir/subdir/content'" do
- @target_url = 'http://lamp/wordpress-3.4.1-custom'
- @fixture = fixtures_dir + '/wordpress-3.4.1-custom-subdirectories.htm'
- @expected = 'custom-dir/subdir/content'
- end
-
- it 'should also check in src attributes' do
- @target_url = 'http://lamp/wordpress-3.4.1'
- @fixture = fixtures_dir + '/wordpress-3.4.1-in-src.htm'
- @expected = 'wp-content'
- end
-
- it 'should find the location even if the src or href goes in the plugins dir' do
- @target_url = 'http://wordpress-3.4.1-in-plugins.htm'
- @fixture = fixtures_dir + '/wordpress-3.4.1-in-plugins.htm'
- @expected = 'wp-content'
- end
-
- it 'should not detect facebook.com as a custom wp-content directory' do
- @target_url = 'http://lamp.localhost/'
- @fixture = fixtures_dir + '/facebook-detection.htm'
- @expected = nil
- end
- end
-
- describe '#default_wp_content_dir_exists?' do
- after :each do
- @wp_target = WpTarget.new('http://lamp.localhost/')
- stub_request(:get, @wp_target.url).to_return(:status => 200, :body => 'homepage') # homepage request
-
- expect(@wp_target.default_wp_content_dir_exists?).to be === @expected
- end
-
- it 'returns false if wp-content returns an invalid response code' do
- stub_request(:get, /.*\/wp-content\/?$/).to_return(:status => 404, :body => '') # default dir request
- stub_request(:get, /.*\.html$/).to_return(:status => 404, :body => '') # 404 hash request
- @expected = false
- end
-
- it 'returns false if wp-content and homepage have same bodies' do
- stub_request(:get, /.*\/wp-content\/?$/).to_return(:status => 200, :body => 'homepage') # default dir request
- stub_request(:get, /.*\.html$/).to_return(:status => 404, :body => '404!') # 404 hash request
- @expected = false
- end
-
- it 'returns false if wp-content and 404 page have same bodies' do
- stub_request(:get, /.*\/wp-content\/?$/).to_return(:status => 200, :body => '404!') # default dir request
- stub_request(:get, /.*\.html$/).to_return(:status => 404, :body => '404!') # 404 hash request
- @expected = false
- end
-
- it 'returns true if wp-content, 404 page and hoempage return different bodies' do
- stub_request(:get, /.*\/wp-content\/?$/).to_return(:status => 200, :body => '') # default dir request
- stub_request(:get, /.*\.html$/).to_return(:status => 200, :body => '404!') # 404 hash request
- @expected = true
- end
- end
-
- describe '#wp_plugins_dir' do
- after :each do
- expect(@wp_target.wp_plugins_dir).to be === @expected
- end
-
- it 'returns the string set in the initialize method' do
- @wp_target = WpTarget.new('http://example.localhost/', options.merge(wp_content_dir: 'asdf', wp_plugins_dir: 'custom-plugins'))
- @expected = 'custom-plugins'
- end
-
- it "returns 'custom/plugins'" do
- @wp_target = WpTarget.new('http://example.localhost/', options.merge(wp_content_dir: 'custom', wp_plugins_dir: nil))
- @expected = 'custom/plugins'
- end
- end
-
- describe '#wp_plugins_dir_exists?' do
- let(:wp_target) { WpTarget.new('http://example.localhost/', custom_options) }
- let(:custom_options) { options.merge(wp_content_dir: 'asdf', wp_plugins_dir: 'custom-plugins') }
- let(:url) { wp_target.uri.merge(wp_target.wp_plugins_dir).to_s }
-
- it 'returns true' do
- stub_request(:get, url).to_return(status: 200)
- expect(wp_target.wp_plugins_dir_exists?).to eq true
- end
-
- it 'returns false' do
- stub_request(:get, url).to_return(status: 404)
- expect(wp_target.wp_plugins_dir_exists?).to eq false
- end
- end
-
-end
diff --git a/spec/shared_examples/wp_target/wp_full_path_disclosure.rb b/spec/shared_examples/wp_target/wp_full_path_disclosure.rb
deleted file mode 100644
index 39a63bf6..00000000
--- a/spec/shared_examples/wp_target/wp_full_path_disclosure.rb
+++ /dev/null
@@ -1,37 +0,0 @@
-# encoding: UTF-8
-
-shared_examples 'WpTarget::WpFullPathDisclosure' do
-
- let(:fixtures_dir) { SPEC_FIXTURES_WPSCAN_WP_TARGET_DIR + '/wp_full_path_disclosure' }
-
- describe '#full_path_disclosure_url' do
- it 'returns http://example.localhost/wp-includes/rss-functions.php' do
- expect(wp_target.full_path_disclosure_url).to be === 'http://example.localhost/wp-includes/rss-functions.php'
- end
- end
-
- describe '#has_full_path_disclosure?' do
- after do
- stub_request(:get, wp_target.full_path_disclosure_url).
- to_return(@stub)
-
- expect(wp_target.has_full_path_disclosure?).to be === @expected
- end
-
- it 'returns false on a 404' do
- @stub = { status: 404 }
- @expected = false
- end
-
- it 'returns false if no fpd found (blank page for example)' do
- @stub = { status: 200, body: '' }
- @expected = false
- end
-
- it 'returns true' do
- @stub = { status: 200, body: File.new(fixtures_dir + '/rss-functions-disclosure.php') }
- @expected = true
- end
- end
-
-end
diff --git a/spec/shared_examples/wp_target/wp_login_protection.rb b/spec/shared_examples/wp_target/wp_login_protection.rb
deleted file mode 100644
index 5a959683..00000000
--- a/spec/shared_examples/wp_target/wp_login_protection.rb
+++ /dev/null
@@ -1,91 +0,0 @@
-# encoding: UTF-8
-
-shared_examples 'WpTarget::WpLoginProtection' do
-
- let(:fixtures_dir) { SPEC_FIXTURES_WPSCAN_WP_TARGET_DIR + '/wp_login_protection' }
-
- before { allow(wp_target).to receive(:wp_plugins_dir).and_return('wp-content/plugins') }
-
- # It will test all protected methods has_.*_protection with each fixtures to be sure that
- # there is not false positive : for example the login-lock must not be detected as login-lockdown
- describe '#has_.*_protection?' do
-
- pattern = WpTarget::WpLoginProtection::LOGIN_PROTECTION_METHOD_PATTERN
- fixtures = %w(
- wp-login-clean.php wp-login-login_lockdown.php wp-login-login_lock.php
- wp-login-better_wp_security.php wp-login-simple_login_lockdown.php
- wp-login-login_security_solution.php wp-login-limit_login_attempts.php
- wp-login-bluetrait_event_viewer.php wp-login-security_protection.php
- )
-
- # For plugins which are detected from the existence of their directory into wp-content/plugins/ (or one of their file)
- # and not from a regex into the login page
- special_plugins = %w(better_wp_security simple_login_lockdown login_security_solution limit_login_attempts bluetrait_event_viewer)
-
- after :each do
- stub_request_to_fixture(url: login_url, fixture: @fixture)
-
- # Stub all special plugins urls to a 404 except if it's the one we want
- special_plugins.each do |special_plugin|
- special_plugin_call_detection_symbol = :"has_#{special_plugin}_protection?"
- special_plugin_call_url_symbol = :"#{special_plugin}_url"
-
- status_code = (@symbol_to_call === special_plugin_call_detection_symbol and @expected === true) ? 200 : 404
- stub_request(:get, wp_target.send(special_plugin_call_url_symbol).to_s).to_return(status: status_code)
- end
-
- expect(wp_target.send(@symbol_to_call)).to eql @expected
- end
-
- protected_instance_methods.grep(pattern).each do |symbol_to_call|
- plugin_name_from_symbol = symbol_to_call[pattern, 1].gsub('_', '-')
-
- fixtures.each do |fixture|
- plugin_name_from_fixture = fixture[/wp-login-(.*)\.php/i, 1].gsub('_', '-')
- expected = plugin_name_from_fixture === plugin_name_from_symbol ? true : false
-
- it "#{symbol_to_call} with #{fixture} returns #{expected}" do
- @plugin_name = plugin_name_from_fixture
- @fixture = File.join(fixtures_dir, fixture)
- @symbol_to_call = symbol_to_call
- @expected = expected
- end
- end
- end
- end
-
- describe '#login_protection_plugin' do
- after :each do
- stub_request(:get, /.*/).to_return(status: 404)
- stub_request_to_fixture(url: login_url, fixture: @fixture)
-
- expect(wp_target.login_protection_plugin).to eq @plugin_expected
- expect(wp_target.has_login_protection?).to eql @protection_expected
- end
-
- it 'returns nil if no protection is present' do
- @fixture = File.join(fixtures_dir, 'wp-login-clean.php')
- @plugin_expected = nil
- @protection_expected = false
- end
-
- it 'returns a login-lockdown WpPlugin object' do
- @fixture = File.join(fixtures_dir, 'wp-login-login_lockdown.php')
- @plugin_expected = WpPlugin.new(wp_target.uri, name: 'login-lockdown')
- @protection_expected = true
- end
-
- it 'returns a login-lock WpPlugin object' do
- @fixture = File.join(fixtures_dir, 'wp-login-login_lock.php')
- @plugin_expected = WpPlugin.new(wp_target.uri, name: 'login-lock')
- @protection_expected = true
- end
-
- it 'returns a security-protection WpPlugin object' do
- @fixture = File.join(fixtures_dir, 'wp-login-security_protection.php')
- @plugin_expected = WpPlugin.new(wp_target.uri, name: 'security-protection')
- @protection_expected = true
- end
- end
-
-end
diff --git a/spec/shared_examples/wp_target/wp_readme.rb b/spec/shared_examples/wp_target/wp_readme.rb
deleted file mode 100644
index 7d9f6241..00000000
--- a/spec/shared_examples/wp_target/wp_readme.rb
+++ /dev/null
@@ -1,36 +0,0 @@
-# encoding: UTF-8
-
-shared_examples 'WpTarget::WpReadme' do
-
- let(:fixtures_dir) { SPEC_FIXTURES_WPSCAN_WP_TARGET_DIR + '/wp_readme' }
-
- describe '#readme_url' do
- it 'returns http://example.localhost/readme.html' do
- expect(wp_target.readme_url).to be === "#{wp_target.uri}readme.html"
- end
- end
-
- describe '#has_readme?' do
- after do
- stub_request(:get, wp_target.readme_url).to_return(@stub)
-
- expect(wp_target.has_readme?).to be === @expected
- end
-
- it 'returns false on a 404' do
- @stub = { status: 404 }
- @expected = false
- end
-
- it 'returns true if it exists' do
- @stub = { status: 200, body: File.new(fixtures_dir + '/readme-3.2.1.html') }
- @expected = true
- end
-
- it 'returns true even if the readme.html is not in english' do
- @stub = { status: 200, body: File.new(fixtures_dir + '/readme-3.3.2-fr.html') }
- @expected = true
- end
- end
-
-end
diff --git a/spec/shared_examples/wp_target/wp_registrable.rb b/spec/shared_examples/wp_target/wp_registrable.rb
deleted file mode 100644
index 6938b4d1..00000000
--- a/spec/shared_examples/wp_target/wp_registrable.rb
+++ /dev/null
@@ -1,96 +0,0 @@
-# encoding: UTF-8
-
-shared_examples 'WpTarget::WpRegistrable' do
-
- let(:signup_url) { wp_target.uri.merge('wp-signup.php').to_s }
-
- describe '#registration_url' do
- after { expect(wp_target.registration_url).to be === @expected }
-
- context 'when multisite' do
- it 'returns the signup url' do
- allow(wp_target).to receive(:multisite?).and_return(true)
-
- @expected = signup_url
- end
- end
-
- context 'when not multisite' do
- it 'returns the login url with ?action=register' do
- allow(wp_target).to receive(:multisite?).and_return(false)
-
- @expected = login_url + '?action=register'
- end
- end
- end
-
- describe '#registration_enabled?' do
- after do
- allow(wp_target).to receive(:multisite?).and_return(multisite)
- stub_request(:get, wp_target.registration_url).to_return(@stub)
-
- expect(wp_target.registration_enabled?).to be === @expected
- end
-
- context 'when multisite' do
- let(:multisite) { true }
- it 'returns false' do
- @stub = { status: 302, headers: { 'Location' => 'wp-login.php?registration=disabled' } }
- @expected = false
- end
-
- it 'returns true' do
- @stub = { status: 200, body: '