id: wordpress-woocommerce-pdf-invoices-packing-slips

info:
  name: PDF Invoices & Packing Slips for WooCommerce Detection
  author: ricardomaia
  severity: info
  reference:
    - https://wordpress.org/plugins/woocommerce-pdf-invoices-packing-slips/
  metadata:
    plugin_namespace: woocommerce-pdf-invoices-packing-slips
    wpscan: https://wpscan.com/plugin/woocommerce-pdf-invoices-packing-slips
  tags: tech,wordpress,wp-plugin,top-200

http:
  - method: GET
    path:
      - "{{BaseURL}}/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/readme.txt"

    payloads:
      last_version: helpers/wordpress/plugins/woocommerce-pdf-invoices-packing-slips.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: 4a0a0047304502204aad7b29c3f5ba0da913feacf2401c708c4ea9be43a00f2fd68eb8f8fb436818022100d895b872106668f545504fe7acd3535f61a5233dee71456e2b1e2d5f0865bb17:922c64590222798bb761d5b6d8e72950