ESET Online Help

Search
Select the category
Select the topic

Block Hashes From External Tools

You can block executables in ESET Inspect On-Prem by calling REST API from script languages like Python. First, you must log in to ESET Inspect Server by typing your username and password, which will retrieve a token. Then, you can call the function for blocking hashes, giving the hash and token. Here are the details for both REST calls:

Login request

Method: “PUT”

URL: “[server_address]/FRONTEND/LOGIN”

Body: JSON object with fields:

“username”—string

“password”—string

 

Response:

The response header "X-Security-Token" will contain the token.

 

Ban hash request

Method: “PUT”

URL: “[server_address]/FRONTEND/HASHES/BLOCK”

Body: JSON object with fields:

“sha1”—an array of strings with hexadecimal sha1 of executables that will be blocked (one hash has to be in an array)

“shouldClean”— a bool indicating if executables should be cleaned

“comment”—the string that ESET Inspect will display in the blocked hashes list

Headers:

“Authorization”—string: “Bearer ” + token

 

Python example:

 

JavaScript example: