From b296af23f1efb04e7fc0ebed2c450ffe66b9deb4 Mon Sep 17 00:00:00 2001 From: Colin O'Dell Date: Sat, 2 Oct 2021 09:17:14 -0400 Subject: [PATCH 1/2] Add New Relic User API Key regex --- pywhat/Data/regex.json | 14 ++++++++++++++ tests/test_regex_identifier.py | 5 +++++ 2 files changed, 19 insertions(+) diff --git a/pywhat/Data/regex.json b/pywhat/Data/regex.json index f3aecc0..49eff11 100644 --- a/pywhat/Data/regex.json +++ b/pywhat/Data/regex.json @@ -671,6 +671,20 @@ "Bug Bounty" ] }, + { + "Name": "New Relic User API Key", + "Regex": "(?i)^(NRAK-[a-z0-9]{27})$", + "plural_name": false, + "Description": null, + "Exploit": null, + "Rarity": 1, + "URL": null, + "Tags": [ + "API Keys", + "Bug Bounty", + "Credentials" + ] + }, { "Name": "Microsoft Teams Webhook", "Regex": "(?i)^(https://outlook\\.office\\.com/webhook/[A-Za-z0-9\\-@]{64}/IncomingWebhook/[A-Za-z0-9\\-]{64}/[A-Za-z0-9\\-]{64})$", diff --git a/tests/test_regex_identifier.py b/tests/test_regex_identifier.py index 643d995..32f48e1 100644 --- a/tests/test_regex_identifier.py +++ b/tests/test_regex_identifier.py @@ -765,3 +765,8 @@ def test_stripe_api_key(): def test_zapier_webhook(): res = r.check(["https://hooks.zapier.com/hooks/catch/1234567/f8f22dgg/"]) _assert_match_first_item("Zapier Webhook Token", res) + + +def test_new_relic_user_api_key(): + res = r.check(["NRAK-WI4JTVS049IF5A3FGS5N51XS3Y5"]) + _assert_match_first_item("New Relic User API Key", res) From a436110073554dc552f1a6832175fd54d61897bf Mon Sep 17 00:00:00 2001 From: Colin O'Dell Date: Sat, 2 Oct 2021 09:17:36 -0400 Subject: [PATCH 2/2] Add tests for New Relic REST and Synthetics keys --- tests/test_regex_identifier.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/test_regex_identifier.py b/tests/test_regex_identifier.py index 32f48e1..41cf773 100644 --- a/tests/test_regex_identifier.py +++ b/tests/test_regex_identifier.py @@ -767,6 +767,16 @@ def test_zapier_webhook(): _assert_match_first_item("Zapier Webhook Token", res) +def test_new_relic_rest_api_key(): + res = r.check(["NRRA-2a2d50d7d9449f3bb7ef65ac1184c488bd4fe7a8bd"]) + _assert_match_first_item("New Relic REST API Key", res) + + +def test_new_relic_synthetics_api_key(): + res = r.check(["NRSP-us010E1E3D1716F721FF39F726B3E4CBCB7"]) + _assert_match_first_item("New Relic Synthetics Location Key", res) + + def test_new_relic_user_api_key(): res = r.check(["NRAK-WI4JTVS049IF5A3FGS5N51XS3Y5"]) _assert_match_first_item("New Relic User API Key", res)