id: wordpress-duracelltomi-google-tag-manager

info:
  name: GTM4WP – A Google Tag Manager (GTM) plugin for WordPress Detection
  author: ricardomaia
  severity: info
  reference:
    - https://wordpress.org/plugins/duracelltomi-google-tag-manager/
  metadata:
    plugin_namespace: duracelltomi-google-tag-manager
    wpscan: https://wpscan.com/plugin/duracelltomi-google-tag-manager
  tags: tech,wordpress,wp-plugin,top-100,top-200,discovery

http:
  - method: GET
    path:
      - "{{BaseURL}}/wp-content/plugins/duracelltomi-google-tag-manager/readme.txt"

    payloads:
      last_version: helpers/wordpress/plugins/duracelltomi-google-tag-manager.txt

    extractors:
      - type: regex
        part: body
        internal: true
        name: internal_detected_version
        group: 1
        regex:
          - '(?i)Stable.tag:\s?([\w.]+)'

      - type: regex
        part: body
        name: detected_version
        group: 1
        regex:
          - '(?i)Stable.tag:\s?([\w.]+)'

    matchers-condition: or
    matchers:
      - type: dsl
        name: "outdated_version"
        dsl:
          - compare_versions(internal_detected_version, concat("< ", last_version))

      - type: regex
        part: body
        regex:
          - '(?i)Stable.tag:\s?([\w.]+)'
# digest: 4b0a00483046022100d595a88e2f3c406e6402a9cd552f6b52cc416633427eeaefb8c4fdd15a819910022100a55875d812217262fc58b2497b4ce5ac792a4fe38157d5902517ccce82968ab2:922c64590222798bb761d5b6d8e72950