diff --git a/.sdk-version b/.sdk-version index 90009ae..c1e14a1 100644 --- a/.sdk-version +++ b/.sdk-version @@ -1 +1 @@ -v4.64.0 +v4.67.1 diff --git a/README.md b/README.md index cb6771d..d75697b 100644 --- a/README.md +++ b/README.md @@ -562,6 +562,7 @@ Class | Method | HTTP request | Description - [Display](docs/Display.md) - [DnsQuery](docs/DnsQuery.md) - [DrakvufFileMetadata](docs/DrakvufFileMetadata.md) + - [DynamicExecutionMetadata](docs/DynamicExecutionMetadata.md) - [DynamicExecutionStatus](docs/DynamicExecutionStatus.md) - [DynamicExecutionStatusResponse](docs/DynamicExecutionStatusResponse.md) - [ELFImportModel](docs/ELFImportModel.md) @@ -769,10 +770,12 @@ Class | Method | HTTP request | Description - [NetworkingScanResult](docs/NetworkingScanResult.md) - [NetworkingVerification](docs/NetworkingVerification.md) - [OIDCCallbackInputBody](docs/OIDCCallbackInputBody.md) + - [OperandXref](docs/OperandXref.md) - [OperationBinaryExportMetadataBinaryExportResult](docs/OperationBinaryExportMetadataBinaryExportResult.md) - [OperationCreateMetadataCreateResult](docs/OperationCreateMetadataCreateResult.md) - [OperationCryptoExplainMetadataCryptoExplainResult](docs/OperationCryptoExplainMetadataCryptoExplainResult.md) - [OperationCryptoScanMetadataCryptoScanResult](docs/OperationCryptoScanMetadataCryptoScanResult.md) + - [OperationDynamicExecutionMetadataDynamicExecutionResult](docs/OperationDynamicExecutionMetadataDynamicExecutionResult.md) - [OperationExecutionExplainMetadataExecutionExplainResult](docs/OperationExecutionExplainMetadataExecutionExplainResult.md) - [OperationExecutionScanMetadataExecutionScanResult](docs/OperationExecutionScanMetadataExecutionScanResult.md) - [OperationFilesystemAnalyseMetadataFilesystemAnalyseResult](docs/OperationFilesystemAnalyseMetadataFilesystemAnalyseResult.md) @@ -854,6 +857,7 @@ Class | Method | HTTP request | Description - [ResultBody](docs/ResultBody.md) - [RevokeBody](docs/RevokeBody.md) - [RuleKind](docs/RuleKind.md) + - [RunDynamicExecutionInputBody](docs/RunDynamicExecutionInputBody.md) - [SSOProvider](docs/SSOProvider.md) - [SSOProvidersOutputBody](docs/SSOProvidersOutputBody.md) - [SandboxConfig](docs/SandboxConfig.md) diff --git a/docs/DisassemblyOutputBody.md b/docs/DisassemblyOutputBody.md index 5f0ca2b..69505b6 100644 --- a/docs/DisassemblyOutputBody.md +++ b/docs/DisassemblyOutputBody.md @@ -9,6 +9,7 @@ Name | Type | Description | Notes **function_id** | **int** | | **global_variables** | **object** | | [optional] **local_variables** | **object** | | [optional] +**operand_xrefs** | [**List[OperandXref]**](OperandXref.md) | Instruction operands that reference a pointer slot, sorted by instruction_vaddr, target_vaddr, pointed_vaddr. | [optional] **params** | **object** | | [optional] **return_type** | **str** | | [optional] **returns** | **bool** | | diff --git a/docs/DynamicExecutionMetadata.md b/docs/DynamicExecutionMetadata.md new file mode 100644 index 0000000..a006662 --- /dev/null +++ b/docs/DynamicExecutionMetadata.md @@ -0,0 +1,30 @@ +# DynamicExecutionMetadata + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**logs** | [**AnalysisLogs**](AnalysisLogs.md) | Sandbox status log messages captured during the run. Empty when none have been captured yet. | +**status** | **str** | Run status. UNINITIALISED means this analysis has never had a run triggered. | + +## Example + +```python +from revengai.models.dynamic_execution_metadata import DynamicExecutionMetadata + +# TODO update the JSON string below +json = "{}" +# create an instance of DynamicExecutionMetadata from a JSON string +dynamic_execution_metadata_instance = DynamicExecutionMetadata.from_json(json) +# print the JSON string representation of the object +print(DynamicExecutionMetadata.to_json()) + +# convert the object into a dict +dynamic_execution_metadata_dict = dynamic_execution_metadata_instance.to_dict() +# create an instance of DynamicExecutionMetadata from a dict +dynamic_execution_metadata_from_dict = DynamicExecutionMetadata.from_dict(dynamic_execution_metadata_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/OperandXref.md b/docs/OperandXref.md new file mode 100644 index 0000000..172d601 --- /dev/null +++ b/docs/OperandXref.md @@ -0,0 +1,31 @@ +# OperandXref + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**instruction_vaddr** | **int** | Vaddr of the instruction containing the operand. | +**pointed_vaddr** | **int** | Address stored in the pointer slot. Resolve this to a function, import or global to name the reference. | +**target_vaddr** | **int** | Vaddr of the pointer slot the operand references. | + +## Example + +```python +from revengai.models.operand_xref import OperandXref + +# TODO update the JSON string below +json = "{}" +# create an instance of OperandXref from a JSON string +operand_xref_instance = OperandXref.from_json(json) +# print the JSON string representation of the object +print(OperandXref.to_json()) + +# convert the object into a dict +operand_xref_dict = operand_xref_instance.to_dict() +# create an instance of OperandXref from a dict +operand_xref_from_dict = OperandXref.from_dict(operand_xref_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/OperationDynamicExecutionMetadataDynamicExecutionResult.md b/docs/OperationDynamicExecutionMetadataDynamicExecutionResult.md new file mode 100644 index 0000000..83d3ff2 --- /dev/null +++ b/docs/OperationDynamicExecutionMetadataDynamicExecutionResult.md @@ -0,0 +1,33 @@ +# OperationDynamicExecutionMetadataDynamicExecutionResult + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**done** | **bool** | Whether the operation has reached a terminal state. | +**error** | [**Status**](Status.md) | Failure detail, populated only when done is true and the operation failed. | [optional] +**metadata** | [**DynamicExecutionMetadata**](DynamicExecutionMetadata.md) | In-flight information and details. | [optional] +**name** | **str** | API resource name. | +**response** | **object** | | [optional] + +## Example + +```python +from revengai.models.operation_dynamic_execution_metadata_dynamic_execution_result import OperationDynamicExecutionMetadataDynamicExecutionResult + +# TODO update the JSON string below +json = "{}" +# create an instance of OperationDynamicExecutionMetadataDynamicExecutionResult from a JSON string +operation_dynamic_execution_metadata_dynamic_execution_result_instance = OperationDynamicExecutionMetadataDynamicExecutionResult.from_json(json) +# print the JSON string representation of the object +print(OperationDynamicExecutionMetadataDynamicExecutionResult.to_json()) + +# convert the object into a dict +operation_dynamic_execution_metadata_dynamic_execution_result_dict = operation_dynamic_execution_metadata_dynamic_execution_result_instance.to_dict() +# create an instance of OperationDynamicExecutionMetadataDynamicExecutionResult from a dict +operation_dynamic_execution_metadata_dynamic_execution_result_from_dict = OperationDynamicExecutionMetadataDynamicExecutionResult.from_dict(operation_dynamic_execution_metadata_dynamic_execution_result_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/RunDynamicExecutionInputBody.md b/docs/RunDynamicExecutionInputBody.md new file mode 100644 index 0000000..6f3aaee --- /dev/null +++ b/docs/RunDynamicExecutionInputBody.md @@ -0,0 +1,34 @@ +# RunDynamicExecutionInputBody + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**archive_entry_path** | **str** | Relative path of the entry inside the archive to execute | [optional] +**archive_password** | **str** | Password for an encrypted archive | [optional] +**archive_sha_256_hash** | **str** | SHA-256 of the archive object to send to the sandbox instead of the analysed binary | [optional] +**command_line_args** | **str** | Command-line arguments passed to the sample when the sandbox launches it | [optional] +**start_method** | **str** | How the sandbox launches the sample. Defaults to the sandbox's standard behaviour when omitted. | [optional] +**timeout** | **int** | Maximum sandbox execution time in seconds | [optional] [default to 120] + +## Example + +```python +from revengai.models.run_dynamic_execution_input_body import RunDynamicExecutionInputBody + +# TODO update the JSON string below +json = "{}" +# create an instance of RunDynamicExecutionInputBody from a JSON string +run_dynamic_execution_input_body_instance = RunDynamicExecutionInputBody.from_json(json) +# print the JSON string representation of the object +print(RunDynamicExecutionInputBody.to_json()) + +# convert the object into a dict +run_dynamic_execution_input_body_dict = run_dynamic_execution_input_body_instance.to_dict() +# create an instance of RunDynamicExecutionInputBody from a dict +run_dynamic_execution_input_body_from_dict = RunDynamicExecutionInputBody.from_dict(run_dynamic_execution_input_body_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/revengai/__init__.py b/revengai/__init__.py index 3ab1b0e..78cd153 100644 --- a/revengai/__init__.py +++ b/revengai/__init__.py @@ -13,7 +13,7 @@ """ # noqa: E501 -__version__ = "v4.64.0" +__version__ = "v4.67.1" # Define package exports __all__ = [ @@ -321,6 +321,7 @@ "Display", "DnsQuery", "DrakvufFileMetadata", + "DynamicExecutionMetadata", "DynamicExecutionStatus", "DynamicExecutionStatusResponse", "ELFImportModel", @@ -528,10 +529,12 @@ "NetworkingScanResult", "NetworkingVerification", "OIDCCallbackInputBody", + "OperandXref", "OperationBinaryExportMetadataBinaryExportResult", "OperationCreateMetadataCreateResult", "OperationCryptoExplainMetadataCryptoExplainResult", "OperationCryptoScanMetadataCryptoScanResult", + "OperationDynamicExecutionMetadataDynamicExecutionResult", "OperationExecutionExplainMetadataExecutionExplainResult", "OperationExecutionScanMetadataExecutionScanResult", "OperationFilesystemAnalyseMetadataFilesystemAnalyseResult", @@ -613,6 +616,7 @@ "ResultBody", "RevokeBody", "RuleKind", + "RunDynamicExecutionInputBody", "SSOProvider", "SSOProvidersOutputBody", "SandboxConfig", @@ -1098,6 +1102,7 @@ from revengai.models.display import Display as Display from revengai.models.dns_query import DnsQuery as DnsQuery from revengai.models.drakvuf_file_metadata import DrakvufFileMetadata as DrakvufFileMetadata +from revengai.models.dynamic_execution_metadata import DynamicExecutionMetadata as DynamicExecutionMetadata from revengai.models.dynamic_execution_status import DynamicExecutionStatus as DynamicExecutionStatus from revengai.models.dynamic_execution_status_response import DynamicExecutionStatusResponse as DynamicExecutionStatusResponse from revengai.models.elf_import_model import ELFImportModel as ELFImportModel @@ -1305,10 +1310,12 @@ from revengai.models.networking_scan_result import NetworkingScanResult as NetworkingScanResult from revengai.models.networking_verification import NetworkingVerification as NetworkingVerification from revengai.models.oidc_callback_input_body import OIDCCallbackInputBody as OIDCCallbackInputBody +from revengai.models.operand_xref import OperandXref as OperandXref from revengai.models.operation_binary_export_metadata_binary_export_result import OperationBinaryExportMetadataBinaryExportResult as OperationBinaryExportMetadataBinaryExportResult from revengai.models.operation_create_metadata_create_result import OperationCreateMetadataCreateResult as OperationCreateMetadataCreateResult from revengai.models.operation_crypto_explain_metadata_crypto_explain_result import OperationCryptoExplainMetadataCryptoExplainResult as OperationCryptoExplainMetadataCryptoExplainResult from revengai.models.operation_crypto_scan_metadata_crypto_scan_result import OperationCryptoScanMetadataCryptoScanResult as OperationCryptoScanMetadataCryptoScanResult +from revengai.models.operation_dynamic_execution_metadata_dynamic_execution_result import OperationDynamicExecutionMetadataDynamicExecutionResult as OperationDynamicExecutionMetadataDynamicExecutionResult from revengai.models.operation_execution_explain_metadata_execution_explain_result import OperationExecutionExplainMetadataExecutionExplainResult as OperationExecutionExplainMetadataExecutionExplainResult from revengai.models.operation_execution_scan_metadata_execution_scan_result import OperationExecutionScanMetadataExecutionScanResult as OperationExecutionScanMetadataExecutionScanResult from revengai.models.operation_filesystem_analyse_metadata_filesystem_analyse_result import OperationFilesystemAnalyseMetadataFilesystemAnalyseResult as OperationFilesystemAnalyseMetadataFilesystemAnalyseResult @@ -1390,6 +1397,7 @@ from revengai.models.result_body import ResultBody as ResultBody from revengai.models.revoke_body import RevokeBody as RevokeBody from revengai.models.rule_kind import RuleKind as RuleKind +from revengai.models.run_dynamic_execution_input_body import RunDynamicExecutionInputBody as RunDynamicExecutionInputBody from revengai.models.sso_provider import SSOProvider as SSOProvider from revengai.models.sso_providers_output_body import SSOProvidersOutputBody as SSOProvidersOutputBody from revengai.models.sandbox_config import SandboxConfig as SandboxConfig diff --git a/revengai/api/analyses_bulk_actions_api.py b/revengai/api/analyses_bulk_actions_api.py index 02dbf2a..7dd5d93 100644 --- a/revengai/api/analyses_bulk_actions_api.py +++ b/revengai/api/analyses_bulk_actions_api.py @@ -58,7 +58,7 @@ def bulk_add_analysis_tags( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BaseResponseAnalysisBulkAddTagsResponse: - """Bulk Add Analysis Tags + """(Deprecated) Bulk Add Analysis Tags Updates analysis tags for multiple analyses. User must be the owner. @@ -85,6 +85,7 @@ def bulk_add_analysis_tags( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("PATCH /v2/analyses/tags/add is deprecated.", DeprecationWarning) _param = self._bulk_add_analysis_tags_serialize( analysis_bulk_add_tags_request=analysis_bulk_add_tags_request, @@ -126,7 +127,7 @@ def bulk_add_analysis_tags_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[BaseResponseAnalysisBulkAddTagsResponse]: - """Bulk Add Analysis Tags + """(Deprecated) Bulk Add Analysis Tags Updates analysis tags for multiple analyses. User must be the owner. @@ -153,6 +154,7 @@ def bulk_add_analysis_tags_with_http_info( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("PATCH /v2/analyses/tags/add is deprecated.", DeprecationWarning) _param = self._bulk_add_analysis_tags_serialize( analysis_bulk_add_tags_request=analysis_bulk_add_tags_request, @@ -194,7 +196,7 @@ def bulk_add_analysis_tags_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Bulk Add Analysis Tags + """(Deprecated) Bulk Add Analysis Tags Updates analysis tags for multiple analyses. User must be the owner. @@ -221,6 +223,7 @@ def bulk_add_analysis_tags_without_preload_content( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("PATCH /v2/analyses/tags/add is deprecated.", DeprecationWarning) _param = self._bulk_add_analysis_tags_serialize( analysis_bulk_add_tags_request=analysis_bulk_add_tags_request, diff --git a/revengai/api/analyses_core_api.py b/revengai/api/analyses_core_api.py index 0b66270..d436c18 100644 --- a/revengai/api/analyses_core_api.py +++ b/revengai/api/analyses_core_api.py @@ -1818,7 +1818,7 @@ def get_analysis_function_map( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BaseResponseAnalysisFunctionMapping: - """Get Analysis Function Map + """(Deprecated) Get Analysis Function Map Returns three maps: a map of function ids to function addresses, it's inverse and a map of function addresses to function names. @@ -1845,6 +1845,7 @@ def get_analysis_function_map( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("GET /v2/analyses/{analysis_id}/func_maps is deprecated.", DeprecationWarning) _param = self._get_analysis_function_map_serialize( analysis_id=analysis_id, @@ -1886,7 +1887,7 @@ def get_analysis_function_map_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[BaseResponseAnalysisFunctionMapping]: - """Get Analysis Function Map + """(Deprecated) Get Analysis Function Map Returns three maps: a map of function ids to function addresses, it's inverse and a map of function addresses to function names. @@ -1913,6 +1914,7 @@ def get_analysis_function_map_with_http_info( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("GET /v2/analyses/{analysis_id}/func_maps is deprecated.", DeprecationWarning) _param = self._get_analysis_function_map_serialize( analysis_id=analysis_id, @@ -1954,7 +1956,7 @@ def get_analysis_function_map_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get Analysis Function Map + """(Deprecated) Get Analysis Function Map Returns three maps: a map of function ids to function addresses, it's inverse and a map of function addresses to function names. @@ -1981,6 +1983,7 @@ def get_analysis_function_map_without_preload_content( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("GET /v2/analyses/{analysis_id}/func_maps is deprecated.", DeprecationWarning) _param = self._get_analysis_function_map_serialize( analysis_id=analysis_id, @@ -3475,7 +3478,7 @@ def get_dynamic_execution_report( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> AnalysisReport: - """Get dynamic execution report + """(Deprecated) Get dynamic execution report Returns the dynamic execution report JSON for the analysis. Requires the task to be in COMPLETED status. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`DYNAMIC_EXECUTION_INCOMPLETE`](/errors/DYNAMIC_EXECUTION_INCOMPLETE) — Dynamic Execution Incomplete @@ -3502,6 +3505,7 @@ def get_dynamic_execution_report( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("GET /v2/analyses/{analysis_id}/dynamic-execution/report is deprecated.", DeprecationWarning) _param = self._get_dynamic_execution_report_serialize( analysis_id=analysis_id, @@ -3546,7 +3550,7 @@ def get_dynamic_execution_report_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[AnalysisReport]: - """Get dynamic execution report + """(Deprecated) Get dynamic execution report Returns the dynamic execution report JSON for the analysis. Requires the task to be in COMPLETED status. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`DYNAMIC_EXECUTION_INCOMPLETE`](/errors/DYNAMIC_EXECUTION_INCOMPLETE) — Dynamic Execution Incomplete @@ -3573,6 +3577,7 @@ def get_dynamic_execution_report_with_http_info( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("GET /v2/analyses/{analysis_id}/dynamic-execution/report is deprecated.", DeprecationWarning) _param = self._get_dynamic_execution_report_serialize( analysis_id=analysis_id, @@ -3617,7 +3622,7 @@ def get_dynamic_execution_report_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get dynamic execution report + """(Deprecated) Get dynamic execution report Returns the dynamic execution report JSON for the analysis. Requires the task to be in COMPLETED status. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`DYNAMIC_EXECUTION_INCOMPLETE`](/errors/DYNAMIC_EXECUTION_INCOMPLETE) — Dynamic Execution Incomplete @@ -3644,6 +3649,7 @@ def get_dynamic_execution_report_without_preload_content( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("GET /v2/analyses/{analysis_id}/dynamic-execution/report is deprecated.", DeprecationWarning) _param = self._get_dynamic_execution_report_serialize( analysis_id=analysis_id, @@ -3749,7 +3755,7 @@ def get_dynamic_execution_status( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> DynamicExecutionStatusResponse: - """Get dynamic execution status + """(Deprecated) Get dynamic execution status Returns the status of the most recent dynamic execution task for the analysis. Returns UNINITIALISED if no task has been started. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied @@ -3776,6 +3782,7 @@ def get_dynamic_execution_status( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("GET /v2/analyses/{analysis_id}/dynamic-execution/status is deprecated.", DeprecationWarning) _param = self._get_dynamic_execution_status_serialize( analysis_id=analysis_id, @@ -3819,7 +3826,7 @@ def get_dynamic_execution_status_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[DynamicExecutionStatusResponse]: - """Get dynamic execution status + """(Deprecated) Get dynamic execution status Returns the status of the most recent dynamic execution task for the analysis. Returns UNINITIALISED if no task has been started. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied @@ -3846,6 +3853,7 @@ def get_dynamic_execution_status_with_http_info( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("GET /v2/analyses/{analysis_id}/dynamic-execution/status is deprecated.", DeprecationWarning) _param = self._get_dynamic_execution_status_serialize( analysis_id=analysis_id, @@ -3889,7 +3897,7 @@ def get_dynamic_execution_status_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get dynamic execution status + """(Deprecated) Get dynamic execution status Returns the status of the most recent dynamic execution task for the analysis. Returns UNINITIALISED if no task has been started. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied @@ -3916,6 +3924,7 @@ def get_dynamic_execution_status_without_preload_content( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("GET /v2/analyses/{analysis_id}/dynamic-execution/status is deprecated.", DeprecationWarning) _param = self._get_dynamic_execution_status_serialize( analysis_id=analysis_id, @@ -6237,7 +6246,7 @@ def update_analysis_tags( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BaseResponseAnalysisUpdateTagsResponse: - """Update Analysis Tags + """(Deprecated) Update Analysis Tags Updates analysis tags. User must be the owner. @@ -6266,6 +6275,7 @@ def update_analysis_tags( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("PATCH /v2/analyses/{analysis_id}/tags is deprecated.", DeprecationWarning) _param = self._update_analysis_tags_serialize( analysis_id=analysis_id, @@ -6309,7 +6319,7 @@ def update_analysis_tags_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[BaseResponseAnalysisUpdateTagsResponse]: - """Update Analysis Tags + """(Deprecated) Update Analysis Tags Updates analysis tags. User must be the owner. @@ -6338,6 +6348,7 @@ def update_analysis_tags_with_http_info( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("PATCH /v2/analyses/{analysis_id}/tags is deprecated.", DeprecationWarning) _param = self._update_analysis_tags_serialize( analysis_id=analysis_id, @@ -6381,7 +6392,7 @@ def update_analysis_tags_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Update Analysis Tags + """(Deprecated) Update Analysis Tags Updates analysis tags. User must be the owner. @@ -6410,6 +6421,7 @@ def update_analysis_tags_without_preload_content( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("PATCH /v2/analyses/{analysis_id}/tags is deprecated.", DeprecationWarning) _param = self._update_analysis_tags_serialize( analysis_id=analysis_id, diff --git a/revengai/api/analyses_results_metadata_api.py b/revengai/api/analyses_results_metadata_api.py index a8947e1..d91757a 100644 --- a/revengai/api/analyses_results_metadata_api.py +++ b/revengai/api/analyses_results_metadata_api.py @@ -998,7 +998,7 @@ def get_tags( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BaseResponseAnalysisTags: - """Get function tags with maliciousness score + """(Deprecated) Get function tags with maliciousness score :param analysis_id: (required) @@ -1024,6 +1024,7 @@ def get_tags( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("GET /v2/analyses/{analysis_id}/tags is deprecated.", DeprecationWarning) _param = self._get_tags_serialize( analysis_id=analysis_id, @@ -1065,7 +1066,7 @@ def get_tags_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[BaseResponseAnalysisTags]: - """Get function tags with maliciousness score + """(Deprecated) Get function tags with maliciousness score :param analysis_id: (required) @@ -1091,6 +1092,7 @@ def get_tags_with_http_info( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("GET /v2/analyses/{analysis_id}/tags is deprecated.", DeprecationWarning) _param = self._get_tags_serialize( analysis_id=analysis_id, @@ -1132,7 +1134,7 @@ def get_tags_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get function tags with maliciousness score + """(Deprecated) Get function tags with maliciousness score :param analysis_id: (required) @@ -1158,6 +1160,7 @@ def get_tags_without_preload_content( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("GET /v2/analyses/{analysis_id}/tags is deprecated.", DeprecationWarning) _param = self._get_tags_serialize( analysis_id=analysis_id, diff --git a/revengai/api/analyses_x_refs_api.py b/revengai/api/analyses_x_refs_api.py index 2f86092..7f29018 100644 --- a/revengai/api/analyses_x_refs_api.py +++ b/revengai/api/analyses_x_refs_api.py @@ -55,7 +55,7 @@ def get_xref_by_vaddr( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BaseResponseXrefResponse: - """[Beta] Look up xrefs by virtual address + """(Deprecated) [Beta] Look up xrefs by virtual address **This endpoint is in beta and may change without notice.** @@ -84,6 +84,7 @@ def get_xref_by_vaddr( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("GET /v2/analyses/{analysis_id}/xrefs/{vaddr} is deprecated.", DeprecationWarning) _param = self._get_xref_by_vaddr_serialize( analysis_id=analysis_id, @@ -128,7 +129,7 @@ def get_xref_by_vaddr_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[BaseResponseXrefResponse]: - """[Beta] Look up xrefs by virtual address + """(Deprecated) [Beta] Look up xrefs by virtual address **This endpoint is in beta and may change without notice.** @@ -157,6 +158,7 @@ def get_xref_by_vaddr_with_http_info( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("GET /v2/analyses/{analysis_id}/xrefs/{vaddr} is deprecated.", DeprecationWarning) _param = self._get_xref_by_vaddr_serialize( analysis_id=analysis_id, @@ -201,7 +203,7 @@ def get_xref_by_vaddr_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """[Beta] Look up xrefs by virtual address + """(Deprecated) [Beta] Look up xrefs by virtual address **This endpoint is in beta and may change without notice.** @@ -230,6 +232,7 @@ def get_xref_by_vaddr_without_preload_content( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("GET /v2/analyses/{analysis_id}/xrefs/{vaddr} is deprecated.", DeprecationWarning) _param = self._get_xref_by_vaddr_serialize( analysis_id=analysis_id, diff --git a/revengai/api/authentication_users_api.py b/revengai/api/authentication_users_api.py index 768db76..3179fec 100644 --- a/revengai/api/authentication_users_api.py +++ b/revengai/api/authentication_users_api.py @@ -61,7 +61,7 @@ def get_user( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BaseResponseGetPublicUserResponse: - """Get a user's public information + """(Deprecated) Get a user's public information :param user_id: (required) @@ -87,6 +87,7 @@ def get_user( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("GET /v2/users/{user_id} is deprecated.", DeprecationWarning) _param = self._get_user_serialize( user_id=user_id, @@ -128,7 +129,7 @@ def get_user_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[BaseResponseGetPublicUserResponse]: - """Get a user's public information + """(Deprecated) Get a user's public information :param user_id: (required) @@ -154,6 +155,7 @@ def get_user_with_http_info( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("GET /v2/users/{user_id} is deprecated.", DeprecationWarning) _param = self._get_user_serialize( user_id=user_id, @@ -195,7 +197,7 @@ def get_user_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get a user's public information + """(Deprecated) Get a user's public information :param user_id: (required) @@ -221,6 +223,7 @@ def get_user_without_preload_content( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("GET /v2/users/{user_id} is deprecated.", DeprecationWarning) _param = self._get_user_serialize( user_id=user_id, @@ -322,7 +325,7 @@ def get_user_activity( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BaseResponseListUserActivityResponse: - """Get auth user activity + """(Deprecated) Get auth user activity :param _request_timeout: timeout setting for this request. If one @@ -346,6 +349,7 @@ def get_user_activity( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("GET /v2/users/activity is deprecated.", DeprecationWarning) _param = self._get_user_activity_serialize( _request_auth=_request_auth, @@ -385,7 +389,7 @@ def get_user_activity_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[BaseResponseListUserActivityResponse]: - """Get auth user activity + """(Deprecated) Get auth user activity :param _request_timeout: timeout setting for this request. If one @@ -409,6 +413,7 @@ def get_user_activity_with_http_info( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("GET /v2/users/activity is deprecated.", DeprecationWarning) _param = self._get_user_activity_serialize( _request_auth=_request_auth, @@ -448,7 +453,7 @@ def get_user_activity_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get auth user activity + """(Deprecated) Get auth user activity :param _request_timeout: timeout setting for this request. If one @@ -472,6 +477,7 @@ def get_user_activity_without_preload_content( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("GET /v2/users/activity is deprecated.", DeprecationWarning) _param = self._get_user_activity_serialize( _request_auth=_request_auth, @@ -570,7 +576,7 @@ def submit_user_feedback( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BaseResponse: - """Submit feedback about the application + """(Deprecated) Submit feedback about the application Submits feedback about the application and forwards it to the RevEng.ai project management tool. @@ -597,6 +603,7 @@ def submit_user_feedback( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("POST /v2/users/feedback is deprecated.", DeprecationWarning) _param = self._submit_user_feedback_serialize( submit_user_feedback_request=submit_user_feedback_request, @@ -638,7 +645,7 @@ def submit_user_feedback_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[BaseResponse]: - """Submit feedback about the application + """(Deprecated) Submit feedback about the application Submits feedback about the application and forwards it to the RevEng.ai project management tool. @@ -665,6 +672,7 @@ def submit_user_feedback_with_http_info( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("POST /v2/users/feedback is deprecated.", DeprecationWarning) _param = self._submit_user_feedback_serialize( submit_user_feedback_request=submit_user_feedback_request, @@ -706,7 +714,7 @@ def submit_user_feedback_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Submit feedback about the application + """(Deprecated) Submit feedback about the application Submits feedback about the application and forwards it to the RevEng.ai project management tool. @@ -733,6 +741,7 @@ def submit_user_feedback_without_preload_content( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("POST /v2/users/feedback is deprecated.", DeprecationWarning) _param = self._submit_user_feedback_serialize( submit_user_feedback_request=submit_user_feedback_request, diff --git a/revengai/api/binaries_api.py b/revengai/api/binaries_api.py index d9b3520..6c530c0 100644 --- a/revengai/api/binaries_api.py +++ b/revengai/api/binaries_api.py @@ -69,7 +69,7 @@ def download_zipped_binary( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> bytearray: - """Downloads a zipped binary with password protection + """(Deprecated) Downloads a zipped binary with password protection :param binary_id: (required) @@ -95,6 +95,7 @@ def download_zipped_binary( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("GET /v2/binaries/{binary_id}/download-zipped is deprecated.", DeprecationWarning) _param = self._download_zipped_binary_serialize( binary_id=binary_id, @@ -136,7 +137,7 @@ def download_zipped_binary_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[bytearray]: - """Downloads a zipped binary with password protection + """(Deprecated) Downloads a zipped binary with password protection :param binary_id: (required) @@ -162,6 +163,7 @@ def download_zipped_binary_with_http_info( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("GET /v2/binaries/{binary_id}/download-zipped is deprecated.", DeprecationWarning) _param = self._download_zipped_binary_serialize( binary_id=binary_id, @@ -203,7 +205,7 @@ def download_zipped_binary_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Downloads a zipped binary with password protection + """(Deprecated) Downloads a zipped binary with password protection :param binary_id: (required) @@ -229,6 +231,7 @@ def download_zipped_binary_without_preload_content( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("GET /v2/binaries/{binary_id}/download-zipped is deprecated.", DeprecationWarning) _param = self._download_zipped_binary_serialize( binary_id=binary_id, @@ -1410,7 +1413,7 @@ def get_binary_details( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BaseResponseBinaryDetailsResponse: - """Gets the details of a binary + """(Deprecated) Gets the details of a binary :param binary_id: (required) @@ -1436,6 +1439,7 @@ def get_binary_details( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("GET /v2/binaries/{binary_id}/details is deprecated.", DeprecationWarning) _param = self._get_binary_details_serialize( binary_id=binary_id, @@ -1477,7 +1481,7 @@ def get_binary_details_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[BaseResponseBinaryDetailsResponse]: - """Gets the details of a binary + """(Deprecated) Gets the details of a binary :param binary_id: (required) @@ -1503,6 +1507,7 @@ def get_binary_details_with_http_info( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("GET /v2/binaries/{binary_id}/details is deprecated.", DeprecationWarning) _param = self._get_binary_details_serialize( binary_id=binary_id, @@ -1544,7 +1549,7 @@ def get_binary_details_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Gets the details of a binary + """(Deprecated) Gets the details of a binary :param binary_id: (required) @@ -1570,6 +1575,7 @@ def get_binary_details_without_preload_content( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("GET /v2/binaries/{binary_id}/details is deprecated.", DeprecationWarning) _param = self._get_binary_details_serialize( binary_id=binary_id, @@ -1937,7 +1943,7 @@ def get_binary_externals( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BaseResponseBinaryExternalsResponse: - """Gets the external details of a binary + """(Deprecated) Gets the external details of a binary :param binary_id: (required) @@ -1963,6 +1969,7 @@ def get_binary_externals( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("GET /v2/binaries/{binary_id}/externals is deprecated.", DeprecationWarning) _param = self._get_binary_externals_serialize( binary_id=binary_id, @@ -2004,7 +2011,7 @@ def get_binary_externals_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[BaseResponseBinaryExternalsResponse]: - """Gets the external details of a binary + """(Deprecated) Gets the external details of a binary :param binary_id: (required) @@ -2030,6 +2037,7 @@ def get_binary_externals_with_http_info( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("GET /v2/binaries/{binary_id}/externals is deprecated.", DeprecationWarning) _param = self._get_binary_externals_serialize( binary_id=binary_id, @@ -2071,7 +2079,7 @@ def get_binary_externals_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Gets the external details of a binary + """(Deprecated) Gets the external details of a binary :param binary_id: (required) @@ -2097,6 +2105,7 @@ def get_binary_externals_without_preload_content( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("GET /v2/binaries/{binary_id}/externals is deprecated.", DeprecationWarning) _param = self._get_binary_externals_serialize( binary_id=binary_id, diff --git a/revengai/api/external_sources_api.py b/revengai/api/external_sources_api.py index f096988..1fc223e 100644 --- a/revengai/api/external_sources_api.py +++ b/revengai/api/external_sources_api.py @@ -57,7 +57,7 @@ def create_external_task_vt( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BaseResponseStr: - """Pulls data from VirusTotal + """(Deprecated) Pulls data from VirusTotal :param analysis_id: (required) @@ -83,6 +83,7 @@ def create_external_task_vt( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("POST /v2/analysis/{analysis_id}/external/vt is deprecated.", DeprecationWarning) _param = self._create_external_task_vt_serialize( analysis_id=analysis_id, @@ -125,7 +126,7 @@ def create_external_task_vt_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[BaseResponseStr]: - """Pulls data from VirusTotal + """(Deprecated) Pulls data from VirusTotal :param analysis_id: (required) @@ -151,6 +152,7 @@ def create_external_task_vt_with_http_info( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("POST /v2/analysis/{analysis_id}/external/vt is deprecated.", DeprecationWarning) _param = self._create_external_task_vt_serialize( analysis_id=analysis_id, @@ -193,7 +195,7 @@ def create_external_task_vt_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Pulls data from VirusTotal + """(Deprecated) Pulls data from VirusTotal :param analysis_id: (required) @@ -219,6 +221,7 @@ def create_external_task_vt_without_preload_content( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("POST /v2/analysis/{analysis_id}/external/vt is deprecated.", DeprecationWarning) _param = self._create_external_task_vt_serialize( analysis_id=analysis_id, @@ -322,7 +325,7 @@ def get_vt_data( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BaseResponseExternalResponse: - """Get VirusTotal data + """(Deprecated) Get VirusTotal data :param analysis_id: (required) @@ -348,6 +351,7 @@ def get_vt_data( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("GET /v2/analysis/{analysis_id}/external/vt is deprecated.", DeprecationWarning) _param = self._get_vt_data_serialize( analysis_id=analysis_id, @@ -390,7 +394,7 @@ def get_vt_data_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[BaseResponseExternalResponse]: - """Get VirusTotal data + """(Deprecated) Get VirusTotal data :param analysis_id: (required) @@ -416,6 +420,7 @@ def get_vt_data_with_http_info( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("GET /v2/analysis/{analysis_id}/external/vt is deprecated.", DeprecationWarning) _param = self._get_vt_data_serialize( analysis_id=analysis_id, @@ -458,7 +463,7 @@ def get_vt_data_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get VirusTotal data + """(Deprecated) Get VirusTotal data :param analysis_id: (required) @@ -484,6 +489,7 @@ def get_vt_data_without_preload_content( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("GET /v2/analysis/{analysis_id}/external/vt is deprecated.", DeprecationWarning) _param = self._get_vt_data_serialize( analysis_id=analysis_id, @@ -587,7 +593,7 @@ def get_vt_task_status( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BaseResponseTaskResponse: - """Check the status of VirusTotal data retrieval + """(Deprecated) Check the status of VirusTotal data retrieval :param analysis_id: (required) @@ -613,6 +619,7 @@ def get_vt_task_status( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("GET /v2/analysis/{analysis_id}/external/vt/status is deprecated.", DeprecationWarning) _param = self._get_vt_task_status_serialize( analysis_id=analysis_id, @@ -654,7 +661,7 @@ def get_vt_task_status_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[BaseResponseTaskResponse]: - """Check the status of VirusTotal data retrieval + """(Deprecated) Check the status of VirusTotal data retrieval :param analysis_id: (required) @@ -680,6 +687,7 @@ def get_vt_task_status_with_http_info( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("GET /v2/analysis/{analysis_id}/external/vt/status is deprecated.", DeprecationWarning) _param = self._get_vt_task_status_serialize( analysis_id=analysis_id, @@ -721,7 +729,7 @@ def get_vt_task_status_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Check the status of VirusTotal data retrieval + """(Deprecated) Check the status of VirusTotal data retrieval :param analysis_id: (required) @@ -747,6 +755,7 @@ def get_vt_task_status_without_preload_content( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("GET /v2/analysis/{analysis_id}/external/vt/status is deprecated.", DeprecationWarning) _param = self._get_vt_task_status_serialize( analysis_id=analysis_id, diff --git a/revengai/api/functions_ai_decompilation_api.py b/revengai/api/functions_ai_decompilation_api.py index 9a8ca74..5ebf39e 100644 --- a/revengai/api/functions_ai_decompilation_api.py +++ b/revengai/api/functions_ai_decompilation_api.py @@ -1499,7 +1499,7 @@ def get_ai_decompilation_rating( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BaseResponseUnionGetAiDecompilationRatingResponseNoneType: - """Get rating for AI decompilation + """(Deprecated) Get rating for AI decompilation :param function_id: The ID of the function for which to get the rating (required) @@ -1525,6 +1525,7 @@ def get_ai_decompilation_rating( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("GET /v2/functions/{function_id}/ai-decompilation/rating is deprecated.", DeprecationWarning) _param = self._get_ai_decompilation_rating_serialize( function_id=function_id, @@ -1566,7 +1567,7 @@ def get_ai_decompilation_rating_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[BaseResponseUnionGetAiDecompilationRatingResponseNoneType]: - """Get rating for AI decompilation + """(Deprecated) Get rating for AI decompilation :param function_id: The ID of the function for which to get the rating (required) @@ -1592,6 +1593,7 @@ def get_ai_decompilation_rating_with_http_info( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("GET /v2/functions/{function_id}/ai-decompilation/rating is deprecated.", DeprecationWarning) _param = self._get_ai_decompilation_rating_serialize( function_id=function_id, @@ -1633,7 +1635,7 @@ def get_ai_decompilation_rating_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get rating for AI decompilation + """(Deprecated) Get rating for AI decompilation :param function_id: The ID of the function for which to get the rating (required) @@ -1659,6 +1661,7 @@ def get_ai_decompilation_rating_without_preload_content( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("GET /v2/functions/{function_id}/ai-decompilation/rating is deprecated.", DeprecationWarning) _param = self._get_ai_decompilation_rating_serialize( function_id=function_id, @@ -3706,7 +3709,7 @@ def upsert_ai_decompilation_rating( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BaseResponse: - """Upsert rating for AI decompilation + """(Deprecated) Upsert rating for AI decompilation :param function_id: The ID of the function being rated (required) @@ -3734,6 +3737,7 @@ def upsert_ai_decompilation_rating( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("PATCH /v2/functions/{function_id}/ai-decompilation/rating is deprecated.", DeprecationWarning) _param = self._upsert_ai_decompilation_rating_serialize( function_id=function_id, @@ -3777,7 +3781,7 @@ def upsert_ai_decompilation_rating_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[BaseResponse]: - """Upsert rating for AI decompilation + """(Deprecated) Upsert rating for AI decompilation :param function_id: The ID of the function being rated (required) @@ -3805,6 +3809,7 @@ def upsert_ai_decompilation_rating_with_http_info( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("PATCH /v2/functions/{function_id}/ai-decompilation/rating is deprecated.", DeprecationWarning) _param = self._upsert_ai_decompilation_rating_serialize( function_id=function_id, @@ -3848,7 +3853,7 @@ def upsert_ai_decompilation_rating_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Upsert rating for AI decompilation + """(Deprecated) Upsert rating for AI decompilation :param function_id: The ID of the function being rated (required) @@ -3876,6 +3881,7 @@ def upsert_ai_decompilation_rating_without_preload_content( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("PATCH /v2/functions/{function_id}/ai-decompilation/rating is deprecated.", DeprecationWarning) _param = self._upsert_ai_decompilation_rating_serialize( function_id=function_id, diff --git a/revengai/api/search_api.py b/revengai/api/search_api.py index e1932fe..2e08101 100644 --- a/revengai/api/search_api.py +++ b/revengai/api/search_api.py @@ -69,7 +69,7 @@ def search_binaries( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BaseResponseBinarySearchResponse: - """Binaries search + """(Deprecated) Binaries search Searches for a specific binary @@ -112,6 +112,7 @@ def search_binaries( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("GET /v2/search/binaries is deprecated.", DeprecationWarning) _param = self._search_binaries_serialize( page=page, @@ -169,7 +170,7 @@ def search_binaries_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[BaseResponseBinarySearchResponse]: - """Binaries search + """(Deprecated) Binaries search Searches for a specific binary @@ -212,6 +213,7 @@ def search_binaries_with_http_info( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("GET /v2/search/binaries is deprecated.", DeprecationWarning) _param = self._search_binaries_serialize( page=page, @@ -269,7 +271,7 @@ def search_binaries_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Binaries search + """(Deprecated) Binaries search Searches for a specific binary @@ -312,6 +314,7 @@ def search_binaries_without_preload_content( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("GET /v2/search/binaries is deprecated.", DeprecationWarning) _param = self._search_binaries_serialize( page=page, @@ -475,7 +478,7 @@ def search_collections( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BaseResponseCollectionSearchResponse: - """Collections search + """(Deprecated) Collections search Searches for a specific collection @@ -520,6 +523,7 @@ def search_collections( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("GET /v2/search/collections is deprecated.", DeprecationWarning) _param = self._search_collections_serialize( page=page, @@ -579,7 +583,7 @@ def search_collections_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[BaseResponseCollectionSearchResponse]: - """Collections search + """(Deprecated) Collections search Searches for a specific collection @@ -624,6 +628,7 @@ def search_collections_with_http_info( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("GET /v2/search/collections is deprecated.", DeprecationWarning) _param = self._search_collections_serialize( page=page, @@ -683,7 +688,7 @@ def search_collections_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Collections search + """(Deprecated) Collections search Searches for a specific collection @@ -728,6 +733,7 @@ def search_collections_without_preload_content( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("GET /v2/search/collections is deprecated.", DeprecationWarning) _param = self._search_collections_serialize( page=page, @@ -892,7 +898,7 @@ def search_functions( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BaseResponseFunctionSearchResponse: - """Functions search + """(Deprecated) Functions search Searches for a specific function @@ -925,6 +931,7 @@ def search_functions( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("GET /v2/search/functions is deprecated.", DeprecationWarning) _param = self._search_functions_serialize( page=page, @@ -972,7 +979,7 @@ def search_functions_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[BaseResponseFunctionSearchResponse]: - """Functions search + """(Deprecated) Functions search Searches for a specific function @@ -1005,6 +1012,7 @@ def search_functions_with_http_info( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("GET /v2/search/functions is deprecated.", DeprecationWarning) _param = self._search_functions_serialize( page=page, @@ -1052,7 +1060,7 @@ def search_functions_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Functions search + """(Deprecated) Functions search Searches for a specific function @@ -1085,6 +1093,7 @@ def search_functions_without_preload_content( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("GET /v2/search/functions is deprecated.", DeprecationWarning) _param = self._search_functions_serialize( page=page, @@ -1209,7 +1218,7 @@ def search_tags( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BaseResponseTagSearchResponse: - """Tags search + """(Deprecated) Tags search Searches for tags by there name @@ -1240,6 +1249,7 @@ def search_tags( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("GET /v2/search/tags is deprecated.", DeprecationWarning) _param = self._search_tags_serialize( partial_name=partial_name, @@ -1285,7 +1295,7 @@ def search_tags_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[BaseResponseTagSearchResponse]: - """Tags search + """(Deprecated) Tags search Searches for tags by there name @@ -1316,6 +1326,7 @@ def search_tags_with_http_info( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("GET /v2/search/tags is deprecated.", DeprecationWarning) _param = self._search_tags_serialize( partial_name=partial_name, @@ -1361,7 +1372,7 @@ def search_tags_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Tags search + """(Deprecated) Tags search Searches for tags by there name @@ -1392,6 +1403,7 @@ def search_tags_without_preload_content( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("GET /v2/search/tags is deprecated.", DeprecationWarning) _param = self._search_tags_serialize( partial_name=partial_name, diff --git a/revengai/api_client.py b/revengai/api_client.py index 4406318..1b8724d 100644 --- a/revengai/api_client.py +++ b/revengai/api_client.py @@ -90,7 +90,7 @@ def __init__( self.default_headers[header_name] = header_value self.cookie = cookie # Set default User-Agent. - self.user_agent = 'OpenAPI-Generator/v4.64.0/python' + self.user_agent = 'OpenAPI-Generator/v4.67.1/python' self.client_side_validation = configuration.client_side_validation def __enter__(self): diff --git a/revengai/configuration.py b/revengai/configuration.py index ef4c1ef..2495f5c 100644 --- a/revengai/configuration.py +++ b/revengai/configuration.py @@ -541,8 +541,8 @@ def to_debug_report(self) -> str: return "Python SDK Debug Report:\n"\ "OS: {env}\n"\ "Python Version: {pyversion}\n"\ - "Version of the API: v4.64.0\n"\ - "SDK Package Version: v4.64.0".\ + "Version of the API: v4.67.1\n"\ + "SDK Package Version: v4.67.1".\ format(env=sys.platform, pyversion=sys.version) def get_host_settings(self) -> List[HostSetting]: diff --git a/revengai/models/__init__.py b/revengai/models/__init__.py index b71ea4a..3fca1a2 100644 --- a/revengai/models/__init__.py +++ b/revengai/models/__init__.py @@ -287,6 +287,7 @@ from revengai.models.display import Display from revengai.models.dns_query import DnsQuery from revengai.models.drakvuf_file_metadata import DrakvufFileMetadata +from revengai.models.dynamic_execution_metadata import DynamicExecutionMetadata from revengai.models.dynamic_execution_status import DynamicExecutionStatus from revengai.models.dynamic_execution_status_response import DynamicExecutionStatusResponse from revengai.models.elf_import_model import ELFImportModel @@ -494,10 +495,12 @@ from revengai.models.networking_scan_result import NetworkingScanResult from revengai.models.networking_verification import NetworkingVerification from revengai.models.oidc_callback_input_body import OIDCCallbackInputBody +from revengai.models.operand_xref import OperandXref from revengai.models.operation_binary_export_metadata_binary_export_result import OperationBinaryExportMetadataBinaryExportResult from revengai.models.operation_create_metadata_create_result import OperationCreateMetadataCreateResult from revengai.models.operation_crypto_explain_metadata_crypto_explain_result import OperationCryptoExplainMetadataCryptoExplainResult from revengai.models.operation_crypto_scan_metadata_crypto_scan_result import OperationCryptoScanMetadataCryptoScanResult +from revengai.models.operation_dynamic_execution_metadata_dynamic_execution_result import OperationDynamicExecutionMetadataDynamicExecutionResult from revengai.models.operation_execution_explain_metadata_execution_explain_result import OperationExecutionExplainMetadataExecutionExplainResult from revengai.models.operation_execution_scan_metadata_execution_scan_result import OperationExecutionScanMetadataExecutionScanResult from revengai.models.operation_filesystem_analyse_metadata_filesystem_analyse_result import OperationFilesystemAnalyseMetadataFilesystemAnalyseResult @@ -579,6 +582,7 @@ from revengai.models.result_body import ResultBody from revengai.models.revoke_body import RevokeBody from revengai.models.rule_kind import RuleKind +from revengai.models.run_dynamic_execution_input_body import RunDynamicExecutionInputBody from revengai.models.sso_provider import SSOProvider from revengai.models.sso_providers_output_body import SSOProvidersOutputBody from revengai.models.sandbox_config import SandboxConfig diff --git a/revengai/models/disassembly_output_body.py b/revengai/models/disassembly_output_body.py index 1d0e06f..a12fcd0 100644 --- a/revengai/models/disassembly_output_body.py +++ b/revengai/models/disassembly_output_body.py @@ -16,8 +16,9 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional +from revengai.models.operand_xref import OperandXref from typing import Optional, Set from typing_extensions import Self @@ -29,11 +30,12 @@ class DisassemblyOutputBody(BaseModel): function_id: StrictInt global_variables: Optional[Any] = None local_variables: Optional[Any] = None + operand_xrefs: Optional[List[OperandXref]] = Field(default=None, description="Instruction operands that reference a pointer slot, sorted by instruction_vaddr, target_vaddr, pointed_vaddr.") params: Optional[Any] = None return_type: Optional[StrictStr] = None returns: StrictBool additional_properties: Dict[str, Any] = {} - __properties: ClassVar[List[str]] = ["basic_blocks", "function_id", "global_variables", "local_variables", "params", "return_type", "returns"] + __properties: ClassVar[List[str]] = ["basic_blocks", "function_id", "global_variables", "local_variables", "operand_xrefs", "params", "return_type", "returns"] model_config = ConfigDict( populate_by_name=True, @@ -76,6 +78,13 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # override the default output from pydantic by calling `to_dict()` of each item in operand_xrefs (list) + _items = [] + if self.operand_xrefs: + for _item_operand_xrefs in self.operand_xrefs: + if _item_operand_xrefs: + _items.append(_item_operand_xrefs.to_dict()) + _dict['operand_xrefs'] = _items # puts key-value pairs in additional_properties in the top level if self.additional_properties is not None: for _key, _value in self.additional_properties.items(): @@ -96,6 +105,11 @@ def to_dict(self) -> Dict[str, Any]: if self.local_variables is None and "local_variables" in self.model_fields_set: _dict['local_variables'] = None + # set to None if operand_xrefs (nullable) is None + # and model_fields_set contains the field + if self.operand_xrefs is None and "operand_xrefs" in self.model_fields_set: + _dict['operand_xrefs'] = None + # set to None if params (nullable) is None # and model_fields_set contains the field if self.params is None and "params" in self.model_fields_set: @@ -117,6 +131,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "function_id": obj.get("function_id"), "global_variables": obj.get("global_variables"), "local_variables": obj.get("local_variables"), + "operand_xrefs": [OperandXref.from_dict(_item) for _item in obj["operand_xrefs"]] if obj.get("operand_xrefs") is not None else None, "params": obj.get("params"), "return_type": obj.get("return_type"), "returns": obj.get("returns") diff --git a/revengai/models/dynamic_execution_metadata.py b/revengai/models/dynamic_execution_metadata.py new file mode 100644 index 0000000..a02ab95 --- /dev/null +++ b/revengai/models/dynamic_execution_metadata.py @@ -0,0 +1,112 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is an AI-powered binary analysis platform for reverse engineering and malware analysis. It provides similarity search across executable binaries and functions, AI-driven decompilation, dynamic execution analysis, firmware unpacking, and integration with external threat intelligence sources like VirusTotal. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List +from revengai.models.analysis_logs import AnalysisLogs +from typing import Optional, Set +from typing_extensions import Self + +class DynamicExecutionMetadata(BaseModel): + """ + DynamicExecutionMetadata + """ # noqa: E501 + logs: AnalysisLogs = Field(description="Sandbox status log messages captured during the run. Empty when none have been captured yet.") + status: StrictStr = Field(description="Run status. UNINITIALISED means this analysis has never had a run triggered.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["logs", "status"] + + @field_validator('status') + def status_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['UNINITIALISED', 'PENDING', 'RUNNING', 'COMPLETED', 'FAILED', 'unknown_default_open_api']): + raise ValueError("must be one of enum values ('UNINITIALISED', 'PENDING', 'RUNNING', 'COMPLETED', 'FAILED', 'unknown_default_open_api')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DynamicExecutionMetadata from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of logs + if self.logs: + _dict['logs'] = self.logs.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DynamicExecutionMetadata from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "logs": AnalysisLogs.from_dict(obj["logs"]) if obj.get("logs") is not None else None, + "status": obj.get("status") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/revengai/models/operand_xref.py b/revengai/models/operand_xref.py new file mode 100644 index 0000000..b8c5237 --- /dev/null +++ b/revengai/models/operand_xref.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is an AI-powered binary analysis platform for reverse engineering and malware analysis. It provides similarity search across executable binaries and functions, AI-driven decompilation, dynamic execution analysis, firmware unpacking, and integration with external threat intelligence sources like VirusTotal. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class OperandXref(BaseModel): + """ + OperandXref + """ # noqa: E501 + instruction_vaddr: StrictInt = Field(description="Vaddr of the instruction containing the operand.") + pointed_vaddr: StrictInt = Field(description="Address stored in the pointer slot. Resolve this to a function, import or global to name the reference.") + target_vaddr: StrictInt = Field(description="Vaddr of the pointer slot the operand references.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["instruction_vaddr", "pointed_vaddr", "target_vaddr"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OperandXref from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OperandXref from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "instruction_vaddr": obj.get("instruction_vaddr"), + "pointed_vaddr": obj.get("pointed_vaddr"), + "target_vaddr": obj.get("target_vaddr") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/revengai/models/operation_dynamic_execution_metadata_dynamic_execution_result.py b/revengai/models/operation_dynamic_execution_metadata_dynamic_execution_result.py new file mode 100644 index 0000000..1a17408 --- /dev/null +++ b/revengai/models/operation_dynamic_execution_metadata_dynamic_execution_result.py @@ -0,0 +1,115 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is an AI-powered binary analysis platform for reverse engineering and malware analysis. It provides similarity search across executable binaries and functions, AI-driven decompilation, dynamic execution analysis, firmware unpacking, and integration with external threat intelligence sources like VirusTotal. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from revengai.models.dynamic_execution_metadata import DynamicExecutionMetadata +from revengai.models.status import Status +from typing import Optional, Set +from typing_extensions import Self + +class OperationDynamicExecutionMetadataDynamicExecutionResult(BaseModel): + """ + OperationDynamicExecutionMetadataDynamicExecutionResult + """ # noqa: E501 + done: StrictBool = Field(description="Whether the operation has reached a terminal state.") + error: Optional[Status] = Field(default=None, description="Failure detail, populated only when done is true and the operation failed.") + metadata: Optional[DynamicExecutionMetadata] = Field(default=None, description="In-flight information and details.") + name: StrictStr = Field(description="API resource name.") + response: Optional[Dict[str, Any]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["done", "error", "metadata", "name", "response"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OperationDynamicExecutionMetadataDynamicExecutionResult from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of error + if self.error: + _dict['error'] = self.error.to_dict() + # override the default output from pydantic by calling `to_dict()` of metadata + if self.metadata: + _dict['metadata'] = self.metadata.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OperationDynamicExecutionMetadataDynamicExecutionResult from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "done": obj.get("done"), + "error": Status.from_dict(obj["error"]) if obj.get("error") is not None else None, + "metadata": DynamicExecutionMetadata.from_dict(obj["metadata"]) if obj.get("metadata") is not None else None, + "name": obj.get("name"), + "response": obj.get("response") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/revengai/models/run_dynamic_execution_input_body.py b/revengai/models/run_dynamic_execution_input_body.py new file mode 100644 index 0000000..fd4f346 --- /dev/null +++ b/revengai/models/run_dynamic_execution_input_body.py @@ -0,0 +1,140 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is an AI-powered binary analysis platform for reverse engineering and malware analysis. It provides similarity search across executable binaries and functions, AI-driven decompilation, dynamic execution analysis, firmware unpacking, and integration with external threat intelligence sources like VirusTotal. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class RunDynamicExecutionInputBody(BaseModel): + """ + RunDynamicExecutionInputBody + """ # noqa: E501 + archive_entry_path: Optional[Annotated[str, Field(strict=True, max_length=4096)]] = Field(default=None, description="Relative path of the entry inside the archive to execute") + archive_password: Optional[Annotated[str, Field(strict=True, max_length=512)]] = Field(default=None, description="Password for an encrypted archive") + archive_sha_256_hash: Optional[Annotated[str, Field(strict=True)]] = Field(default=None, description="SHA-256 of the archive object to send to the sandbox instead of the analysed binary") + command_line_args: Optional[Annotated[str, Field(strict=True, max_length=4096)]] = Field(default=None, description="Command-line arguments passed to the sample when the sandbox launches it") + start_method: Optional[StrictStr] = Field(default=None, description="How the sandbox launches the sample. Defaults to the sandbox's standard behaviour when omitted.") + timeout: Optional[StrictInt] = Field(default=120, description="Maximum sandbox execution time in seconds") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["archive_entry_path", "archive_password", "archive_sha_256_hash", "command_line_args", "start_method", "timeout"] + + @field_validator('archive_sha_256_hash') + def archive_sha_256_hash_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^[a-fA-F0-9]{64}$", value): + raise ValueError(r"must validate the regular expression /^[a-fA-F0-9]{64}$/") + return value + + @field_validator('start_method') + def start_method_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['standard_user_process', 'administrator_process', 'unknown_default_open_api']): + raise ValueError("must be one of enum values ('standard_user_process', 'administrator_process', 'unknown_default_open_api')") + return value + + @field_validator('timeout') + def timeout_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set([120, 180, 300, 600, 11184809]): + raise ValueError("must be one of enum values (120, 180, 300, 600, 11184809)") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of RunDynamicExecutionInputBody from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of RunDynamicExecutionInputBody from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "archive_entry_path": obj.get("archive_entry_path"), + "archive_password": obj.get("archive_password"), + "archive_sha_256_hash": obj.get("archive_sha_256_hash"), + "command_line_args": obj.get("command_line_args"), + "start_method": obj.get("start_method"), + "timeout": obj.get("timeout") if obj.get("timeout") is not None else 120 + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + +