Skip to main content

Module: @sapphire/phisherman

Interfaces

Type aliases

CheckReturnType

Ƭ CheckReturnType: PhishermanReturnType & { isScam: boolean }

Defined in

projects/utilities/packages/phisherman/src/lib/PhishermanTypes.ts:10

Functions

checkDomain

checkDomain(domain, apiKey?): Promise<{ classification: "malicious" | "suspicious" | "safe" | "unknown" ; isScam: boolean ; verifiedPhish: boolean }>

Checks if a link is detected as a scam or phishing link by phisherman.

since 1.0.0

Parameters

NameTypeDefault valueDescription
domainstringundefinedThe domain to check.
apiKeystringstoredApiKeyoptionally pass a Phiserman API key for making this request. This will default to {@link storedApiKey}, which can be configured through setApiKey.

Returns

Promise<{ classification: "malicious" | "suspicious" | "safe" | "unknown" ; isScam: boolean ; verifiedPhish: boolean }>

Defined in

projects/utilities/packages/phisherman/src/lib/Phisherman.ts:16


reportDomain

reportDomain(domain, apiKey?): Promise<PhishermanReportType>

Report a domain that is confirmed to be a scam or phishing domain to phisherman, to enhance their API.

since 1.0.0

Parameters

NameTypeDefault valueDescription
domainstringundefinedThe domain to report.
apiKeystringstoredApiKeyoptionally pass a Phiserman API key for making this request. This will default to {@link storedApiKey}, which can be configured through setApiKey.

Returns

Promise<PhishermanReportType>

Defined in

projects/utilities/packages/phisherman/src/lib/Phisherman.ts:41


setApiKey

setApiKey(key): Promise<void>

Set the phisherman's API key.

since 1.0.0

Parameters

NameTypeDescription
keystringThe API key to access the phisherman API and cache within the code of the wrapper.

Returns

Promise<void>

Defined in

projects/utilities/packages/phisherman/src/lib/Phisherman.ts:64