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

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: 490a004630440220021db73057f389fb4a9e02b3f748fdba0af1664f3a4e33bd4318ee3639720c440220647ff0c0a6baddf97d94f252c623ec677f865688a8a6c69ca7017d04b7375d4c:922c64590222798bb761d5b6d8e72950