id: wordpress-siteorigin-panels

info:
  name: Page Builder by SiteOrigin Detection
  author: ricardomaia
  severity: info
  reference:
    - https://wordpress.org/plugins/siteorigin-panels/
  metadata:
    plugin_namespace: siteorigin-panels
    wpscan: https://wpscan.com/plugin/siteorigin-panels
  tags: tech,wordpress,wp-plugin,top-200

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

    payloads:
      last_version: helpers/wordpress/plugins/siteorigin-panels.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: 4a0a004730450221008a4c4caedf2cc3059f1893e76ebcf1bcf5e907ac20ca8056d1f0fa3e959afef00220357959f2e721337ca8a8413d9df10b07d510615720809bafd94e6cc7733aa15f:922c64590222798bb761d5b6d8e72950