|
14 | 14 |
|
15 | 15 | from ReversingLabs.SDK.helper import ADVANCED_SEARCH_SORTING_CRITERIA, DEFAULT_USER_AGENT, HASH_LENGTH_MAP, \
|
16 | 16 | RESPONSE_CODE_ERROR_MAP, MD5, SHA1, SHA256, SHA512, NoFileTypeError, NotFoundError, \
|
17 |
| - WrongInputError, validate_hashes, deprecated_args |
| 17 | + WrongInputError, validate_hashes |
18 | 18 |
|
19 | 19 |
|
20 | 20 | XML = "xml"
|
@@ -6207,67 +6207,12 @@ def get_objects_aggregated(self, api_root, collection_id, result_limit=500, adde
|
6207 | 6207 | if not more_pages or len(results) >= max_results:
|
6208 | 6208 | return results[:max_results]
|
6209 | 6209 |
|
| 6210 | + |
6210 | 6211 | class TAXIIRansomwareFeed(TAXIIFeed):
|
6211 | 6212 | def __init__(self, host, username, password, verify=True, proxies=None, user_agent=DEFAULT_USER_AGENT,
|
6212 | 6213 | allow_none_return=False):
|
6213 | 6214 | super(TAXIIRansomwareFeed, self).__init__(host, username, password, verify, proxies,
|
6214 |
| - user_agent=user_agent, allow_none_return=allow_none_return) |
6215 |
| - |
6216 |
| -class AdvancedActions(object): |
6217 |
| - """A class containing advanced and combined actions |
6218 |
| - utilizing various different classes.""" |
6219 |
| - |
6220 |
| - def __init__(self, host, username, password, verify=True, proxies=None, user_agent=DEFAULT_USER_AGENT, |
6221 |
| - allow_none_return=False): |
6222 |
| - |
6223 |
| - self._rldata_client = FileAnalysis( |
6224 |
| - host=host, |
6225 |
| - username=username, |
6226 |
| - password=password, |
6227 |
| - verify=verify, |
6228 |
| - user_agent=user_agent, |
6229 |
| - proxies=proxies, |
6230 |
| - allow_none_return=allow_none_return |
6231 |
| - ) |
6232 |
| - |
6233 |
| - self._da_client = DynamicAnalysis( |
6234 |
| - host=host, |
6235 |
| - username=username, |
6236 |
| - password=password, |
6237 |
| - verify=verify, |
6238 |
| - user_agent=user_agent, |
6239 |
| - proxies=proxies, |
6240 |
| - allow_none_return=allow_none_return |
6241 |
| - ) |
6242 |
| - |
6243 |
| - def enriched_file_analysis(self, sample_hash): |
6244 |
| - """Accepts a sample hash and returns a TCA-0104 File Analysis report enriched with a TCA-0106 Dynamic Analysis |
6245 |
| - report. |
6246 |
| - :param sample_hash: sample hash |
6247 |
| - :type sample_hash: str |
6248 |
| - :return: file analysis report enriched with dynamic analysis |
6249 |
| - :rtype: dict |
6250 |
| - """ |
6251 |
| - da_response = self._da_client.get_dynamic_analysis_results( |
6252 |
| - sample_hash=sample_hash |
6253 |
| - ) |
6254 |
| - |
6255 |
| - rldata_response = self._rldata_client.get_analysis_results( |
6256 |
| - hash_input=sample_hash |
6257 |
| - ) |
6258 |
| - |
6259 |
| - da_report = da_response.json().get("rl", {}).get("report") |
6260 |
| - if da_report: |
6261 |
| - rldata_report = rldata_response.json() |
6262 |
| - try: |
6263 |
| - rldata_report["rl"]["sample"]["dynamic_analysis"]["report"] = da_report |
6264 |
| - except KeyError: |
6265 |
| - rldata_report["rl"]["sample"]["dynamic_analysis"] = {} |
6266 |
| - rldata_report["rl"]["sample"]["dynamic_analysis"]["report"] = da_report |
6267 |
| - |
6268 |
| - return rldata_report |
6269 |
| - |
6270 |
| - return {} |
| 6215 | + user_agent=user_agent, allow_none_return=allow_none_return) |
6271 | 6216 |
|
6272 | 6217 |
|
6273 | 6218 | def _update_hash_object(input_source, hash_object):
|
|
0 commit comments