File Intel | Python 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.
Initializes a new Pangea service client.
FileIntel(token, config, logger_name)download-file
FileIntel.download_file()Reputation, from filepath
FileIntel.filepath_reputation(filepath, provider, verbose, raw)Retrieve a reputation score for a file hash from a provider, including an optional detailed report. This function calculates a hash from the file at a given filepath and makes a request to the service.
response = file_intel.filepath_reputation(
filepath="./myfile.exe",
provider="reversinglabs",
)
Reputation, from filepath V2
FileIntel.filepath_reputation_bulk(filepaths, provider, verbose, raw)Retrieve reputation scores for a list of file hashes from a provider, including an optional detailed report. This function calculates hashes from the files at the given filepaths and makes a request to the service.
response = file_intel.filepath_reputation_bulk(
filepaths=["./myfile.exe"],
provider="reversinglabs",
)
Reputation check
FileIntel.hash_reputation(hash, hash_type, provider, verbose, raw)Retrieve a reputation score for a file hash from a provider, including an optional detailed report.
response = file_intel.hash_reputation(
hash="179e2b8a4162372cd9344b81793cbf74a9513a002eda3324e6331243f3137a63",
hash_type="sha256",
provider="reversinglabs",
)
Reputation check V2
FileIntel.hash_reputation_bulk(hashes, hash_type, provider, verbose, raw)Retrieve reputation scores for a set of file hashes from a provider, including an optional detailed report.
response = file_intel.hash_reputation_bulk(
hashes=["179e2b8a4162372cd9344b81793cbf74a9513a002eda3324e6331243f3137a63"],
hash_type="sha256",
provider="reversinglabs",
)
Poll result
FileIntel.poll_result(exception)Returns request's result that has been accepted by the server
response = service.poll_result(exception)