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,discovery

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: 4a0a00473045022016f0f351552731ab7643506cfdff7fa10b2d863356d70b9d247000196553b615022100de45f6445d1a46992697510bf61b169335ff1568b540faaca038056812bde398:922c64590222798bb761d5b6d8e72950