-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Added a documentation XML file - Updated some variable and method names - The constructor of YachtsClient had its identity and cache period arguments switched - Bumped Discord.net for the example project from 3.7.2 to 3.8.0 - Minor general code changes
- Loading branch information
Showing
7 changed files
with
217 additions
and
118 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,76 +9,97 @@ | |
</div> | ||
|
||
## Usage | ||
This library can be downloaded as the package `SinkingYachts`. The main class is called `YachtsClient`. | ||
Available on NuGet as `SinkingYachts`, methods are available under the public class `YachtsClient`. | ||
|
||
https://www.nuget.org/packages/SinkingYachts | ||
|
||
## Features | ||
- Made with **.NET 6** | ||
- Fully async | ||
- Access to a Discord-related phishing database of over `13 300` confirmed malicious domains | ||
- Access to a Discord-related phishing database of over `15 500` confirmed malicious domains | ||
- Regex matching of domains and automatic phishing detection | ||
- Different modes for storing and loading phishing domains | ||
- Instant updates through **WebSocket events** | ||
- Domain whitelisting to prevent false positives | ||
- Customizable caching to decrease load | ||
- Domain whitelisting to decrease false positives | ||
- Customizable caching to decrease load | ||
|
||
## Example Project | ||
Under the `Example` directory you can find a working demo Discord bot that implements this library. | ||
```rust | ||
07.09. 19:13:59 [Discord] Discord.Net v3.8.0 (API v9) | ||
07.09. 19:13:59 [Gateway] Connecting | ||
07.09. 19:14:01 [Gateway] Connected | ||
07.09. 19:14:02 [Bot] Ready to protect your server from 15601 phishing domains | ||
07.09. 19:14:02 [Bot] Domains added within the past day: 8 | ||
07.09. 19:14:02 [Bot] Domains deleted within the past day: 0 | ||
07.09. 19:14:02 [Gateway] Ready | ||
``` | ||
|
||
## Code Samples | ||
|
||
### Check message content | ||
```csharp | ||
bool isPhishing = await Yachts.IsPhishing("hello https://hypesquadacademy-apply.ml"); | ||
//👉 True | ||
``` | ||
|
||
### Check a domain | ||
```csharp | ||
bool isPhishing = await Yachts.IsPhishingDomain("warning-selectioneventhype.gq"); | ||
//👉 True | ||
``` | ||
|
||
### Get the latest domains | ||
```csharp | ||
string[] domains = (await Yachts.GetRecent(TimeSpan.FromDays(1))).Where(x => x.Type == ChangeType.Add).SelectMany(x => x.Domains).ToArray(); | ||
//👉 steamcommunitysiv.top, wvwww-roblox.com, discord-download.win, steamcoumunity.eu, streamcummonity.com, streamcommunity.org, join-event-hypesquad.com, steamcommunityzowe.top | ||
``` | ||
|
||
### Get the database size | ||
```csharp | ||
int size = await Yachts.GetDatabaseSize(); | ||
//👉 15601 | ||
``` | ||
|
||
## Available methods | ||
- Task<Change[]> `Recent`(TimeSpan time) | ||
- Task<Change[]> `Recent`(int seconds) | ||
- Task<bool> `IsPhishing`(string content) | ||
- Task<bool> `IsPhishingDomain`(string domain) | ||
- Task<int> `DatabaseSize`() | ||
- Task<string[]> `GetPhishingDomains`() | ||
- Task<Change[]> GetRecent(TimeSpan time) | ||
- Task<Change[]> GetRecent(int seconds) | ||
- Task<bool> IsPhishing(string content) | ||
- Task<bool> IsPhishingDomain(string domain) | ||
- Task<int> GetDatabaseSize() | ||
- Task<string[]> GetPhishingDomains() | ||
|
||
## Available events (requires `StorageMode.LocalWS`) | ||
- EventHandler\<string> `DomainAdded` | ||
- EventHandler\<string> `DomainDeleted` | ||
- EventHandler\<string> DomainAdded | ||
- EventHandler\<string> DomainDeleted | ||
|
||
## Statistics from the past week | ||
| Date | New domains found | | ||
| :---: | :---: | | ||
| 0.0.0 | + `0` | | ||
| 0.0.0 | + `0` | | ||
| 0.0.0 | + `0` | | ||
| 0.0.0 | + `0` | | ||
| 0.0.0 | + `0` | | ||
| 23.06.2022 | + `33` | | ||
| 24.06.2022 | + `24` | | ||
| 31.08.2022 | + `23` | | ||
| 01.09.2022 | + `10` | | ||
| 02.09.2022 | + `23` | | ||
| 03.09.2022 | + `25` | | ||
| 04.09.2022 | + `3` | | ||
| 05.09.2022 | + `18` | | ||
| 06.09.2022 | + `5` | | ||
|
||
## Recently flagged domains | ||
```ruby | ||
steamcommunityzivc.top | ||
www-robloxa.com | ||
wwzw-robloxs.com | ||
www-roblox.com.ru | ||
discoradnitro.xyz | ||
hype-squad-vote.gq | ||
www.discordpolicy.repl.co | ||
wmw-roblox.com | ||
hype-events-badges.gq | ||
wwu-roblox.com | ||
discrod-egift.com | ||
steamcommunityzowe.top | ||
sleamtlade-ofler.xyz | ||
vww-roblox.ga | ||
wwwwv-roblox.com | ||
roblox-profiles.gq | ||
``` | ||
|
||
## Example | ||
Under the `Example` folder you can find a demo Discord bot that implements this library. | ||
```rust | ||
18.06. 20:09:38 [Discord] Discord.Net v3.6.0 (API v9) | ||
18.06. 20:09:38 [Gateway] Connecting | ||
18.06. 20:09:40 [Gateway] Connected | ||
18.06. 20:09:40 [Bot] Bot is ready to protect your server from 13326 phishing domains | ||
18.06. 20:09:40 [Bot] Domains added within the past day: 111 | ||
18.06. 20:09:40 [Bot] Domains deleted within the past day: 0 | ||
18.06. 20:09:40 [Gateway] Ready | ||
``` | ||
|
||
## Unknown domains | ||
Found a Discord/Steam phishing domain that isn't yet present in the database? Send it into the `#domain-reports` channel on our Discord server or open an **issue**. | ||
## Missing domains | ||
Found a Discord/Steam phishing domain that isn't yet present in the database? Send it into the `#domain-reports` channel on our Discord server or open an **issue** in this repository. | ||
|
||
## Links | ||
Need help, want to discuss phishing or have a suggestion? Feel free to join our Discord server: https://discord.gg/cT6eQjWW8H | ||
## Resources | ||
Need help, want to discuss phishing or have a suggestion? Feel free to join our Discord server: https://discord.gg/d63pvY28HU (temporarily closed) | ||
|
||
Official website: https://sinking.yachts<br> | ||
Email: [email protected]<br> | ||
Email: [email protected], [email protected]<br> | ||
GitHub: https://github.com/SinkingYachts<br> | ||
Blog: https://sinking.yachts/blog/<br> | ||
Blog: https://sinking.yachts/blog/<br> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.