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: 490a0046304402206bb23e14a70ad895b50329fb9f0c5bba663589d644e95f54846cdbfc9dcbc47102207977c7cb165012bed16337f87ae9cb6fe67699947735ea997ec9cff5550a9820:922c64590222798bb761d5b6d8e72950