From 7481848e57037baf44f999ca6c612e670f4e05c0 Mon Sep 17 00:00:00 2001 From: SkeletalDemise <29117662+SkeletalDemise@users.noreply.github.com> Date: Thu, 7 Oct 2021 16:14:41 -0700 Subject: [PATCH 1/2] Add numerous new tags Adds numerous new tags to the regexes. --- pywhat/Data/regex.json | 342 +++++++++++++++++++++++++++-------------- 1 file changed, 225 insertions(+), 117 deletions(-) diff --git a/pywhat/Data/regex.json b/pywhat/Data/regex.json index ef19099..73db4f1 100644 --- a/pywhat/Data/regex.json +++ b/pywhat/Data/regex.json @@ -126,7 +126,8 @@ "Tags": [ "Finance", "Cryptocurrency Wallet", - "Bitcoin Cash Wallet" + "Bitcoin Cash Wallet", + "Bitcoin" ] }, { @@ -140,7 +141,8 @@ "Tags": [ "Bug Bounty", "API Keys", - "Credentials" + "Credentials", + "Heroku" ] }, { @@ -154,7 +156,8 @@ "Tags": [ "Bug Bounty", "API Keys", - "Credentials" + "Credentials", + "Slack" ] }, { @@ -168,7 +171,8 @@ "Tags": [ "Bug Bounty", "API Keys", - "Credentials" + "Credentials", + "Slack" ] }, { @@ -193,7 +197,8 @@ "URL": null, "Tags": [ "Networking", - "AWS" + "AWS", + "Bug Bounty" ] }, { @@ -207,7 +212,7 @@ "Tags": [ "API Keys", "Credentials", - "Square API", + "Square", "Bug Bounty" ] }, @@ -222,7 +227,7 @@ "Tags": [ "API Keys", "Credentials", - "Square API", + "Square", "Bug Bounty" ] }, @@ -237,7 +242,8 @@ "Tags": [ "API Keys", "Credentials", - "Bug Bounty" + "Bug Bounty", + "Stripe" ] }, { @@ -251,10 +257,11 @@ "Tags": [ "API Keys", "Credentials", - "Bug Bounty" + "Bug Bounty", + "GitHub" ] }, - { + { "Name": "Amazon Resource Name (ARN)", "Regex": "(?i)^(arn:(?P[^:\\n]*):(?P[^:\\n]*):(?P[^:\\n]*):(?P[^:\\n]*):(?P(?P[^:\\/\\n]*)[:\\/])?(?P.*))$", "plural_name": false, @@ -264,7 +271,8 @@ "Tags": [ "Identifiers", "Networking", - "AWS" + "AWS", + "Bug Bounty" ] }, { @@ -278,7 +286,8 @@ "Tags": [ "API Keys", "Bug Bounty", - "Credentials" + "Credentials", + "Facebook" ] }, { @@ -292,7 +301,8 @@ "Tags": [ "API Keys", "Bug Bounty", - "Credentials" + "Credentials", + "Facebook" ] }, { @@ -304,7 +314,8 @@ "Rarity": 1, "URL": null, "Tags": [ - "Bug Bounty" + "Bug Bounty", + "Facebook" ] }, { @@ -318,7 +329,8 @@ "Tags": [ "API Keys", "Bug Bounty", - "Credentials" + "Credentials", + "Twitter" ] }, { @@ -330,7 +342,8 @@ "Rarity": 1, "URL": null, "Tags": [ - "Bug Bounty" + "Bug Bounty", + "Twitter" ] }, { @@ -343,7 +356,8 @@ "URL": null, "Tags": [ "Token", - "Bug Bounty" + "Bug Bounty", + "NPM" ] }, { @@ -357,7 +371,8 @@ "Tags": [ "API Keys", "Bug Bounty", - "Credentials" + "Credentials", + "GitHub" ] }, { @@ -371,7 +386,8 @@ "Tags": [ "API Keys", "Bug Bounty", - "Credentials" + "Credentials", + "GitHub" ] }, { @@ -385,7 +401,8 @@ "Tags": [ "API Keys", "Bug Bounty", - "Credentials" + "Credentials", + "GitHub" ] }, { @@ -399,7 +416,8 @@ "Tags": [ "API Keys", "Bug Bounty", - "Credentials" + "Credentials", + "GitHub" ] }, { @@ -411,7 +429,8 @@ "Rarity": 1, "URL": null, "Tags": [ - "Bug Bounty" + "Bug Bounty", + "LinkedIn" ] }, { @@ -425,7 +444,8 @@ "Tags": [ "API Keys", "Bug Bounty", - "Credentials" + "Credentials", + "LinkedIn" ] }, { @@ -439,7 +459,8 @@ "Tags": [ "API Keys", "Bug Bounty", - "Credentials" + "Credentials", + "GitHub" ] }, { @@ -453,7 +474,8 @@ "Tags": [ "API Keys", "Bug Bounty", - "Credentials" + "Credentials", + "Stripe" ] }, { @@ -467,7 +489,8 @@ "Tags": [ "API Keys", "Bug Bounty", - "Credentials" + "Credentials", + "Stripe" ] }, { @@ -481,7 +504,8 @@ "Tags": [ "API Keys", "Bug Bounty", - "Credentials" + "Credentials", + "Square" ] }, { @@ -495,7 +519,8 @@ "Tags": [ "API Keys", "Bug Bounty", - "Credentials" + "Credentials", + "Square" ] }, { @@ -509,7 +534,9 @@ "Tags": [ "API Keys", "Bug Bounty", - "Credentials" + "Credentials", + "PayPal", + "Braintree" ] }, { @@ -523,7 +550,9 @@ "Tags": [ "API Keys", "Bug Bounty", - "Credentials" + "Credentials", + "Amazon", + "MWS" ] }, { @@ -537,7 +566,8 @@ "Tags": [ "API Keys", "Bug Bounty", - "Credentials" + "Credentials", + "Picatic" ] }, { @@ -551,7 +581,8 @@ "Tags": [ "API Keys", "Bug Bounty", - "Credentials" + "Credentials", + "Google" ] }, { @@ -565,7 +596,8 @@ "Tags": [ "API Keys", "Bug Bounty", - "Credentials" + "Credentials", + "Google" ] }, { @@ -579,7 +611,8 @@ "Tags": [ "API Keys", "Bug Bounty", - "Credentials" + "Credentials", + "StackHawk" ] }, { @@ -593,7 +626,8 @@ "Tags": [ "API Keys", "Bug Bounty", - "Credentials" + "Credentials", + "NuGet" ] }, { @@ -607,7 +641,8 @@ "Tags": [ "API Keys", "Bug Bounty", - "Credentials" + "Credentials", + "SendGrid" ] }, { @@ -619,7 +654,8 @@ "Rarity": 1, "URL": null, "Tags": [ - "Bug Bounty" + "Bug Bounty", + "Zoho" ] }, { @@ -633,7 +669,8 @@ "Tags": [ "API Keys", "Bug Bounty", - "Credentials" + "Credentials", + "Zapier" ] }, { @@ -647,7 +684,8 @@ "Tags": [ "API Keys", "Bug Bounty", - "Credentials" + "Credentials", + "New Relic" ] }, { @@ -661,7 +699,8 @@ "Tags": [ "API Keys", "Bug Bounty", - "Credentials" + "Credentials", + "New Relic" ] }, { @@ -675,7 +714,8 @@ "Tags": [ "API Keys", "Bug Bounty", - "Credentials" + "Credentials", + "New Relic" ] }, { @@ -687,7 +727,8 @@ "Rarity": 1, "URL": null, "Tags": [ - "Bug Bounty" + "Bug Bounty", + "New Relic" ] }, { @@ -701,7 +742,8 @@ "Tags": [ "API Keys", "Bug Bounty", - "Credentials" + "Credentials", + "New Relic" ] }, { @@ -714,7 +756,9 @@ "URL": null, "Tags": [ "Bug Bounty", - "URL" + "URL", + "Microsoft Teams", + "Microsoft" ] }, { @@ -726,12 +770,13 @@ "Rarity": 1, "URL": null, "Tags": [ - "Bug Bounty" + "Bug Bounty", + "Google" ] }, { "Name": "Google Calendar URI", - "Regex": "(?i)^(https:\/\/calendar.google.com\/calendar\/embed\\?src=[A-Za-z0-9%@&;=\\-_\\./]+)$", + "Regex": "(?i)^(https://calendar.google.com/calendar/embed\\?src=[A-Za-z0-9%@&;=\\-_\\./]+)$", "plural_name": false, "Description": null, "Exploit": null, @@ -739,7 +784,9 @@ "URL": null, "Tags": [ "Bug Bounty", - "URL" + "URL", + "Google Calendar", + "Google" ] }, { @@ -752,7 +799,8 @@ "URL": null, "Tags": [ "Bug Bounty", - "URL" + "URL", + "Discord" ] }, { @@ -765,21 +813,23 @@ "URL": null, "Tags": [ "Bug Bounty", - "Credentials" + "Credentials", + "Cloudinary" ] }, { - "Name": "PyPi Upload Token", + "Name": "PyPI Upload Token", "Regex": "(?i)^(pypi-AgEIcHlwaS5vcmc[A-Za-z0-9-_]+)$", "plural_name": false, "Description": null, - "Exploit": "Anyone with this token is able to upload to the PyPi for the package that belongs to this token.\n", + "Exploit": "Anyone with this token is able to upload to the PyPI for the package that belongs to this token.\n", "Rarity": 1, "URL": null, "Tags": [ "Bug Bounty", "Credentials", - "API Keys" + "API Keys", + "PyPI" ] }, { @@ -793,7 +843,8 @@ "Tags": [ "Bug Bounty", "Credentials", - "API Keys" + "API Keys", + "Shopify" ] }, { @@ -807,7 +858,8 @@ "Tags": [ "Bug Bounty", "Credentials", - "API Keys" + "API Keys", + "Shopify" ] }, { @@ -821,7 +873,8 @@ "Tags": [ "Bug Bounty", "Credentials", - "API Keys" + "API Keys", + "Shopify" ] }, { @@ -835,7 +888,8 @@ "Tags": [ "Bug Bounty", "Credentials", - "API Keys" + "API Keys", + "Shopify" ] }, { @@ -849,7 +903,8 @@ "Tags": [ "Bug Bounty", "Credentials", - "API Keys" + "API Keys", + "Dynatrace" ] }, { @@ -862,7 +917,8 @@ "URL": null, "Tags": [ "Bug Bounty", - "AWS" + "AWS", + "Amazon" ] }, { @@ -875,7 +931,8 @@ "Tags": [ "Finance", "Cryptocurrency Wallet", - "Nano Wallet" + "Nano Wallet", + "Nano" ] }, { @@ -889,7 +946,9 @@ "Tags": [ "API Keys", "Bug Bounty", - "Credentials" + "Credentials", + "Google Cloud", + "Google" ] }, { @@ -903,7 +962,8 @@ "Tags": [ "Bug Bounty", "API Keys", - "Credentials" + "Credentials", + "Mailchimp" ] }, { @@ -916,7 +976,8 @@ "Tags": [ "Identifiers", "Networking", - "IP" + "IP", + "IPv4" ] }, { @@ -941,7 +1002,8 @@ "Tags": [ "Identifiers", "Networking", - "IP" + "IP", + "IPv6" ] }, { @@ -954,7 +1016,8 @@ "Tags": [ "Finance", "Cryptocurrency Wallet", - "Bitcoin Wallet" + "Bitcoin Wallet", + "Bitcoin" ] }, { @@ -965,7 +1028,9 @@ "Rarity": 0.7, "URL": "https://www.google.com/maps/place/", "Tags": [ - "Geo-location" + "Geo-location", + "Lat & Long", + "Coords" ] }, { @@ -977,13 +1042,18 @@ "URL": "https://maclookup.app/search/macs/", "Tags": [ "Identifiers", - "Networking" + "Networking", + "EUI-48", + "Bluetooth Address", + "Ethernet Address", + "WiFi Address", + "Mac Address" ], "Children": { - "path": "mac_vendors.json", - "entry": "Vendor(s): ", - "method": "hashmap", - "deletion_pattern": "[:.-]" + "path": "mac_vendors.json", + "entry": "Vendor(s): ", + "method": "hashmap", + "deletion_pattern": "[:.-]" } }, { @@ -996,7 +1066,8 @@ "Tags": [ "Finance", "Cryptocurrency Wallet", - "Dogecoin Wallet" + "Dogecoin Wallet", + "Dogecoin" ] }, { @@ -1009,7 +1080,8 @@ "Tags": [ "Identifiers", "Credentials", - "Email Address" + "Email Address", + "Email" ] }, { @@ -1022,7 +1094,8 @@ "Tags": [ "Identifiers", "Credentials", - "Phone Number" + "Phone Number", + "Phone" ], "Children": { "path": "phone_codes.json", @@ -1040,6 +1113,7 @@ "Tags": [ "Credentials", "SSN", + "Social Security Number", "Bug Bounty" ] }, @@ -1054,7 +1128,8 @@ "Tags": [ "Bug Bounty", "Credentials", - "API Keys" + "API Keys", + "Bitly" ] }, { @@ -1063,12 +1138,14 @@ "plural_name": false, "Description": null, "Rarity": 0.5, - "Exploit":null, + "Exploit": null, "URL": null, "Tags": [ "Identifiers", "API Keys", - "Bug Bounty" + "Bug Bounty", + "Visual Studio", + "Microsoft" ] }, { @@ -1080,7 +1157,8 @@ "URL": "https://www.youtube.com/channel/", "Tags": [ "Media", - "YouTube" + "YouTube", + "YouTube Channel" ] }, { @@ -1091,10 +1169,12 @@ "Rarity": 0.5, "URL": null, "Tags": [ - "Credentials", - "Token", - "API Keys", - "Bug Bounty" + "Credentials", + "Token", + "API Keys", + "Bug Bounty", + "Discord", + "Discord Bot" ] }, { @@ -1105,7 +1185,9 @@ "Rarity": 0.4, "URL": null, "Tags": [ - "Identifiers" + "Identifiers", + "License Plate", + "Turkish" ] }, { @@ -1116,7 +1198,9 @@ "Rarity": 0.4, "URL": null, "Tags": [ - "Identifiers" + "Identifiers", + "Date of Birth", + "DOB" ] }, { @@ -1129,7 +1213,8 @@ "Tags": [ "Finance", "Cryptocurrency Wallet", - "Monero Wallet" + "Monero Wallet", + "Monero" ] }, { @@ -1142,7 +1227,8 @@ "Tags": [ "Finance", "Cryptocurrency Wallet", - "Litecoin Wallet" + "Litecoin Wallet", + "Litecoin" ] }, { @@ -1155,7 +1241,9 @@ "Tags": [ "Finance", "Cryptocurrency Wallet", - "Ripple Wallet" + "Ripple Wallet", + "Ripple", + "XRP" ] }, { @@ -1349,10 +1437,11 @@ "Tags": [ "Finance", "Cryptocurrency Wallet", - "Ethereum Wallet" + "Ethereum Wallet", + "Ethereum" ] }, - { + { "Name": "Slack Token", "Regex": "^(xox[a-zA-Z]-[a-zA-Z0-9-]+)$", "plural_name": false, @@ -1363,10 +1452,11 @@ "Tags": [ "API Keys", "Credentials", - "Bug Bounty" + "Bug Bounty", + "Slack" ] - }, - { + }, + { "Name": "Amazon Web Services Organization identifier", "Regex": "^(o-[a-z0-9]{10,32})$", "plural_name": false, @@ -1375,10 +1465,11 @@ "URL": null, "Tags": [ "Identifiers", - "AWS" - ] - }, - { + "AWS", + "Amazon" + ] + }, + { "Name": "Google API Key", "Regex": "^(AIza[0-9A-Za-z-_]{35})$", "plural_name": false, @@ -1407,7 +1498,7 @@ "Bug Bounty" ] }, - { + { "Name": "Mailgun API Key", "Regex": "^(key-[0-9a-zA-Z]{32})$", "plural_name": false, @@ -1418,7 +1509,8 @@ "Tags": [ "API Keys", "Credentials", - "Bug Bounty" + "Bug Bounty", + "Mailgun" ] }, { @@ -1432,7 +1524,8 @@ "Tags": [ "API Keys", "Credentials", - "Bug Bounty" + "Bug Bounty", + "Twilio" ] }, { @@ -1499,7 +1592,8 @@ "Tags": [ "Token", "Website", - "JWT Token" + "JWT Token", + "JWT" ] }, { @@ -1513,10 +1607,11 @@ "Tags": [ "Credentials", "API Keys", - "AWS" - ] - }, - { + "AWS", + "Amazon" + ] + }, + { "Name": "Amazon Web Services Secret Access Key", "Regex": "^((? Date: Thu, 7 Oct 2021 16:17:23 -0700 Subject: [PATCH 2/2] Fix PyPI test --- tests/test_regex_identifier.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_regex_identifier.py b/tests/test_regex_identifier.py index 41c7899..57b2174 100644 --- a/tests/test_regex_identifier.py +++ b/tests/test_regex_identifier.py @@ -858,7 +858,7 @@ def test_pypi_upload_token(): "pypi-AgEIcHlwaS5vcmcCJDZlNzEyNGJmLWQ4N2UtNGZhYS1iNWEzLWQzYzg2YjU3NzAxYgACJXsicGVybWlzc2lvbnMiOiAidXNlciIsICJ2ZXJzaW9uIjogMX0AAAYgeYcgrZO31PTS_3ipsd0fTSMy1kVkxCzhQvHN6m97yIE" ] ) - _assert_match_first_item("PyPi Upload Token", res) + _assert_match_first_item("PyPI Upload Token", res) def test_turkish_car_plate():