19 package com.basistech.df.cybertriage.autopsy.ctapi;
31 import java.util.Collections;
32 import java.util.HashMap;
33 import java.util.List;
35 import org.apache.commons.collections.CollectionUtils;
47 private static final String
CTCLOUD_SERVER_HASH_PATH =
"/_ah/api/reputation/v1/query/file/hash/md5?query_types=CORRELATION,MALWARE";
69 .setProduct(AUTOPSY_PRODUCT)
72 return httpClient.doPost(LICENSE_REQUEST_PATH, licenseRequest,
LicenseResponse.class);
81 .setHostId(decrypted.getLicenseHostId());
83 return httpClient.doPost(AUTH_TOKEN_REQUEST_PATH, authTokenRequest,
AuthTokenResponse.class);
87 return new HashMap<String, String>() {
89 put(
"api_key", authenticatedRequestData.
getApiKey());
90 put(
"token", authenticatedRequestData.
getToken());
91 put(
"host_id", authenticatedRequestData.
getHostId());
97 if (CollectionUtils.isEmpty(md5Hashes)) {
98 return Collections.emptyList();
105 CTCLOUD_SERVER_HASH_PATH,
111 return resp == null || resp.
getItems() == null
112 ? Collections.emptyList()
static Map< String, String > getAuthParams(AuthenticatedRequestData authenticatedRequestData)
LicenseRequest setTimeZoneId(String timeZoneId)
static String getInferredUserTimeZone()
List< CTCloudBean > getItems()
static final CTApiDAO instance
static CTApiDAO getInstance()
LicenseRequest setHostId(String hostId)
static final String CTCLOUD_SERVER_HASH_PATH
List< CTCloudBean > getReputationResults(AuthenticatedRequestData authenticatedRequestData, List< String > md5Hashes)
LicenseRequest setBoostLicenseCode(String boostLicenseCode)
AuthTokenRequest setRequestFileUpload(boolean requestFileUpload)
static CTCloudHttpClient getInstance()
static String getAppVersion()
AuthTokenRequest setAutopsyVersion(String autopsyVersion)
static String generateLicenseHostID()
AuthTokenResponse getAuthToken(DecryptedLicenseResponse decrypted)
static final String LICENSE_REQUEST_PATH
AuthTokenRequest setBoostLicenseId(String boostLicenseId)
FileReputationRequest setHashes(List< String > hashes)
static final String AUTOPSY_PRODUCT
static String getVersion()
static final String AUTH_TOKEN_REQUEST_PATH
LicenseResponse getLicenseInfo(String licenseString)
final CTCloudHttpClient httpClient