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

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