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,discovery

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