id: wordpress-woocommerce-gateway-stripe

info:
  name: WooCommerce Stripe Payment Gateway Detection
  author: ricardomaia
  severity: info
  reference:
    - https://wordpress.org/plugins/woocommerce-gateway-stripe/
  metadata:
    plugin_namespace: woocommerce-gateway-stripe
    wpscan: https://wpscan.com/plugin/woocommerce-gateway-stripe
  tags: tech,wordpress,wp-plugin,top-100,top-200,discovery

http:
  - method: GET
    path:
      - "{{BaseURL}}/wp-content/plugins/woocommerce-gateway-stripe/readme.txt"

    payloads:
      last_version: helpers/wordpress/plugins/woocommerce-gateway-stripe.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: 4a0a00473045022047e1c9443577248da09a807f88757748046784e0d57768613a4c75ef6a28f53d022100cb9c58940492a8b3b8b173fb356183018d8b6bae64a4beecf4ba98a837b03db2:922c64590222798bb761d5b6d8e72950