Crate malwaredb_api

Crate malwaredb_api 

Source
Expand description

§Malware DB API

TestLintCrossDocumentationCrates.io Version

This crate stores the API endpoints and data types expected for each endpoint. This could be used to build a custom client.

Modules§

digest
Wrapper for fixed-size cryptographic hash digests from hex strings

Structs§

GetAPIKeyRequest
User authentication with username and password to get the API key
GetAPIKeyResponse
Respond to authentication with the key if the credentials were correct, and possibly show a message related to errors or warnings.
GetUserInfoResponse
User account information
Label
A label, used for describing sources and/or samples
Labels
One or more available labels
NewSampleB64
New file sample being sent to Malware DB via UPLOAD_SAMPLE_JSON_URL
NewSampleBytes
New file sample being sent to Malware DB via UPLOAD_SAMPLE_CBOR_URL
Report
Information for an individual sample
SearchRequest
Search for a file by some criteria Specifying both a hash and file name is an AND operation!
SearchRequestParameters
Search for a file by some criteria, all of which are an AND operation:
SearchResponse
Search result
ServerInfo
Information about the server
SimilarSample
Relation between a similar sample and the hashes by which the sample is similar
SimilarSamplesRequest
Requesting hashes of possible similar samples by similarity hash
SimilarSamplesResponse
Response indicating samples which are similar
SourceInfo
Information about a sample source
Sources
Sources response for request for sources
SupportedFileType
One record of supported file types
SupportedFileTypes
Server’s supported types, the response
VirusTotalSummary
Virus Total hits summary for a specific sample

Enums§

PartialHashSearchType
Specify the type of hash when searching for a partial match
SearchType
Searching the next batch from a prior search, or the initial search
ServerError
Server error responses
ServerResponse
For request types, wrap in this struct to handle some error conditions
SimilarityHashType
The hash by which a sample is identified

Constants§

DOWNLOAD_SAMPLE_CART_URL
API endpoint for downloading a sample as a CaRT container file, GET Example: /v1/samples/download/cart/aabbccddeeff0011223344556677889900 Response is the file encoded in a CaRT container file, or HTTP 404 if not found
DOWNLOAD_SAMPLE_URL
API endpoint for downloading a sample, GET. The hash value goes at the end of the URL. Example: /v1/samples/download/aabbccddeeff0011223344556677889900 Response is raw bytes of the file, or HTTP 404 if not found
LIST_LABELS_URL
API endpoint for finding samples which are similar to a specific file, POST
LIST_SOURCES_URL
Endpoint for the sources, per-user, GET, authenticated
MDB_API_HEADER
HTTP header used to present the API key to the server
MDB_VERSION
MDB version
MDNS_NAME
Endpoint name for use with Multicast DNS
SAMPLE_REPORT_URL
API endpoint to get a report for a given sample Example: /v1/samples/report/aabbccddeeff0011223344556677889900
SEARCH_URL
APU endpoint for searching for files with some criteria
SERVER_INFO_URL
Server information, request is empty, GET, Unauthenticated.
SIMILAR_SAMPLES_URL
API endpoint for finding samples which are similar to a specific file, POST, Authenticated.
SUPPORTED_FILE_TYPES_URL
File types supported by Malware DB, request is empty, GET, Unauthenticated.
UPLOAD_SAMPLE_CBOR_URL
API endpoint for uploading a sample with CBOR, POST, Authenticated
UPLOAD_SAMPLE_JSON_URL
API endpoint for uploading a sample with JSON, POST, Authenticated
USER_INFO_URL
User’s account information API endpoint, GET, authenticated
USER_LOGIN_URL
Authentication endpoint, POST
USER_LOGOUT_URL
Logout API endpoint to clear their API key, GET, authenticated.