diff --git a/pywhat/Data/regex.json b/pywhat/Data/regex.json index 6b44f89..093f337 100644 --- a/pywhat/Data/regex.json +++ b/pywhat/Data/regex.json @@ -933,6 +933,30 @@ "Amazon" ] }, + { + "Name": "Notion Note URI", + "Regex": "(?i)^(https:\/\/www\\.notion\\.so\/[A-Za-z0-9-_]+\/.*-[0-9a-f]{32})$", + "plural_name": false, + "Description": null, + "Rarity": 1, + "URL": null, + "Tags": [ + "Bug Bounty", + "URL" + ] + }, + { + "Name": "Notion Team Note URI", + "Regex": "(?i)^(https:\/\/[A-Za-z0-9-_]+\\.notion\\.site\/.*-[0-9a-f]{32})$", + "plural_name": false, + "Description": null, + "Rarity": 1, + "URL": null, + "Tags": [ + "Bug Bounty", + "URL" + ] + }, { "Name": "Nano (NANO) Wallet Address", "Regex": "^((nano|xrb)_[13]{1}[1a-km-z3-9]{59})$", @@ -978,6 +1002,19 @@ "Mailchimp" ] }, + { + "Name": "Notion Integration Token", + "Regex": "(?i)^((secret_)([a-zA-Z0-9]{43}))$", + "plural_name": false, + "Description": "A Notion API integration's internal integration token.", + "Rarity": 0.8, + "URL": null, + "Tags": [ + "Credentials", + "API Keys", + "Bug Bounty" + ] + }, { "Name": "Internet Protocol (IP) Address Version 6", "Regex": "^((?=.*[0-9])\\[?(?:(?:[0-9a-f]{1,4}:){7,7}[0-9a-f]{1,4}|([0-9a-f]{4}:){1,7}:|([0-9a-f]{1,4}:){1,6}:[0-9a-f]{1,4}|([0-9a-f]{1,4}:){1,5}(:[0-9a-f]{1,4}){1,2}|([0-9a-f]{1,4}:){1,4}(:[0-9a-f]{1,4}){1,3}|([0-9a-f]{1,4}:){1,3}(:[0-9a-f]{1,4}){1,4}|([0-9a-fA]{1,4}:){1,2}(:[0-9a-f]{1,4}){1,5}|[0-9a-f]{1,4}:((:[0-9a-f]{1,4}){1,6})|:((:[0-9a-f]{1,4}){1,7}|:)|fe80:(:[0-9a-f]{0,4}){0,4}%[0-9a-z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|(?:[0-9a-f]{1,4}:){1,4}:(?:(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\.){3,3}(25[0-5]|(?:2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\\]?(?::[0-9]{1,5})?)$", diff --git a/tests/test_regex_identifier.py b/tests/test_regex_identifier.py index e90db5c..5eaecb6 100644 --- a/tests/test_regex_identifier.py +++ b/tests/test_regex_identifier.py @@ -703,6 +703,20 @@ def test_google_cal(): assert "Google Calendar URI" in str(res) +def test_notion_note(): + res = r.check( + ["https://www.notion.so/test-user/My-Note-fa45346d9dd4421abc6857ce2e7fb0db"] + ) + assert "Notion Note URI" in str(res) + + +def test_notion_team_note(): + res = r.check( + ["https://testorg.notion.site/My-Note-9f8863871e024ea6acc64d6564004a22"] + ) + assert "Notion Team Note URI" in str(res) + + def test_aws_access_key_id(): res = r.check(["AKIA31OMZKYAARWZ3ERH"]) _assert_match_first_item("Amazon Web Services Access Key", res) @@ -768,6 +782,11 @@ def test_slack_token(): ) +def test_notion_integration_token(): + res = r.check(["secret_n2ZeRrMx743JQ5wiucZ0DBEe47opfKubUp22N0wIrOy"]) + _assert_match_first_item("Notion Integration Token", res) + + def test_pgp_public_key(): res = r.check( [