286 Commits

Author SHA1 Message Date
Andrew Horton fd7a914972 performance improvements!!! 2025-10-20 02:12:11 +11:00
Andrew Horton 4a00e6bf88 refactored output messages to use notice, warning, debug, etc. 2025-10-18 17:31:04 +11:00
Andrew Horton 11e06b958c Commit Summary
Add cookie jar persistence and improve cookie handling
Key Changes:

Cookie jar file persistence: --cookie-jar now saves cookies to file and loads them on startup, maintaining cookies across WhatWeb sessions
Domain-aware cookie storage: New format tracks cookies per domain (backwards compatible with legacy single-domain format)
Automatic file creation: Cookie jar file is created if it doesn't exist
Thread-safe implementation: Mutex-protected cookie operations for concurrent scanning

Implementation Details:

Modified SimpleCookieJar to support load_from_file() and save_to_file() methods
Cookie jar file uses domain-aware format: # Domain: example.com followed by cookie string
Maintains backward compatibility with legacy cookie jar format
Saves cookies at program exit, preserving session state
Added proper error handling and directory creation for cookie jar files
2025-10-18 17:00:51 +11:00
Andrew Horton 608cc2b3f4 Cookie redirection handling & improved error, debug and warning messages 2025-10-18 16:31:03 +11:00
Andrew Horton 29aa301273 Version 0.6.1 - August 2, 2025
Changelog:
* Updated version from 0.5.5 to 0.6.1
* Improved SSL/TLS security with comprehensive cipher suite support (TLSv1, TLSv1.1, TLSv1.2, SSLv3, SSLv2)
  - Added SSL_ATTRIBUTES constant for verify_mode
  - Replaced dynamic SSL parameter collection with explicit SSLContext configuration
  - Set verify_mode to VERIFY_NONE for maximum compatibility
  - Enabled negotiation of all SSL/TLS versions including legacy SSLv2/SSLv3
* Enhanced HTTPS connection handling with optimized verification settings
  - Cleared minimum version restrictions and disabled protocol exclusion flags
  - Added fallback handling for different OpenSSL configurations
* Added dual-protocol feature: simple hostnames (without paths or ports) are now scanned using both HTTP and HTTPS protocols
  - Automatically creates and tests both HTTP and HTTPS versions of simple hostnames
  - Shows informational message when dual-protocol scanning is performed
  - Intelligently detects and avoids duplicate URL scanning with redirect handling
* Added robust input validation and error handling
  - Automatically aborts processing after 10 consecutive parsing errors
  - Prevents wasted resources when processing invalid data sources
  - Provides helpful error messages to guide users in troubleshooting input issues
  - Handles various error cases including malformed URLs and non-URL input data
* Improved dependency management with Bundler group support
  - Reorganized Gemfile with proper optional group definitions for mongo and rchardet
  - Added clear installation instructions for optional dependencies
  - Set explicit version constraints for test dependencies
  - Added support for older Bundler versions through GEMFILE_GROUPS environment variable
* Expanded documentation for optional dependencies
  - Added detailed installation instructions for MongoDB support
  - Added clear steps for character set detection configuration
  - Provided combined installation commands for all optional features
  - Improved explanation of performance implications

This release introduces three new search contexts for plugin authors to use:
- uri.path
- uri.query
- uri.extension

An example of how to use this is from the PHP plugin.

```
{ :name=>"File extension", :regexp=>/^(php|phtml|php3|php4|php5|phps)$/, :search=>"uri.extension" }
```

* #311 - JSON Logging fails... UTF-8 can't modify frozen String (@juananpe)

* Refactored Helper::convert_to_utf8. Droped Ruby 2.0 support (@urbanadventurer)
* Added new search contexts for plugins: uri.path, uri.query, uri.extension (@urbanadventurer)

* Plex Media Server (@urbanadventurer)
* Meta-Facebook-Infrastructure (@urbanadventurer)
* Netflix-Platform (@urbanadventurer)
* VKontakte-Platform (@urbanadventurer)
* Distributed-Tracing (@urbanadventurer)
* Modern-Security-Headers (@urbanadventurer)
* Baidu-Platform (@urbanadventurer)
* Alibaba-Aliyun (@urbanadventurer)
* Weibo-Platform (@urbanadventurer)

* Adobe-Flash (@urbanadventurer)
* ASP_NET (@urbanadventurer)
* ColdFusion (@urbanadventurer)
* Drupal (@gboddin)
* Java (@urbanadventurer)
* Perl (@urbanadventurer)
* PHP (@urbanadventurer)
* Python (@urbanadventurer)
* Ruby (@urbanadventurer)
* TYPO3 (@definity)
* WordPress (@juananpe)
* Shopify (enhanced HTTP header detection) (@urbanadventurer)
* CloudFlare (enhanced with CF-RAY and other headers) (@urbanadventurer)
* CloudFront (renamed to Amazon-CloudFront and enhanced) (@urbanadventurer)
* Tengine Web Server (added Alibaba-specific headers) (@urbanadventurer)
* Content-Security-Policy (added modern CSP headers) (@urbanadventurer)
* Azure (renamed to Microsoft-Azure and enhanced) (@urbanadventurer)
2025-08-02 03:04:19 +10:00
Andrew Horton d07a9ac751 Dropped the www from www.morningstarsecurity.com 2021-02-05 01:58:26 +11:00
Brendan Coles 44be06d311 whatweb: rubocop cleanup 2020-10-03 05:49:30 +00:00
Lars Kulseng 9fa5d7871c Fixed Mongodb logging and charset bugs 2020-02-07 10:39:24 +01:00
urbanadventurer 694eda18c4 Update Copyright strings to 2020 2020-01-22 07:12:48 +11:00
urbanadventurer 9bb422a2c9 Fixed #286. Typo in usage for --cookie-jar 2019-11-20 02:05:23 +11:00
abenson b6a32e8f51 Fix #282 and #283 Thanks @abenson and @blshkv for your help. 2019-11-20 01:27:52 +11:00
jose nazario 62931324f3 fix a comment typo in two spots, no code changes 2019-06-21 11:30:01 -04:00
urbanadventurer ecd302dea0 Put spacing into EXAMPLE USAGE 2019-06-10 10:15:30 +10:00
urbanadventurer 62de2b2473 Reduced the size of the short usage help. 2019-06-10 10:12:10 +10:00
urbanadventurer 2ea39d07da Update all copyright notices to Copyright 2009 to 2019 Andrew Horton and Brendan Coles 2019-06-10 10:00:56 +10:00
urbanadventurer 9021fe0905 Updated all links to morningstarsecurity.com to use https 2019-06-10 09:51:32 +10:00
urbanadventurer f195d0945f Changed mongo logging error message 2019-06-10 07:22:17 +10:00
urbanadventurer 8aae12e482 Removed checks for JSON gem in JSON logging usage. JSON is checked for as a required gem. 2019-06-10 07:17:41 +10:00
urbanadventurer 18edee5823 Removed the OPTIONAL DEPENDENCIES output suggesting mongo and rchardet from the usage. This is not relevant to 99% of users. 2019-06-10 07:15:54 +10:00
urbanadventurer 8619b2a19d Ported BASIC_AUTH parsing fix from @rmaksimov.
Works even when a password contains a colon.
2018-07-05 19:33:58 +10:00
urbanadventurer ed3dd25faa Raise Thread errors when WWDEBUG is true 2018-06-17 21:59:20 +10:00
Brendan Coles 87a673ac40 Use argument keywords for WhatWeb::Scan.new 2017-12-08 18:22:24 +00:00
urbanadventurer 156763dd8f Revert keyword parameters for mandatory paramaters 2017-12-09 04:46:30 +11:00
urbanadventurer 29cc82c0d2 whitespace 2017-12-09 03:56:47 +11:00
urbanadventurer 86f16140b2 Add keywords to WhatWeb::Redirect 2017-12-09 03:22:28 +11:00
urbanadventurer 66fd80eb81 Removed unnecessary variables line from ScanContext causing aggressive plugins to fail. Added scanner keyword to ScanContext.new. Added Scan_scan_from_plugin method 2017-12-09 03:13:27 +11:00
urbanadventurer 643635f990 Update Parser.run_plugins with keyword arguments. Add scanner to run_plugins 2017-12-09 02:51:57 +11:00
urbanadventurer f1fb4ec6d4 Update Parser with keyword arguments. parse(target: nil, result: nil, logging_list: nil, grep_plugin: false) 2017-12-09 02:48:24 +11:00
urbanadventurer b4cb03985c Remove Iconv, which was deprecated in ruby 1.9.3, from lib/target.rb 2017-12-06 07:16:13 +11:00
urbanadventurer 54f0069bb0 Move redirection code into WhatWeb::Redirect.new(target, scanner, max_redirects) 2017-12-06 07:10:01 +11:00
Brendan Coles a0d24b2e57 Replace MAX_REDIRECTS global with local variable 2017-12-04 03:41:40 +00:00
Brendan Coles 2ed0e3c804 Return results from WhatWeb::Parse.parse 2017-12-04 03:39:24 +00:00
Brendan Coles 50daa22d62 Fix JSON logging 2017-12-04 00:48:56 +00:00
Brendan Coles dad35cf80e Add Plugin.shutdown_all convenience method 2017-12-04 00:48:33 +00:00
urbanadventurer 5805178dc2 Renamed Parser.parse_results to Parser.log_results 2017-12-04 11:35:50 +11:00
urbanadventurer 562e4feeac Implemented redirection.
Added :redirect_counter to Target
Can set redirection_counter on Target.initialize and Target.add_target
2017-12-04 11:27:24 +11:00
urbanadventurer 9ffc182dd3 Setup redirection (no max limit yet)
Made target_queue an instance variable that is define in Scan.initialize
Add Scan.add_target
Remove comments relating to result mutexes
2017-12-04 10:55:23 +11:00
urbanadventurer 0238295986 Tidy up comments related to moving code out of Scan 2017-12-04 10:36:32 +11:00
urbanadventurer b34fc9ee44 Removed instantiated WhatWeb::Parser and made methods self. 2017-12-04 10:06:01 +11:00
urbanadventurer d5e18181b1 Decouple scanner from plugins. Note that plugins can launch their own aggressive scans.
Redirection temporarily disabled.
Moved run_plugins into Parser.
Changed Scan initialize to only set up variables. Created Scan.scan to execute scanning and yields target objects.
Made opts and targets instance variables in Scan
No longer passing plugin list to Scan
Moved log and plugin shutown to whatweb
2017-12-04 09:38:14 +11:00
urbanadventurer 37f0716db9 Changed output names to logging 2017-12-04 08:07:39 +11:00
Brendan Coles a7a6b4ed97 Add plugins to WhatWeb::Scan keyword arguments 2017-12-02 18:58:29 +00:00
Brendan Coles 91c531a513 Move word_wrap method to OutputHelper module 2017-12-02 18:29:07 +00:00
Brendan Coles 85c3e7d431 Move dependencies requirements to lib 2017-12-02 18:20:53 +00:00
Brendan Coles f4a97452db Use root_dir rather than LOAD_PATH 2017-12-02 17:09:57 +00:00
Brendan Coles a80a137980 Fix typo 2017-12-02 15:59:20 +00:00
urbanadventurer 4e40571e71 Created WhatWeb::Parser to parse results yielded from WhatWeb::Scan. Removed UTF mutations from JSON output. 2017-12-03 02:37:06 +11:00
Brendan Coles e8aa98ea52 remove NO_THREADS global 2017-12-02 14:19:36 +00:00
Brendan Coles ae0f3e6722 Change max_threads global to opt 2017-12-02 14:13:46 +00:00
Brendan Coles 64b8459b89 Change url_* target modification globals to opts 2017-12-02 13:13:10 +00:00