Skip to content

Commit

Permalink
Merge pull request #247 from IlluminatiFish/patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
amadejpapez committed May 16, 2023
2 parents 8a83d28 + 1743bd8 commit 75a1592
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 0 deletions.
4 changes: 4 additions & 0 deletions fixtures/file
Expand Up @@ -103,3 +103,7 @@ doi:10.1392/BC1.0
10.1000/123

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
25 changes: 25 additions & 0 deletions pywhat/Data/regex.json
Expand Up @@ -1010,6 +1010,31 @@
"Invalid": []
}
},
{
"Name": "Guilded Webhook",
"Regex": "(?i)^(https?:\\/\\/(?:api\\.|media\\.|(?P<web>www.))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://www.guilded.gg/api/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",
"https://www.guilded.gg/webhooks/1fa5fe35-74e7-4f17-bf53-52d02293fea6/zhXzVecRvaMCWEcOCIuIMYQyeeKemUCswca24Q68cCQCgg4oYKeawamAiEkaI2uCS8Q2sgwy2qUOe2c4yE2em6",
"https://api.guilded.gg/api/webhooks/1fa5fe35-74e7-4f17-bf53-52d02293fea6/zhXzVecRvaMCWEcOCIuIMYQyeeKemUCswca24Q68cCQCgg4oYKeawamAiEkaI2uCS8Q2sgwy2qUOe2c4yE2em6"
]
}
},
{
"Name": "Cloudinary Credentials",
"Regex": "(?i)^(cloudinary://[0-9]+:[A-Za-z0-9-_.]+@[A-Za-z0-9-_.]+)$",
Expand Down
14 changes: 14 additions & 0 deletions tests/test_click.py
Expand Up @@ -660,6 +660,20 @@ def test_file_fixture_slack_webhook():
assert re.findall("Slack Webhook", str(result.output))


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_file_fixture_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():
runner = CliRunner()
result = runner.invoke(
Expand Down

0 comments on commit 75a1592

Please sign in to comment.