Skip to content

Latest commit

 

History

History
26 lines (18 loc) · 550 Bytes

scanWebsite.md

File metadata and controls

26 lines (18 loc) · 550 Bytes
icon
browser

Scan Website

Usage

import { SuiSecBlocklist } from "suisecblocklist";

const blocklist = new SuiSecBlocklist();

// 1. Fetch the domainlist and persist it in the storage
blocklist.fetchDomainlist();

// 2. Re-refetch the domainlist every 5 minutes
setInterval(() => blocklist.fetchDomainlist(), 1000 * 60 * 5);

// 3. Once you have a domainlist object saved, you can execute lookups
const action = blocklist.scanDomain("https://scam-website.io");

if (action === Action.BLOCK) {
  // block the domain
}