From a90d208b997aa84c329bd93906bdbb9674361f49 Mon Sep 17 00:00:00 2001 From: IlluminatiFish <45714340+IlluminatiFish@users.noreply.github.com> Date: Thu, 3 Mar 2022 22:36:29 +0000 Subject: [PATCH 01/11] Added Guilded webhook Added Guilded (guilded,gg) webhook regex --- pywhat/Data/regex.json | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/pywhat/Data/regex.json b/pywhat/Data/regex.json index eaf8fff..9b3a511 100644 --- a/pywhat/Data/regex.json +++ b/pywhat/Data/regex.json @@ -1002,6 +1002,30 @@ "Invalid": [] } }, + { + "Name": "Guilded Webhook", + "Regex": "^https?:\\/\\/(?:api\\.|media\\.|(?Pwww.))guilded\\.gg(?(web)\\/api|)\\/webhooks\\/[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89abAB][a-f0-9]{3}-[a-f0-9]{12}\\/[\\w]{86}$", + "plural_name": false, + "Description": null, + "Rarity": 1, + "URL": null, + "Tags": [ + "Bug Bounty", + "URL", + "Guilded" + ], + "Examples": { + "Valid": [ + "https://media.guilded.gg/webhooks/1fa5fe35-74e7-4f17-bf53-52d02293fea6/zhXzVecRvaMCWEcOCIuIMYQyeeKemUCswca24Q68cCQCgg4oYKeawamAiEkaI2uCS8Q2sgwy2qUOe2c4yE2em6", + "https://media.guilded.gg/api/webhooks/1fa5fe35-74e7-4f17-bf53-52d02293fea6/zhXzVecRvaMCWEcOCIuIMYQyeeKemUCswca24Q68cCQCgg4oYKeawamAiEkaI2uCS8Q2sgwy2qUOe2c4yE2em6", + "https://www.guilded.gg/webhooks/1fa5fe35-74e7-4f17-bf53-52d02293fea6/zhXzVecRvaMCWEcOCIuIMYQyeeKemUCswca24Q68cCQCgg4oYKeawamAiEkaI2uCS8Q2sgwy2qUOe2c4yE2em6", + "https://www.guilded.gg/api/webhooks/1fa5fe35-74e7-4f17-bf53-52d02293fea6/zhXzVecRvaMCWEcOCIuIMYQyeeKemUCswca24Q68cCQCgg4oYKeawamAiEkaI2uCS8Q2sgwy2qUOe2c4yE2em6", + "https://api.guilded.gg/webhooks/1fa5fe35-74e7-4f17-bf53-52d02293fea6/zhXzVecRvaMCWEcOCIuIMYQyeeKemUCswca24Q68cCQCgg4oYKeawamAiEkaI2uCS8Q2sgwy2qUOe2c4yE2em6", + "https://api.guilded.gg/api/webhooks/1fa5fe35-74e7-4f17-bf53-52d02293fea6/zhXzVecRvaMCWEcOCIuIMYQyeeKemUCswca24Q68cCQCgg4oYKeawamAiEkaI2uCS8Q2sgwy2qUOe2c4yE2em6" + ], + "Invalid": [] + } + }, { "Name": "Cloudinary Credentials", "Regex": "(?i)^(cloudinary://[0-9]+:[A-Za-z0-9-_.]+@[A-Za-z0-9-_.]+)$", From af61d8ade184f7ffb4020f41e55b06940d4036bf Mon Sep 17 00:00:00 2001 From: IlluminatiFish <45714340+IlluminatiFish@users.noreply.github.com> Date: Thu, 3 Mar 2022 22:42:57 +0000 Subject: [PATCH 02/11] Add Discord webhook fixture Added Discord webhook fixture --- fixtures/file | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fixtures/file b/fixtures/file index 99df774..92caeca 100644 --- a/fixtures/file +++ b/fixtures/file @@ -103,3 +103,5 @@ doi:10.1392/BC1.0 10.1000/123 a80122b2565c3e26a61cbf58d1d1aad7-us5 + +https://discord.com/api/webhooks/949053171232276500/V4xxtMKjN9_xH_L6ipXkNRjUqZSAiYQ2l64-L0Z4-3ciPc6tsDh25zLaEEjp97U5wXN2 From 25532aa6c98f5300d2688c3d9d4d3363bb3d4ba6 Mon Sep 17 00:00:00 2001 From: IlluminatiFish <45714340+IlluminatiFish@users.noreply.github.com> Date: Thu, 3 Mar 2022 22:45:27 +0000 Subject: [PATCH 03/11] Added Discord webhook test Added Discord webhook test --- tests/test_click.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/test_click.py b/tests/test_click.py index cdaf5ec..c47907a 100644 --- a/tests/test_click.py +++ b/tests/test_click.py @@ -737,3 +737,10 @@ def test_print_tags2(): ) assert result.exit_code == 0 assert "Tags: CTF Flag" in result.output + + +def test_discord_webhook(): + runner = CliRunner() + result = runner.invoke(main, ["fixtures/file"]) + assert result.exit_code == 0 + assert re.findall("Discord Webhook", str(result.output)) From d5c142384bb225e9e053ef80ac3d768bda4c3ddb Mon Sep 17 00:00:00 2001 From: IlluminatiFish <45714340+IlluminatiFish@users.noreply.github.com> Date: Thu, 3 Mar 2022 22:55:25 +0000 Subject: [PATCH 04/11] Added Guilded webhook test Added Guilded webhook test --- tests/test_click.py | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/tests/test_click.py b/tests/test_click.py index c47907a..8b898b3 100644 --- a/tests/test_click.py +++ b/tests/test_click.py @@ -658,6 +658,20 @@ def test_file_fixture_slack_webhook(): result = runner.invoke(main, ["fixtures/file"]) assert result.exit_code == 0 assert re.findall("Slack Webhook", str(result.output)) + + +def test_discord_webhook(): + runner = CliRunner() + result = runner.invoke(main, ["fixtures/file"]) + assert result.exit_code == 0 + assert re.findall("Discord Webhook", str(result.output)) + + +def test_guilded_webhook(): + runner = CliRunner() + result = runner.invoke(main, ["fixtures/file"]) + assert result.exit_code == 0 + assert re.findall("Guilded Webhook", str(result.output)) def test_format(): @@ -738,9 +752,4 @@ def test_print_tags2(): assert result.exit_code == 0 assert "Tags: CTF Flag" in result.output - -def test_discord_webhook(): - runner = CliRunner() - result = runner.invoke(main, ["fixtures/file"]) - assert result.exit_code == 0 - assert re.findall("Discord Webhook", str(result.output)) + From d78ffec13270b131f799a8319dc361f54ea674ad Mon Sep 17 00:00:00 2001 From: IlluminatiFish <45714340+IlluminatiFish@users.noreply.github.com> Date: Thu, 3 Mar 2022 22:56:17 +0000 Subject: [PATCH 05/11] Added Guilded webhook fixture Added Guilded webhook fixture --- fixtures/file | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fixtures/file b/fixtures/file index 92caeca..8c41e5a 100644 --- a/fixtures/file +++ b/fixtures/file @@ -105,3 +105,5 @@ doi:10.1392/BC1.0 a80122b2565c3e26a61cbf58d1d1aad7-us5 https://discord.com/api/webhooks/949053171232276500/V4xxtMKjN9_xH_L6ipXkNRjUqZSAiYQ2l64-L0Z4-3ciPc6tsDh25zLaEEjp97U5wXN2 + +https://www.guilded.gg/api/webhooks/1fa5fe35-74e7-4f17-bf53-52d02293fea6/zhXzVecRvaMCWEcOCIuIMYQyeeKemUCswca24Q68cCQCgg4oYKeawamAiEkaI2uCS8Q2sgwy2qUOe2c4yE2em6 From c7a2ebb8006110afa5905bf18ffd77c1f7a631dc Mon Sep 17 00:00:00 2001 From: IlluminatiFish <45714340+IlluminatiFish@users.noreply.github.com> Date: Thu, 3 Mar 2022 23:25:27 +0000 Subject: [PATCH 06/11] Add in-line mode specifier Add in-line mode specifier --- pywhat/Data/regex.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pywhat/Data/regex.json b/pywhat/Data/regex.json index 9b3a511..2f96f39 100644 --- a/pywhat/Data/regex.json +++ b/pywhat/Data/regex.json @@ -1004,7 +1004,7 @@ }, { "Name": "Guilded Webhook", - "Regex": "^https?:\\/\\/(?:api\\.|media\\.|(?Pwww.))guilded\\.gg(?(web)\\/api|)\\/webhooks\\/[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89abAB][a-f0-9]{3}-[a-f0-9]{12}\\/[\\w]{86}$", + "Regex": "(?i)^https?:\\/\\/(?:api\\.|media\\.|(?Pwww.))guilded\\.gg(?(web)\\/api|)\\/webhooks\\/[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89abAB][a-f0-9]{3}-[a-f0-9]{12}\\/[\\w]{86}$", "plural_name": false, "Description": null, "Rarity": 1, From 5990493e25189dff24b581eb4ba7190b5a16967f Mon Sep 17 00:00:00 2001 From: IlluminatiFish <45714340+IlluminatiFish@users.noreply.github.com> Date: Thu, 3 Mar 2022 23:35:56 +0000 Subject: [PATCH 07/11] Fix examples for Guilded webhooks Initial commit had the list meshed together (oops) --- pywhat/Data/regex.json | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/pywhat/Data/regex.json b/pywhat/Data/regex.json index 2f96f39..f4a59da 100644 --- a/pywhat/Data/regex.json +++ b/pywhat/Data/regex.json @@ -1017,13 +1017,14 @@ "Examples": { "Valid": [ "https://media.guilded.gg/webhooks/1fa5fe35-74e7-4f17-bf53-52d02293fea6/zhXzVecRvaMCWEcOCIuIMYQyeeKemUCswca24Q68cCQCgg4oYKeawamAiEkaI2uCS8Q2sgwy2qUOe2c4yE2em6", - "https://media.guilded.gg/api/webhooks/1fa5fe35-74e7-4f17-bf53-52d02293fea6/zhXzVecRvaMCWEcOCIuIMYQyeeKemUCswca24Q68cCQCgg4oYKeawamAiEkaI2uCS8Q2sgwy2qUOe2c4yE2em6", - "https://www.guilded.gg/webhooks/1fa5fe35-74e7-4f17-bf53-52d02293fea6/zhXzVecRvaMCWEcOCIuIMYQyeeKemUCswca24Q68cCQCgg4oYKeawamAiEkaI2uCS8Q2sgwy2qUOe2c4yE2em6", "https://www.guilded.gg/api/webhooks/1fa5fe35-74e7-4f17-bf53-52d02293fea6/zhXzVecRvaMCWEcOCIuIMYQyeeKemUCswca24Q68cCQCgg4oYKeawamAiEkaI2uCS8Q2sgwy2qUOe2c4yE2em6", "https://api.guilded.gg/webhooks/1fa5fe35-74e7-4f17-bf53-52d02293fea6/zhXzVecRvaMCWEcOCIuIMYQyeeKemUCswca24Q68cCQCgg4oYKeawamAiEkaI2uCS8Q2sgwy2qUOe2c4yE2em6", - "https://api.guilded.gg/api/webhooks/1fa5fe35-74e7-4f17-bf53-52d02293fea6/zhXzVecRvaMCWEcOCIuIMYQyeeKemUCswca24Q68cCQCgg4oYKeawamAiEkaI2uCS8Q2sgwy2qUOe2c4yE2em6" ], - "Invalid": [] + "Invalid": [ + "https://media.guilded.gg/api/webhooks/1fa5fe35-74e7-4f17-bf53-52d02293fea6/zhXzVecRvaMCWEcOCIuIMYQyeeKemUCswca24Q68cCQCgg4oYKeawamAiEkaI2uCS8Q2sgwy2qUOe2c4yE2em6", + "https://www.guilded.gg/webhooks/1fa5fe35-74e7-4f17-bf53-52d02293fea6/zhXzVecRvaMCWEcOCIuIMYQyeeKemUCswca24Q68cCQCgg4oYKeawamAiEkaI2uCS8Q2sgwy2qUOe2c4yE2em6", + "https://api.guilded.gg/api/webhooks/1fa5fe35-74e7-4f17-bf53-52d02293fea6/zhXzVecRvaMCWEcOCIuIMYQyeeKemUCswca24Q68cCQCgg4oYKeawamAiEkaI2uCS8Q2sgwy2qUOe2c4yE2em6" + ] } }, { From ff32546a7a47cbfc42675f9ec3a9961f801c62ee Mon Sep 17 00:00:00 2001 From: IlluminatiFish <45714340+IlluminatiFish@users.noreply.github.com> Date: Thu, 3 Mar 2022 23:40:02 +0000 Subject: [PATCH 08/11] Fix Guilded webhook examples Remove trailing comma from Guilded webhook examples --- pywhat/Data/regex.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pywhat/Data/regex.json b/pywhat/Data/regex.json index f4a59da..a507600 100644 --- a/pywhat/Data/regex.json +++ b/pywhat/Data/regex.json @@ -1018,7 +1018,7 @@ "Valid": [ "https://media.guilded.gg/webhooks/1fa5fe35-74e7-4f17-bf53-52d02293fea6/zhXzVecRvaMCWEcOCIuIMYQyeeKemUCswca24Q68cCQCgg4oYKeawamAiEkaI2uCS8Q2sgwy2qUOe2c4yE2em6", "https://www.guilded.gg/api/webhooks/1fa5fe35-74e7-4f17-bf53-52d02293fea6/zhXzVecRvaMCWEcOCIuIMYQyeeKemUCswca24Q68cCQCgg4oYKeawamAiEkaI2uCS8Q2sgwy2qUOe2c4yE2em6", - "https://api.guilded.gg/webhooks/1fa5fe35-74e7-4f17-bf53-52d02293fea6/zhXzVecRvaMCWEcOCIuIMYQyeeKemUCswca24Q68cCQCgg4oYKeawamAiEkaI2uCS8Q2sgwy2qUOe2c4yE2em6", + "https://api.guilded.gg/webhooks/1fa5fe35-74e7-4f17-bf53-52d02293fea6/zhXzVecRvaMCWEcOCIuIMYQyeeKemUCswca24Q68cCQCgg4oYKeawamAiEkaI2uCS8Q2sgwy2qUOe2c4yE2em6" ], "Invalid": [ "https://media.guilded.gg/api/webhooks/1fa5fe35-74e7-4f17-bf53-52d02293fea6/zhXzVecRvaMCWEcOCIuIMYQyeeKemUCswca24Q68cCQCgg4oYKeawamAiEkaI2uCS8Q2sgwy2qUOe2c4yE2em6", From cdb6494ecca53948a83fabe8056787c934b59a08 Mon Sep 17 00:00:00 2001 From: IlluminatiFish <45714340+IlluminatiFish@users.noreply.github.com> Date: Thu, 3 Mar 2022 23:47:01 +0000 Subject: [PATCH 09/11] Fix Guilded webhook regex format Oops lol --- pywhat/Data/regex.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pywhat/Data/regex.json b/pywhat/Data/regex.json index a507600..c38c18f 100644 --- a/pywhat/Data/regex.json +++ b/pywhat/Data/regex.json @@ -1004,7 +1004,7 @@ }, { "Name": "Guilded Webhook", - "Regex": "(?i)^https?:\\/\\/(?:api\\.|media\\.|(?Pwww.))guilded\\.gg(?(web)\\/api|)\\/webhooks\\/[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89abAB][a-f0-9]{3}-[a-f0-9]{12}\\/[\\w]{86}$", + "Regex": "(?i)^(https?:\\/\\/(?:api\\.|media\\.|(?Pwww.))guilded\\.gg(?(web)\\/api|)\\/webhooks\\/[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89abAB][a-f0-9]{3}-[a-f0-9]{12}\\/[\\w]{86})$", "plural_name": false, "Description": null, "Rarity": 1, From b04f1eba670c688aac1b1968d033cd03d7135242 Mon Sep 17 00:00:00 2001 From: IlluminatiFish <45714340+IlluminatiFish@users.noreply.github.com> Date: Thu, 3 Mar 2022 23:52:20 +0000 Subject: [PATCH 10/11] Update tests Update test function names --- tests/test_click.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_click.py b/tests/test_click.py index 8b898b3..61f3271 100644 --- a/tests/test_click.py +++ b/tests/test_click.py @@ -660,14 +660,14 @@ def test_file_fixture_slack_webhook(): assert re.findall("Slack Webhook", str(result.output)) -def test_discord_webhook(): +def test_file_fixture_discord_webhook(): runner = CliRunner() result = runner.invoke(main, ["fixtures/file"]) assert result.exit_code == 0 assert re.findall("Discord Webhook", str(result.output)) -def test_guilded_webhook(): +def test_file_fixture_guilded_webhook(): runner = CliRunner() result = runner.invoke(main, ["fixtures/file"]) assert result.exit_code == 0 From ac4e0ec8b06ac0f2d7875c74251452e162da3407 Mon Sep 17 00:00:00 2001 From: IlluminatiFish <45714340+IlluminatiFish@users.noreply.github.com> Date: Fri, 4 Mar 2022 00:37:55 +0000 Subject: [PATCH 11/11] Fix black formatting complaints Hopefully fixes black formatting complaints --- tests/test_click.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tests/test_click.py b/tests/test_click.py index 61f3271..9afaa54 100644 --- a/tests/test_click.py +++ b/tests/test_click.py @@ -658,7 +658,7 @@ def test_file_fixture_slack_webhook(): result = runner.invoke(main, ["fixtures/file"]) assert result.exit_code == 0 assert re.findall("Slack Webhook", str(result.output)) - + def test_file_fixture_discord_webhook(): runner = CliRunner() @@ -666,7 +666,7 @@ def test_file_fixture_discord_webhook(): assert result.exit_code == 0 assert re.findall("Discord Webhook", str(result.output)) - + def test_file_fixture_guilded_webhook(): runner = CliRunner() result = runner.invoke(main, ["fixtures/file"]) @@ -751,5 +751,3 @@ def test_print_tags2(): ) assert result.exit_code == 0 assert "Tags: CTF Flag" in result.output - -