From fdbfd1ec60114b1c8f9d025f2ec75a628d7a43e2 Mon Sep 17 00:00:00 2001 From: erwanlr Date: Tue, 3 Sep 2019 12:03:12 +0100 Subject: [PATCH] Ref #1386 --- .../dynamic_finder/version/body_pattern.rb | 2 +- spec/fixtures/db/dynamic_finders.yml | 41 +++++++++++++++++++ spec/fixtures/dynamic_finders/expected.yml | 41 +++++++++++++++++++ .../dependencies_file/wpml-dependencies.json | 9 ++++ .../dependencies_file/wpml-dependencies.json | 9 ++++ .../dependencies_file/wpml-dependencies.json | 9 ++++ .../dependencies_file/wpml-dependencies.json | 9 ++++ .../dependencies_file/wpml-dependencies.json | 9 ++++ .../dependencies_file/wpml-dependencies.json | 9 ++++ .../dependencies_file/wpml-dependencies.json | 9 ++++ 10 files changed, 146 insertions(+), 1 deletion(-) create mode 100644 spec/fixtures/dynamic_finders/plugin_version/gravityforms-multilingual/dependencies_file/wpml-dependencies.json create mode 100644 spec/fixtures/dynamic_finders/plugin_version/sitepress-multilingual-cms/dependencies_file/wpml-dependencies.json create mode 100644 spec/fixtures/dynamic_finders/plugin_version/wpml-cms-nav/dependencies_file/wpml-dependencies.json create mode 100644 spec/fixtures/dynamic_finders/plugin_version/wpml-media-translation/dependencies_file/wpml-dependencies.json create mode 100644 spec/fixtures/dynamic_finders/plugin_version/wpml-sticky-links/dependencies_file/wpml-dependencies.json create mode 100644 spec/fixtures/dynamic_finders/plugin_version/wpml-string-translation/dependencies_file/wpml-dependencies.json create mode 100644 spec/fixtures/dynamic_finders/plugin_version/wpml-translation-management/dependencies_file/wpml-dependencies.json diff --git a/lib/wpscan/finders/dynamic_finder/version/body_pattern.rb b/lib/wpscan/finders/dynamic_finder/version/body_pattern.rb index 95c525e7..615a3f38 100644 --- a/lib/wpscan/finders/dynamic_finder/version/body_pattern.rb +++ b/lib/wpscan/finders/dynamic_finder/version/body_pattern.rb @@ -4,7 +4,7 @@ module WPScan module Finders module DynamicFinder module Version - # Version finder using Body Pattern method. Tipically used when the response is not + # Version finder using Body Pattern method. Typically used when the response is not # an HTML doc and Xpath can't be used class BodyPattern < Finders::DynamicFinder::Version::Finder # @return [ Hash ] diff --git a/spec/fixtures/db/dynamic_finders.yml b/spec/fixtures/db/dynamic_finders.yml index 8d3d0969..489a7064 100644 --- a/spec/fixtures/db/dynamic_finders.yml +++ b/spec/fixtures/db/dynamic_finders.yml @@ -14317,6 +14317,12 @@ plugins: path: changelog.md pattern: !ruby/regexp /\#\# (?\d+\.[\.\d]+)/ version: true + gravityforms-multilingual: + DependenciesFile: + class: ConfigParser + path: wpml-dependencies.json + key: gravityforms-multilingual + version: true gravityformsactivecampaign: ChangeLog: class: BodyPattern @@ -29208,6 +29214,11 @@ plugins: - res/css/language-selector.css.gzip - res/js/jquery.cookie.js version: true + DependenciesFile: + class: ConfigParser + path: wpml-dependencies.json + key: sitepress-multilingual-cms + version: true sitewit-engagement-analytics: TranslationFile: class: BodyPattern @@ -42494,6 +42505,36 @@ plugins: files: - assets/js/wpmk-script.js version: true + wpml-media-translation: + DependenciesFile: + class: ConfigParser + path: wpml-dependencies.json + key: wpml-media-translation + version: true + wpml-cms-nav: + DependenciesFile: + class: ConfigParser + path: wpml-dependencies.json + key: wpml-cms-nav + version: true + wpml-string-translation: + DependenciesFile: + class: ConfigParser + path: wpml-dependencies.json + key: wpml-string-translation + version: true + wpml-sticky-links: + DependenciesFile: + class: ConfigParser + path: wpml-dependencies.json + key: wpml-sticky-links + version: true + wpml-translation-management: + DependenciesFile: + class: ConfigParser + path: wpml-dependencies.json + key: wpml-translation-management + version: true wpml-widgets: Readme: path: readme.txt diff --git a/spec/fixtures/dynamic_finders/expected.yml b/spec/fixtures/dynamic_finders/expected.yml index da31d105..a082cfde 100644 --- a/spec/fixtures/dynamic_finders/expected.yml +++ b/spec/fixtures/dynamic_finders/expected.yml @@ -14697,6 +14697,12 @@ plugins: interesting_entries: - 'http://wp.lab/wp-content/plugins/gravityforms-eway/changelog.md, Match: ''## 2.2.8''' + gravityforms-multilingual: + DependenciesFile: + number: 1.3.16 + found_by: Dependencies File (Aggressive Detection) + interesting_entries: + - 'http://wp.lab/wp-content/plugins/gravityforms-multilingual/wpml-dependencies.json, Match: ''1.3.16''' gravityformsactivecampaign: ChangeLog: number: 1.4.4 @@ -30347,6 +30353,11 @@ plugins: interesting_entries: - http://wp.lab/wp-content/plugins/sitepress-multilingual-cms/res/css/language-selector.css.gzip?v=3.1.8.4 - http://wp.lab/wp-content/plugins/sitepress-multilingual-cms/res/js/jquery.cookie.js?v=3.1.8.4 + DependenciesFile: + number: 4.0.4 + found_by: Dependencies File (Aggressive Detection) + interesting_entries: + - 'http://wp.lab/wp-content/plugins/sitepress-multilingual-cms/wpml-dependencies.json, Match: ''4.0.4''' sitewit-engagement-analytics: TranslationFile: number: 2.5.0 @@ -44221,6 +44232,36 @@ plugins: interesting_entries: - http://wp.lab/wp-content/plugins/wpmk-portfolio/assets/js/wpmk-script.js?ver=1.0.0 confidence: 10 + wpml-cms-nav: + DependenciesFile: + number: 1.4.3 + found_by: Dependencies File (Aggressive Detection) + interesting_entries: + - 'http://wp.lab/wp-content/plugins/wpml-cms-nav/wpml-dependencies.json, Match: ''1.4.3''' + wpml-media-translation: + DependenciesFile: + number: 2.3.4 + found_by: Dependencies File (Aggressive Detection) + interesting_entries: + - 'http://wp.lab/wp-content/plugins/wpml-media-translation/wpml-dependencies.json, Match: ''2.3.4''' + wpml-string-translation: + DependenciesFile: + number: 2.8.4 + found_by: Dependencies File (Aggressive Detection) + interesting_entries: + - 'http://wp.lab/wp-content/plugins/wpml-string-translation/wpml-dependencies.json, Match: ''2.8.4''' + wpml-sticky-links: + DependenciesFile: + number: 1.4.4 + found_by: Dependencies File (Aggressive Detection) + interesting_entries: + - 'http://wp.lab/wp-content/plugins/wpml-sticky-links/wpml-dependencies.json, Match: ''1.4.4''' + wpml-translation-management: + DependenciesFile: + number: 2.6.4 + found_by: Dependencies File (Aggressive Detection) + interesting_entries: + - 'http://wp.lab/wp-content/plugins/wpml-translation-management/wpml-dependencies.json, Match: ''2.6.4''' wpmovielibrary: QueryParameter: number: 2.1.4.7 diff --git a/spec/fixtures/dynamic_finders/plugin_version/gravityforms-multilingual/dependencies_file/wpml-dependencies.json b/spec/fixtures/dynamic_finders/plugin_version/gravityforms-multilingual/dependencies_file/wpml-dependencies.json new file mode 100644 index 00000000..2f3525b6 --- /dev/null +++ b/spec/fixtures/dynamic_finders/plugin_version/gravityforms-multilingual/dependencies_file/wpml-dependencies.json @@ -0,0 +1,9 @@ +{ + "sitepress-multilingual-cms": "4.0.4", + "wpml-translation-management": "2.6.4", + "wpml-string-translation": "2.8.4", + "wpml-media-translation": "2.3.4", + "wpml-sticky-links": "1.4.4", + "wpml-cms-nav": "1.4.3", + "gravityforms-multilingual": "1.3.16" +} diff --git a/spec/fixtures/dynamic_finders/plugin_version/sitepress-multilingual-cms/dependencies_file/wpml-dependencies.json b/spec/fixtures/dynamic_finders/plugin_version/sitepress-multilingual-cms/dependencies_file/wpml-dependencies.json new file mode 100644 index 00000000..2f3525b6 --- /dev/null +++ b/spec/fixtures/dynamic_finders/plugin_version/sitepress-multilingual-cms/dependencies_file/wpml-dependencies.json @@ -0,0 +1,9 @@ +{ + "sitepress-multilingual-cms": "4.0.4", + "wpml-translation-management": "2.6.4", + "wpml-string-translation": "2.8.4", + "wpml-media-translation": "2.3.4", + "wpml-sticky-links": "1.4.4", + "wpml-cms-nav": "1.4.3", + "gravityforms-multilingual": "1.3.16" +} diff --git a/spec/fixtures/dynamic_finders/plugin_version/wpml-cms-nav/dependencies_file/wpml-dependencies.json b/spec/fixtures/dynamic_finders/plugin_version/wpml-cms-nav/dependencies_file/wpml-dependencies.json new file mode 100644 index 00000000..2f3525b6 --- /dev/null +++ b/spec/fixtures/dynamic_finders/plugin_version/wpml-cms-nav/dependencies_file/wpml-dependencies.json @@ -0,0 +1,9 @@ +{ + "sitepress-multilingual-cms": "4.0.4", + "wpml-translation-management": "2.6.4", + "wpml-string-translation": "2.8.4", + "wpml-media-translation": "2.3.4", + "wpml-sticky-links": "1.4.4", + "wpml-cms-nav": "1.4.3", + "gravityforms-multilingual": "1.3.16" +} diff --git a/spec/fixtures/dynamic_finders/plugin_version/wpml-media-translation/dependencies_file/wpml-dependencies.json b/spec/fixtures/dynamic_finders/plugin_version/wpml-media-translation/dependencies_file/wpml-dependencies.json new file mode 100644 index 00000000..2f3525b6 --- /dev/null +++ b/spec/fixtures/dynamic_finders/plugin_version/wpml-media-translation/dependencies_file/wpml-dependencies.json @@ -0,0 +1,9 @@ +{ + "sitepress-multilingual-cms": "4.0.4", + "wpml-translation-management": "2.6.4", + "wpml-string-translation": "2.8.4", + "wpml-media-translation": "2.3.4", + "wpml-sticky-links": "1.4.4", + "wpml-cms-nav": "1.4.3", + "gravityforms-multilingual": "1.3.16" +} diff --git a/spec/fixtures/dynamic_finders/plugin_version/wpml-sticky-links/dependencies_file/wpml-dependencies.json b/spec/fixtures/dynamic_finders/plugin_version/wpml-sticky-links/dependencies_file/wpml-dependencies.json new file mode 100644 index 00000000..2f3525b6 --- /dev/null +++ b/spec/fixtures/dynamic_finders/plugin_version/wpml-sticky-links/dependencies_file/wpml-dependencies.json @@ -0,0 +1,9 @@ +{ + "sitepress-multilingual-cms": "4.0.4", + "wpml-translation-management": "2.6.4", + "wpml-string-translation": "2.8.4", + "wpml-media-translation": "2.3.4", + "wpml-sticky-links": "1.4.4", + "wpml-cms-nav": "1.4.3", + "gravityforms-multilingual": "1.3.16" +} diff --git a/spec/fixtures/dynamic_finders/plugin_version/wpml-string-translation/dependencies_file/wpml-dependencies.json b/spec/fixtures/dynamic_finders/plugin_version/wpml-string-translation/dependencies_file/wpml-dependencies.json new file mode 100644 index 00000000..2f3525b6 --- /dev/null +++ b/spec/fixtures/dynamic_finders/plugin_version/wpml-string-translation/dependencies_file/wpml-dependencies.json @@ -0,0 +1,9 @@ +{ + "sitepress-multilingual-cms": "4.0.4", + "wpml-translation-management": "2.6.4", + "wpml-string-translation": "2.8.4", + "wpml-media-translation": "2.3.4", + "wpml-sticky-links": "1.4.4", + "wpml-cms-nav": "1.4.3", + "gravityforms-multilingual": "1.3.16" +} diff --git a/spec/fixtures/dynamic_finders/plugin_version/wpml-translation-management/dependencies_file/wpml-dependencies.json b/spec/fixtures/dynamic_finders/plugin_version/wpml-translation-management/dependencies_file/wpml-dependencies.json new file mode 100644 index 00000000..2f3525b6 --- /dev/null +++ b/spec/fixtures/dynamic_finders/plugin_version/wpml-translation-management/dependencies_file/wpml-dependencies.json @@ -0,0 +1,9 @@ +{ + "sitepress-multilingual-cms": "4.0.4", + "wpml-translation-management": "2.6.4", + "wpml-string-translation": "2.8.4", + "wpml-media-translation": "2.3.4", + "wpml-sticky-links": "1.4.4", + "wpml-cms-nav": "1.4.3", + "gravityforms-multilingual": "1.3.16" +}