Skip to content

Commit 2c99274

Browse files
Merge pull request #3072 from ChrisJr404/feat/social-linktree-2399
Add Linktree to social module (#2399)
2 parents 5be4993 + 210b95e commit 2c99274

2 files changed

Lines changed: 14 additions & 1 deletion

File tree

bbot/modules/social.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ class social(BaseModule):
2626
"docker": (r"hub.docker.com/[ru]/([a-zA-Z0-9_-]+)", False),
2727
"huggingface": (r"huggingface.co/([a-zA-Z0-9_-]+)", False),
2828
"postman": (r"www.postman.com/([a-zA-Z0-9_-]+)", False),
29+
# Linktree usernames are 3–30 chars of [a-z0-9._] (case-insensitive in URLs).
30+
"linktree": (r"linktr\.ee/([a-zA-Z0-9._]{3,30})", False),
2931
}
3032

3133
scope_distance_modifier = 1

bbot/test/test_step_2/module_tests/test_module_social.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,14 @@ async def setup_after_prep(self, module_test):
1515
<a href="https://hub.docker.com/r/blacklanternsecurity/bbot"/>
1616
<a href="https://hub.docker.com/r/blacklanternSECURITY/bbot"/>
1717
<a href="https://www.postman.com/blacklanternsecurity/bbot"/>
18+
<a href="https://linktr.ee/blacklanternsecurity"/>
1819
</html>
1920
"""
2021
}
2122
module_test.set_expect_requests(expect_args=expect_args, respond_args=respond_args)
2223

2324
def check(self, module_test, events):
24-
assert 4 == len([e for e in events if e.type == "SOCIAL"])
25+
assert 5 == len([e for e in events if e.type == "SOCIAL"])
2526
assert 1 == len(
2627
[
2728
e
@@ -56,3 +57,13 @@ def check(self, module_test, events):
5657
and e.data["profile_name"] == "blacklanternsecurity"
5758
]
5859
)
60+
assert 1 == len(
61+
[
62+
e
63+
for e in events
64+
if e.type == "SOCIAL"
65+
and e.data["platform"] == "linktree"
66+
and e.data["profile_name"] == "blacklanternsecurity"
67+
and e.data["url"] == "https://linktr.ee/blacklanternsecurity"
68+
]
69+
)

0 commit comments

Comments
 (0)