Skip to main content

Module: phisherman/src

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:17


getDomainInfo

getDomainInfo(domain, apiKey?): Promise<PhishermanInfo>

Returns information for a domain.

since 1.1.0

Parameters

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

Returns

Promise<PhishermanInfo>

Defined in

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


reportCaughtPhish

reportCaughtPhish(domain, apiKey?, guildId?): Promise<PhishermanReportType>

Report a caught phish back to phisherman to improve their analytics.

since 1.1.0

Parameters

NameTypeDefault valueDescription
domainstringundefinedThe domain which was caught.
apiKeystringstoredApiKey@param apiKey optionally pass a Phiserman API key for making this request. This will default to {@link storedApiKey}, which can be configured through setApiKey.
guildIdstring | number''The id of the guild in which the domain was caught.

Returns

Promise<PhishermanReportType>

Defined in

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


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:43


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:114