From 92b97e17b525f451cebd7da560c0b5fa7daaea63 Mon Sep 17 00:00:00 2001 From: Scott Walsh Date: Tue, 5 Dec 2023 04:24:32 -0400 Subject: [PATCH] Update to use the JSON extractor for nextcloud-owncloud-detect.yaml (#8719) * Update to use the JSON extractor * fix regex * word matcher + json extractor --------- Co-authored-by: Dhiyaneshwaran Co-authored-by: sandeep <8293321+ehsandeep@users.noreply.github.com> --- .../nextcloud-owncloud-detect.yaml | 22 +++++++++---------- 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/http/technologies/nextcloud-owncloud-detect.yaml b/http/technologies/nextcloud-owncloud-detect.yaml index e3fd3aa456..c63f84c40a 100644 --- a/http/technologies/nextcloud-owncloud-detect.yaml +++ b/http/technologies/nextcloud-owncloud-detect.yaml @@ -2,7 +2,7 @@ id: owncloud-status-page info: name: Owncloud StatusPage detection - author: myztique + author: myztique,invisiblethreat severity: info metadata: verified: true @@ -16,17 +16,15 @@ http: - "{{BaseURL}}/status.php" matchers: - - type: regex + - type: word part: body - regex: - - '{"installed":(?:true|false),"maintenance":(?:true|false),"version":"[0-9\.]*","versionstring":"[a-z-A-Z0-9\.]*","edition":"[\d\D]*"}' + words: + - '"versionstring":' + - '"installed":' + - '"edition":' + condition: and extractors: - - type: regex - part: body - name: version - group: 1 - regex: - - '{[\d\D]*"version":"([0-9\.]+)"' - -# digest: 4a0a00473045022100f3414071ecfd36084121e102dde43f6816d4f5bf9af4653cab8e3f50914aa7d4022002503f4e4f126a0581b1d1731362eaf5b67e9aace6301b608d4a2f24f89d4609:922c64590222798bb761d5b6d8e72950 + - type: json + json: + - .version