id: wordpress-google-sitemap-generator

info:
  name: XML Sitemap Generator for Google Detection
  author: ricardomaia
  severity: info
  reference:
    - https://wordpress.org/plugins/google-sitemap-generator/
  metadata:
    plugin_namespace: google-sitemap-generator
    wpscan: https://wpscan.com/plugin/google-sitemap-generator
  tags: tech,wordpress,wp-plugin,top-100,top-200,discovery

http:
  - method: GET
    path:
      - "{{BaseURL}}/wp-content/plugins/google-sitemap-generator/readme.txt"

    payloads:
      last_version: helpers/wordpress/plugins/google-sitemap-generator.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: 4b0a00483046022100db6f95ae601f34782ffc6aa21fbc6a87d7f693eeb8021125d417cb3bb60d09a1022100d3821b6c39a66af5eb0b82904c62a766d043e620b97c1ca2837e0c16c848de4d:922c64590222798bb761d5b6d8e72950