Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion application/config.json.template
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@
"freenitro",
"^earn$",
"^earning",
".exe$"
".exe$",
"mrbeast"
],
"hostWhitelist": [
"discord.com",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public ScamDetector(Config config) {
public boolean isScam(Message message) {
Member author = message.getMember();
boolean isTrustedUser = author != null
&& author.getRoles().stream().map(Role::getName).noneMatch(hasTrustedRole);
&& author.getRoles().stream().map(Role::getName).anyMatch(hasTrustedRole);
if (isTrustedUser) {
return false;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ void setUp() {
when(scamConfig.getSuspiciousKeywords()).thenReturn(Set.of("nitro", "boob", "sexy", "sexi",
"esex", "steam", "gift", "onlyfans", "bitcoin", "btc", "promo", "trader", "trading",
"whatsapp", "crypto", "^claim", "teen", "adobe", "hack", "steamcommunity",
"freenitro", "^earn$", "^earning", ".exe$"));
"freenitro", "^earn$", "^earning", ".exe$", "mrbeast"));
when(scamConfig.getHostWhitelist()).thenReturn(Set.of("discord.com", "discord.media",
"discordapp.com", "discordapp.net", "discordstatus.com", "thehackernews.com",
"gradle.org", "help.gradle.org", "youtube.com", "www.youtube.com"));
Expand Down Expand Up @@ -223,7 +223,7 @@ void ignoreTrustedUser() {
boolean isScamResult = scamDetector.isScam(message);

// THEN flags it as harmless
assertTrue(isScamResult);
assertFalse(isScamResult);
}

private static Message createMessageMock(String content, List<Message.Attachment> attachments) {
Expand Down Expand Up @@ -400,7 +400,8 @@ B2CWorkflow Builder (React Flow)
Ready to unlock your earning potential in the digital market? you can start earning $100,000 and even more
as a beginner from the digital market, DM me for expert guidance or contact me directly on telegram and start building your financial future.
Telegram username @JohnSmith123""",
"Grab it before it's deleted (available for Windows and macOS): https://www.reddit.com/r/TVBaFreeHub/comments/12345t/ninaatradercrackedfullpowertradingfreefor123/");
"Grab it before it's deleted (available for Windows and macOS): https://www.reddit.com/r/TVBaFreeHub/comments/12345t/ninaatradercrackedfullpowertradingfreefor123/",
"Bro, claim 0.1 BTC now! Use promo code \"mrbeast\" at expmcoins.com screen @everyone");
}

private static List<String> provideRealFalsePositiveMessages() {
Expand Down
Loading