File Intel | Node.js SDK
The File Intel service enables you to submit a file's hash and get the file's attributes back - giving you insight into the disposition of the file.
File Intel
constructor(token: PangeaToken, config: PangeaConfig): FileIntelServiceCreates a new FileIntelService
with the given Pangea API token and
configuration.
const config = new PangeaConfig({ domain: "pangea_domain" });
const fileIntel = new FileIntelService("pangea_token", config);
Reputation, from file path
filepathReputation(filepath: string, options: ReputationOptions): Promise<PangeaResponse<ReputationResult>>Retrieve file reputation from a provider, using the file's hash.
const response = await fileIntel.filepathReputation(
"./myfile.exe",
{ provider: "reversinglabs" }
);
Reputation, from file paths
filepathReputationBulk(filepaths: string[], options: ReputationOptions): Promise<PangeaResponse<ReputationBulkResult>>Retrieve file reputations from a provider, using the files' hashes.
const response = await fileIntel.filepathReputationBulk(
["./myfile1.exe", "./myfile2.exe"],
{ provider: "reversinglabs" }
);
Reputation, from file hash
hashReputation(fileHash: string, hashType: string, options: ReputationOptions): Promise<PangeaResponse<ReputationResult>>Retrieve hash-based file reputation from a provider, including an optional detailed report.
const response = await fileIntel.hashReputation(
"142b638c6a60b60c7f9928da4fb85a5a8e1422a9ffdc9ee49e17e56ccca9cf6e",
"sha256",
{ provider: "reversinglabs" }
);
Reputation V2
hashReputationBulk(hashes: string[], hashType: string, options: ReputationOptions): Promise<PangeaResponse<ReputationBulkResult>>Retrieve reputations for a list of file hashes, from a provider, including an optional detailed report.
const hashes = [
"142b638c6a60b60c7f9928da4fb85a5a8e1422a9ffdc9ee49e17e56ccca9cf6e",
];
const response = await fileIntel.hashReputationBulk(
hashes,
"sha256",
{ provider: "reversinglabs" }
);