id: wordpress-popup-builder

info:
  name: Popup Builder – Create highly converting, mobile friendly marketing popups. Detection
  author: ricardomaia
  severity: info
  reference:
    - https://wordpress.org/plugins/popup-builder/
  metadata:
    max-request: 1
    plugin_namespace: popup-builder
    wpscan: https://wpscan.com/plugin/popup-builder
  tags: tech,wordpress,wp-plugin,top-200,discovery

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

    payloads:
      last_version: helpers/wordpress/plugins/popup-builder.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: 490a0046304402201cda62dc7f3d575315bdff8692f368ad383996bb29c2f84d78b55ba3aac40ea20220779908fdcc4148e08209fc5ae8b952bef37e1b23a6c249cb0f646720f98251e7:922c64590222798bb761d5b6d8e72950