revengai 2.74.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- revengai/__init__.py +647 -0
- revengai/api/__init__.py +22 -0
- revengai/api/analyses_comments_api.py +1198 -0
- revengai/api/analyses_core_api.py +3870 -0
- revengai/api/analyses_dynamic_execution_api.py +1884 -0
- revengai/api/analyses_results_metadata_api.py +2240 -0
- revengai/api/analyses_security_checks_api.py +862 -0
- revengai/api/authentication_users_api.py +1323 -0
- revengai/api/binaries_api.py +1610 -0
- revengai/api/collections_api.py +2167 -0
- revengai/api/external_sources_api.py +827 -0
- revengai/api/firmware_api.py +592 -0
- revengai/api/functions_ai_decompilation_api.py +2592 -0
- revengai/api/functions_block_comments_api.py +849 -0
- revengai/api/functions_core_api.py +3430 -0
- revengai/api/functions_data_types_api.py +1746 -0
- revengai/api/functions_decompilation_api.py +1198 -0
- revengai/api/functions_renaming_history_api.py +1151 -0
- revengai/api/models_api.py +284 -0
- revengai/api/search_api.py +1454 -0
- revengai/api_client.py +803 -0
- revengai/api_response.py +21 -0
- revengai/configuration.py +605 -0
- revengai/exceptions.py +215 -0
- revengai/models/__init__.py +298 -0
- revengai/models/addr.py +143 -0
- revengai/models/ai_decompilation_rating.py +37 -0
- revengai/models/ai_unstrip_request.py +86 -0
- revengai/models/analysis_access_info.py +88 -0
- revengai/models/analysis_config.py +106 -0
- revengai/models/analysis_create_request.py +131 -0
- revengai/models/analysis_create_response.py +88 -0
- revengai/models/analysis_detail_response.py +121 -0
- revengai/models/analysis_function_mapping.py +90 -0
- revengai/models/analysis_function_matching_request.py +110 -0
- revengai/models/analysis_functions.py +94 -0
- revengai/models/analysis_functions_list.py +94 -0
- revengai/models/analysis_record.py +128 -0
- revengai/models/analysis_scope.py +36 -0
- revengai/models/analysis_strings_response.py +96 -0
- revengai/models/analysis_tags.py +94 -0
- revengai/models/analysis_update_request.py +108 -0
- revengai/models/analysis_update_tags_request.py +86 -0
- revengai/models/analysis_update_tags_response.py +94 -0
- revengai/models/app_api_rest_v2_analyses_enums_dynamic_execution_status.py +38 -0
- revengai/models/app_api_rest_v2_analyses_enums_order_by.py +37 -0
- revengai/models/app_api_rest_v2_collections_enums_order_by.py +40 -0
- revengai/models/app_api_rest_v2_functions_responses_function.py +93 -0
- revengai/models/app_api_rest_v2_functions_types_function.py +110 -0
- revengai/models/app_services_dynamic_execution_schemas_dynamic_execution_status.py +86 -0
- revengai/models/argument.py +99 -0
- revengai/models/auto_unstrip_request.py +99 -0
- revengai/models/auto_unstrip_response.py +129 -0
- revengai/models/base_response.py +124 -0
- revengai/models/base_response_analysis_create_response.py +125 -0
- revengai/models/base_response_analysis_detail_response.py +125 -0
- revengai/models/base_response_analysis_function_mapping.py +125 -0
- revengai/models/base_response_analysis_functions.py +125 -0
- revengai/models/base_response_analysis_functions_list.py +125 -0
- revengai/models/base_response_analysis_strings_response.py +125 -0
- revengai/models/base_response_analysis_tags.py +125 -0
- revengai/models/base_response_analysis_update_tags_response.py +125 -0
- revengai/models/base_response_basic.py +125 -0
- revengai/models/base_response_binary_additional_response.py +125 -0
- revengai/models/base_response_binary_details_response.py +125 -0
- revengai/models/base_response_binary_externals_response.py +125 -0
- revengai/models/base_response_binary_search_response.py +125 -0
- revengai/models/base_response_block_comments_generation_for_function_response.py +125 -0
- revengai/models/base_response_block_comments_overview_generation_response.py +116 -0
- revengai/models/base_response_bool.py +121 -0
- revengai/models/base_response_callees_caller_functions_response.py +125 -0
- revengai/models/base_response_capabilities.py +125 -0
- revengai/models/base_response_check_security_checks_task_response.py +125 -0
- revengai/models/base_response_child_binaries_response.py +125 -0
- revengai/models/base_response_collection_binaries_update_response.py +125 -0
- revengai/models/base_response_collection_response.py +125 -0
- revengai/models/base_response_collection_search_response.py +125 -0
- revengai/models/base_response_collection_tags_update_response.py +125 -0
- revengai/models/base_response_comment_response.py +125 -0
- revengai/models/base_response_communities.py +125 -0
- revengai/models/base_response_created.py +125 -0
- revengai/models/base_response_dict.py +121 -0
- revengai/models/base_response_dynamic_execution_status.py +125 -0
- revengai/models/base_response_external_response.py +125 -0
- revengai/models/base_response_function_blocks_response.py +125 -0
- revengai/models/base_response_function_capability_response.py +125 -0
- revengai/models/base_response_function_data_types.py +125 -0
- revengai/models/base_response_function_data_types_list.py +125 -0
- revengai/models/base_response_function_search_response.py +125 -0
- revengai/models/base_response_function_strings_response.py +125 -0
- revengai/models/base_response_function_task_response.py +125 -0
- revengai/models/base_response_functions_detail_response.py +125 -0
- revengai/models/base_response_generate_function_data_types.py +125 -0
- revengai/models/base_response_generation_status_list.py +125 -0
- revengai/models/base_response_get_ai_decompilation_rating_response.py +125 -0
- revengai/models/base_response_get_ai_decompilation_task.py +125 -0
- revengai/models/base_response_get_me_response.py +125 -0
- revengai/models/base_response_get_public_user_response.py +125 -0
- revengai/models/base_response_list_collection_results.py +125 -0
- revengai/models/base_response_list_comment_response.py +129 -0
- revengai/models/base_response_list_die_match.py +129 -0
- revengai/models/base_response_list_function_name_history.py +129 -0
- revengai/models/base_response_list_sbom.py +129 -0
- revengai/models/base_response_list_user_activity_response.py +129 -0
- revengai/models/base_response_login_response.py +125 -0
- revengai/models/base_response_logs.py +125 -0
- revengai/models/base_response_models_response.py +125 -0
- revengai/models/base_response_network_overview_response.py +125 -0
- revengai/models/base_response_params.py +125 -0
- revengai/models/base_response_process_dumps.py +125 -0
- revengai/models/base_response_process_registry.py +125 -0
- revengai/models/base_response_process_tree.py +125 -0
- revengai/models/base_response_queued_security_checks_task_response.py +125 -0
- revengai/models/base_response_recent.py +125 -0
- revengai/models/base_response_security_checks_response.py +125 -0
- revengai/models/base_response_status.py +125 -0
- revengai/models/base_response_str.py +121 -0
- revengai/models/base_response_tag_search_response.py +125 -0
- revengai/models/base_response_task_response.py +125 -0
- revengai/models/base_response_ttps.py +125 -0
- revengai/models/base_response_upload_response.py +125 -0
- revengai/models/base_response_vulnerabilities.py +125 -0
- revengai/models/basic.py +116 -0
- revengai/models/binary_additional_details_data_response.py +112 -0
- revengai/models/binary_additional_response.py +105 -0
- revengai/models/binary_config.py +108 -0
- revengai/models/binary_details_response.py +125 -0
- revengai/models/binary_externals_response.py +95 -0
- revengai/models/binary_search_response.py +94 -0
- revengai/models/binary_search_result.py +108 -0
- revengai/models/binary_task_status.py +39 -0
- revengai/models/block.py +86 -0
- revengai/models/block_comments_generation_for_function_response.py +86 -0
- revengai/models/callee_function_info.py +106 -0
- revengai/models/callees_caller_functions_response.py +106 -0
- revengai/models/caller_function_info.py +106 -0
- revengai/models/capabilities.py +94 -0
- revengai/models/capability.py +90 -0
- revengai/models/check_security_checks_task_response.py +87 -0
- revengai/models/child_binaries_response.py +104 -0
- revengai/models/code_signature_model.py +98 -0
- revengai/models/collection_binaries_update_request.py +86 -0
- revengai/models/collection_binaries_update_response.py +94 -0
- revengai/models/collection_binary_response.py +97 -0
- revengai/models/collection_create_request.py +107 -0
- revengai/models/collection_list_item.py +112 -0
- revengai/models/collection_response.py +131 -0
- revengai/models/collection_response_binaries_inner.py +135 -0
- revengai/models/collection_scope.py +38 -0
- revengai/models/collection_search_response.py +94 -0
- revengai/models/collection_search_result.py +124 -0
- revengai/models/collection_tags_update_request.py +86 -0
- revengai/models/collection_tags_update_response.py +86 -0
- revengai/models/collection_update_request.py +106 -0
- revengai/models/comment_base.py +86 -0
- revengai/models/comment_response.py +110 -0
- revengai/models/comment_update_request.py +86 -0
- revengai/models/communities.py +100 -0
- revengai/models/community_match_percentages.py +92 -0
- revengai/models/confidence_type.py +39 -0
- revengai/models/context.py +141 -0
- revengai/models/created.py +90 -0
- revengai/models/decompilation_comment_context.py +98 -0
- revengai/models/die_match.py +92 -0
- revengai/models/dynamic_execution_status_input.py +38 -0
- revengai/models/elf_dynamic_entry.py +88 -0
- revengai/models/elf_import_model.py +88 -0
- revengai/models/elf_model.py +179 -0
- revengai/models/elf_relocation.py +98 -0
- revengai/models/elf_section.py +104 -0
- revengai/models/elf_security.py +94 -0
- revengai/models/elf_segment.py +102 -0
- revengai/models/elf_symbol.py +98 -0
- revengai/models/entrypoint_model.py +88 -0
- revengai/models/enumeration.py +97 -0
- revengai/models/error_model.py +88 -0
- revengai/models/export_model.py +88 -0
- revengai/models/external_response.py +91 -0
- revengai/models/file_format.py +37 -0
- revengai/models/file_hashes.py +140 -0
- revengai/models/file_metadata.py +96 -0
- revengai/models/filters.py +39 -0
- revengai/models/function_block_destination_response.py +95 -0
- revengai/models/function_block_response.py +109 -0
- revengai/models/function_blocks_response.py +121 -0
- revengai/models/function_boundary.py +90 -0
- revengai/models/function_capability_response.py +86 -0
- revengai/models/function_comment_create_request.py +92 -0
- revengai/models/function_data_types.py +106 -0
- revengai/models/function_data_types_list.py +98 -0
- revengai/models/function_data_types_list_item.py +108 -0
- revengai/models/function_data_types_params.py +86 -0
- revengai/models/function_data_types_status.py +90 -0
- revengai/models/function_header.py +112 -0
- revengai/models/function_info_input.py +105 -0
- revengai/models/function_info_input_func_deps_inner.py +163 -0
- revengai/models/function_info_output.py +105 -0
- revengai/models/function_list_item.py +96 -0
- revengai/models/function_local_variable_response.py +94 -0
- revengai/models/function_mapping.py +90 -0
- revengai/models/function_mapping_full.py +275 -0
- revengai/models/function_match.py +111 -0
- revengai/models/function_matching_filters.py +103 -0
- revengai/models/function_matching_request.py +114 -0
- revengai/models/function_matching_response.py +157 -0
- revengai/models/function_name_history.py +99 -0
- revengai/models/function_param_response.py +94 -0
- revengai/models/function_rename.py +88 -0
- revengai/models/function_rename_map.py +90 -0
- revengai/models/function_search_response.py +94 -0
- revengai/models/function_search_result.py +99 -0
- revengai/models/function_source_type.py +39 -0
- revengai/models/function_string.py +88 -0
- revengai/models/function_strings_response.py +96 -0
- revengai/models/function_task_response.py +94 -0
- revengai/models/function_task_status.py +39 -0
- revengai/models/function_type_input.py +127 -0
- revengai/models/function_type_output.py +127 -0
- revengai/models/functions_detail_response.py +125 -0
- revengai/models/functions_list_rename.py +94 -0
- revengai/models/generate_function_data_types.py +94 -0
- revengai/models/generation_status_list.py +98 -0
- revengai/models/get_ai_decompilation_rating_response.py +94 -0
- revengai/models/get_ai_decompilation_task.py +159 -0
- revengai/models/get_me_response.py +108 -0
- revengai/models/get_public_user_response.py +88 -0
- revengai/models/global_variable.py +101 -0
- revengai/models/icon_model.py +91 -0
- revengai/models/import_model.py +88 -0
- revengai/models/inverse_function_map_item.py +99 -0
- revengai/models/inverse_string_map_item.py +93 -0
- revengai/models/inverse_value.py +86 -0
- revengai/models/isa.py +37 -0
- revengai/models/list_collection_results.py +94 -0
- revengai/models/login_request.py +89 -0
- revengai/models/login_response.py +86 -0
- revengai/models/logs.py +86 -0
- revengai/models/matched_function.py +116 -0
- revengai/models/matched_function_suggestion.py +97 -0
- revengai/models/meta_model.py +95 -0
- revengai/models/model_name.py +40 -0
- revengai/models/models_response.py +86 -0
- revengai/models/name_confidence.py +89 -0
- revengai/models/network_overview_dns.py +98 -0
- revengai/models/network_overview_dns_answer.py +88 -0
- revengai/models/network_overview_metadata.py +99 -0
- revengai/models/network_overview_response.py +104 -0
- revengai/models/order.py +36 -0
- revengai/models/pagination_model.py +90 -0
- revengai/models/params.py +103 -0
- revengai/models/pdb_debug_model.py +94 -0
- revengai/models/pe_model.py +215 -0
- revengai/models/platform.py +36 -0
- revengai/models/process.py +103 -0
- revengai/models/process_dump.py +96 -0
- revengai/models/process_dump_metadata.py +90 -0
- revengai/models/process_dumps.py +92 -0
- revengai/models/process_dumps_data.py +96 -0
- revengai/models/process_registry.py +105 -0
- revengai/models/process_tree.py +96 -0
- revengai/models/queued_security_checks_task_response.py +86 -0
- revengai/models/re_analysis_form.py +101 -0
- revengai/models/recent.py +94 -0
- revengai/models/registry.py +102 -0
- revengai/models/relative_binary_response.py +90 -0
- revengai/models/sandbox_options.py +88 -0
- revengai/models/sbom.py +96 -0
- revengai/models/sbom_package.py +88 -0
- revengai/models/scrape_third_party_config.py +86 -0
- revengai/models/section_model.py +96 -0
- revengai/models/security_checks_response.py +98 -0
- revengai/models/security_checks_result.py +103 -0
- revengai/models/security_model.py +106 -0
- revengai/models/severity_type.py +40 -0
- revengai/models/single_code_certificate_model.py +96 -0
- revengai/models/single_code_signature_model.py +96 -0
- revengai/models/single_pdb_entry_model.py +90 -0
- revengai/models/single_section_model.py +98 -0
- revengai/models/stack_variable.py +101 -0
- revengai/models/status_input.py +40 -0
- revengai/models/status_output.py +88 -0
- revengai/models/string_functions.py +96 -0
- revengai/models/structure.py +117 -0
- revengai/models/structure_member.py +99 -0
- revengai/models/symbols.py +96 -0
- revengai/models/tag.py +86 -0
- revengai/models/tag_item.py +95 -0
- revengai/models/tag_response.py +88 -0
- revengai/models/tag_search_response.py +94 -0
- revengai/models/tag_search_result.py +88 -0
- revengai/models/task_response.py +94 -0
- revengai/models/task_status.py +39 -0
- revengai/models/timestamp_model.py +90 -0
- revengai/models/ttps.py +92 -0
- revengai/models/ttps_attack.py +88 -0
- revengai/models/ttps_data.py +96 -0
- revengai/models/ttps_element.py +108 -0
- revengai/models/ttps_occurance.py +88 -0
- revengai/models/type_definition.py +97 -0
- revengai/models/update_function_data_types.py +92 -0
- revengai/models/upload_file_type.py +38 -0
- revengai/models/upload_response.py +91 -0
- revengai/models/upsert_ai_decomplation_rating_request.py +94 -0
- revengai/models/user_activity_response.py +97 -0
- revengai/models/vulnerabilities.py +94 -0
- revengai/models/vulnerability.py +113 -0
- revengai/models/vulnerability_type.py +40 -0
- revengai/models/workspace.py +37 -0
- revengai/py.typed +0 -0
- revengai/rest.py +257 -0
- revengai-2.74.0.dist-info/METADATA +447 -0
- revengai-2.74.0.dist-info/RECORD +314 -0
- revengai-2.74.0.dist-info/WHEEL +4 -0
- revengai-2.74.0.dist-info/licenses/LICENSE.md +19 -0
|
@@ -0,0 +1,827 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
RevEng.AI API
|
|
5
|
+
|
|
6
|
+
RevEng.AI is Similarity Search Engine for executable binaries
|
|
7
|
+
|
|
8
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
9
|
+
|
|
10
|
+
Do not edit the class manually.
|
|
11
|
+
""" # noqa: E501
|
|
12
|
+
|
|
13
|
+
import warnings
|
|
14
|
+
from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
|
|
15
|
+
from typing import Any, Dict, List, Optional, Tuple, Union
|
|
16
|
+
from typing_extensions import Annotated
|
|
17
|
+
|
|
18
|
+
from pydantic import StrictInt
|
|
19
|
+
from revengai.models.base_response_external_response import BaseResponseExternalResponse
|
|
20
|
+
from revengai.models.base_response_str import BaseResponseStr
|
|
21
|
+
from revengai.models.base_response_task_response import BaseResponseTaskResponse
|
|
22
|
+
|
|
23
|
+
from revengai.api_client import ApiClient, RequestSerialized
|
|
24
|
+
from revengai.api_response import ApiResponse
|
|
25
|
+
from revengai.rest import RESTResponseType
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
class ExternalSourcesApi:
|
|
29
|
+
"""NOTE: This class is auto generated by OpenAPI Generator
|
|
30
|
+
Ref: https://openapi-generator.tech
|
|
31
|
+
|
|
32
|
+
Do not edit the class manually.
|
|
33
|
+
"""
|
|
34
|
+
|
|
35
|
+
def __init__(self, api_client=None) -> None:
|
|
36
|
+
if api_client is None:
|
|
37
|
+
api_client = ApiClient.get_default()
|
|
38
|
+
self.api_client = api_client
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
@validate_call
|
|
42
|
+
def create_external_task_vt(
|
|
43
|
+
self,
|
|
44
|
+
analysis_id: StrictInt,
|
|
45
|
+
_request_timeout: Union[
|
|
46
|
+
None,
|
|
47
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
48
|
+
Tuple[
|
|
49
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
50
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
51
|
+
]
|
|
52
|
+
] = None,
|
|
53
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
54
|
+
_content_type: Optional[StrictStr] = None,
|
|
55
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
56
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
57
|
+
) -> BaseResponseStr:
|
|
58
|
+
"""Pulls data from VirusTotal
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
:param analysis_id: (required)
|
|
62
|
+
:type analysis_id: int
|
|
63
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
64
|
+
number provided, it will be total request
|
|
65
|
+
timeout. It can also be a pair (tuple) of
|
|
66
|
+
(connection, read) timeouts.
|
|
67
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
68
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
69
|
+
request; this effectively ignores the
|
|
70
|
+
authentication in the spec for a single request.
|
|
71
|
+
:type _request_auth: dict, optional
|
|
72
|
+
:param _content_type: force content-type for the request.
|
|
73
|
+
:type _content_type: str, Optional
|
|
74
|
+
:param _headers: set to override the headers for a single
|
|
75
|
+
request; this effectively ignores the headers
|
|
76
|
+
in the spec for a single request.
|
|
77
|
+
:type _headers: dict, optional
|
|
78
|
+
:param _host_index: set to override the host_index for a single
|
|
79
|
+
request; this effectively ignores the host_index
|
|
80
|
+
in the spec for a single request.
|
|
81
|
+
:type _host_index: int, optional
|
|
82
|
+
:return: Returns the result object.
|
|
83
|
+
""" # noqa: E501
|
|
84
|
+
|
|
85
|
+
_param = self._create_external_task_vt_serialize(
|
|
86
|
+
analysis_id=analysis_id,
|
|
87
|
+
_request_auth=_request_auth,
|
|
88
|
+
_content_type=_content_type,
|
|
89
|
+
_headers=_headers,
|
|
90
|
+
_host_index=_host_index
|
|
91
|
+
)
|
|
92
|
+
|
|
93
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
94
|
+
'202': "BaseResponseStr",
|
|
95
|
+
'422': "BaseResponse",
|
|
96
|
+
'409': "BaseResponse",
|
|
97
|
+
}
|
|
98
|
+
response_data = self.api_client.call_api(
|
|
99
|
+
*_param,
|
|
100
|
+
_request_timeout=_request_timeout
|
|
101
|
+
)
|
|
102
|
+
response_data.read()
|
|
103
|
+
return self.api_client.response_deserialize(
|
|
104
|
+
response_data=response_data,
|
|
105
|
+
response_types_map=_response_types_map,
|
|
106
|
+
).data
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
@validate_call
|
|
110
|
+
def create_external_task_vt_with_http_info(
|
|
111
|
+
self,
|
|
112
|
+
analysis_id: StrictInt,
|
|
113
|
+
_request_timeout: Union[
|
|
114
|
+
None,
|
|
115
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
116
|
+
Tuple[
|
|
117
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
118
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
119
|
+
]
|
|
120
|
+
] = None,
|
|
121
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
122
|
+
_content_type: Optional[StrictStr] = None,
|
|
123
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
124
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
125
|
+
) -> ApiResponse[BaseResponseStr]:
|
|
126
|
+
"""Pulls data from VirusTotal
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
:param analysis_id: (required)
|
|
130
|
+
:type analysis_id: int
|
|
131
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
132
|
+
number provided, it will be total request
|
|
133
|
+
timeout. It can also be a pair (tuple) of
|
|
134
|
+
(connection, read) timeouts.
|
|
135
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
136
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
137
|
+
request; this effectively ignores the
|
|
138
|
+
authentication in the spec for a single request.
|
|
139
|
+
:type _request_auth: dict, optional
|
|
140
|
+
:param _content_type: force content-type for the request.
|
|
141
|
+
:type _content_type: str, Optional
|
|
142
|
+
:param _headers: set to override the headers for a single
|
|
143
|
+
request; this effectively ignores the headers
|
|
144
|
+
in the spec for a single request.
|
|
145
|
+
:type _headers: dict, optional
|
|
146
|
+
:param _host_index: set to override the host_index for a single
|
|
147
|
+
request; this effectively ignores the host_index
|
|
148
|
+
in the spec for a single request.
|
|
149
|
+
:type _host_index: int, optional
|
|
150
|
+
:return: Returns the result object.
|
|
151
|
+
""" # noqa: E501
|
|
152
|
+
|
|
153
|
+
_param = self._create_external_task_vt_serialize(
|
|
154
|
+
analysis_id=analysis_id,
|
|
155
|
+
_request_auth=_request_auth,
|
|
156
|
+
_content_type=_content_type,
|
|
157
|
+
_headers=_headers,
|
|
158
|
+
_host_index=_host_index
|
|
159
|
+
)
|
|
160
|
+
|
|
161
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
162
|
+
'202': "BaseResponseStr",
|
|
163
|
+
'422': "BaseResponse",
|
|
164
|
+
'409': "BaseResponse",
|
|
165
|
+
}
|
|
166
|
+
response_data = self.api_client.call_api(
|
|
167
|
+
*_param,
|
|
168
|
+
_request_timeout=_request_timeout
|
|
169
|
+
)
|
|
170
|
+
response_data.read()
|
|
171
|
+
return self.api_client.response_deserialize(
|
|
172
|
+
response_data=response_data,
|
|
173
|
+
response_types_map=_response_types_map,
|
|
174
|
+
)
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
@validate_call
|
|
178
|
+
def create_external_task_vt_without_preload_content(
|
|
179
|
+
self,
|
|
180
|
+
analysis_id: StrictInt,
|
|
181
|
+
_request_timeout: Union[
|
|
182
|
+
None,
|
|
183
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
184
|
+
Tuple[
|
|
185
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
186
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
187
|
+
]
|
|
188
|
+
] = None,
|
|
189
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
190
|
+
_content_type: Optional[StrictStr] = None,
|
|
191
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
192
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
193
|
+
) -> RESTResponseType:
|
|
194
|
+
"""Pulls data from VirusTotal
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+
:param analysis_id: (required)
|
|
198
|
+
:type analysis_id: int
|
|
199
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
200
|
+
number provided, it will be total request
|
|
201
|
+
timeout. It can also be a pair (tuple) of
|
|
202
|
+
(connection, read) timeouts.
|
|
203
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
204
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
205
|
+
request; this effectively ignores the
|
|
206
|
+
authentication in the spec for a single request.
|
|
207
|
+
:type _request_auth: dict, optional
|
|
208
|
+
:param _content_type: force content-type for the request.
|
|
209
|
+
:type _content_type: str, Optional
|
|
210
|
+
:param _headers: set to override the headers for a single
|
|
211
|
+
request; this effectively ignores the headers
|
|
212
|
+
in the spec for a single request.
|
|
213
|
+
:type _headers: dict, optional
|
|
214
|
+
:param _host_index: set to override the host_index for a single
|
|
215
|
+
request; this effectively ignores the host_index
|
|
216
|
+
in the spec for a single request.
|
|
217
|
+
:type _host_index: int, optional
|
|
218
|
+
:return: Returns the result object.
|
|
219
|
+
""" # noqa: E501
|
|
220
|
+
|
|
221
|
+
_param = self._create_external_task_vt_serialize(
|
|
222
|
+
analysis_id=analysis_id,
|
|
223
|
+
_request_auth=_request_auth,
|
|
224
|
+
_content_type=_content_type,
|
|
225
|
+
_headers=_headers,
|
|
226
|
+
_host_index=_host_index
|
|
227
|
+
)
|
|
228
|
+
|
|
229
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
230
|
+
'202': "BaseResponseStr",
|
|
231
|
+
'422': "BaseResponse",
|
|
232
|
+
'409': "BaseResponse",
|
|
233
|
+
}
|
|
234
|
+
response_data = self.api_client.call_api(
|
|
235
|
+
*_param,
|
|
236
|
+
_request_timeout=_request_timeout
|
|
237
|
+
)
|
|
238
|
+
return response_data.response
|
|
239
|
+
|
|
240
|
+
|
|
241
|
+
def _create_external_task_vt_serialize(
|
|
242
|
+
self,
|
|
243
|
+
analysis_id,
|
|
244
|
+
_request_auth,
|
|
245
|
+
_content_type,
|
|
246
|
+
_headers,
|
|
247
|
+
_host_index,
|
|
248
|
+
) -> RequestSerialized:
|
|
249
|
+
|
|
250
|
+
_host = None
|
|
251
|
+
|
|
252
|
+
_collection_formats: Dict[str, str] = {
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
_path_params: Dict[str, str] = {}
|
|
256
|
+
_query_params: List[Tuple[str, str]] = []
|
|
257
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
258
|
+
_form_params: List[Tuple[str, str]] = []
|
|
259
|
+
_files: Dict[
|
|
260
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
261
|
+
] = {}
|
|
262
|
+
_body_params: Optional[bytes] = None
|
|
263
|
+
|
|
264
|
+
# process the path parameters
|
|
265
|
+
if analysis_id is not None:
|
|
266
|
+
_path_params['analysis_id'] = analysis_id
|
|
267
|
+
# process the query parameters
|
|
268
|
+
# process the header parameters
|
|
269
|
+
# process the form parameters
|
|
270
|
+
# process the body parameter
|
|
271
|
+
|
|
272
|
+
|
|
273
|
+
# set the HTTP header `Accept`
|
|
274
|
+
if 'Accept' not in _header_params:
|
|
275
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
276
|
+
[
|
|
277
|
+
'application/json'
|
|
278
|
+
]
|
|
279
|
+
)
|
|
280
|
+
|
|
281
|
+
|
|
282
|
+
# authentication setting
|
|
283
|
+
_auth_settings: List[str] = [
|
|
284
|
+
'APIKey'
|
|
285
|
+
]
|
|
286
|
+
|
|
287
|
+
return self.api_client.param_serialize(
|
|
288
|
+
method='POST',
|
|
289
|
+
resource_path='/v2/analysis/{analysis_id}/external/vt',
|
|
290
|
+
path_params=_path_params,
|
|
291
|
+
query_params=_query_params,
|
|
292
|
+
header_params=_header_params,
|
|
293
|
+
body=_body_params,
|
|
294
|
+
post_params=_form_params,
|
|
295
|
+
files=_files,
|
|
296
|
+
auth_settings=_auth_settings,
|
|
297
|
+
collection_formats=_collection_formats,
|
|
298
|
+
_host=_host,
|
|
299
|
+
_request_auth=_request_auth
|
|
300
|
+
)
|
|
301
|
+
|
|
302
|
+
|
|
303
|
+
|
|
304
|
+
|
|
305
|
+
@validate_call
|
|
306
|
+
def get_vt_data(
|
|
307
|
+
self,
|
|
308
|
+
analysis_id: StrictInt,
|
|
309
|
+
_request_timeout: Union[
|
|
310
|
+
None,
|
|
311
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
312
|
+
Tuple[
|
|
313
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
314
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
315
|
+
]
|
|
316
|
+
] = None,
|
|
317
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
318
|
+
_content_type: Optional[StrictStr] = None,
|
|
319
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
320
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
321
|
+
) -> BaseResponseExternalResponse:
|
|
322
|
+
"""Get VirusTotal data
|
|
323
|
+
|
|
324
|
+
|
|
325
|
+
:param analysis_id: (required)
|
|
326
|
+
:type analysis_id: int
|
|
327
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
328
|
+
number provided, it will be total request
|
|
329
|
+
timeout. It can also be a pair (tuple) of
|
|
330
|
+
(connection, read) timeouts.
|
|
331
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
332
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
333
|
+
request; this effectively ignores the
|
|
334
|
+
authentication in the spec for a single request.
|
|
335
|
+
:type _request_auth: dict, optional
|
|
336
|
+
:param _content_type: force content-type for the request.
|
|
337
|
+
:type _content_type: str, Optional
|
|
338
|
+
:param _headers: set to override the headers for a single
|
|
339
|
+
request; this effectively ignores the headers
|
|
340
|
+
in the spec for a single request.
|
|
341
|
+
:type _headers: dict, optional
|
|
342
|
+
:param _host_index: set to override the host_index for a single
|
|
343
|
+
request; this effectively ignores the host_index
|
|
344
|
+
in the spec for a single request.
|
|
345
|
+
:type _host_index: int, optional
|
|
346
|
+
:return: Returns the result object.
|
|
347
|
+
""" # noqa: E501
|
|
348
|
+
|
|
349
|
+
_param = self._get_vt_data_serialize(
|
|
350
|
+
analysis_id=analysis_id,
|
|
351
|
+
_request_auth=_request_auth,
|
|
352
|
+
_content_type=_content_type,
|
|
353
|
+
_headers=_headers,
|
|
354
|
+
_host_index=_host_index
|
|
355
|
+
)
|
|
356
|
+
|
|
357
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
358
|
+
'200': "BaseResponseExternalResponse",
|
|
359
|
+
'422': "BaseResponse",
|
|
360
|
+
'404': "BaseResponse",
|
|
361
|
+
}
|
|
362
|
+
response_data = self.api_client.call_api(
|
|
363
|
+
*_param,
|
|
364
|
+
_request_timeout=_request_timeout
|
|
365
|
+
)
|
|
366
|
+
response_data.read()
|
|
367
|
+
return self.api_client.response_deserialize(
|
|
368
|
+
response_data=response_data,
|
|
369
|
+
response_types_map=_response_types_map,
|
|
370
|
+
).data
|
|
371
|
+
|
|
372
|
+
|
|
373
|
+
@validate_call
|
|
374
|
+
def get_vt_data_with_http_info(
|
|
375
|
+
self,
|
|
376
|
+
analysis_id: StrictInt,
|
|
377
|
+
_request_timeout: Union[
|
|
378
|
+
None,
|
|
379
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
380
|
+
Tuple[
|
|
381
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
382
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
383
|
+
]
|
|
384
|
+
] = None,
|
|
385
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
386
|
+
_content_type: Optional[StrictStr] = None,
|
|
387
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
388
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
389
|
+
) -> ApiResponse[BaseResponseExternalResponse]:
|
|
390
|
+
"""Get VirusTotal data
|
|
391
|
+
|
|
392
|
+
|
|
393
|
+
:param analysis_id: (required)
|
|
394
|
+
:type analysis_id: int
|
|
395
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
396
|
+
number provided, it will be total request
|
|
397
|
+
timeout. It can also be a pair (tuple) of
|
|
398
|
+
(connection, read) timeouts.
|
|
399
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
400
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
401
|
+
request; this effectively ignores the
|
|
402
|
+
authentication in the spec for a single request.
|
|
403
|
+
:type _request_auth: dict, optional
|
|
404
|
+
:param _content_type: force content-type for the request.
|
|
405
|
+
:type _content_type: str, Optional
|
|
406
|
+
:param _headers: set to override the headers for a single
|
|
407
|
+
request; this effectively ignores the headers
|
|
408
|
+
in the spec for a single request.
|
|
409
|
+
:type _headers: dict, optional
|
|
410
|
+
:param _host_index: set to override the host_index for a single
|
|
411
|
+
request; this effectively ignores the host_index
|
|
412
|
+
in the spec for a single request.
|
|
413
|
+
:type _host_index: int, optional
|
|
414
|
+
:return: Returns the result object.
|
|
415
|
+
""" # noqa: E501
|
|
416
|
+
|
|
417
|
+
_param = self._get_vt_data_serialize(
|
|
418
|
+
analysis_id=analysis_id,
|
|
419
|
+
_request_auth=_request_auth,
|
|
420
|
+
_content_type=_content_type,
|
|
421
|
+
_headers=_headers,
|
|
422
|
+
_host_index=_host_index
|
|
423
|
+
)
|
|
424
|
+
|
|
425
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
426
|
+
'200': "BaseResponseExternalResponse",
|
|
427
|
+
'422': "BaseResponse",
|
|
428
|
+
'404': "BaseResponse",
|
|
429
|
+
}
|
|
430
|
+
response_data = self.api_client.call_api(
|
|
431
|
+
*_param,
|
|
432
|
+
_request_timeout=_request_timeout
|
|
433
|
+
)
|
|
434
|
+
response_data.read()
|
|
435
|
+
return self.api_client.response_deserialize(
|
|
436
|
+
response_data=response_data,
|
|
437
|
+
response_types_map=_response_types_map,
|
|
438
|
+
)
|
|
439
|
+
|
|
440
|
+
|
|
441
|
+
@validate_call
|
|
442
|
+
def get_vt_data_without_preload_content(
|
|
443
|
+
self,
|
|
444
|
+
analysis_id: StrictInt,
|
|
445
|
+
_request_timeout: Union[
|
|
446
|
+
None,
|
|
447
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
448
|
+
Tuple[
|
|
449
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
450
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
451
|
+
]
|
|
452
|
+
] = None,
|
|
453
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
454
|
+
_content_type: Optional[StrictStr] = None,
|
|
455
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
456
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
457
|
+
) -> RESTResponseType:
|
|
458
|
+
"""Get VirusTotal data
|
|
459
|
+
|
|
460
|
+
|
|
461
|
+
:param analysis_id: (required)
|
|
462
|
+
:type analysis_id: int
|
|
463
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
464
|
+
number provided, it will be total request
|
|
465
|
+
timeout. It can also be a pair (tuple) of
|
|
466
|
+
(connection, read) timeouts.
|
|
467
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
468
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
469
|
+
request; this effectively ignores the
|
|
470
|
+
authentication in the spec for a single request.
|
|
471
|
+
:type _request_auth: dict, optional
|
|
472
|
+
:param _content_type: force content-type for the request.
|
|
473
|
+
:type _content_type: str, Optional
|
|
474
|
+
:param _headers: set to override the headers for a single
|
|
475
|
+
request; this effectively ignores the headers
|
|
476
|
+
in the spec for a single request.
|
|
477
|
+
:type _headers: dict, optional
|
|
478
|
+
:param _host_index: set to override the host_index for a single
|
|
479
|
+
request; this effectively ignores the host_index
|
|
480
|
+
in the spec for a single request.
|
|
481
|
+
:type _host_index: int, optional
|
|
482
|
+
:return: Returns the result object.
|
|
483
|
+
""" # noqa: E501
|
|
484
|
+
|
|
485
|
+
_param = self._get_vt_data_serialize(
|
|
486
|
+
analysis_id=analysis_id,
|
|
487
|
+
_request_auth=_request_auth,
|
|
488
|
+
_content_type=_content_type,
|
|
489
|
+
_headers=_headers,
|
|
490
|
+
_host_index=_host_index
|
|
491
|
+
)
|
|
492
|
+
|
|
493
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
494
|
+
'200': "BaseResponseExternalResponse",
|
|
495
|
+
'422': "BaseResponse",
|
|
496
|
+
'404': "BaseResponse",
|
|
497
|
+
}
|
|
498
|
+
response_data = self.api_client.call_api(
|
|
499
|
+
*_param,
|
|
500
|
+
_request_timeout=_request_timeout
|
|
501
|
+
)
|
|
502
|
+
return response_data.response
|
|
503
|
+
|
|
504
|
+
|
|
505
|
+
def _get_vt_data_serialize(
|
|
506
|
+
self,
|
|
507
|
+
analysis_id,
|
|
508
|
+
_request_auth,
|
|
509
|
+
_content_type,
|
|
510
|
+
_headers,
|
|
511
|
+
_host_index,
|
|
512
|
+
) -> RequestSerialized:
|
|
513
|
+
|
|
514
|
+
_host = None
|
|
515
|
+
|
|
516
|
+
_collection_formats: Dict[str, str] = {
|
|
517
|
+
}
|
|
518
|
+
|
|
519
|
+
_path_params: Dict[str, str] = {}
|
|
520
|
+
_query_params: List[Tuple[str, str]] = []
|
|
521
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
522
|
+
_form_params: List[Tuple[str, str]] = []
|
|
523
|
+
_files: Dict[
|
|
524
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
525
|
+
] = {}
|
|
526
|
+
_body_params: Optional[bytes] = None
|
|
527
|
+
|
|
528
|
+
# process the path parameters
|
|
529
|
+
if analysis_id is not None:
|
|
530
|
+
_path_params['analysis_id'] = analysis_id
|
|
531
|
+
# process the query parameters
|
|
532
|
+
# process the header parameters
|
|
533
|
+
# process the form parameters
|
|
534
|
+
# process the body parameter
|
|
535
|
+
|
|
536
|
+
|
|
537
|
+
# set the HTTP header `Accept`
|
|
538
|
+
if 'Accept' not in _header_params:
|
|
539
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
540
|
+
[
|
|
541
|
+
'application/json'
|
|
542
|
+
]
|
|
543
|
+
)
|
|
544
|
+
|
|
545
|
+
|
|
546
|
+
# authentication setting
|
|
547
|
+
_auth_settings: List[str] = [
|
|
548
|
+
'APIKey'
|
|
549
|
+
]
|
|
550
|
+
|
|
551
|
+
return self.api_client.param_serialize(
|
|
552
|
+
method='GET',
|
|
553
|
+
resource_path='/v2/analysis/{analysis_id}/external/vt',
|
|
554
|
+
path_params=_path_params,
|
|
555
|
+
query_params=_query_params,
|
|
556
|
+
header_params=_header_params,
|
|
557
|
+
body=_body_params,
|
|
558
|
+
post_params=_form_params,
|
|
559
|
+
files=_files,
|
|
560
|
+
auth_settings=_auth_settings,
|
|
561
|
+
collection_formats=_collection_formats,
|
|
562
|
+
_host=_host,
|
|
563
|
+
_request_auth=_request_auth
|
|
564
|
+
)
|
|
565
|
+
|
|
566
|
+
|
|
567
|
+
|
|
568
|
+
|
|
569
|
+
@validate_call
|
|
570
|
+
def get_vt_task_status(
|
|
571
|
+
self,
|
|
572
|
+
analysis_id: StrictInt,
|
|
573
|
+
_request_timeout: Union[
|
|
574
|
+
None,
|
|
575
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
576
|
+
Tuple[
|
|
577
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
578
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
579
|
+
]
|
|
580
|
+
] = None,
|
|
581
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
582
|
+
_content_type: Optional[StrictStr] = None,
|
|
583
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
584
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
585
|
+
) -> BaseResponseTaskResponse:
|
|
586
|
+
"""Check the status of VirusTotal data retrieval
|
|
587
|
+
|
|
588
|
+
|
|
589
|
+
:param analysis_id: (required)
|
|
590
|
+
:type analysis_id: int
|
|
591
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
592
|
+
number provided, it will be total request
|
|
593
|
+
timeout. It can also be a pair (tuple) of
|
|
594
|
+
(connection, read) timeouts.
|
|
595
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
596
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
597
|
+
request; this effectively ignores the
|
|
598
|
+
authentication in the spec for a single request.
|
|
599
|
+
:type _request_auth: dict, optional
|
|
600
|
+
:param _content_type: force content-type for the request.
|
|
601
|
+
:type _content_type: str, Optional
|
|
602
|
+
:param _headers: set to override the headers for a single
|
|
603
|
+
request; this effectively ignores the headers
|
|
604
|
+
in the spec for a single request.
|
|
605
|
+
:type _headers: dict, optional
|
|
606
|
+
:param _host_index: set to override the host_index for a single
|
|
607
|
+
request; this effectively ignores the host_index
|
|
608
|
+
in the spec for a single request.
|
|
609
|
+
:type _host_index: int, optional
|
|
610
|
+
:return: Returns the result object.
|
|
611
|
+
""" # noqa: E501
|
|
612
|
+
|
|
613
|
+
_param = self._get_vt_task_status_serialize(
|
|
614
|
+
analysis_id=analysis_id,
|
|
615
|
+
_request_auth=_request_auth,
|
|
616
|
+
_content_type=_content_type,
|
|
617
|
+
_headers=_headers,
|
|
618
|
+
_host_index=_host_index
|
|
619
|
+
)
|
|
620
|
+
|
|
621
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
622
|
+
'200': "BaseResponseTaskResponse",
|
|
623
|
+
'422': "BaseResponse",
|
|
624
|
+
}
|
|
625
|
+
response_data = self.api_client.call_api(
|
|
626
|
+
*_param,
|
|
627
|
+
_request_timeout=_request_timeout
|
|
628
|
+
)
|
|
629
|
+
response_data.read()
|
|
630
|
+
return self.api_client.response_deserialize(
|
|
631
|
+
response_data=response_data,
|
|
632
|
+
response_types_map=_response_types_map,
|
|
633
|
+
).data
|
|
634
|
+
|
|
635
|
+
|
|
636
|
+
@validate_call
|
|
637
|
+
def get_vt_task_status_with_http_info(
|
|
638
|
+
self,
|
|
639
|
+
analysis_id: StrictInt,
|
|
640
|
+
_request_timeout: Union[
|
|
641
|
+
None,
|
|
642
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
643
|
+
Tuple[
|
|
644
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
645
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
646
|
+
]
|
|
647
|
+
] = None,
|
|
648
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
649
|
+
_content_type: Optional[StrictStr] = None,
|
|
650
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
651
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
652
|
+
) -> ApiResponse[BaseResponseTaskResponse]:
|
|
653
|
+
"""Check the status of VirusTotal data retrieval
|
|
654
|
+
|
|
655
|
+
|
|
656
|
+
:param analysis_id: (required)
|
|
657
|
+
:type analysis_id: int
|
|
658
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
659
|
+
number provided, it will be total request
|
|
660
|
+
timeout. It can also be a pair (tuple) of
|
|
661
|
+
(connection, read) timeouts.
|
|
662
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
663
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
664
|
+
request; this effectively ignores the
|
|
665
|
+
authentication in the spec for a single request.
|
|
666
|
+
:type _request_auth: dict, optional
|
|
667
|
+
:param _content_type: force content-type for the request.
|
|
668
|
+
:type _content_type: str, Optional
|
|
669
|
+
:param _headers: set to override the headers for a single
|
|
670
|
+
request; this effectively ignores the headers
|
|
671
|
+
in the spec for a single request.
|
|
672
|
+
:type _headers: dict, optional
|
|
673
|
+
:param _host_index: set to override the host_index for a single
|
|
674
|
+
request; this effectively ignores the host_index
|
|
675
|
+
in the spec for a single request.
|
|
676
|
+
:type _host_index: int, optional
|
|
677
|
+
:return: Returns the result object.
|
|
678
|
+
""" # noqa: E501
|
|
679
|
+
|
|
680
|
+
_param = self._get_vt_task_status_serialize(
|
|
681
|
+
analysis_id=analysis_id,
|
|
682
|
+
_request_auth=_request_auth,
|
|
683
|
+
_content_type=_content_type,
|
|
684
|
+
_headers=_headers,
|
|
685
|
+
_host_index=_host_index
|
|
686
|
+
)
|
|
687
|
+
|
|
688
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
689
|
+
'200': "BaseResponseTaskResponse",
|
|
690
|
+
'422': "BaseResponse",
|
|
691
|
+
}
|
|
692
|
+
response_data = self.api_client.call_api(
|
|
693
|
+
*_param,
|
|
694
|
+
_request_timeout=_request_timeout
|
|
695
|
+
)
|
|
696
|
+
response_data.read()
|
|
697
|
+
return self.api_client.response_deserialize(
|
|
698
|
+
response_data=response_data,
|
|
699
|
+
response_types_map=_response_types_map,
|
|
700
|
+
)
|
|
701
|
+
|
|
702
|
+
|
|
703
|
+
@validate_call
|
|
704
|
+
def get_vt_task_status_without_preload_content(
|
|
705
|
+
self,
|
|
706
|
+
analysis_id: StrictInt,
|
|
707
|
+
_request_timeout: Union[
|
|
708
|
+
None,
|
|
709
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
710
|
+
Tuple[
|
|
711
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
712
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
713
|
+
]
|
|
714
|
+
] = None,
|
|
715
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
716
|
+
_content_type: Optional[StrictStr] = None,
|
|
717
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
718
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
719
|
+
) -> RESTResponseType:
|
|
720
|
+
"""Check the status of VirusTotal data retrieval
|
|
721
|
+
|
|
722
|
+
|
|
723
|
+
:param analysis_id: (required)
|
|
724
|
+
:type analysis_id: int
|
|
725
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
726
|
+
number provided, it will be total request
|
|
727
|
+
timeout. It can also be a pair (tuple) of
|
|
728
|
+
(connection, read) timeouts.
|
|
729
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
730
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
731
|
+
request; this effectively ignores the
|
|
732
|
+
authentication in the spec for a single request.
|
|
733
|
+
:type _request_auth: dict, optional
|
|
734
|
+
:param _content_type: force content-type for the request.
|
|
735
|
+
:type _content_type: str, Optional
|
|
736
|
+
:param _headers: set to override the headers for a single
|
|
737
|
+
request; this effectively ignores the headers
|
|
738
|
+
in the spec for a single request.
|
|
739
|
+
:type _headers: dict, optional
|
|
740
|
+
:param _host_index: set to override the host_index for a single
|
|
741
|
+
request; this effectively ignores the host_index
|
|
742
|
+
in the spec for a single request.
|
|
743
|
+
:type _host_index: int, optional
|
|
744
|
+
:return: Returns the result object.
|
|
745
|
+
""" # noqa: E501
|
|
746
|
+
|
|
747
|
+
_param = self._get_vt_task_status_serialize(
|
|
748
|
+
analysis_id=analysis_id,
|
|
749
|
+
_request_auth=_request_auth,
|
|
750
|
+
_content_type=_content_type,
|
|
751
|
+
_headers=_headers,
|
|
752
|
+
_host_index=_host_index
|
|
753
|
+
)
|
|
754
|
+
|
|
755
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
756
|
+
'200': "BaseResponseTaskResponse",
|
|
757
|
+
'422': "BaseResponse",
|
|
758
|
+
}
|
|
759
|
+
response_data = self.api_client.call_api(
|
|
760
|
+
*_param,
|
|
761
|
+
_request_timeout=_request_timeout
|
|
762
|
+
)
|
|
763
|
+
return response_data.response
|
|
764
|
+
|
|
765
|
+
|
|
766
|
+
def _get_vt_task_status_serialize(
|
|
767
|
+
self,
|
|
768
|
+
analysis_id,
|
|
769
|
+
_request_auth,
|
|
770
|
+
_content_type,
|
|
771
|
+
_headers,
|
|
772
|
+
_host_index,
|
|
773
|
+
) -> RequestSerialized:
|
|
774
|
+
|
|
775
|
+
_host = None
|
|
776
|
+
|
|
777
|
+
_collection_formats: Dict[str, str] = {
|
|
778
|
+
}
|
|
779
|
+
|
|
780
|
+
_path_params: Dict[str, str] = {}
|
|
781
|
+
_query_params: List[Tuple[str, str]] = []
|
|
782
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
783
|
+
_form_params: List[Tuple[str, str]] = []
|
|
784
|
+
_files: Dict[
|
|
785
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
786
|
+
] = {}
|
|
787
|
+
_body_params: Optional[bytes] = None
|
|
788
|
+
|
|
789
|
+
# process the path parameters
|
|
790
|
+
if analysis_id is not None:
|
|
791
|
+
_path_params['analysis_id'] = analysis_id
|
|
792
|
+
# process the query parameters
|
|
793
|
+
# process the header parameters
|
|
794
|
+
# process the form parameters
|
|
795
|
+
# process the body parameter
|
|
796
|
+
|
|
797
|
+
|
|
798
|
+
# set the HTTP header `Accept`
|
|
799
|
+
if 'Accept' not in _header_params:
|
|
800
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
801
|
+
[
|
|
802
|
+
'application/json'
|
|
803
|
+
]
|
|
804
|
+
)
|
|
805
|
+
|
|
806
|
+
|
|
807
|
+
# authentication setting
|
|
808
|
+
_auth_settings: List[str] = [
|
|
809
|
+
'APIKey'
|
|
810
|
+
]
|
|
811
|
+
|
|
812
|
+
return self.api_client.param_serialize(
|
|
813
|
+
method='GET',
|
|
814
|
+
resource_path='/v2/analysis/{analysis_id}/external/vt/status',
|
|
815
|
+
path_params=_path_params,
|
|
816
|
+
query_params=_query_params,
|
|
817
|
+
header_params=_header_params,
|
|
818
|
+
body=_body_params,
|
|
819
|
+
post_params=_form_params,
|
|
820
|
+
files=_files,
|
|
821
|
+
auth_settings=_auth_settings,
|
|
822
|
+
collection_formats=_collection_formats,
|
|
823
|
+
_host=_host,
|
|
824
|
+
_request_auth=_request_auth
|
|
825
|
+
)
|
|
826
|
+
|
|
827
|
+
|