id: flexmls-idx-detect

info:
  name: Flexmls IDX - Detect
  author: rxerium,sorrowx3
  severity: info
  metadata:
    verified: true
    max-request: 1
    shodan-query: html:"/wp-content/plugins/flexmls-idx"
  tags: tech,detect,flexmls,idx

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

    payloads:
      last_version: helpers/wordpress/plugins/flexmls-idx.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: 490a0046304402206d87d5615c83869425e5d5f40fd472e18a7334be1033db8a2a77dbdc24741e7c02200e322ba617201648e2d1c6f1566f04bab3345a460a55f8e7c557f64ade3c2d43:922c64590222798bb761d5b6d8e72950