ESET Online Help

Search
Select the category
Select the topic

Block Hashes From External Tools

The action of blocking executables in ESET Inspect can be achieved by calling REST API from script languages like Python. First, the user needs to log in to ESET Inspect Server by typing their username and password, and as a result, a token will be retrieved. Then the user can call the function for blocking hashes, giving the hash and previously received token. Here are the details of both REST calls:

Login request

Method: “PUT”

URL: “[server_address]/ FRONTEND/LOGIN”

Body: JSON object with fields:

“username”—string

“password”—string

 

Response:

As a result, the following token is received in response header “X-Security-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 which will be blocked (even one hash has to be in an array)

“shouldClean”—bool indicating if executables should be cleaned

“comment”—the string that will be displayed in ESET Inspect in a list of blocked hashes

Headers:

“Authorization”—string: “Bearer ” + token

 

Python code example:

 

JavaScript code example: