id: wordpress-flamingo

info:
  name: Flamingo Detection
  author: ricardomaia
  severity: info
  reference:
    - https://wordpress.org/plugins/flamingo/
  metadata:
    plugin_namespace: flamingo
    wpscan: https://wpscan.com/plugin/flamingo
  tags: tech,wordpress,wp-plugin,top-100,top-200,discovery

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

    payloads:
      last_version: helpers/wordpress/plugins/flamingo.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: 4a0a0047304502201adccd55c87a4fbf93e93053e6dbb893df098611c767769b11a1d8994a39a90c022100a520e03bb8beb5281d156cd50c2a7445dfd4e8fdfc93090db6bb20d4da2e6a39:922c64590222798bb761d5b6d8e72950