diff --git a/spec/fixtures/db/dynamic_finders.yml b/spec/fixtures/db/dynamic_finders.yml index fb6f6982..7fdeccca 100644 --- a/spec/fixtures/db/dynamic_finders.yml +++ b/spec/fixtures/db/dynamic_finders.yml @@ -35,6 +35,17 @@ wordpress: xpath: //meta[@name="generator"]/@content pattern: !ruby/regexp /wordPress (?\d+\.[\.\d]+)/i version: true + StyleEtag: + class: HeaderPattern + header: Etag + pattern: !ruby/regexp /(?\d+\.[\.\d]+)/i + path: wp-admin/load-styles.php + version: true + ScriptEtag: + class: HeaderPattern + header: Etag + pattern: !ruby/regexp /(?\d+\.[\.\d]+)/i + path: wp-admin/load-scripts.php OpmlGenerator: class: Comment path: wp-links-opml.php diff --git a/spec/fixtures/dynamic_finders/expected.yml b/spec/fixtures/dynamic_finders/expected.yml index 8fe37d0f..fd4389ac 100644 --- a/spec/fixtures/dynamic_finders/expected.yml +++ b/spec/fixtures/dynamic_finders/expected.yml @@ -36,6 +36,16 @@ wordpress: found_by: Meta Generator (Passive Detection) interesting_entries: - 'http://wp.lab/, Match: ''WordPress 3.8.1''' + StyleEtag: + number: 3.8.1 + found_by: Style Etag (Aggressive Detection) + interesting_entries: + - 'http://wp.lab/wp-admin/load-styles.php, Match: ''3.8.1''' + ScriptEtag: + number: 3.8.1 + found_by: Script Etag (Aggressive Detection) + interesting_entries: + - 'http://wp.lab/wp-admin/load-scripts.php, Match: ''3.8.1''' OpmlGenerator: number: 4.0 found_by: Opml Generator (Aggressive Detection) diff --git a/spec/fixtures/dynamic_finders/wp_version/script_etag/wp-admin/load-scripts.php b/spec/fixtures/dynamic_finders/wp_version/script_etag/wp-admin/load-scripts.php new file mode 100644 index 00000000..8b0e5a9f --- /dev/null +++ b/spec/fixtures/dynamic_finders/wp_version/script_etag/wp-admin/load-scripts.php @@ -0,0 +1,8 @@ +{ + "Date": "Tue, 03 Mar 2020 15:51:52 GMT", + "Server": "Apache", + "Etag": "3.8.1", + "Expires": "Wed, 03 Mar 2021 15:51:52 GMT", + "Cache-Control": "public, max-age=31536000", + "Content-Type": "application/javascript; charset=UTF-8" +} diff --git a/spec/fixtures/dynamic_finders/wp_version/style_etag/wp-admin/load-styles.php b/spec/fixtures/dynamic_finders/wp_version/style_etag/wp-admin/load-styles.php new file mode 100644 index 00000000..b9bf8294 --- /dev/null +++ b/spec/fixtures/dynamic_finders/wp_version/style_etag/wp-admin/load-styles.php @@ -0,0 +1,8 @@ +{ + "Date": "Tue, 03 Mar 2020 15:51:52 GMT", + "Server": "Apache", + "Etag": "3.8.1", + "Expires": "Wed, 03 Mar 2021 15:51:52 GMT", + "Cache-Control": "public, max-age=31536000", + "Content-Type": "text/css; charset=UTF-8" +}