From 0a7022b784400dc31be6e595e70bcf31cd037aea Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 8 May 2026 06:45:49 +0000 Subject: [PATCH] Update SDK to version v3.81.0 - Generated from OpenAPI spec version v3.81.0 - Auto-generated by GitHub Actions --- .sdk-version | 2 +- README.md | 27 ++ docs/AgentApi.md | 8 + docs/AnalysisReport.md | 42 +++ docs/ApiCall.md | 32 +++ docs/Connection.md | 34 +++ docs/DnsQuery.md | 30 ++ docs/DrakvufFileMetadata.md | 33 +++ docs/DynamicExecutionStatusResponse.md | 30 ++ docs/ExtractedURL.md | 30 ++ docs/FileActivityEntry.md | 30 ++ docs/HttpRequest.md | 44 +++ docs/MemdumpEntry.md | 40 +++ docs/ModuleLoadEntry.md | 32 +++ docs/MutexEntry.md | 30 ++ docs/NetworkActivity.md | 32 +++ docs/ProcessActivityEntry.md | 35 +++ docs/ProcessMemdumps.md | 30 ++ docs/ProcessNode.md | 39 +++ docs/ProcessTree.md | 30 ++ docs/RegistryOperation.md | 30 ++ docs/ReportEvent.md | 35 +++ docs/ReportInfo.md | 36 +++ docs/ReportOptions.md | 40 +++ docs/SandboxOptions.md | 2 + docs/SandboxStartMethod.md | 12 + docs/SandboxTimeout.md | 16 ++ docs/ScheduledTaskEntry.md | 39 +++ docs/ServiceEntry.md | 34 +++ docs/StartupInfo.md | 35 +++ docs/Ttp.md | 34 +++ revengai/__init__.py | 56 +++- revengai/api/agent_api.py | 3 + revengai/api_client.py | 2 +- revengai/configuration.py | 4 +- revengai/models/__init__.py | 27 ++ revengai/models/analysis_report.py | 258 ++++++++++++++++++ revengai/models/api_call.py | 125 +++++++++ revengai/models/connection.py | 147 ++++++++++ revengai/models/dns_query.py | 119 ++++++++ revengai/models/drakvuf_file_metadata.py | 132 +++++++++ .../dynamic_execution_status_response.py | 101 +++++++ revengai/models/error_body.py | 4 +- revengai/models/extracted_url.py | 119 ++++++++ revengai/models/file_activity_entry.py | 119 ++++++++ revengai/models/http_request.py | 202 ++++++++++++++ revengai/models/memdump_entry.py | 161 +++++++++++ revengai/models/module_load_entry.py | 110 ++++++++ revengai/models/mutex_entry.py | 119 ++++++++ revengai/models/network_activity.py | 157 +++++++++++ revengai/models/process_activity_entry.py | 139 ++++++++++ revengai/models/process_memdumps.py | 114 ++++++++ revengai/models/process_node.py | 148 ++++++++++ revengai/models/process_tree.py | 114 ++++++++ revengai/models/registry_operation.py | 119 ++++++++ revengai/models/report_event.py | 139 ++++++++++ revengai/models/report_info.py | 151 ++++++++++ revengai/models/report_options.py | 166 +++++++++++ revengai/models/sandbox_options.py | 15 +- revengai/models/sandbox_start_method.py | 36 +++ revengai/models/sandbox_timeout.py | 38 +++ revengai/models/scheduled_task_entry.py | 182 ++++++++++++ revengai/models/service_entry.py | 147 ++++++++++ revengai/models/startup_info.py | 136 +++++++++ revengai/models/ttp.py | 134 +++++++++ test/test_analysis_config.py | 4 +- test/test_analysis_create_request.py | 4 +- test/test_analysis_report.py | 111 ++++++++ test/test_api_call.py | 54 ++++ test/test_connection.py | 64 +++++ test/test_dns_query.py | 56 ++++ test/test_drakvuf_file_metadata.py | 56 ++++ .../test_dynamic_execution_status_response.py | 52 ++++ test/test_extracted_url.py | 56 ++++ test/test_file_activity_entry.py | 56 ++++ test/test_http_request.py | 71 +++++ test/test_memdump_entry.py | 67 +++++ test/test_module_load_entry.py | 56 ++++ test/test_mutex_entry.py | 56 ++++ test/test_network_activity.py | 69 +++++ test/test_process_activity_entry.py | 65 +++++ test/test_process_memdumps.py | 56 ++++ test/test_process_node.py | 70 +++++ test/test_process_tree.py | 55 ++++ test/test_registry_operation.py | 56 ++++ test/test_report_event.py | 61 +++++ test/test_report_info.py | 62 +++++ test/test_report_options.py | 63 +++++ test/test_sandbox_options.py | 4 +- test/test_sandbox_start_method.py | 32 +++ test/test_sandbox_timeout.py | 32 +++ test/test_scheduled_task_entry.py | 64 +++++ test/test_service_entry.py | 59 ++++ test/test_startup_info.py | 56 ++++ test/test_ttp.py | 62 +++++ 95 files changed, 6283 insertions(+), 12 deletions(-) create mode 100644 docs/AnalysisReport.md create mode 100644 docs/ApiCall.md create mode 100644 docs/Connection.md create mode 100644 docs/DnsQuery.md create mode 100644 docs/DrakvufFileMetadata.md create mode 100644 docs/DynamicExecutionStatusResponse.md create mode 100644 docs/ExtractedURL.md create mode 100644 docs/FileActivityEntry.md create mode 100644 docs/HttpRequest.md create mode 100644 docs/MemdumpEntry.md create mode 100644 docs/ModuleLoadEntry.md create mode 100644 docs/MutexEntry.md create mode 100644 docs/NetworkActivity.md create mode 100644 docs/ProcessActivityEntry.md create mode 100644 docs/ProcessMemdumps.md create mode 100644 docs/ProcessNode.md create mode 100644 docs/ProcessTree.md create mode 100644 docs/RegistryOperation.md create mode 100644 docs/ReportEvent.md create mode 100644 docs/ReportInfo.md create mode 100644 docs/ReportOptions.md create mode 100644 docs/SandboxStartMethod.md create mode 100644 docs/SandboxTimeout.md create mode 100644 docs/ScheduledTaskEntry.md create mode 100644 docs/ServiceEntry.md create mode 100644 docs/StartupInfo.md create mode 100644 docs/Ttp.md create mode 100644 revengai/models/analysis_report.py create mode 100644 revengai/models/api_call.py create mode 100644 revengai/models/connection.py create mode 100644 revengai/models/dns_query.py create mode 100644 revengai/models/drakvuf_file_metadata.py create mode 100644 revengai/models/dynamic_execution_status_response.py create mode 100644 revengai/models/extracted_url.py create mode 100644 revengai/models/file_activity_entry.py create mode 100644 revengai/models/http_request.py create mode 100644 revengai/models/memdump_entry.py create mode 100644 revengai/models/module_load_entry.py create mode 100644 revengai/models/mutex_entry.py create mode 100644 revengai/models/network_activity.py create mode 100644 revengai/models/process_activity_entry.py create mode 100644 revengai/models/process_memdumps.py create mode 100644 revengai/models/process_node.py create mode 100644 revengai/models/process_tree.py create mode 100644 revengai/models/registry_operation.py create mode 100644 revengai/models/report_event.py create mode 100644 revengai/models/report_info.py create mode 100644 revengai/models/report_options.py create mode 100644 revengai/models/sandbox_start_method.py create mode 100644 revengai/models/sandbox_timeout.py create mode 100644 revengai/models/scheduled_task_entry.py create mode 100644 revengai/models/service_entry.py create mode 100644 revengai/models/startup_info.py create mode 100644 revengai/models/ttp.py create mode 100644 test/test_analysis_report.py create mode 100644 test/test_api_call.py create mode 100644 test/test_connection.py create mode 100644 test/test_dns_query.py create mode 100644 test/test_drakvuf_file_metadata.py create mode 100644 test/test_dynamic_execution_status_response.py create mode 100644 test/test_extracted_url.py create mode 100644 test/test_file_activity_entry.py create mode 100644 test/test_http_request.py create mode 100644 test/test_memdump_entry.py create mode 100644 test/test_module_load_entry.py create mode 100644 test/test_mutex_entry.py create mode 100644 test/test_network_activity.py create mode 100644 test/test_process_activity_entry.py create mode 100644 test/test_process_memdumps.py create mode 100644 test/test_process_node.py create mode 100644 test/test_process_tree.py create mode 100644 test/test_registry_operation.py create mode 100644 test/test_report_event.py create mode 100644 test/test_report_info.py create mode 100644 test/test_report_options.py create mode 100644 test/test_sandbox_start_method.py create mode 100644 test/test_sandbox_timeout.py create mode 100644 test/test_scheduled_task_entry.py create mode 100644 test/test_service_entry.py create mode 100644 test/test_startup_info.py create mode 100644 test/test_ttp.py diff --git a/.sdk-version b/.sdk-version index c17f470e..1c021120 100644 --- a/.sdk-version +++ b/.sdk-version @@ -1 +1 @@ -v3.80.0 +v3.81.0 diff --git a/README.md b/README.md index b7f5ca02..0a7fffd2 100644 --- a/README.md +++ b/README.md @@ -174,6 +174,7 @@ Class | Method | HTTP request | Description - [AnalysisFunctions](docs/AnalysisFunctions.md) - [AnalysisFunctionsList](docs/AnalysisFunctionsList.md) - [AnalysisRecord](docs/AnalysisRecord.md) + - [AnalysisReport](docs/AnalysisReport.md) - [AnalysisScope](docs/AnalysisScope.md) - [AnalysisStringInput](docs/AnalysisStringInput.md) - [AnalysisStringsResponse](docs/AnalysisStringsResponse.md) @@ -182,6 +183,7 @@ Class | Method | HTTP request | Description - [AnalysisUpdateRequest](docs/AnalysisUpdateRequest.md) - [AnalysisUpdateTagsRequest](docs/AnalysisUpdateTagsRequest.md) - [AnalysisUpdateTagsResponse](docs/AnalysisUpdateTagsResponse.md) + - [ApiCall](docs/ApiCall.md) - [AppApiRestV2AgentSchemaCapability](docs/AppApiRestV2AgentSchemaCapability.md) - [AppApiRestV2AnalysesEnumsOrderBy](docs/AppApiRestV2AnalysesEnumsOrderBy.md) - [AppApiRestV2CollectionsEnumsOrderBy](docs/AppApiRestV2CollectionsEnumsOrderBy.md) @@ -297,6 +299,7 @@ Class | Method | HTTP request | Description - [CommentUpdateRequest](docs/CommentUpdateRequest.md) - [ConfigResponse](docs/ConfigResponse.md) - [ConfirmToolInputBody](docs/ConfirmToolInputBody.md) + - [Connection](docs/Connection.md) - [Context](docs/Context.md) - [Conversation](docs/Conversation.md) - [ConversationContext](docs/ConversationContext.md) @@ -305,7 +308,10 @@ Class | Method | HTTP request | Description - [Created](docs/Created.md) - [DecompilationCommentContext](docs/DecompilationCommentContext.md) - [DieMatch](docs/DieMatch.md) + - [DnsQuery](docs/DnsQuery.md) + - [DrakvufFileMetadata](docs/DrakvufFileMetadata.md) - [DynamicExecutionStatus](docs/DynamicExecutionStatus.md) + - [DynamicExecutionStatusResponse](docs/DynamicExecutionStatusResponse.md) - [ELFImportModel](docs/ELFImportModel.md) - [ELFModel](docs/ELFModel.md) - [ELFRelocation](docs/ELFRelocation.md) @@ -337,6 +343,8 @@ Class | Method | HTTP request | Description - [EventTOOLCONFIRMATIONREQUIRED](docs/EventTOOLCONFIRMATIONREQUIRED.md) - [ExportModel](docs/ExportModel.md) - [ExternalResponse](docs/ExternalResponse.md) + - [ExtractedURL](docs/ExtractedURL.md) + - [FileActivityEntry](docs/FileActivityEntry.md) - [FileFormat](docs/FileFormat.md) - [FileHashes](docs/FileHashes.md) - [FileMetadata](docs/FileMetadata.md) @@ -386,6 +394,7 @@ Class | Method | HTTP request | Description - [GetMeResponse](docs/GetMeResponse.md) - [GetPublicUserResponse](docs/GetPublicUserResponse.md) - [GlobalVariable](docs/GlobalVariable.md) + - [HttpRequest](docs/HttpRequest.md) - [IOC](docs/IOC.md) - [ISA](docs/ISA.md) - [IconModel](docs/IconModel.md) @@ -399,33 +408,49 @@ Class | Method | HTTP request | Description - [MITRETechnique](docs/MITRETechnique.md) - [MatchedFunction](docs/MatchedFunction.md) - [MatchedFunctionSuggestion](docs/MatchedFunctionSuggestion.md) + - [MemdumpEntry](docs/MemdumpEntry.md) - [MetaModel](docs/MetaModel.md) - [ModelName](docs/ModelName.md) - [ModelsResponse](docs/ModelsResponse.md) + - [ModuleLoadEntry](docs/ModuleLoadEntry.md) + - [MutexEntry](docs/MutexEntry.md) - [NameConfidence](docs/NameConfidence.md) - [NameSourceType](docs/NameSourceType.md) + - [NetworkActivity](docs/NetworkActivity.md) - [Order](docs/Order.md) - [PDBDebugModel](docs/PDBDebugModel.md) - [PEModel](docs/PEModel.md) - [PaginationModel](docs/PaginationModel.md) - [Params](docs/Params.md) - [Platform](docs/Platform.md) + - [ProcessActivityEntry](docs/ProcessActivityEntry.md) + - [ProcessMemdumps](docs/ProcessMemdumps.md) + - [ProcessNode](docs/ProcessNode.md) + - [ProcessTree](docs/ProcessTree.md) - [PutAnalysisStringsRequest](docs/PutAnalysisStringsRequest.md) - [QueuePositionResponse](docs/QueuePositionResponse.md) - [QueuedWorkflowTaskResponse](docs/QueuedWorkflowTaskResponse.md) - [ReAnalysisForm](docs/ReAnalysisForm.md) - [Recent](docs/Recent.md) - [RegenerateTarget](docs/RegenerateTarget.md) + - [RegistryOperation](docs/RegistryOperation.md) - [RelativeBinaryResponse](docs/RelativeBinaryResponse.md) - [ReportAnalysisResponse](docs/ReportAnalysisResponse.md) + - [ReportEvent](docs/ReportEvent.md) + - [ReportInfo](docs/ReportInfo.md) + - [ReportOptions](docs/ReportOptions.md) - [SBOM](docs/SBOM.md) - [SBOMPackage](docs/SBOMPackage.md) - [SandboxOptions](docs/SandboxOptions.md) + - [SandboxStartMethod](docs/SandboxStartMethod.md) + - [SandboxTimeout](docs/SandboxTimeout.md) + - [ScheduledTaskEntry](docs/ScheduledTaskEntry.md) - [ScrapeThirdPartyConfig](docs/ScrapeThirdPartyConfig.md) - [SectionModel](docs/SectionModel.md) - [SecurityModel](docs/SecurityModel.md) - [SegmentInfo](docs/SegmentInfo.md) - [SendMessageRequest](docs/SendMessageRequest.md) + - [ServiceEntry](docs/ServiceEntry.md) - [SingleCodeCertificateModel](docs/SingleCodeCertificateModel.md) - [SingleCodeSignatureModel](docs/SingleCodeSignatureModel.md) - [SinglePDBEntryModel](docs/SinglePDBEntryModel.md) @@ -447,6 +472,7 @@ Class | Method | HTTP request | Description - [SseEventToolCallStartData](docs/SseEventToolCallStartData.md) - [SseEventToolConfirmationRequiredData](docs/SseEventToolConfirmationRequiredData.md) - [StackVariable](docs/StackVariable.md) + - [StartupInfo](docs/StartupInfo.md) - [StatusInput](docs/StatusInput.md) - [StatusOutput](docs/StatusOutput.md) - [StatusResponse](docs/StatusResponse.md) @@ -468,6 +494,7 @@ Class | Method | HTTP request | Description - [TimestampModel](docs/TimestampModel.md) - [TriageFunctionResponse](docs/TriageFunctionResponse.md) - [TriageReportResponse](docs/TriageReportResponse.md) + - [Ttp](docs/Ttp.md) - [TypeDefinition](docs/TypeDefinition.md) - [UpdateFunctionDataTypes](docs/UpdateFunctionDataTypes.md) - [UploadFileType](docs/UploadFileType.md) diff --git a/docs/AgentApi.md b/docs/AgentApi.md index 92831b7a..e0760744 100644 --- a/docs/AgentApi.md +++ b/docs/AgentApi.md @@ -567,6 +567,14 @@ Name | Type | Description | Notes Get Report Analysis Result +Returns: +- A summary of the analysis +- The software type of the binary +- An attack flow summary +- List of IOCs +- List of MITRE executable techniques +- A YARA rule + ### Example * Api Key Authentication (APIKey): diff --git a/docs/AnalysisReport.md b/docs/AnalysisReport.md new file mode 100644 index 00000000..813749db --- /dev/null +++ b/docs/AnalysisReport.md @@ -0,0 +1,42 @@ +# AnalysisReport + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**file_activity** | [**List[FileActivityEntry]**](FileActivityEntry.md) | | [optional] +**info** | [**ReportInfo**](ReportInfo.md) | | +**memdumps** | [**List[ProcessMemdumps]**](ProcessMemdumps.md) | | [optional] +**module_load_addresses** | [**List[ModuleLoadEntry]**](ModuleLoadEntry.md) | | [optional] +**mutexes** | [**List[MutexEntry]**](MutexEntry.md) | | [optional] +**network_activity** | [**NetworkActivity**](NetworkActivity.md) | | [optional] +**process_activity** | [**List[ProcessActivityEntry]**](ProcessActivityEntry.md) | | [optional] +**process_tree** | [**ProcessTree**](ProcessTree.md) | | [optional] +**registry_operations** | [**List[RegistryOperation]**](RegistryOperation.md) | | [optional] +**scheduled_tasks** | [**List[ScheduledTaskEntry]**](ScheduledTaskEntry.md) | | [optional] +**services** | [**List[ServiceEntry]**](ServiceEntry.md) | | [optional] +**startup** | [**StartupInfo**](StartupInfo.md) | | [optional] +**threat_score** | **int** | | +**ttps** | [**List[Ttp]**](Ttp.md) | | [optional] + +## Example + +```python +from revengai.models.analysis_report import AnalysisReport + +# TODO update the JSON string below +json = "{}" +# create an instance of AnalysisReport from a JSON string +analysis_report_instance = AnalysisReport.from_json(json) +# print the JSON string representation of the object +print(AnalysisReport.to_json()) + +# convert the object into a dict +analysis_report_dict = analysis_report_instance.to_dict() +# create an instance of AnalysisReport from a dict +analysis_report_from_dict = AnalysisReport.from_dict(analysis_report_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/ApiCall.md b/docs/ApiCall.md new file mode 100644 index 00000000..9fbfb44f --- /dev/null +++ b/docs/ApiCall.md @@ -0,0 +1,32 @@ +# ApiCall + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**called_from** | **str** | | [optional] +**called_from_rva** | **str** | | [optional] +**from_module** | **str** | | [optional] +**method** | **str** | | + +## Example + +```python +from revengai.models.api_call import ApiCall + +# TODO update the JSON string below +json = "{}" +# create an instance of ApiCall from a JSON string +api_call_instance = ApiCall.from_json(json) +# print the JSON string representation of the object +print(ApiCall.to_json()) + +# convert the object into a dict +api_call_dict = api_call_instance.to_dict() +# create an instance of ApiCall from a dict +api_call_from_dict = ApiCall.from_dict(api_call_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/Connection.md b/docs/Connection.md new file mode 100644 index 00000000..212c0fe7 --- /dev/null +++ b/docs/Connection.md @@ -0,0 +1,34 @@ +# Connection + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**events** | [**List[ReportEvent]**](ReportEvent.md) | | [optional] +**local_ip** | **str** | | +**local_port** | **object** | | +**protocol** | **str** | | +**remote_ip** | **str** | | +**remote_port** | **object** | | + +## Example + +```python +from revengai.models.connection import Connection + +# TODO update the JSON string below +json = "{}" +# create an instance of Connection from a JSON string +connection_instance = Connection.from_json(json) +# print the JSON string representation of the object +print(Connection.to_json()) + +# convert the object into a dict +connection_dict = connection_instance.to_dict() +# create an instance of Connection from a dict +connection_from_dict = Connection.from_dict(connection_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/DnsQuery.md b/docs/DnsQuery.md new file mode 100644 index 00000000..5e0daf9c --- /dev/null +++ b/docs/DnsQuery.md @@ -0,0 +1,30 @@ +# DnsQuery + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**domain** | **str** | | +**events** | [**List[ReportEvent]**](ReportEvent.md) | | [optional] + +## Example + +```python +from revengai.models.dns_query import DnsQuery + +# TODO update the JSON string below +json = "{}" +# create an instance of DnsQuery from a JSON string +dns_query_instance = DnsQuery.from_json(json) +# print the JSON string representation of the object +print(DnsQuery.to_json()) + +# convert the object into a dict +dns_query_dict = dns_query_instance.to_dict() +# create an instance of DnsQuery from a dict +dns_query_from_dict = DnsQuery.from_dict(dns_query_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/DrakvufFileMetadata.md b/docs/DrakvufFileMetadata.md new file mode 100644 index 00000000..546f66ee --- /dev/null +++ b/docs/DrakvufFileMetadata.md @@ -0,0 +1,33 @@ +# DrakvufFileMetadata + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**mime_type** | **str** | | [optional] +**name** | **str** | | +**sha256** | **str** | | +**type** | **str** | | [optional] +**type_id** | **str** | | [optional] + +## Example + +```python +from revengai.models.drakvuf_file_metadata import DrakvufFileMetadata + +# TODO update the JSON string below +json = "{}" +# create an instance of DrakvufFileMetadata from a JSON string +drakvuf_file_metadata_instance = DrakvufFileMetadata.from_json(json) +# print the JSON string representation of the object +print(DrakvufFileMetadata.to_json()) + +# convert the object into a dict +drakvuf_file_metadata_dict = drakvuf_file_metadata_instance.to_dict() +# create an instance of DrakvufFileMetadata from a dict +drakvuf_file_metadata_from_dict = DrakvufFileMetadata.from_dict(drakvuf_file_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/DynamicExecutionStatusResponse.md b/docs/DynamicExecutionStatusResponse.md new file mode 100644 index 00000000..e05b3240 --- /dev/null +++ b/docs/DynamicExecutionStatusResponse.md @@ -0,0 +1,30 @@ +# DynamicExecutionStatusResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**error_message** | **str** | Error detail, set when status is ERROR | [optional] +**status** | **str** | Task status: UNINITIALISED, PENDING, RUNNING, COMPLETED, or ERROR | + +## Example + +```python +from revengai.models.dynamic_execution_status_response import DynamicExecutionStatusResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of DynamicExecutionStatusResponse from a JSON string +dynamic_execution_status_response_instance = DynamicExecutionStatusResponse.from_json(json) +# print the JSON string representation of the object +print(DynamicExecutionStatusResponse.to_json()) + +# convert the object into a dict +dynamic_execution_status_response_dict = dynamic_execution_status_response_instance.to_dict() +# create an instance of DynamicExecutionStatusResponse from a dict +dynamic_execution_status_response_from_dict = DynamicExecutionStatusResponse.from_dict(dynamic_execution_status_response_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/ExtractedURL.md b/docs/ExtractedURL.md new file mode 100644 index 00000000..6fb6b268 --- /dev/null +++ b/docs/ExtractedURL.md @@ -0,0 +1,30 @@ +# ExtractedURL + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**events** | [**List[ReportEvent]**](ReportEvent.md) | | [optional] +**url** | **str** | | + +## Example + +```python +from revengai.models.extracted_url import ExtractedURL + +# TODO update the JSON string below +json = "{}" +# create an instance of ExtractedURL from a JSON string +extracted_url_instance = ExtractedURL.from_json(json) +# print the JSON string representation of the object +print(ExtractedURL.to_json()) + +# convert the object into a dict +extracted_url_dict = extracted_url_instance.to_dict() +# create an instance of ExtractedURL from a dict +extracted_url_from_dict = ExtractedURL.from_dict(extracted_url_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/FileActivityEntry.md b/docs/FileActivityEntry.md new file mode 100644 index 00000000..295d2bbd --- /dev/null +++ b/docs/FileActivityEntry.md @@ -0,0 +1,30 @@ +# FileActivityEntry + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**events** | [**List[ReportEvent]**](ReportEvent.md) | | [optional] +**path** | **str** | | + +## Example + +```python +from revengai.models.file_activity_entry import FileActivityEntry + +# TODO update the JSON string below +json = "{}" +# create an instance of FileActivityEntry from a JSON string +file_activity_entry_instance = FileActivityEntry.from_json(json) +# print the JSON string representation of the object +print(FileActivityEntry.to_json()) + +# convert the object into a dict +file_activity_entry_dict = file_activity_entry_instance.to_dict() +# create an instance of FileActivityEntry from a dict +file_activity_entry_from_dict = FileActivityEntry.from_dict(file_activity_entry_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/HttpRequest.md b/docs/HttpRequest.md new file mode 100644 index 00000000..69429516 --- /dev/null +++ b/docs/HttpRequest.md @@ -0,0 +1,44 @@ +# HttpRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**events** | [**List[ReportEvent]**](ReportEvent.md) | | [optional] +**extra_headers** | **List[str]** | | [optional] +**flags** | **int** | | [optional] +**password** | **str** | | [optional] +**path** | **str** | | [optional] +**post_data** | **str** | | [optional] +**proxy** | **str** | | [optional] +**proxy_bypass** | **str** | | [optional] +**referer** | **str** | | [optional] +**server_name** | **str** | | [optional] +**server_port** | **int** | | [optional] +**service** | **int** | | [optional] +**user_agent** | **str** | | [optional] +**username** | **str** | | [optional] +**verb** | **str** | | [optional] +**version** | **str** | | [optional] + +## Example + +```python +from revengai.models.http_request import HttpRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of HttpRequest from a JSON string +http_request_instance = HttpRequest.from_json(json) +# print the JSON string representation of the object +print(HttpRequest.to_json()) + +# convert the object into a dict +http_request_dict = http_request_instance.to_dict() +# create an instance of HttpRequest from a dict +http_request_from_dict = HttpRequest.from_dict(http_request_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/MemdumpEntry.md b/docs/MemdumpEntry.md new file mode 100644 index 00000000..0fa3dda9 --- /dev/null +++ b/docs/MemdumpEntry.md @@ -0,0 +1,40 @@ +# MemdumpEntry + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**address** | **str** | | +**dump_reason** | **str** | | +**file_type** | **str** | | [optional] +**filename** | **str** | | +**index** | **int** | | +**is_pe** | **bool** | | [optional] +**method** | **str** | | +**mime_type** | **str** | | [optional] +**sha256** | **str** | | [optional] +**size** | **int** | | +**target_addr** | **str** | | [optional] +**target_process** | **int** | | [optional] + +## Example + +```python +from revengai.models.memdump_entry import MemdumpEntry + +# TODO update the JSON string below +json = "{}" +# create an instance of MemdumpEntry from a JSON string +memdump_entry_instance = MemdumpEntry.from_json(json) +# print the JSON string representation of the object +print(MemdumpEntry.to_json()) + +# convert the object into a dict +memdump_entry_dict = memdump_entry_instance.to_dict() +# create an instance of MemdumpEntry from a dict +memdump_entry_from_dict = MemdumpEntry.from_dict(memdump_entry_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/ModuleLoadEntry.md b/docs/ModuleLoadEntry.md new file mode 100644 index 00000000..a1c4ba7f --- /dev/null +++ b/docs/ModuleLoadEntry.md @@ -0,0 +1,32 @@ +# ModuleLoadEntry + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**modules** | **Dict[str, str]** | | [optional] +**pid** | **int** | | +**process_name** | **str** | | [optional] +**process_seqid** | **int** | | [optional] + +## Example + +```python +from revengai.models.module_load_entry import ModuleLoadEntry + +# TODO update the JSON string below +json = "{}" +# create an instance of ModuleLoadEntry from a JSON string +module_load_entry_instance = ModuleLoadEntry.from_json(json) +# print the JSON string representation of the object +print(ModuleLoadEntry.to_json()) + +# convert the object into a dict +module_load_entry_dict = module_load_entry_instance.to_dict() +# create an instance of ModuleLoadEntry from a dict +module_load_entry_from_dict = ModuleLoadEntry.from_dict(module_load_entry_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/MutexEntry.md b/docs/MutexEntry.md new file mode 100644 index 00000000..ea0dfc63 --- /dev/null +++ b/docs/MutexEntry.md @@ -0,0 +1,30 @@ +# MutexEntry + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**events** | [**List[ReportEvent]**](ReportEvent.md) | | [optional] +**name** | **str** | | + +## Example + +```python +from revengai.models.mutex_entry import MutexEntry + +# TODO update the JSON string below +json = "{}" +# create an instance of MutexEntry from a JSON string +mutex_entry_instance = MutexEntry.from_json(json) +# print the JSON string representation of the object +print(MutexEntry.to_json()) + +# convert the object into a dict +mutex_entry_dict = mutex_entry_instance.to_dict() +# create an instance of MutexEntry from a dict +mutex_entry_from_dict = MutexEntry.from_dict(mutex_entry_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/NetworkActivity.md b/docs/NetworkActivity.md new file mode 100644 index 00000000..192fb689 --- /dev/null +++ b/docs/NetworkActivity.md @@ -0,0 +1,32 @@ +# NetworkActivity + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**connections** | [**List[Connection]**](Connection.md) | | [optional] +**dns_queries** | [**List[DnsQuery]**](DnsQuery.md) | | [optional] +**extracted_urls** | [**List[ExtractedURL]**](ExtractedURL.md) | | [optional] +**http_requests** | [**List[HttpRequest]**](HttpRequest.md) | | [optional] + +## Example + +```python +from revengai.models.network_activity import NetworkActivity + +# TODO update the JSON string below +json = "{}" +# create an instance of NetworkActivity from a JSON string +network_activity_instance = NetworkActivity.from_json(json) +# print the JSON string representation of the object +print(NetworkActivity.to_json()) + +# convert the object into a dict +network_activity_dict = network_activity_instance.to_dict() +# create an instance of NetworkActivity from a dict +network_activity_from_dict = NetworkActivity.from_dict(network_activity_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/ProcessActivityEntry.md b/docs/ProcessActivityEntry.md new file mode 100644 index 00000000..30fe72e9 --- /dev/null +++ b/docs/ProcessActivityEntry.md @@ -0,0 +1,35 @@ +# ProcessActivityEntry + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**args** | **List[str]** | | [optional] +**child_seqid** | **int** | | +**events** | [**List[ReportEvent]**](ReportEvent.md) | | [optional] +**exit_code** | **int** | | [optional] +**exit_code_str** | **str** | | [optional] +**name** | **str** | | +**pid** | **int** | | + +## Example + +```python +from revengai.models.process_activity_entry import ProcessActivityEntry + +# TODO update the JSON string below +json = "{}" +# create an instance of ProcessActivityEntry from a JSON string +process_activity_entry_instance = ProcessActivityEntry.from_json(json) +# print the JSON string representation of the object +print(ProcessActivityEntry.to_json()) + +# convert the object into a dict +process_activity_entry_dict = process_activity_entry_instance.to_dict() +# create an instance of ProcessActivityEntry from a dict +process_activity_entry_from_dict = ProcessActivityEntry.from_dict(process_activity_entry_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/ProcessMemdumps.md b/docs/ProcessMemdumps.md new file mode 100644 index 00000000..960baa68 --- /dev/null +++ b/docs/ProcessMemdumps.md @@ -0,0 +1,30 @@ +# ProcessMemdumps + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**dumps** | [**List[MemdumpEntry]**](MemdumpEntry.md) | | [optional] +**process_seqid** | **int** | | + +## Example + +```python +from revengai.models.process_memdumps import ProcessMemdumps + +# TODO update the JSON string below +json = "{}" +# create an instance of ProcessMemdumps from a JSON string +process_memdumps_instance = ProcessMemdumps.from_json(json) +# print the JSON string representation of the object +print(ProcessMemdumps.to_json()) + +# convert the object into a dict +process_memdumps_dict = process_memdumps_instance.to_dict() +# create an instance of ProcessMemdumps from a dict +process_memdumps_from_dict = ProcessMemdumps.from_dict(process_memdumps_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/ProcessNode.md b/docs/ProcessNode.md new file mode 100644 index 00000000..6f4a71bd --- /dev/null +++ b/docs/ProcessNode.md @@ -0,0 +1,39 @@ +# ProcessNode + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**args** | **List[str]** | | [optional] +**attributed** | **bool** | | +**children** | [**List[ProcessNode]**](ProcessNode.md) | | [optional] +**exit_code** | **int** | | [optional] +**exit_code_str** | **str** | | [optional] +**exited_at** | **float** | | [optional] +**killed_by** | **int** | | [optional] +**name** | **str** | | +**pid** | **int** | | +**seqid** | **int** | | +**started_at** | **float** | | [optional] + +## Example + +```python +from revengai.models.process_node import ProcessNode + +# TODO update the JSON string below +json = "{}" +# create an instance of ProcessNode from a JSON string +process_node_instance = ProcessNode.from_json(json) +# print the JSON string representation of the object +print(ProcessNode.to_json()) + +# convert the object into a dict +process_node_dict = process_node_instance.to_dict() +# create an instance of ProcessNode from a dict +process_node_from_dict = ProcessNode.from_dict(process_node_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/ProcessTree.md b/docs/ProcessTree.md new file mode 100644 index 00000000..21059701 --- /dev/null +++ b/docs/ProcessTree.md @@ -0,0 +1,30 @@ +# ProcessTree + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**nodes** | [**List[ProcessNode]**](ProcessNode.md) | | [optional] +**sample_seqid** | **int** | | [optional] + +## Example + +```python +from revengai.models.process_tree import ProcessTree + +# TODO update the JSON string below +json = "{}" +# create an instance of ProcessTree from a JSON string +process_tree_instance = ProcessTree.from_json(json) +# print the JSON string representation of the object +print(ProcessTree.to_json()) + +# convert the object into a dict +process_tree_dict = process_tree_instance.to_dict() +# create an instance of ProcessTree from a dict +process_tree_from_dict = ProcessTree.from_dict(process_tree_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/RegistryOperation.md b/docs/RegistryOperation.md new file mode 100644 index 00000000..2e86e190 --- /dev/null +++ b/docs/RegistryOperation.md @@ -0,0 +1,30 @@ +# RegistryOperation + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**events** | [**List[ReportEvent]**](ReportEvent.md) | | [optional] +**key** | **str** | | + +## Example + +```python +from revengai.models.registry_operation import RegistryOperation + +# TODO update the JSON string below +json = "{}" +# create an instance of RegistryOperation from a JSON string +registry_operation_instance = RegistryOperation.from_json(json) +# print the JSON string representation of the object +print(RegistryOperation.to_json()) + +# convert the object into a dict +registry_operation_dict = registry_operation_instance.to_dict() +# create an instance of RegistryOperation from a dict +registry_operation_from_dict = RegistryOperation.from_dict(registry_operation_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/ReportEvent.md b/docs/ReportEvent.md new file mode 100644 index 00000000..dce34cf9 --- /dev/null +++ b/docs/ReportEvent.md @@ -0,0 +1,35 @@ +# ReportEvent + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**api_calls** | [**List[ApiCall]**](ApiCall.md) | | [optional] +**process_seqid** | **int** | | [optional] +**total_bytes_requested** | **int** | | [optional] +**type** | **str** | | +**value** | **str** | | [optional] +**value_name** | **str** | | [optional] +**write_count** | **int** | | [optional] + +## Example + +```python +from revengai.models.report_event import ReportEvent + +# TODO update the JSON string below +json = "{}" +# create an instance of ReportEvent from a JSON string +report_event_instance = ReportEvent.from_json(json) +# print the JSON string representation of the object +print(ReportEvent.to_json()) + +# convert the object into a dict +report_event_dict = report_event_instance.to_dict() +# create an instance of ReportEvent from a dict +report_event_from_dict = ReportEvent.from_dict(report_event_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/ReportInfo.md b/docs/ReportInfo.md new file mode 100644 index 00000000..d4c6d919 --- /dev/null +++ b/docs/ReportInfo.md @@ -0,0 +1,36 @@ +# ReportInfo + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**file** | [**DrakvufFileMetadata**](DrakvufFileMetadata.md) | | [optional] +**id** | **str** | | +**options** | [**ReportOptions**](ReportOptions.md) | | [optional] +**os_profile** | **str** | | [optional] +**status** | **str** | | [optional] +**time_analysis_finished** | **str** | | [optional] +**time_execution_started** | **str** | | [optional] +**time_started** | **str** | | [optional] + +## Example + +```python +from revengai.models.report_info import ReportInfo + +# TODO update the JSON string below +json = "{}" +# create an instance of ReportInfo from a JSON string +report_info_instance = ReportInfo.from_json(json) +# print the JSON string representation of the object +print(ReportInfo.to_json()) + +# convert the object into a dict +report_info_dict = report_info_instance.to_dict() +# create an instance of ReportInfo from a dict +report_info_from_dict = ReportInfo.from_dict(report_info_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/ReportOptions.md b/docs/ReportOptions.md new file mode 100644 index 00000000..138b4f5f --- /dev/null +++ b/docs/ReportOptions.md @@ -0,0 +1,40 @@ +# ReportOptions + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**archive_entry_path** | **str** | | [optional] +**extract_archive** | **bool** | | [optional] +**guest_target_directory** | **str** | | [optional] +**guest_working_directory** | **str** | | [optional] +**net_enable** | **bool** | | [optional] +**os_profile** | **str** | | [optional] +**plugins** | **List[str]** | | [optional] +**preset** | **str** | | [optional] +**sample_filename** | **str** | | [optional] +**start_command** | **str** | | [optional] +**start_method** | **str** | | [optional] +**timeout** | **int** | | [optional] + +## Example + +```python +from revengai.models.report_options import ReportOptions + +# TODO update the JSON string below +json = "{}" +# create an instance of ReportOptions from a JSON string +report_options_instance = ReportOptions.from_json(json) +# print the JSON string representation of the object +print(ReportOptions.to_json()) + +# convert the object into a dict +report_options_dict = report_options_instance.to_dict() +# create an instance of ReportOptions from a dict +report_options_from_dict = ReportOptions.from_dict(report_options_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/SandboxOptions.md b/docs/SandboxOptions.md index 0b798238..742da2ff 100644 --- a/docs/SandboxOptions.md +++ b/docs/SandboxOptions.md @@ -7,6 +7,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **enabled** | **bool** | | [optional] [default to False] **command_line_args** | **str** | The command line parameters to pass to the dynamic execution sandbox. Requires `sandbox` to be True. | [optional] [default to ''] +**start_method** | [**SandboxStartMethod**](SandboxStartMethod.md) | | [optional] +**timeout** | [**SandboxTimeout**](SandboxTimeout.md) | Maximum execution time for the sandbox run, in seconds. Allowed values: 120 (2m), 180 (3m), 300 (5m), 600 (10m). | [optional] ## Example diff --git a/docs/SandboxStartMethod.md b/docs/SandboxStartMethod.md new file mode 100644 index 00000000..e56c789b --- /dev/null +++ b/docs/SandboxStartMethod.md @@ -0,0 +1,12 @@ +# SandboxStartMethod + + +## Enum + +* `STANDARD_USER_PROCESS` (value: `'standard_user_process'`) + +* `ADMINISTRATOR_PROCESS` (value: `'administrator_process'`) + +[[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/SandboxTimeout.md b/docs/SandboxTimeout.md new file mode 100644 index 00000000..fbbb59b7 --- /dev/null +++ b/docs/SandboxTimeout.md @@ -0,0 +1,16 @@ +# SandboxTimeout + + +## Enum + +* `NUMBER_120` (value: `120`) + +* `NUMBER_180` (value: `180`) + +* `NUMBER_300` (value: `300`) + +* `NUMBER_600` (value: `600`) + +[[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/ScheduledTaskEntry.md b/docs/ScheduledTaskEntry.md new file mode 100644 index 00000000..b201a320 --- /dev/null +++ b/docs/ScheduledTaskEntry.md @@ -0,0 +1,39 @@ +# ScheduledTaskEntry + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**command** | **str** | | [optional] +**day** | **str** | | [optional] +**end_date** | **str** | | [optional] +**events** | [**List[ReportEvent]**](ReportEvent.md) | | [optional] +**executable** | **str** | | [optional] +**modifier** | **str** | | [optional] +**run_as** | **str** | | [optional] +**schedule_type** | **str** | | [optional] +**start_date** | **str** | | [optional] +**start_time** | **str** | | [optional] +**task_name** | **str** | | [optional] + +## Example + +```python +from revengai.models.scheduled_task_entry import ScheduledTaskEntry + +# TODO update the JSON string below +json = "{}" +# create an instance of ScheduledTaskEntry from a JSON string +scheduled_task_entry_instance = ScheduledTaskEntry.from_json(json) +# print the JSON string representation of the object +print(ScheduledTaskEntry.to_json()) + +# convert the object into a dict +scheduled_task_entry_dict = scheduled_task_entry_instance.to_dict() +# create an instance of ScheduledTaskEntry from a dict +scheduled_task_entry_from_dict = ScheduledTaskEntry.from_dict(scheduled_task_entry_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/ServiceEntry.md b/docs/ServiceEntry.md new file mode 100644 index 00000000..2cc31631 --- /dev/null +++ b/docs/ServiceEntry.md @@ -0,0 +1,34 @@ +# ServiceEntry + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**binary_path** | **str** | | [optional] +**display_name** | **str** | | [optional] +**events** | [**List[ReportEvent]**](ReportEvent.md) | | [optional] +**name** | **str** | | [optional] +**service_type** | **str** | | [optional] +**start_type** | **str** | | [optional] + +## Example + +```python +from revengai.models.service_entry import ServiceEntry + +# TODO update the JSON string below +json = "{}" +# create an instance of ServiceEntry from a JSON string +service_entry_instance = ServiceEntry.from_json(json) +# print the JSON string representation of the object +print(ServiceEntry.to_json()) + +# convert the object into a dict +service_entry_dict = service_entry_instance.to_dict() +# create an instance of ServiceEntry from a dict +service_entry_from_dict = ServiceEntry.from_dict(service_entry_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/StartupInfo.md b/docs/StartupInfo.md new file mode 100644 index 00000000..5f948153 --- /dev/null +++ b/docs/StartupInfo.md @@ -0,0 +1,35 @@ +# StartupInfo + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**arguments** | **str** | | [optional] +**error** | **str** | | [optional] +**error_code** | **str** | | [optional] +**pid** | **int** | | [optional] +**process** | **int** | | [optional] +**process_name** | **str** | | [optional] +**status** | **str** | | [optional] + +## Example + +```python +from revengai.models.startup_info import StartupInfo + +# TODO update the JSON string below +json = "{}" +# create an instance of StartupInfo from a JSON string +startup_info_instance = StartupInfo.from_json(json) +# print the JSON string representation of the object +print(StartupInfo.to_json()) + +# convert the object into a dict +startup_info_dict = startup_info_instance.to_dict() +# create an instance of StartupInfo from a dict +startup_info_from_dict = StartupInfo.from_dict(startup_info_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/Ttp.md b/docs/Ttp.md new file mode 100644 index 00000000..22507cd0 --- /dev/null +++ b/docs/Ttp.md @@ -0,0 +1,34 @@ +# Ttp + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**attck** | **List[str]** | | [optional] +**mbc** | **List[object]** | | [optional] +**name** | **str** | | [optional] +**namespace** | **str** | | [optional] +**process_seqids** | **List[int]** | | [optional] +**score** | **int** | | + +## Example + +```python +from revengai.models.ttp import Ttp + +# TODO update the JSON string below +json = "{}" +# create an instance of Ttp from a JSON string +ttp_instance = Ttp.from_json(json) +# print the JSON string representation of the object +print(Ttp.to_json()) + +# convert the object into a dict +ttp_dict = ttp_instance.to_dict() +# create an instance of Ttp from a dict +ttp_from_dict = Ttp.from_dict(ttp_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 1f436531..92284581 100644 --- a/revengai/__init__.py +++ b/revengai/__init__.py @@ -13,7 +13,7 @@ """ # noqa: E501 -__version__ = "v3.80.0" +__version__ = "v3.81.0" # Define package exports __all__ = [ @@ -64,6 +64,7 @@ "AnalysisFunctions", "AnalysisFunctionsList", "AnalysisRecord", + "AnalysisReport", "AnalysisScope", "AnalysisStringInput", "AnalysisStringsResponse", @@ -72,6 +73,7 @@ "AnalysisUpdateRequest", "AnalysisUpdateTagsRequest", "AnalysisUpdateTagsResponse", + "ApiCall", "AppApiRestV2AgentSchemaCapability", "AppApiRestV2AnalysesEnumsOrderBy", "AppApiRestV2CollectionsEnumsOrderBy", @@ -187,6 +189,7 @@ "CommentUpdateRequest", "ConfigResponse", "ConfirmToolInputBody", + "Connection", "Context", "Conversation", "ConversationContext", @@ -195,7 +198,10 @@ "Created", "DecompilationCommentContext", "DieMatch", + "DnsQuery", + "DrakvufFileMetadata", "DynamicExecutionStatus", + "DynamicExecutionStatusResponse", "ELFImportModel", "ELFModel", "ELFRelocation", @@ -227,6 +233,8 @@ "EventTOOLCONFIRMATIONREQUIRED", "ExportModel", "ExternalResponse", + "ExtractedURL", + "FileActivityEntry", "FileFormat", "FileHashes", "FileMetadata", @@ -276,6 +284,7 @@ "GetMeResponse", "GetPublicUserResponse", "GlobalVariable", + "HttpRequest", "IOC", "ISA", "IconModel", @@ -289,33 +298,49 @@ "MITRETechnique", "MatchedFunction", "MatchedFunctionSuggestion", + "MemdumpEntry", "MetaModel", "ModelName", "ModelsResponse", + "ModuleLoadEntry", + "MutexEntry", "NameConfidence", "NameSourceType", + "NetworkActivity", "Order", "PDBDebugModel", "PEModel", "PaginationModel", "Params", "Platform", + "ProcessActivityEntry", + "ProcessMemdumps", + "ProcessNode", + "ProcessTree", "PutAnalysisStringsRequest", "QueuePositionResponse", "QueuedWorkflowTaskResponse", "ReAnalysisForm", "Recent", "RegenerateTarget", + "RegistryOperation", "RelativeBinaryResponse", "ReportAnalysisResponse", + "ReportEvent", + "ReportInfo", + "ReportOptions", "SBOM", "SBOMPackage", "SandboxOptions", + "SandboxStartMethod", + "SandboxTimeout", + "ScheduledTaskEntry", "ScrapeThirdPartyConfig", "SectionModel", "SecurityModel", "SegmentInfo", "SendMessageRequest", + "ServiceEntry", "SingleCodeCertificateModel", "SingleCodeSignatureModel", "SinglePDBEntryModel", @@ -337,6 +362,7 @@ "SseEventToolCallStartData", "SseEventToolConfirmationRequiredData", "StackVariable", + "StartupInfo", "StatusInput", "StatusOutput", "StatusResponse", @@ -358,6 +384,7 @@ "TimestampModel", "TriageFunctionResponse", "TriageReportResponse", + "Ttp", "TypeDefinition", "UpdateFunctionDataTypes", "UploadFileType", @@ -424,6 +451,7 @@ from revengai.models.analysis_functions import AnalysisFunctions as AnalysisFunctions from revengai.models.analysis_functions_list import AnalysisFunctionsList as AnalysisFunctionsList from revengai.models.analysis_record import AnalysisRecord as AnalysisRecord +from revengai.models.analysis_report import AnalysisReport as AnalysisReport from revengai.models.analysis_scope import AnalysisScope as AnalysisScope from revengai.models.analysis_string_input import AnalysisStringInput as AnalysisStringInput from revengai.models.analysis_strings_response import AnalysisStringsResponse as AnalysisStringsResponse @@ -432,6 +460,7 @@ from revengai.models.analysis_update_request import AnalysisUpdateRequest as AnalysisUpdateRequest from revengai.models.analysis_update_tags_request import AnalysisUpdateTagsRequest as AnalysisUpdateTagsRequest from revengai.models.analysis_update_tags_response import AnalysisUpdateTagsResponse as AnalysisUpdateTagsResponse +from revengai.models.api_call import ApiCall as ApiCall from revengai.models.app_api_rest_v2_agent_schema_capability import AppApiRestV2AgentSchemaCapability as AppApiRestV2AgentSchemaCapability from revengai.models.app_api_rest_v2_analyses_enums_order_by import AppApiRestV2AnalysesEnumsOrderBy as AppApiRestV2AnalysesEnumsOrderBy from revengai.models.app_api_rest_v2_collections_enums_order_by import AppApiRestV2CollectionsEnumsOrderBy as AppApiRestV2CollectionsEnumsOrderBy @@ -547,6 +576,7 @@ from revengai.models.comment_update_request import CommentUpdateRequest as CommentUpdateRequest from revengai.models.config_response import ConfigResponse as ConfigResponse from revengai.models.confirm_tool_input_body import ConfirmToolInputBody as ConfirmToolInputBody +from revengai.models.connection import Connection as Connection from revengai.models.context import Context as Context from revengai.models.conversation import Conversation as Conversation from revengai.models.conversation_context import ConversationContext as ConversationContext @@ -555,7 +585,10 @@ from revengai.models.created import Created as Created from revengai.models.decompilation_comment_context import DecompilationCommentContext as DecompilationCommentContext from revengai.models.die_match import DieMatch as DieMatch +from revengai.models.dns_query import DnsQuery as DnsQuery +from revengai.models.drakvuf_file_metadata import DrakvufFileMetadata as DrakvufFileMetadata 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 from revengai.models.elf_model import ELFModel as ELFModel from revengai.models.elf_relocation import ELFRelocation as ELFRelocation @@ -587,6 +620,8 @@ from revengai.models.event_toolconfirmationrequired import EventTOOLCONFIRMATIONREQUIRED as EventTOOLCONFIRMATIONREQUIRED from revengai.models.export_model import ExportModel as ExportModel from revengai.models.external_response import ExternalResponse as ExternalResponse +from revengai.models.extracted_url import ExtractedURL as ExtractedURL +from revengai.models.file_activity_entry import FileActivityEntry as FileActivityEntry from revengai.models.file_format import FileFormat as FileFormat from revengai.models.file_hashes import FileHashes as FileHashes from revengai.models.file_metadata import FileMetadata as FileMetadata @@ -636,6 +671,7 @@ from revengai.models.get_me_response import GetMeResponse as GetMeResponse from revengai.models.get_public_user_response import GetPublicUserResponse as GetPublicUserResponse from revengai.models.global_variable import GlobalVariable as GlobalVariable +from revengai.models.http_request import HttpRequest as HttpRequest from revengai.models.ioc import IOC as IOC from revengai.models.isa import ISA as ISA from revengai.models.icon_model import IconModel as IconModel @@ -649,33 +685,49 @@ from revengai.models.mitre_technique import MITRETechnique as MITRETechnique from revengai.models.matched_function import MatchedFunction as MatchedFunction from revengai.models.matched_function_suggestion import MatchedFunctionSuggestion as MatchedFunctionSuggestion +from revengai.models.memdump_entry import MemdumpEntry as MemdumpEntry from revengai.models.meta_model import MetaModel as MetaModel from revengai.models.model_name import ModelName as ModelName from revengai.models.models_response import ModelsResponse as ModelsResponse +from revengai.models.module_load_entry import ModuleLoadEntry as ModuleLoadEntry +from revengai.models.mutex_entry import MutexEntry as MutexEntry from revengai.models.name_confidence import NameConfidence as NameConfidence from revengai.models.name_source_type import NameSourceType as NameSourceType +from revengai.models.network_activity import NetworkActivity as NetworkActivity from revengai.models.order import Order as Order from revengai.models.pdb_debug_model import PDBDebugModel as PDBDebugModel from revengai.models.pe_model import PEModel as PEModel from revengai.models.pagination_model import PaginationModel as PaginationModel from revengai.models.params import Params as Params from revengai.models.platform import Platform as Platform +from revengai.models.process_activity_entry import ProcessActivityEntry as ProcessActivityEntry +from revengai.models.process_memdumps import ProcessMemdumps as ProcessMemdumps +from revengai.models.process_node import ProcessNode as ProcessNode +from revengai.models.process_tree import ProcessTree as ProcessTree from revengai.models.put_analysis_strings_request import PutAnalysisStringsRequest as PutAnalysisStringsRequest from revengai.models.queue_position_response import QueuePositionResponse as QueuePositionResponse from revengai.models.queued_workflow_task_response import QueuedWorkflowTaskResponse as QueuedWorkflowTaskResponse from revengai.models.re_analysis_form import ReAnalysisForm as ReAnalysisForm from revengai.models.recent import Recent as Recent from revengai.models.regenerate_target import RegenerateTarget as RegenerateTarget +from revengai.models.registry_operation import RegistryOperation as RegistryOperation from revengai.models.relative_binary_response import RelativeBinaryResponse as RelativeBinaryResponse from revengai.models.report_analysis_response import ReportAnalysisResponse as ReportAnalysisResponse +from revengai.models.report_event import ReportEvent as ReportEvent +from revengai.models.report_info import ReportInfo as ReportInfo +from revengai.models.report_options import ReportOptions as ReportOptions from revengai.models.sbom import SBOM as SBOM from revengai.models.sbom_package import SBOMPackage as SBOMPackage from revengai.models.sandbox_options import SandboxOptions as SandboxOptions +from revengai.models.sandbox_start_method import SandboxStartMethod as SandboxStartMethod +from revengai.models.sandbox_timeout import SandboxTimeout as SandboxTimeout +from revengai.models.scheduled_task_entry import ScheduledTaskEntry as ScheduledTaskEntry from revengai.models.scrape_third_party_config import ScrapeThirdPartyConfig as ScrapeThirdPartyConfig from revengai.models.section_model import SectionModel as SectionModel from revengai.models.security_model import SecurityModel as SecurityModel from revengai.models.segment_info import SegmentInfo as SegmentInfo from revengai.models.send_message_request import SendMessageRequest as SendMessageRequest +from revengai.models.service_entry import ServiceEntry as ServiceEntry from revengai.models.single_code_certificate_model import SingleCodeCertificateModel as SingleCodeCertificateModel from revengai.models.single_code_signature_model import SingleCodeSignatureModel as SingleCodeSignatureModel from revengai.models.single_pdb_entry_model import SinglePDBEntryModel as SinglePDBEntryModel @@ -697,6 +749,7 @@ from revengai.models.sse_event_tool_call_start_data import SseEventToolCallStartData as SseEventToolCallStartData from revengai.models.sse_event_tool_confirmation_required_data import SseEventToolConfirmationRequiredData as SseEventToolConfirmationRequiredData from revengai.models.stack_variable import StackVariable as StackVariable +from revengai.models.startup_info import StartupInfo as StartupInfo from revengai.models.status_input import StatusInput as StatusInput from revengai.models.status_output import StatusOutput as StatusOutput from revengai.models.status_response import StatusResponse as StatusResponse @@ -718,6 +771,7 @@ from revengai.models.timestamp_model import TimestampModel as TimestampModel from revengai.models.triage_function_response import TriageFunctionResponse as TriageFunctionResponse from revengai.models.triage_report_response import TriageReportResponse as TriageReportResponse +from revengai.models.ttp import Ttp as Ttp from revengai.models.type_definition import TypeDefinition as TypeDefinition from revengai.models.update_function_data_types import UpdateFunctionDataTypes as UpdateFunctionDataTypes from revengai.models.upload_file_type import UploadFileType as UploadFileType diff --git a/revengai/api/agent_api.py b/revengai/api/agent_api.py index d48e85dc..d62da001 100644 --- a/revengai/api/agent_api.py +++ b/revengai/api/agent_api.py @@ -1890,6 +1890,7 @@ def get_report_analysis_result_v2_analyses_analysis_id_agent_report_analysis_get ) -> BaseResponseReportAnalysisResponse: """Get Report Analysis Result + Returns: - A summary of the analysis - The software type of the binary - An attack flow summary - List of IOCs - List of MITRE executable techniques - A YARA rule :param analysis_id: (required) :type analysis_id: int @@ -1957,6 +1958,7 @@ def get_report_analysis_result_v2_analyses_analysis_id_agent_report_analysis_get ) -> ApiResponse[BaseResponseReportAnalysisResponse]: """Get Report Analysis Result + Returns: - A summary of the analysis - The software type of the binary - An attack flow summary - List of IOCs - List of MITRE executable techniques - A YARA rule :param analysis_id: (required) :type analysis_id: int @@ -2024,6 +2026,7 @@ def get_report_analysis_result_v2_analyses_analysis_id_agent_report_analysis_get ) -> RESTResponseType: """Get Report Analysis Result + Returns: - A summary of the analysis - The software type of the binary - An attack flow summary - List of IOCs - List of MITRE executable techniques - A YARA rule :param analysis_id: (required) :type analysis_id: int diff --git a/revengai/api_client.py b/revengai/api_client.py index 698f4454..61b0ce39 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/v3.80.0/python' + self.user_agent = 'OpenAPI-Generator/v3.81.0/python' self.client_side_validation = configuration.client_side_validation def __enter__(self): diff --git a/revengai/configuration.py b/revengai/configuration.py index 5debe943..349f8790 100644 --- a/revengai/configuration.py +++ b/revengai/configuration.py @@ -533,8 +533,8 @@ def to_debug_report(self) -> str: return "Python SDK Debug Report:\n"\ "OS: {env}\n"\ "Python Version: {pyversion}\n"\ - "Version of the API: v3.80.0\n"\ - "SDK Package Version: v3.80.0".\ + "Version of the API: v3.81.0\n"\ + "SDK Package Version: v3.81.0".\ 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 48310c85..dd97b9c4 100644 --- a/revengai/models/__init__.py +++ b/revengai/models/__init__.py @@ -31,6 +31,7 @@ from revengai.models.analysis_functions import AnalysisFunctions from revengai.models.analysis_functions_list import AnalysisFunctionsList from revengai.models.analysis_record import AnalysisRecord +from revengai.models.analysis_report import AnalysisReport from revengai.models.analysis_scope import AnalysisScope from revengai.models.analysis_string_input import AnalysisStringInput from revengai.models.analysis_strings_response import AnalysisStringsResponse @@ -39,6 +40,7 @@ from revengai.models.analysis_update_request import AnalysisUpdateRequest from revengai.models.analysis_update_tags_request import AnalysisUpdateTagsRequest from revengai.models.analysis_update_tags_response import AnalysisUpdateTagsResponse +from revengai.models.api_call import ApiCall from revengai.models.app_api_rest_v2_agent_schema_capability import AppApiRestV2AgentSchemaCapability from revengai.models.app_api_rest_v2_analyses_enums_order_by import AppApiRestV2AnalysesEnumsOrderBy from revengai.models.app_api_rest_v2_collections_enums_order_by import AppApiRestV2CollectionsEnumsOrderBy @@ -154,6 +156,7 @@ from revengai.models.comment_update_request import CommentUpdateRequest from revengai.models.config_response import ConfigResponse from revengai.models.confirm_tool_input_body import ConfirmToolInputBody +from revengai.models.connection import Connection from revengai.models.context import Context from revengai.models.conversation import Conversation from revengai.models.conversation_context import ConversationContext @@ -162,7 +165,10 @@ from revengai.models.created import Created from revengai.models.decompilation_comment_context import DecompilationCommentContext from revengai.models.die_match import DieMatch +from revengai.models.dns_query import DnsQuery +from revengai.models.drakvuf_file_metadata import DrakvufFileMetadata 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 from revengai.models.elf_model import ELFModel from revengai.models.elf_relocation import ELFRelocation @@ -194,6 +200,8 @@ from revengai.models.event_toolconfirmationrequired import EventTOOLCONFIRMATIONREQUIRED from revengai.models.export_model import ExportModel from revengai.models.external_response import ExternalResponse +from revengai.models.extracted_url import ExtractedURL +from revengai.models.file_activity_entry import FileActivityEntry from revengai.models.file_format import FileFormat from revengai.models.file_hashes import FileHashes from revengai.models.file_metadata import FileMetadata @@ -243,6 +251,7 @@ from revengai.models.get_me_response import GetMeResponse from revengai.models.get_public_user_response import GetPublicUserResponse from revengai.models.global_variable import GlobalVariable +from revengai.models.http_request import HttpRequest from revengai.models.ioc import IOC from revengai.models.isa import ISA from revengai.models.icon_model import IconModel @@ -256,33 +265,49 @@ from revengai.models.mitre_technique import MITRETechnique from revengai.models.matched_function import MatchedFunction from revengai.models.matched_function_suggestion import MatchedFunctionSuggestion +from revengai.models.memdump_entry import MemdumpEntry from revengai.models.meta_model import MetaModel from revengai.models.model_name import ModelName from revengai.models.models_response import ModelsResponse +from revengai.models.module_load_entry import ModuleLoadEntry +from revengai.models.mutex_entry import MutexEntry from revengai.models.name_confidence import NameConfidence from revengai.models.name_source_type import NameSourceType +from revengai.models.network_activity import NetworkActivity from revengai.models.order import Order from revengai.models.pdb_debug_model import PDBDebugModel from revengai.models.pe_model import PEModel from revengai.models.pagination_model import PaginationModel from revengai.models.params import Params from revengai.models.platform import Platform +from revengai.models.process_activity_entry import ProcessActivityEntry +from revengai.models.process_memdumps import ProcessMemdumps +from revengai.models.process_node import ProcessNode +from revengai.models.process_tree import ProcessTree from revengai.models.put_analysis_strings_request import PutAnalysisStringsRequest from revengai.models.queue_position_response import QueuePositionResponse from revengai.models.queued_workflow_task_response import QueuedWorkflowTaskResponse from revengai.models.re_analysis_form import ReAnalysisForm from revengai.models.recent import Recent from revengai.models.regenerate_target import RegenerateTarget +from revengai.models.registry_operation import RegistryOperation from revengai.models.relative_binary_response import RelativeBinaryResponse from revengai.models.report_analysis_response import ReportAnalysisResponse +from revengai.models.report_event import ReportEvent +from revengai.models.report_info import ReportInfo +from revengai.models.report_options import ReportOptions from revengai.models.sbom import SBOM from revengai.models.sbom_package import SBOMPackage from revengai.models.sandbox_options import SandboxOptions +from revengai.models.sandbox_start_method import SandboxStartMethod +from revengai.models.sandbox_timeout import SandboxTimeout +from revengai.models.scheduled_task_entry import ScheduledTaskEntry from revengai.models.scrape_third_party_config import ScrapeThirdPartyConfig from revengai.models.section_model import SectionModel from revengai.models.security_model import SecurityModel from revengai.models.segment_info import SegmentInfo from revengai.models.send_message_request import SendMessageRequest +from revengai.models.service_entry import ServiceEntry from revengai.models.single_code_certificate_model import SingleCodeCertificateModel from revengai.models.single_code_signature_model import SingleCodeSignatureModel from revengai.models.single_pdb_entry_model import SinglePDBEntryModel @@ -304,6 +329,7 @@ from revengai.models.sse_event_tool_call_start_data import SseEventToolCallStartData from revengai.models.sse_event_tool_confirmation_required_data import SseEventToolConfirmationRequiredData from revengai.models.stack_variable import StackVariable +from revengai.models.startup_info import StartupInfo from revengai.models.status_input import StatusInput from revengai.models.status_output import StatusOutput from revengai.models.status_response import StatusResponse @@ -325,6 +351,7 @@ from revengai.models.timestamp_model import TimestampModel from revengai.models.triage_function_response import TriageFunctionResponse from revengai.models.triage_report_response import TriageReportResponse +from revengai.models.ttp import Ttp from revengai.models.type_definition import TypeDefinition from revengai.models.update_function_data_types import UpdateFunctionDataTypes from revengai.models.upload_file_type import UploadFileType diff --git a/revengai/models/analysis_report.py b/revengai/models/analysis_report.py new file mode 100644 index 00000000..86f3996d --- /dev/null +++ b/revengai/models/analysis_report.py @@ -0,0 +1,258 @@ +# 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, StrictInt +from typing import Any, ClassVar, Dict, List, Optional +from revengai.models.file_activity_entry import FileActivityEntry +from revengai.models.module_load_entry import ModuleLoadEntry +from revengai.models.mutex_entry import MutexEntry +from revengai.models.network_activity import NetworkActivity +from revengai.models.process_activity_entry import ProcessActivityEntry +from revengai.models.process_memdumps import ProcessMemdumps +from revengai.models.process_tree import ProcessTree +from revengai.models.registry_operation import RegistryOperation +from revengai.models.report_info import ReportInfo +from revengai.models.scheduled_task_entry import ScheduledTaskEntry +from revengai.models.service_entry import ServiceEntry +from revengai.models.startup_info import StartupInfo +from revengai.models.ttp import Ttp +from typing import Optional, Set +from typing_extensions import Self + +class AnalysisReport(BaseModel): + """ + AnalysisReport + """ # noqa: E501 + file_activity: Optional[List[FileActivityEntry]] = None + info: ReportInfo + memdumps: Optional[List[ProcessMemdumps]] = None + module_load_addresses: Optional[List[ModuleLoadEntry]] = None + mutexes: Optional[List[MutexEntry]] = None + network_activity: Optional[NetworkActivity] = None + process_activity: Optional[List[ProcessActivityEntry]] = None + process_tree: Optional[ProcessTree] = None + registry_operations: Optional[List[RegistryOperation]] = None + scheduled_tasks: Optional[List[ScheduledTaskEntry]] = None + services: Optional[List[ServiceEntry]] = None + startup: Optional[StartupInfo] = None + threat_score: StrictInt + ttps: Optional[List[Ttp]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["file_activity", "info", "memdumps", "module_load_addresses", "mutexes", "network_activity", "process_activity", "process_tree", "registry_operations", "scheduled_tasks", "services", "startup", "threat_score", "ttps"] + + 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 AnalysisReport 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 each item in file_activity (list) + _items = [] + if self.file_activity: + for _item_file_activity in self.file_activity: + if _item_file_activity: + _items.append(_item_file_activity.to_dict()) + _dict['file_activity'] = _items + # override the default output from pydantic by calling `to_dict()` of info + if self.info: + _dict['info'] = self.info.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in memdumps (list) + _items = [] + if self.memdumps: + for _item_memdumps in self.memdumps: + if _item_memdumps: + _items.append(_item_memdumps.to_dict()) + _dict['memdumps'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in module_load_addresses (list) + _items = [] + if self.module_load_addresses: + for _item_module_load_addresses in self.module_load_addresses: + if _item_module_load_addresses: + _items.append(_item_module_load_addresses.to_dict()) + _dict['module_load_addresses'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in mutexes (list) + _items = [] + if self.mutexes: + for _item_mutexes in self.mutexes: + if _item_mutexes: + _items.append(_item_mutexes.to_dict()) + _dict['mutexes'] = _items + # override the default output from pydantic by calling `to_dict()` of network_activity + if self.network_activity: + _dict['network_activity'] = self.network_activity.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in process_activity (list) + _items = [] + if self.process_activity: + for _item_process_activity in self.process_activity: + if _item_process_activity: + _items.append(_item_process_activity.to_dict()) + _dict['process_activity'] = _items + # override the default output from pydantic by calling `to_dict()` of process_tree + if self.process_tree: + _dict['process_tree'] = self.process_tree.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in registry_operations (list) + _items = [] + if self.registry_operations: + for _item_registry_operations in self.registry_operations: + if _item_registry_operations: + _items.append(_item_registry_operations.to_dict()) + _dict['registry_operations'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in scheduled_tasks (list) + _items = [] + if self.scheduled_tasks: + for _item_scheduled_tasks in self.scheduled_tasks: + if _item_scheduled_tasks: + _items.append(_item_scheduled_tasks.to_dict()) + _dict['scheduled_tasks'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in services (list) + _items = [] + if self.services: + for _item_services in self.services: + if _item_services: + _items.append(_item_services.to_dict()) + _dict['services'] = _items + # override the default output from pydantic by calling `to_dict()` of startup + if self.startup: + _dict['startup'] = self.startup.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in ttps (list) + _items = [] + if self.ttps: + for _item_ttps in self.ttps: + if _item_ttps: + _items.append(_item_ttps.to_dict()) + _dict['ttps'] = _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(): + _dict[_key] = _value + + # set to None if file_activity (nullable) is None + # and model_fields_set contains the field + if self.file_activity is None and "file_activity" in self.model_fields_set: + _dict['file_activity'] = None + + # set to None if memdumps (nullable) is None + # and model_fields_set contains the field + if self.memdumps is None and "memdumps" in self.model_fields_set: + _dict['memdumps'] = None + + # set to None if module_load_addresses (nullable) is None + # and model_fields_set contains the field + if self.module_load_addresses is None and "module_load_addresses" in self.model_fields_set: + _dict['module_load_addresses'] = None + + # set to None if mutexes (nullable) is None + # and model_fields_set contains the field + if self.mutexes is None and "mutexes" in self.model_fields_set: + _dict['mutexes'] = None + + # set to None if process_activity (nullable) is None + # and model_fields_set contains the field + if self.process_activity is None and "process_activity" in self.model_fields_set: + _dict['process_activity'] = None + + # set to None if registry_operations (nullable) is None + # and model_fields_set contains the field + if self.registry_operations is None and "registry_operations" in self.model_fields_set: + _dict['registry_operations'] = None + + # set to None if scheduled_tasks (nullable) is None + # and model_fields_set contains the field + if self.scheduled_tasks is None and "scheduled_tasks" in self.model_fields_set: + _dict['scheduled_tasks'] = None + + # set to None if services (nullable) is None + # and model_fields_set contains the field + if self.services is None and "services" in self.model_fields_set: + _dict['services'] = None + + # set to None if ttps (nullable) is None + # and model_fields_set contains the field + if self.ttps is None and "ttps" in self.model_fields_set: + _dict['ttps'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AnalysisReport from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "file_activity": [FileActivityEntry.from_dict(_item) for _item in obj["file_activity"]] if obj.get("file_activity") is not None else None, + "info": ReportInfo.from_dict(obj["info"]) if obj.get("info") is not None else None, + "memdumps": [ProcessMemdumps.from_dict(_item) for _item in obj["memdumps"]] if obj.get("memdumps") is not None else None, + "module_load_addresses": [ModuleLoadEntry.from_dict(_item) for _item in obj["module_load_addresses"]] if obj.get("module_load_addresses") is not None else None, + "mutexes": [MutexEntry.from_dict(_item) for _item in obj["mutexes"]] if obj.get("mutexes") is not None else None, + "network_activity": NetworkActivity.from_dict(obj["network_activity"]) if obj.get("network_activity") is not None else None, + "process_activity": [ProcessActivityEntry.from_dict(_item) for _item in obj["process_activity"]] if obj.get("process_activity") is not None else None, + "process_tree": ProcessTree.from_dict(obj["process_tree"]) if obj.get("process_tree") is not None else None, + "registry_operations": [RegistryOperation.from_dict(_item) for _item in obj["registry_operations"]] if obj.get("registry_operations") is not None else None, + "scheduled_tasks": [ScheduledTaskEntry.from_dict(_item) for _item in obj["scheduled_tasks"]] if obj.get("scheduled_tasks") is not None else None, + "services": [ServiceEntry.from_dict(_item) for _item in obj["services"]] if obj.get("services") is not None else None, + "startup": StartupInfo.from_dict(obj["startup"]) if obj.get("startup") is not None else None, + "threat_score": obj.get("threat_score"), + "ttps": [Ttp.from_dict(_item) for _item in obj["ttps"]] if obj.get("ttps") is not None else None + }) + # 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/api_call.py b/revengai/models/api_call.py new file mode 100644 index 00000000..8225c980 --- /dev/null +++ b/revengai/models/api_call.py @@ -0,0 +1,125 @@ +# 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, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ApiCall(BaseModel): + """ + ApiCall + """ # noqa: E501 + called_from: Optional[StrictStr] = None + called_from_rva: Optional[StrictStr] = None + from_module: Optional[StrictStr] = None + method: Optional[StrictStr] + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["called_from", "called_from_rva", "from_module", "method"] + + 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 ApiCall 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 + + # set to None if called_from (nullable) is None + # and model_fields_set contains the field + if self.called_from is None and "called_from" in self.model_fields_set: + _dict['called_from'] = None + + # set to None if called_from_rva (nullable) is None + # and model_fields_set contains the field + if self.called_from_rva is None and "called_from_rva" in self.model_fields_set: + _dict['called_from_rva'] = None + + # set to None if from_module (nullable) is None + # and model_fields_set contains the field + if self.from_module is None and "from_module" in self.model_fields_set: + _dict['from_module'] = None + + # set to None if method (nullable) is None + # and model_fields_set contains the field + if self.method is None and "method" in self.model_fields_set: + _dict['method'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ApiCall from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "called_from": obj.get("called_from"), + "called_from_rva": obj.get("called_from_rva"), + "from_module": obj.get("from_module"), + "method": obj.get("method") + }) + # 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/connection.py b/revengai/models/connection.py new file mode 100644 index 00000000..87b8a895 --- /dev/null +++ b/revengai/models/connection.py @@ -0,0 +1,147 @@ +# 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, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from revengai.models.report_event import ReportEvent +from typing import Optional, Set +from typing_extensions import Self + +class Connection(BaseModel): + """ + Connection + """ # noqa: E501 + events: Optional[List[ReportEvent]] = None + local_ip: Optional[StrictStr] + local_port: Optional[Any] + protocol: Optional[StrictStr] + remote_ip: Optional[StrictStr] + remote_port: Optional[Any] + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["events", "local_ip", "local_port", "protocol", "remote_ip", "remote_port"] + + 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 Connection 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 each item in events (list) + _items = [] + if self.events: + for _item_events in self.events: + if _item_events: + _items.append(_item_events.to_dict()) + _dict['events'] = _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(): + _dict[_key] = _value + + # set to None if events (nullable) is None + # and model_fields_set contains the field + if self.events is None and "events" in self.model_fields_set: + _dict['events'] = None + + # set to None if local_ip (nullable) is None + # and model_fields_set contains the field + if self.local_ip is None and "local_ip" in self.model_fields_set: + _dict['local_ip'] = None + + # set to None if local_port (nullable) is None + # and model_fields_set contains the field + if self.local_port is None and "local_port" in self.model_fields_set: + _dict['local_port'] = None + + # set to None if protocol (nullable) is None + # and model_fields_set contains the field + if self.protocol is None and "protocol" in self.model_fields_set: + _dict['protocol'] = None + + # set to None if remote_ip (nullable) is None + # and model_fields_set contains the field + if self.remote_ip is None and "remote_ip" in self.model_fields_set: + _dict['remote_ip'] = None + + # set to None if remote_port (nullable) is None + # and model_fields_set contains the field + if self.remote_port is None and "remote_port" in self.model_fields_set: + _dict['remote_port'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Connection from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "events": [ReportEvent.from_dict(_item) for _item in obj["events"]] if obj.get("events") is not None else None, + "local_ip": obj.get("local_ip"), + "local_port": obj.get("local_port"), + "protocol": obj.get("protocol"), + "remote_ip": obj.get("remote_ip"), + "remote_port": obj.get("remote_port") + }) + # 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/dns_query.py b/revengai/models/dns_query.py new file mode 100644 index 00000000..7b8a0512 --- /dev/null +++ b/revengai/models/dns_query.py @@ -0,0 +1,119 @@ +# 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, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from revengai.models.report_event import ReportEvent +from typing import Optional, Set +from typing_extensions import Self + +class DnsQuery(BaseModel): + """ + DnsQuery + """ # noqa: E501 + domain: Optional[StrictStr] + events: Optional[List[ReportEvent]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["domain", "events"] + + 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 DnsQuery 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 each item in events (list) + _items = [] + if self.events: + for _item_events in self.events: + if _item_events: + _items.append(_item_events.to_dict()) + _dict['events'] = _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(): + _dict[_key] = _value + + # set to None if domain (nullable) is None + # and model_fields_set contains the field + if self.domain is None and "domain" in self.model_fields_set: + _dict['domain'] = None + + # set to None if events (nullable) is None + # and model_fields_set contains the field + if self.events is None and "events" in self.model_fields_set: + _dict['events'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DnsQuery from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "domain": obj.get("domain"), + "events": [ReportEvent.from_dict(_item) for _item in obj["events"]] if obj.get("events") is not None else None + }) + # 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/drakvuf_file_metadata.py b/revengai/models/drakvuf_file_metadata.py new file mode 100644 index 00000000..225e0b45 --- /dev/null +++ b/revengai/models/drakvuf_file_metadata.py @@ -0,0 +1,132 @@ +# 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, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class DrakvufFileMetadata(BaseModel): + """ + DrakvufFileMetadata + """ # noqa: E501 + mime_type: Optional[StrictStr] = None + name: Optional[StrictStr] + sha256: Optional[StrictStr] + type: Optional[StrictStr] = None + type_id: Optional[StrictStr] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["mime_type", "name", "sha256", "type", "type_id"] + + 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 DrakvufFileMetadata 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 + + # set to None if mime_type (nullable) is None + # and model_fields_set contains the field + if self.mime_type is None and "mime_type" in self.model_fields_set: + _dict['mime_type'] = None + + # set to None if name (nullable) is None + # and model_fields_set contains the field + if self.name is None and "name" in self.model_fields_set: + _dict['name'] = None + + # set to None if sha256 (nullable) is None + # and model_fields_set contains the field + if self.sha256 is None and "sha256" in self.model_fields_set: + _dict['sha256'] = None + + # set to None if type (nullable) is None + # and model_fields_set contains the field + if self.type is None and "type" in self.model_fields_set: + _dict['type'] = None + + # set to None if type_id (nullable) is None + # and model_fields_set contains the field + if self.type_id is None and "type_id" in self.model_fields_set: + _dict['type_id'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DrakvufFileMetadata from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "mime_type": obj.get("mime_type"), + "name": obj.get("name"), + "sha256": obj.get("sha256"), + "type": obj.get("type"), + "type_id": obj.get("type_id") + }) + # 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/dynamic_execution_status_response.py b/revengai/models/dynamic_execution_status_response.py new file mode 100644 index 00000000..8ffc7638 --- /dev/null +++ b/revengai/models/dynamic_execution_status_response.py @@ -0,0 +1,101 @@ +# 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 +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class DynamicExecutionStatusResponse(BaseModel): + """ + DynamicExecutionStatusResponse + """ # noqa: E501 + error_message: Optional[StrictStr] = Field(default=None, description="Error detail, set when status is ERROR") + status: StrictStr = Field(description="Task status: UNINITIALISED, PENDING, RUNNING, COMPLETED, or ERROR") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["error_message", "status"] + + 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 DynamicExecutionStatusResponse 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 DynamicExecutionStatusResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "error_message": obj.get("error_message"), + "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/error_body.py b/revengai/models/error_body.py index 37acd464..5b96eb52 100644 --- a/revengai/models/error_body.py +++ b/revengai/models/error_body.py @@ -36,8 +36,8 @@ class ErrorBody(BaseModel): @field_validator('code') def code_validate_enum(cls, value): """Validates the enum""" - if value not in set(['ACCESS_DENIED', 'ALREADY_EXISTS', 'ANALYSIS_NOT_READY', 'BAD_REQUEST', 'CONFLICT', 'CONVERSATION_NOT_FOUND', 'DOMAIN_ALREADY_CLAIMED', 'DOMAIN_VERIFICATION_PENDING', 'EMAIL_NOT_VERIFIED', 'EXTERNAL_USER', 'FORBIDDEN', 'GATEWAY_TIMEOUT', 'INSUFFICIENT_CREDITS', 'INTERNAL_ERROR', 'INTERNAL_ISSUER', 'INVALID_CONVERSATION_ID', 'INVALID_CREDENTIALS', 'INVALID_RESET_CODE', 'LAST_ORG_OWNER', 'LINKED_TO_ORG', 'METHOD_NOT_ALLOWED', 'NOT_ACCEPTABLE', 'NOT_FOUND', 'NO_ACTIVE_RUN', 'NO_PENDING_CONFIRMATION', 'OIDC_DISCOVERY_FAILED', 'PASSWORD_RESET_REQUIRED', 'PAYMENT_REQUIRED', 'REQUEST_ENTITY_TOO_LARGE', 'RUN_ALREADY_ACTIVE', 'SELF_DELETION_NOT_ALLOWED', 'SERVICE_UNAVAILABLE', 'TOKEN_EXPIRED', 'TOKEN_REUSED', 'TOO_MANY_REQUESTS', 'UNAUTHORIZED', 'UNSUPPORTED_MEDIA_TYPE', 'VALIDATION_FAILED', 'VERIFICATION_EXPIRED', 'VERIFICATION_NOT_FOUND']): - raise ValueError("must be one of enum values ('ACCESS_DENIED', 'ALREADY_EXISTS', 'ANALYSIS_NOT_READY', 'BAD_REQUEST', 'CONFLICT', 'CONVERSATION_NOT_FOUND', 'DOMAIN_ALREADY_CLAIMED', 'DOMAIN_VERIFICATION_PENDING', 'EMAIL_NOT_VERIFIED', 'EXTERNAL_USER', 'FORBIDDEN', 'GATEWAY_TIMEOUT', 'INSUFFICIENT_CREDITS', 'INTERNAL_ERROR', 'INTERNAL_ISSUER', 'INVALID_CONVERSATION_ID', 'INVALID_CREDENTIALS', 'INVALID_RESET_CODE', 'LAST_ORG_OWNER', 'LINKED_TO_ORG', 'METHOD_NOT_ALLOWED', 'NOT_ACCEPTABLE', 'NOT_FOUND', 'NO_ACTIVE_RUN', 'NO_PENDING_CONFIRMATION', 'OIDC_DISCOVERY_FAILED', 'PASSWORD_RESET_REQUIRED', 'PAYMENT_REQUIRED', 'REQUEST_ENTITY_TOO_LARGE', 'RUN_ALREADY_ACTIVE', 'SELF_DELETION_NOT_ALLOWED', 'SERVICE_UNAVAILABLE', 'TOKEN_EXPIRED', 'TOKEN_REUSED', 'TOO_MANY_REQUESTS', 'UNAUTHORIZED', 'UNSUPPORTED_MEDIA_TYPE', 'VALIDATION_FAILED', 'VERIFICATION_EXPIRED', 'VERIFICATION_NOT_FOUND')") + if value not in set(['ACCESS_DENIED', 'ALREADY_EXISTS', 'ANALYSIS_NOT_READY', 'BAD_REQUEST', 'CONFLICT', 'CONVERSATION_NOT_FOUND', 'DOMAIN_ALREADY_CLAIMED', 'DOMAIN_VERIFICATION_PENDING', 'DYNAMIC_EXECUTION_INCOMPLETE', 'EMAIL_NOT_VERIFIED', 'EXTERNAL_USER', 'FORBIDDEN', 'GATEWAY_TIMEOUT', 'INSUFFICIENT_CREDITS', 'INTERNAL_ERROR', 'INTERNAL_ISSUER', 'INVALID_CONVERSATION_ID', 'INVALID_CREDENTIALS', 'INVALID_RESET_CODE', 'LAST_ORG_OWNER', 'LINKED_TO_ORG', 'METHOD_NOT_ALLOWED', 'NOT_ACCEPTABLE', 'NOT_FOUND', 'NO_ACTIVE_RUN', 'NO_PENDING_CONFIRMATION', 'OIDC_DISCOVERY_FAILED', 'PASSWORD_RESET_REQUIRED', 'PAYMENT_REQUIRED', 'REQUEST_ENTITY_TOO_LARGE', 'RUN_ALREADY_ACTIVE', 'SELF_DELETION_NOT_ALLOWED', 'SERVICE_UNAVAILABLE', 'TOKEN_EXPIRED', 'TOKEN_REUSED', 'TOO_MANY_REQUESTS', 'UNAUTHORIZED', 'UNSUPPORTED_MEDIA_TYPE', 'VALIDATION_FAILED', 'VERIFICATION_EXPIRED', 'VERIFICATION_NOT_FOUND']): + raise ValueError("must be one of enum values ('ACCESS_DENIED', 'ALREADY_EXISTS', 'ANALYSIS_NOT_READY', 'BAD_REQUEST', 'CONFLICT', 'CONVERSATION_NOT_FOUND', 'DOMAIN_ALREADY_CLAIMED', 'DOMAIN_VERIFICATION_PENDING', 'DYNAMIC_EXECUTION_INCOMPLETE', 'EMAIL_NOT_VERIFIED', 'EXTERNAL_USER', 'FORBIDDEN', 'GATEWAY_TIMEOUT', 'INSUFFICIENT_CREDITS', 'INTERNAL_ERROR', 'INTERNAL_ISSUER', 'INVALID_CONVERSATION_ID', 'INVALID_CREDENTIALS', 'INVALID_RESET_CODE', 'LAST_ORG_OWNER', 'LINKED_TO_ORG', 'METHOD_NOT_ALLOWED', 'NOT_ACCEPTABLE', 'NOT_FOUND', 'NO_ACTIVE_RUN', 'NO_PENDING_CONFIRMATION', 'OIDC_DISCOVERY_FAILED', 'PASSWORD_RESET_REQUIRED', 'PAYMENT_REQUIRED', 'REQUEST_ENTITY_TOO_LARGE', 'RUN_ALREADY_ACTIVE', 'SELF_DELETION_NOT_ALLOWED', 'SERVICE_UNAVAILABLE', 'TOKEN_EXPIRED', 'TOKEN_REUSED', 'TOO_MANY_REQUESTS', 'UNAUTHORIZED', 'UNSUPPORTED_MEDIA_TYPE', 'VALIDATION_FAILED', 'VERIFICATION_EXPIRED', 'VERIFICATION_NOT_FOUND')") return value model_config = ConfigDict( diff --git a/revengai/models/extracted_url.py b/revengai/models/extracted_url.py new file mode 100644 index 00000000..e8f1a193 --- /dev/null +++ b/revengai/models/extracted_url.py @@ -0,0 +1,119 @@ +# 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, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from revengai.models.report_event import ReportEvent +from typing import Optional, Set +from typing_extensions import Self + +class ExtractedURL(BaseModel): + """ + ExtractedURL + """ # noqa: E501 + events: Optional[List[ReportEvent]] = None + url: Optional[StrictStr] + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["events", "url"] + + 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 ExtractedURL 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 each item in events (list) + _items = [] + if self.events: + for _item_events in self.events: + if _item_events: + _items.append(_item_events.to_dict()) + _dict['events'] = _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(): + _dict[_key] = _value + + # set to None if events (nullable) is None + # and model_fields_set contains the field + if self.events is None and "events" in self.model_fields_set: + _dict['events'] = None + + # set to None if url (nullable) is None + # and model_fields_set contains the field + if self.url is None and "url" in self.model_fields_set: + _dict['url'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ExtractedURL from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "events": [ReportEvent.from_dict(_item) for _item in obj["events"]] if obj.get("events") is not None else None, + "url": obj.get("url") + }) + # 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/file_activity_entry.py b/revengai/models/file_activity_entry.py new file mode 100644 index 00000000..1fdffcb5 --- /dev/null +++ b/revengai/models/file_activity_entry.py @@ -0,0 +1,119 @@ +# 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, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from revengai.models.report_event import ReportEvent +from typing import Optional, Set +from typing_extensions import Self + +class FileActivityEntry(BaseModel): + """ + FileActivityEntry + """ # noqa: E501 + events: Optional[List[ReportEvent]] = None + path: Optional[StrictStr] + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["events", "path"] + + 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 FileActivityEntry 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 each item in events (list) + _items = [] + if self.events: + for _item_events in self.events: + if _item_events: + _items.append(_item_events.to_dict()) + _dict['events'] = _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(): + _dict[_key] = _value + + # set to None if events (nullable) is None + # and model_fields_set contains the field + if self.events is None and "events" in self.model_fields_set: + _dict['events'] = None + + # set to None if path (nullable) is None + # and model_fields_set contains the field + if self.path is None and "path" in self.model_fields_set: + _dict['path'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FileActivityEntry from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "events": [ReportEvent.from_dict(_item) for _item in obj["events"]] if obj.get("events") is not None else None, + "path": obj.get("path") + }) + # 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/http_request.py b/revengai/models/http_request.py new file mode 100644 index 00000000..939eae68 --- /dev/null +++ b/revengai/models/http_request.py @@ -0,0 +1,202 @@ +# 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, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from revengai.models.report_event import ReportEvent +from typing import Optional, Set +from typing_extensions import Self + +class HttpRequest(BaseModel): + """ + HttpRequest + """ # noqa: E501 + events: Optional[List[ReportEvent]] = None + extra_headers: Optional[List[StrictStr]] = None + flags: Optional[StrictInt] = None + password: Optional[StrictStr] = None + path: Optional[StrictStr] = None + post_data: Optional[StrictStr] = None + proxy: Optional[StrictStr] = None + proxy_bypass: Optional[StrictStr] = None + referer: Optional[StrictStr] = None + server_name: Optional[StrictStr] = None + server_port: Optional[StrictInt] = None + service: Optional[StrictInt] = None + user_agent: Optional[StrictStr] = None + username: Optional[StrictStr] = None + verb: Optional[StrictStr] = None + version: Optional[StrictStr] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["events", "extra_headers", "flags", "password", "path", "post_data", "proxy", "proxy_bypass", "referer", "server_name", "server_port", "service", "user_agent", "username", "verb", "version"] + + 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 HttpRequest 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 each item in events (list) + _items = [] + if self.events: + for _item_events in self.events: + if _item_events: + _items.append(_item_events.to_dict()) + _dict['events'] = _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(): + _dict[_key] = _value + + # set to None if events (nullable) is None + # and model_fields_set contains the field + if self.events is None and "events" in self.model_fields_set: + _dict['events'] = None + + # set to None if extra_headers (nullable) is None + # and model_fields_set contains the field + if self.extra_headers is None and "extra_headers" in self.model_fields_set: + _dict['extra_headers'] = None + + # set to None if password (nullable) is None + # and model_fields_set contains the field + if self.password is None and "password" in self.model_fields_set: + _dict['password'] = None + + # set to None if path (nullable) is None + # and model_fields_set contains the field + if self.path is None and "path" in self.model_fields_set: + _dict['path'] = None + + # set to None if post_data (nullable) is None + # and model_fields_set contains the field + if self.post_data is None and "post_data" in self.model_fields_set: + _dict['post_data'] = None + + # set to None if proxy (nullable) is None + # and model_fields_set contains the field + if self.proxy is None and "proxy" in self.model_fields_set: + _dict['proxy'] = None + + # set to None if proxy_bypass (nullable) is None + # and model_fields_set contains the field + if self.proxy_bypass is None and "proxy_bypass" in self.model_fields_set: + _dict['proxy_bypass'] = None + + # set to None if referer (nullable) is None + # and model_fields_set contains the field + if self.referer is None and "referer" in self.model_fields_set: + _dict['referer'] = None + + # set to None if server_name (nullable) is None + # and model_fields_set contains the field + if self.server_name is None and "server_name" in self.model_fields_set: + _dict['server_name'] = None + + # set to None if user_agent (nullable) is None + # and model_fields_set contains the field + if self.user_agent is None and "user_agent" in self.model_fields_set: + _dict['user_agent'] = None + + # set to None if username (nullable) is None + # and model_fields_set contains the field + if self.username is None and "username" in self.model_fields_set: + _dict['username'] = None + + # set to None if verb (nullable) is None + # and model_fields_set contains the field + if self.verb is None and "verb" in self.model_fields_set: + _dict['verb'] = None + + # set to None if version (nullable) is None + # and model_fields_set contains the field + if self.version is None and "version" in self.model_fields_set: + _dict['version'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of HttpRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "events": [ReportEvent.from_dict(_item) for _item in obj["events"]] if obj.get("events") is not None else None, + "extra_headers": obj.get("extra_headers"), + "flags": obj.get("flags"), + "password": obj.get("password"), + "path": obj.get("path"), + "post_data": obj.get("post_data"), + "proxy": obj.get("proxy"), + "proxy_bypass": obj.get("proxy_bypass"), + "referer": obj.get("referer"), + "server_name": obj.get("server_name"), + "server_port": obj.get("server_port"), + "service": obj.get("service"), + "user_agent": obj.get("user_agent"), + "username": obj.get("username"), + "verb": obj.get("verb"), + "version": obj.get("version") + }) + # 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/memdump_entry.py b/revengai/models/memdump_entry.py new file mode 100644 index 00000000..72a604f3 --- /dev/null +++ b/revengai/models/memdump_entry.py @@ -0,0 +1,161 @@ +# 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, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class MemdumpEntry(BaseModel): + """ + MemdumpEntry + """ # noqa: E501 + address: Optional[StrictStr] + dump_reason: Optional[StrictStr] + file_type: Optional[StrictStr] = None + filename: Optional[StrictStr] + index: StrictInt + is_pe: Optional[StrictBool] = None + method: Optional[StrictStr] + mime_type: Optional[StrictStr] = None + sha256: Optional[StrictStr] = None + size: StrictInt + target_addr: Optional[StrictStr] = None + target_process: Optional[StrictInt] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["address", "dump_reason", "file_type", "filename", "index", "is_pe", "method", "mime_type", "sha256", "size", "target_addr", "target_process"] + + 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 MemdumpEntry 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 + + # set to None if address (nullable) is None + # and model_fields_set contains the field + if self.address is None and "address" in self.model_fields_set: + _dict['address'] = None + + # set to None if dump_reason (nullable) is None + # and model_fields_set contains the field + if self.dump_reason is None and "dump_reason" in self.model_fields_set: + _dict['dump_reason'] = None + + # set to None if file_type (nullable) is None + # and model_fields_set contains the field + if self.file_type is None and "file_type" in self.model_fields_set: + _dict['file_type'] = None + + # set to None if filename (nullable) is None + # and model_fields_set contains the field + if self.filename is None and "filename" in self.model_fields_set: + _dict['filename'] = None + + # set to None if method (nullable) is None + # and model_fields_set contains the field + if self.method is None and "method" in self.model_fields_set: + _dict['method'] = None + + # set to None if mime_type (nullable) is None + # and model_fields_set contains the field + if self.mime_type is None and "mime_type" in self.model_fields_set: + _dict['mime_type'] = None + + # set to None if sha256 (nullable) is None + # and model_fields_set contains the field + if self.sha256 is None and "sha256" in self.model_fields_set: + _dict['sha256'] = None + + # set to None if target_addr (nullable) is None + # and model_fields_set contains the field + if self.target_addr is None and "target_addr" in self.model_fields_set: + _dict['target_addr'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of MemdumpEntry from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "address": obj.get("address"), + "dump_reason": obj.get("dump_reason"), + "file_type": obj.get("file_type"), + "filename": obj.get("filename"), + "index": obj.get("index"), + "is_pe": obj.get("is_pe"), + "method": obj.get("method"), + "mime_type": obj.get("mime_type"), + "sha256": obj.get("sha256"), + "size": obj.get("size"), + "target_addr": obj.get("target_addr"), + "target_process": obj.get("target_process") + }) + # 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/module_load_entry.py b/revengai/models/module_load_entry.py new file mode 100644 index 00000000..96097280 --- /dev/null +++ b/revengai/models/module_load_entry.py @@ -0,0 +1,110 @@ +# 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, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ModuleLoadEntry(BaseModel): + """ + ModuleLoadEntry + """ # noqa: E501 + modules: Optional[Dict[str, StrictStr]] = None + pid: StrictInt + process_name: Optional[StrictStr] = None + process_seqid: Optional[StrictInt] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["modules", "pid", "process_name", "process_seqid"] + + 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 ModuleLoadEntry 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 + + # set to None if process_name (nullable) is None + # and model_fields_set contains the field + if self.process_name is None and "process_name" in self.model_fields_set: + _dict['process_name'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ModuleLoadEntry from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "modules": obj.get("modules"), + "pid": obj.get("pid"), + "process_name": obj.get("process_name"), + "process_seqid": obj.get("process_seqid") + }) + # 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/mutex_entry.py b/revengai/models/mutex_entry.py new file mode 100644 index 00000000..cb0465bb --- /dev/null +++ b/revengai/models/mutex_entry.py @@ -0,0 +1,119 @@ +# 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, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from revengai.models.report_event import ReportEvent +from typing import Optional, Set +from typing_extensions import Self + +class MutexEntry(BaseModel): + """ + MutexEntry + """ # noqa: E501 + events: Optional[List[ReportEvent]] = None + name: Optional[StrictStr] + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["events", "name"] + + 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 MutexEntry 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 each item in events (list) + _items = [] + if self.events: + for _item_events in self.events: + if _item_events: + _items.append(_item_events.to_dict()) + _dict['events'] = _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(): + _dict[_key] = _value + + # set to None if events (nullable) is None + # and model_fields_set contains the field + if self.events is None and "events" in self.model_fields_set: + _dict['events'] = None + + # set to None if name (nullable) is None + # and model_fields_set contains the field + if self.name is None and "name" in self.model_fields_set: + _dict['name'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of MutexEntry from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "events": [ReportEvent.from_dict(_item) for _item in obj["events"]] if obj.get("events") is not None else None, + "name": obj.get("name") + }) + # 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/network_activity.py b/revengai/models/network_activity.py new file mode 100644 index 00000000..adf18f92 --- /dev/null +++ b/revengai/models/network_activity.py @@ -0,0 +1,157 @@ +# 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 +from typing import Any, ClassVar, Dict, List, Optional +from revengai.models.connection import Connection +from revengai.models.dns_query import DnsQuery +from revengai.models.extracted_url import ExtractedURL +from revengai.models.http_request import HttpRequest +from typing import Optional, Set +from typing_extensions import Self + +class NetworkActivity(BaseModel): + """ + NetworkActivity + """ # noqa: E501 + connections: Optional[List[Connection]] = None + dns_queries: Optional[List[DnsQuery]] = None + extracted_urls: Optional[List[ExtractedURL]] = None + http_requests: Optional[List[HttpRequest]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["connections", "dns_queries", "extracted_urls", "http_requests"] + + 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 NetworkActivity 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 each item in connections (list) + _items = [] + if self.connections: + for _item_connections in self.connections: + if _item_connections: + _items.append(_item_connections.to_dict()) + _dict['connections'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in dns_queries (list) + _items = [] + if self.dns_queries: + for _item_dns_queries in self.dns_queries: + if _item_dns_queries: + _items.append(_item_dns_queries.to_dict()) + _dict['dns_queries'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in extracted_urls (list) + _items = [] + if self.extracted_urls: + for _item_extracted_urls in self.extracted_urls: + if _item_extracted_urls: + _items.append(_item_extracted_urls.to_dict()) + _dict['extracted_urls'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in http_requests (list) + _items = [] + if self.http_requests: + for _item_http_requests in self.http_requests: + if _item_http_requests: + _items.append(_item_http_requests.to_dict()) + _dict['http_requests'] = _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(): + _dict[_key] = _value + + # set to None if connections (nullable) is None + # and model_fields_set contains the field + if self.connections is None and "connections" in self.model_fields_set: + _dict['connections'] = None + + # set to None if dns_queries (nullable) is None + # and model_fields_set contains the field + if self.dns_queries is None and "dns_queries" in self.model_fields_set: + _dict['dns_queries'] = None + + # set to None if extracted_urls (nullable) is None + # and model_fields_set contains the field + if self.extracted_urls is None and "extracted_urls" in self.model_fields_set: + _dict['extracted_urls'] = None + + # set to None if http_requests (nullable) is None + # and model_fields_set contains the field + if self.http_requests is None and "http_requests" in self.model_fields_set: + _dict['http_requests'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of NetworkActivity from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "connections": [Connection.from_dict(_item) for _item in obj["connections"]] if obj.get("connections") is not None else None, + "dns_queries": [DnsQuery.from_dict(_item) for _item in obj["dns_queries"]] if obj.get("dns_queries") is not None else None, + "extracted_urls": [ExtractedURL.from_dict(_item) for _item in obj["extracted_urls"]] if obj.get("extracted_urls") is not None else None, + "http_requests": [HttpRequest.from_dict(_item) for _item in obj["http_requests"]] if obj.get("http_requests") is not None else None + }) + # 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/process_activity_entry.py b/revengai/models/process_activity_entry.py new file mode 100644 index 00000000..79a903f1 --- /dev/null +++ b/revengai/models/process_activity_entry.py @@ -0,0 +1,139 @@ +# 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, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from revengai.models.report_event import ReportEvent +from typing import Optional, Set +from typing_extensions import Self + +class ProcessActivityEntry(BaseModel): + """ + ProcessActivityEntry + """ # noqa: E501 + args: Optional[List[StrictStr]] = None + child_seqid: StrictInt + events: Optional[List[ReportEvent]] = None + exit_code: Optional[StrictInt] = None + exit_code_str: Optional[StrictStr] = None + name: Optional[StrictStr] + pid: StrictInt + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["args", "child_seqid", "events", "exit_code", "exit_code_str", "name", "pid"] + + 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 ProcessActivityEntry 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 each item in events (list) + _items = [] + if self.events: + for _item_events in self.events: + if _item_events: + _items.append(_item_events.to_dict()) + _dict['events'] = _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(): + _dict[_key] = _value + + # set to None if args (nullable) is None + # and model_fields_set contains the field + if self.args is None and "args" in self.model_fields_set: + _dict['args'] = None + + # set to None if events (nullable) is None + # and model_fields_set contains the field + if self.events is None and "events" in self.model_fields_set: + _dict['events'] = None + + # set to None if exit_code_str (nullable) is None + # and model_fields_set contains the field + if self.exit_code_str is None and "exit_code_str" in self.model_fields_set: + _dict['exit_code_str'] = None + + # set to None if name (nullable) is None + # and model_fields_set contains the field + if self.name is None and "name" in self.model_fields_set: + _dict['name'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ProcessActivityEntry from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "args": obj.get("args"), + "child_seqid": obj.get("child_seqid"), + "events": [ReportEvent.from_dict(_item) for _item in obj["events"]] if obj.get("events") is not None else None, + "exit_code": obj.get("exit_code"), + "exit_code_str": obj.get("exit_code_str"), + "name": obj.get("name"), + "pid": obj.get("pid") + }) + # 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/process_memdumps.py b/revengai/models/process_memdumps.py new file mode 100644 index 00000000..b6134658 --- /dev/null +++ b/revengai/models/process_memdumps.py @@ -0,0 +1,114 @@ +# 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, StrictInt +from typing import Any, ClassVar, Dict, List, Optional +from revengai.models.memdump_entry import MemdumpEntry +from typing import Optional, Set +from typing_extensions import Self + +class ProcessMemdumps(BaseModel): + """ + ProcessMemdumps + """ # noqa: E501 + dumps: Optional[List[MemdumpEntry]] = None + process_seqid: StrictInt + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["dumps", "process_seqid"] + + 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 ProcessMemdumps 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 each item in dumps (list) + _items = [] + if self.dumps: + for _item_dumps in self.dumps: + if _item_dumps: + _items.append(_item_dumps.to_dict()) + _dict['dumps'] = _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(): + _dict[_key] = _value + + # set to None if dumps (nullable) is None + # and model_fields_set contains the field + if self.dumps is None and "dumps" in self.model_fields_set: + _dict['dumps'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ProcessMemdumps from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "dumps": [MemdumpEntry.from_dict(_item) for _item in obj["dumps"]] if obj.get("dumps") is not None else None, + "process_seqid": obj.get("process_seqid") + }) + # 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/process_node.py b/revengai/models/process_node.py new file mode 100644 index 00000000..6944612f --- /dev/null +++ b/revengai/models/process_node.py @@ -0,0 +1,148 @@ +# 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, StrictBool, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Optional, Set +from typing_extensions import Self + +class ProcessNode(BaseModel): + """ + ProcessNode + """ # noqa: E501 + args: Optional[List[StrictStr]] = None + attributed: StrictBool + children: Optional[List[ProcessNode]] = None + exit_code: Optional[StrictInt] = None + exit_code_str: Optional[StrictStr] = None + exited_at: Optional[Union[StrictFloat, StrictInt]] = None + killed_by: Optional[StrictInt] = None + name: Optional[StrictStr] + pid: StrictInt + seqid: StrictInt + started_at: Optional[Union[StrictFloat, StrictInt]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["args", "attributed", "children", "exit_code", "exit_code_str", "exited_at", "killed_by", "name", "pid", "seqid", "started_at"] + + 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 ProcessNode 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 each item in children (list) + _items = [] + if self.children: + for _item_children in self.children: + if _item_children: + _items.append(_item_children.to_dict()) + _dict['children'] = _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(): + _dict[_key] = _value + + # set to None if args (nullable) is None + # and model_fields_set contains the field + if self.args is None and "args" in self.model_fields_set: + _dict['args'] = None + + # set to None if children (nullable) is None + # and model_fields_set contains the field + if self.children is None and "children" in self.model_fields_set: + _dict['children'] = None + + # set to None if exit_code_str (nullable) is None + # and model_fields_set contains the field + if self.exit_code_str is None and "exit_code_str" in self.model_fields_set: + _dict['exit_code_str'] = None + + # set to None if name (nullable) is None + # and model_fields_set contains the field + if self.name is None and "name" in self.model_fields_set: + _dict['name'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ProcessNode from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "args": obj.get("args"), + "attributed": obj.get("attributed"), + "children": [ProcessNode.from_dict(_item) for _item in obj["children"]] if obj.get("children") is not None else None, + "exit_code": obj.get("exit_code"), + "exit_code_str": obj.get("exit_code_str"), + "exited_at": obj.get("exited_at"), + "killed_by": obj.get("killed_by"), + "name": obj.get("name"), + "pid": obj.get("pid"), + "seqid": obj.get("seqid"), + "started_at": obj.get("started_at") + }) + # 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 + +# TODO: Rewrite to not use raise_errors +ProcessNode.model_rebuild(raise_errors=False) + diff --git a/revengai/models/process_tree.py b/revengai/models/process_tree.py new file mode 100644 index 00000000..67304311 --- /dev/null +++ b/revengai/models/process_tree.py @@ -0,0 +1,114 @@ +# 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, StrictInt +from typing import Any, ClassVar, Dict, List, Optional +from revengai.models.process_node import ProcessNode +from typing import Optional, Set +from typing_extensions import Self + +class ProcessTree(BaseModel): + """ + ProcessTree + """ # noqa: E501 + nodes: Optional[List[ProcessNode]] = None + sample_seqid: Optional[StrictInt] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["nodes", "sample_seqid"] + + 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 ProcessTree 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 each item in nodes (list) + _items = [] + if self.nodes: + for _item_nodes in self.nodes: + if _item_nodes: + _items.append(_item_nodes.to_dict()) + _dict['nodes'] = _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(): + _dict[_key] = _value + + # set to None if nodes (nullable) is None + # and model_fields_set contains the field + if self.nodes is None and "nodes" in self.model_fields_set: + _dict['nodes'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ProcessTree from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "nodes": [ProcessNode.from_dict(_item) for _item in obj["nodes"]] if obj.get("nodes") is not None else None, + "sample_seqid": obj.get("sample_seqid") + }) + # 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/registry_operation.py b/revengai/models/registry_operation.py new file mode 100644 index 00000000..1d0d6999 --- /dev/null +++ b/revengai/models/registry_operation.py @@ -0,0 +1,119 @@ +# 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, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from revengai.models.report_event import ReportEvent +from typing import Optional, Set +from typing_extensions import Self + +class RegistryOperation(BaseModel): + """ + RegistryOperation + """ # noqa: E501 + events: Optional[List[ReportEvent]] = None + key: Optional[StrictStr] + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["events", "key"] + + 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 RegistryOperation 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 each item in events (list) + _items = [] + if self.events: + for _item_events in self.events: + if _item_events: + _items.append(_item_events.to_dict()) + _dict['events'] = _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(): + _dict[_key] = _value + + # set to None if events (nullable) is None + # and model_fields_set contains the field + if self.events is None and "events" in self.model_fields_set: + _dict['events'] = None + + # set to None if key (nullable) is None + # and model_fields_set contains the field + if self.key is None and "key" in self.model_fields_set: + _dict['key'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of RegistryOperation from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "events": [ReportEvent.from_dict(_item) for _item in obj["events"]] if obj.get("events") is not None else None, + "key": obj.get("key") + }) + # 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/report_event.py b/revengai/models/report_event.py new file mode 100644 index 00000000..ff67b6d2 --- /dev/null +++ b/revengai/models/report_event.py @@ -0,0 +1,139 @@ +# 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, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from revengai.models.api_call import ApiCall +from typing import Optional, Set +from typing_extensions import Self + +class ReportEvent(BaseModel): + """ + ReportEvent + """ # noqa: E501 + api_calls: Optional[List[ApiCall]] = None + process_seqid: Optional[StrictInt] = None + total_bytes_requested: Optional[StrictInt] = None + type: Optional[StrictStr] + value: Optional[StrictStr] = None + value_name: Optional[StrictStr] = None + write_count: Optional[StrictInt] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["api_calls", "process_seqid", "total_bytes_requested", "type", "value", "value_name", "write_count"] + + 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 ReportEvent 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 each item in api_calls (list) + _items = [] + if self.api_calls: + for _item_api_calls in self.api_calls: + if _item_api_calls: + _items.append(_item_api_calls.to_dict()) + _dict['api_calls'] = _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(): + _dict[_key] = _value + + # set to None if api_calls (nullable) is None + # and model_fields_set contains the field + if self.api_calls is None and "api_calls" in self.model_fields_set: + _dict['api_calls'] = None + + # set to None if type (nullable) is None + # and model_fields_set contains the field + if self.type is None and "type" in self.model_fields_set: + _dict['type'] = None + + # set to None if value (nullable) is None + # and model_fields_set contains the field + if self.value is None and "value" in self.model_fields_set: + _dict['value'] = None + + # set to None if value_name (nullable) is None + # and model_fields_set contains the field + if self.value_name is None and "value_name" in self.model_fields_set: + _dict['value_name'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ReportEvent from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "api_calls": [ApiCall.from_dict(_item) for _item in obj["api_calls"]] if obj.get("api_calls") is not None else None, + "process_seqid": obj.get("process_seqid"), + "total_bytes_requested": obj.get("total_bytes_requested"), + "type": obj.get("type"), + "value": obj.get("value"), + "value_name": obj.get("value_name"), + "write_count": obj.get("write_count") + }) + # 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/report_info.py b/revengai/models/report_info.py new file mode 100644 index 00000000..b819950d --- /dev/null +++ b/revengai/models/report_info.py @@ -0,0 +1,151 @@ +# 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, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from revengai.models.drakvuf_file_metadata import DrakvufFileMetadata +from revengai.models.report_options import ReportOptions +from typing import Optional, Set +from typing_extensions import Self + +class ReportInfo(BaseModel): + """ + ReportInfo + """ # noqa: E501 + file: Optional[DrakvufFileMetadata] = None + id: Optional[StrictStr] + options: Optional[ReportOptions] = None + os_profile: Optional[StrictStr] = None + status: Optional[StrictStr] = None + time_analysis_finished: Optional[StrictStr] = None + time_execution_started: Optional[StrictStr] = None + time_started: Optional[StrictStr] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["file", "id", "options", "os_profile", "status", "time_analysis_finished", "time_execution_started", "time_started"] + + 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 ReportInfo 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 file + if self.file: + _dict['file'] = self.file.to_dict() + # override the default output from pydantic by calling `to_dict()` of options + if self.options: + _dict['options'] = self.options.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 + + # set to None if id (nullable) is None + # and model_fields_set contains the field + if self.id is None and "id" in self.model_fields_set: + _dict['id'] = None + + # set to None if os_profile (nullable) is None + # and model_fields_set contains the field + if self.os_profile is None and "os_profile" in self.model_fields_set: + _dict['os_profile'] = None + + # set to None if status (nullable) is None + # and model_fields_set contains the field + if self.status is None and "status" in self.model_fields_set: + _dict['status'] = None + + # set to None if time_analysis_finished (nullable) is None + # and model_fields_set contains the field + if self.time_analysis_finished is None and "time_analysis_finished" in self.model_fields_set: + _dict['time_analysis_finished'] = None + + # set to None if time_execution_started (nullable) is None + # and model_fields_set contains the field + if self.time_execution_started is None and "time_execution_started" in self.model_fields_set: + _dict['time_execution_started'] = None + + # set to None if time_started (nullable) is None + # and model_fields_set contains the field + if self.time_started is None and "time_started" in self.model_fields_set: + _dict['time_started'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ReportInfo from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "file": DrakvufFileMetadata.from_dict(obj["file"]) if obj.get("file") is not None else None, + "id": obj.get("id"), + "options": ReportOptions.from_dict(obj["options"]) if obj.get("options") is not None else None, + "os_profile": obj.get("os_profile"), + "status": obj.get("status"), + "time_analysis_finished": obj.get("time_analysis_finished"), + "time_execution_started": obj.get("time_execution_started"), + "time_started": obj.get("time_started") + }) + # 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/report_options.py b/revengai/models/report_options.py new file mode 100644 index 00000000..080520f5 --- /dev/null +++ b/revengai/models/report_options.py @@ -0,0 +1,166 @@ +# 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, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ReportOptions(BaseModel): + """ + ReportOptions + """ # noqa: E501 + archive_entry_path: Optional[StrictStr] = None + extract_archive: Optional[StrictBool] = None + guest_target_directory: Optional[StrictStr] = None + guest_working_directory: Optional[StrictStr] = None + net_enable: Optional[StrictBool] = None + os_profile: Optional[StrictStr] = None + plugins: Optional[List[StrictStr]] = None + preset: Optional[StrictStr] = None + sample_filename: Optional[StrictStr] = None + start_command: Optional[StrictStr] = None + start_method: Optional[StrictStr] = None + timeout: Optional[StrictInt] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["archive_entry_path", "extract_archive", "guest_target_directory", "guest_working_directory", "net_enable", "os_profile", "plugins", "preset", "sample_filename", "start_command", "start_method", "timeout"] + + 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 ReportOptions 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 + + # set to None if archive_entry_path (nullable) is None + # and model_fields_set contains the field + if self.archive_entry_path is None and "archive_entry_path" in self.model_fields_set: + _dict['archive_entry_path'] = None + + # set to None if guest_target_directory (nullable) is None + # and model_fields_set contains the field + if self.guest_target_directory is None and "guest_target_directory" in self.model_fields_set: + _dict['guest_target_directory'] = None + + # set to None if guest_working_directory (nullable) is None + # and model_fields_set contains the field + if self.guest_working_directory is None and "guest_working_directory" in self.model_fields_set: + _dict['guest_working_directory'] = None + + # set to None if os_profile (nullable) is None + # and model_fields_set contains the field + if self.os_profile is None and "os_profile" in self.model_fields_set: + _dict['os_profile'] = None + + # set to None if plugins (nullable) is None + # and model_fields_set contains the field + if self.plugins is None and "plugins" in self.model_fields_set: + _dict['plugins'] = None + + # set to None if preset (nullable) is None + # and model_fields_set contains the field + if self.preset is None and "preset" in self.model_fields_set: + _dict['preset'] = None + + # set to None if sample_filename (nullable) is None + # and model_fields_set contains the field + if self.sample_filename is None and "sample_filename" in self.model_fields_set: + _dict['sample_filename'] = None + + # set to None if start_command (nullable) is None + # and model_fields_set contains the field + if self.start_command is None and "start_command" in self.model_fields_set: + _dict['start_command'] = None + + # set to None if start_method (nullable) is None + # and model_fields_set contains the field + if self.start_method is None and "start_method" in self.model_fields_set: + _dict['start_method'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ReportOptions 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"), + "extract_archive": obj.get("extract_archive"), + "guest_target_directory": obj.get("guest_target_directory"), + "guest_working_directory": obj.get("guest_working_directory"), + "net_enable": obj.get("net_enable"), + "os_profile": obj.get("os_profile"), + "plugins": obj.get("plugins"), + "preset": obj.get("preset"), + "sample_filename": obj.get("sample_filename"), + "start_command": obj.get("start_command"), + "start_method": obj.get("start_method"), + "timeout": obj.get("timeout") + }) + # 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/sandbox_options.py b/revengai/models/sandbox_options.py index aff7e449..4763be9c 100644 --- a/revengai/models/sandbox_options.py +++ b/revengai/models/sandbox_options.py @@ -18,6 +18,8 @@ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional +from revengai.models.sandbox_start_method import SandboxStartMethod +from revengai.models.sandbox_timeout import SandboxTimeout from typing import Optional, Set from typing_extensions import Self @@ -27,7 +29,9 @@ class SandboxOptions(BaseModel): """ # noqa: E501 enabled: Optional[StrictBool] = False command_line_args: Optional[StrictStr] = Field(default='', description="The command line parameters to pass to the dynamic execution sandbox. Requires `sandbox` to be True.") - __properties: ClassVar[List[str]] = ["enabled", "command_line_args"] + start_method: Optional[SandboxStartMethod] = None + timeout: Optional[SandboxTimeout] = Field(default=None, description="Maximum execution time for the sandbox run, in seconds. Allowed values: 120 (2m), 180 (3m), 300 (5m), 600 (10m).") + __properties: ClassVar[List[str]] = ["enabled", "command_line_args", "start_method", "timeout"] model_config = ConfigDict( populate_by_name=True, @@ -68,6 +72,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # set to None if start_method (nullable) is None + # and model_fields_set contains the field + if self.start_method is None and "start_method" in self.model_fields_set: + _dict['start_method'] = None + return _dict @classmethod @@ -81,7 +90,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "enabled": obj.get("enabled") if obj.get("enabled") is not None else False, - "command_line_args": obj.get("command_line_args") if obj.get("command_line_args") is not None else '' + "command_line_args": obj.get("command_line_args") if obj.get("command_line_args") is not None else '', + "start_method": obj.get("start_method"), + "timeout": obj.get("timeout") }) return _obj diff --git a/revengai/models/sandbox_start_method.py b/revengai/models/sandbox_start_method.py new file mode 100644 index 00000000..fa9f71e5 --- /dev/null +++ b/revengai/models/sandbox_start_method.py @@ -0,0 +1,36 @@ +# 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 json +from enum import Enum +from typing_extensions import Self + + +class SandboxStartMethod(str, Enum): + """ + SandboxStartMethod + """ + + """ + allowed enum values + """ + STANDARD_USER_PROCESS = 'standard_user_process' + ADMINISTRATOR_PROCESS = 'administrator_process' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of SandboxStartMethod from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/revengai/models/sandbox_timeout.py b/revengai/models/sandbox_timeout.py new file mode 100644 index 00000000..154f9e05 --- /dev/null +++ b/revengai/models/sandbox_timeout.py @@ -0,0 +1,38 @@ +# 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 json +from enum import Enum +from typing_extensions import Self + + +class SandboxTimeout(int, Enum): + """ + SandboxTimeout + """ + + """ + allowed enum values + """ + NUMBER_120 = 120 + NUMBER_180 = 180 + NUMBER_300 = 300 + NUMBER_600 = 600 + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of SandboxTimeout from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/revengai/models/scheduled_task_entry.py b/revengai/models/scheduled_task_entry.py new file mode 100644 index 00000000..d7edf1e7 --- /dev/null +++ b/revengai/models/scheduled_task_entry.py @@ -0,0 +1,182 @@ +# 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, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from revengai.models.report_event import ReportEvent +from typing import Optional, Set +from typing_extensions import Self + +class ScheduledTaskEntry(BaseModel): + """ + ScheduledTaskEntry + """ # noqa: E501 + command: Optional[StrictStr] = None + day: Optional[StrictStr] = None + end_date: Optional[StrictStr] = None + events: Optional[List[ReportEvent]] = None + executable: Optional[StrictStr] = None + modifier: Optional[StrictStr] = None + run_as: Optional[StrictStr] = None + schedule_type: Optional[StrictStr] = None + start_date: Optional[StrictStr] = None + start_time: Optional[StrictStr] = None + task_name: Optional[StrictStr] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["command", "day", "end_date", "events", "executable", "modifier", "run_as", "schedule_type", "start_date", "start_time", "task_name"] + + 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 ScheduledTaskEntry 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 each item in events (list) + _items = [] + if self.events: + for _item_events in self.events: + if _item_events: + _items.append(_item_events.to_dict()) + _dict['events'] = _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(): + _dict[_key] = _value + + # set to None if command (nullable) is None + # and model_fields_set contains the field + if self.command is None and "command" in self.model_fields_set: + _dict['command'] = None + + # set to None if day (nullable) is None + # and model_fields_set contains the field + if self.day is None and "day" in self.model_fields_set: + _dict['day'] = None + + # set to None if end_date (nullable) is None + # and model_fields_set contains the field + if self.end_date is None and "end_date" in self.model_fields_set: + _dict['end_date'] = None + + # set to None if events (nullable) is None + # and model_fields_set contains the field + if self.events is None and "events" in self.model_fields_set: + _dict['events'] = None + + # set to None if executable (nullable) is None + # and model_fields_set contains the field + if self.executable is None and "executable" in self.model_fields_set: + _dict['executable'] = None + + # set to None if modifier (nullable) is None + # and model_fields_set contains the field + if self.modifier is None and "modifier" in self.model_fields_set: + _dict['modifier'] = None + + # set to None if run_as (nullable) is None + # and model_fields_set contains the field + if self.run_as is None and "run_as" in self.model_fields_set: + _dict['run_as'] = None + + # set to None if schedule_type (nullable) is None + # and model_fields_set contains the field + if self.schedule_type is None and "schedule_type" in self.model_fields_set: + _dict['schedule_type'] = None + + # set to None if start_date (nullable) is None + # and model_fields_set contains the field + if self.start_date is None and "start_date" in self.model_fields_set: + _dict['start_date'] = None + + # set to None if start_time (nullable) is None + # and model_fields_set contains the field + if self.start_time is None and "start_time" in self.model_fields_set: + _dict['start_time'] = None + + # set to None if task_name (nullable) is None + # and model_fields_set contains the field + if self.task_name is None and "task_name" in self.model_fields_set: + _dict['task_name'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ScheduledTaskEntry from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "command": obj.get("command"), + "day": obj.get("day"), + "end_date": obj.get("end_date"), + "events": [ReportEvent.from_dict(_item) for _item in obj["events"]] if obj.get("events") is not None else None, + "executable": obj.get("executable"), + "modifier": obj.get("modifier"), + "run_as": obj.get("run_as"), + "schedule_type": obj.get("schedule_type"), + "start_date": obj.get("start_date"), + "start_time": obj.get("start_time"), + "task_name": obj.get("task_name") + }) + # 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/service_entry.py b/revengai/models/service_entry.py new file mode 100644 index 00000000..8999ec8d --- /dev/null +++ b/revengai/models/service_entry.py @@ -0,0 +1,147 @@ +# 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, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from revengai.models.report_event import ReportEvent +from typing import Optional, Set +from typing_extensions import Self + +class ServiceEntry(BaseModel): + """ + ServiceEntry + """ # noqa: E501 + binary_path: Optional[StrictStr] = None + display_name: Optional[StrictStr] = None + events: Optional[List[ReportEvent]] = None + name: Optional[StrictStr] = None + service_type: Optional[StrictStr] = None + start_type: Optional[StrictStr] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["binary_path", "display_name", "events", "name", "service_type", "start_type"] + + 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 ServiceEntry 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 each item in events (list) + _items = [] + if self.events: + for _item_events in self.events: + if _item_events: + _items.append(_item_events.to_dict()) + _dict['events'] = _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(): + _dict[_key] = _value + + # set to None if binary_path (nullable) is None + # and model_fields_set contains the field + if self.binary_path is None and "binary_path" in self.model_fields_set: + _dict['binary_path'] = None + + # set to None if display_name (nullable) is None + # and model_fields_set contains the field + if self.display_name is None and "display_name" in self.model_fields_set: + _dict['display_name'] = None + + # set to None if events (nullable) is None + # and model_fields_set contains the field + if self.events is None and "events" in self.model_fields_set: + _dict['events'] = None + + # set to None if name (nullable) is None + # and model_fields_set contains the field + if self.name is None and "name" in self.model_fields_set: + _dict['name'] = None + + # set to None if service_type (nullable) is None + # and model_fields_set contains the field + if self.service_type is None and "service_type" in self.model_fields_set: + _dict['service_type'] = None + + # set to None if start_type (nullable) is None + # and model_fields_set contains the field + if self.start_type is None and "start_type" in self.model_fields_set: + _dict['start_type'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ServiceEntry from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "binary_path": obj.get("binary_path"), + "display_name": obj.get("display_name"), + "events": [ReportEvent.from_dict(_item) for _item in obj["events"]] if obj.get("events") is not None else None, + "name": obj.get("name"), + "service_type": obj.get("service_type"), + "start_type": obj.get("start_type") + }) + # 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/startup_info.py b/revengai/models/startup_info.py new file mode 100644 index 00000000..2ab615d3 --- /dev/null +++ b/revengai/models/startup_info.py @@ -0,0 +1,136 @@ +# 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, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class StartupInfo(BaseModel): + """ + StartupInfo + """ # noqa: E501 + arguments: Optional[StrictStr] = None + error: Optional[StrictStr] = None + error_code: Optional[StrictStr] = None + pid: Optional[StrictInt] = None + process: Optional[StrictInt] = None + process_name: Optional[StrictStr] = None + status: Optional[StrictStr] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["arguments", "error", "error_code", "pid", "process", "process_name", "status"] + + 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 StartupInfo 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 + + # set to None if arguments (nullable) is None + # and model_fields_set contains the field + if self.arguments is None and "arguments" in self.model_fields_set: + _dict['arguments'] = None + + # set to None if error (nullable) is None + # and model_fields_set contains the field + if self.error is None and "error" in self.model_fields_set: + _dict['error'] = None + + # set to None if error_code (nullable) is None + # and model_fields_set contains the field + if self.error_code is None and "error_code" in self.model_fields_set: + _dict['error_code'] = None + + # set to None if process_name (nullable) is None + # and model_fields_set contains the field + if self.process_name is None and "process_name" in self.model_fields_set: + _dict['process_name'] = None + + # set to None if status (nullable) is None + # and model_fields_set contains the field + if self.status is None and "status" in self.model_fields_set: + _dict['status'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of StartupInfo from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "arguments": obj.get("arguments"), + "error": obj.get("error"), + "error_code": obj.get("error_code"), + "pid": obj.get("pid"), + "process": obj.get("process"), + "process_name": obj.get("process_name"), + "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/ttp.py b/revengai/models/ttp.py new file mode 100644 index 00000000..54b5e0f3 --- /dev/null +++ b/revengai/models/ttp.py @@ -0,0 +1,134 @@ +# 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 +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class Ttp(BaseModel): + """ + Ttp + """ # noqa: E501 + attck: Optional[List[StrictStr]] = Field(default=None, alias="att&ck") + mbc: Optional[List[Any]] = None + name: Optional[StrictStr] = None + namespace: Optional[StrictStr] = None + process_seqids: Optional[List[StrictInt]] = None + score: StrictInt + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["att&ck", "mbc", "name", "namespace", "process_seqids", "score"] + + 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 Ttp 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 + + # set to None if attck (nullable) is None + # and model_fields_set contains the field + if self.attck is None and "attck" in self.model_fields_set: + _dict['att&ck'] = None + + # set to None if mbc (nullable) is None + # and model_fields_set contains the field + if self.mbc is None and "mbc" in self.model_fields_set: + _dict['mbc'] = None + + # set to None if name (nullable) is None + # and model_fields_set contains the field + if self.name is None and "name" in self.model_fields_set: + _dict['name'] = None + + # set to None if namespace (nullable) is None + # and model_fields_set contains the field + if self.namespace is None and "namespace" in self.model_fields_set: + _dict['namespace'] = None + + # set to None if process_seqids (nullable) is None + # and model_fields_set contains the field + if self.process_seqids is None and "process_seqids" in self.model_fields_set: + _dict['process_seqids'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Ttp from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "att&ck": obj.get("att&ck"), + "mbc": obj.get("mbc"), + "name": obj.get("name"), + "namespace": obj.get("namespace"), + "process_seqids": obj.get("process_seqids"), + "score": obj.get("score") + }) + # 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/test/test_analysis_config.py b/test/test_analysis_config.py index 22102c45..0a74e1e1 100644 --- a/test/test_analysis_config.py +++ b/test/test_analysis_config.py @@ -43,7 +43,9 @@ def make_instance(self, include_optional) -> AnalysisConfig: advanced_analysis = True, sandbox_config = revengai.models.sandbox_options.SandboxOptions( enabled = True, - command_line_args = '', ) + command_line_args = '', + start_method = 'standard_user_process', + timeout = 120, ) ) else: return AnalysisConfig( diff --git a/test/test_analysis_create_request.py b/test/test_analysis_create_request.py index 444fa34f..e7be6b65 100644 --- a/test/test_analysis_create_request.py +++ b/test/test_analysis_create_request.py @@ -61,7 +61,9 @@ def make_instance(self, include_optional) -> AnalysisCreateRequest: advanced_analysis = True, sandbox_config = revengai.models.sandbox_options.SandboxOptions( enabled = True, - command_line_args = '', ), ), + command_line_args = '', + start_method = 'standard_user_process', + timeout = 120, ), ), binary_config = revengai.models.binary_config.BinaryConfig( isa = 'x86', platform = 'linux', diff --git a/test/test_analysis_report.py b/test/test_analysis_report.py new file mode 100644 index 00000000..1999e952 --- /dev/null +++ b/test/test_analysis_report.py @@ -0,0 +1,111 @@ +# 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 + + +import unittest + +from revengai.models.analysis_report import AnalysisReport + +class TestAnalysisReport(unittest.TestCase): + """AnalysisReport unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AnalysisReport: + """Test AnalysisReport + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AnalysisReport` + """ + model = AnalysisReport() + if include_optional: + return AnalysisReport( + file_activity = [ + { + 'key' : null + } + ], + info = { + 'key' : null + }, + memdumps = [ + { + 'key' : null + } + ], + module_load_addresses = [ + { + 'key' : null + } + ], + mutexes = [ + { + 'key' : null + } + ], + network_activity = { + 'key' : null + }, + process_activity = [ + { + 'key' : null + } + ], + process_tree = { + 'key' : null + }, + registry_operations = [ + { + 'key' : null + } + ], + scheduled_tasks = [ + { + 'key' : null + } + ], + services = [ + { + 'key' : null + } + ], + startup = { + 'key' : null + }, + threat_score = 56, + ttps = [ + { + 'key' : null + } + ] + ) + else: + return AnalysisReport( + info = { + 'key' : null + }, + threat_score = 56, + ) + """ + + def testAnalysisReport(self): + """Test AnalysisReport""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_api_call.py b/test/test_api_call.py new file mode 100644 index 00000000..9925f955 --- /dev/null +++ b/test/test_api_call.py @@ -0,0 +1,54 @@ +# 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 + + +import unittest + +from revengai.models.api_call import ApiCall + +class TestApiCall(unittest.TestCase): + """ApiCall unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ApiCall: + """Test ApiCall + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ApiCall` + """ + model = ApiCall() + if include_optional: + return ApiCall( + called_from = '', + called_from_rva = '', + from_module = '', + method = '' + ) + else: + return ApiCall( + method = '', + ) + """ + + def testApiCall(self): + """Test ApiCall""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_connection.py b/test/test_connection.py new file mode 100644 index 00000000..df5d1c45 --- /dev/null +++ b/test/test_connection.py @@ -0,0 +1,64 @@ +# 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 + + +import unittest + +from revengai.models.connection import Connection + +class TestConnection(unittest.TestCase): + """Connection unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Connection: + """Test Connection + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `Connection` + """ + model = Connection() + if include_optional: + return Connection( + events = [ + { + 'key' : null + } + ], + local_ip = '', + local_port = None, + protocol = '', + remote_ip = '', + remote_port = None + ) + else: + return Connection( + local_ip = '', + local_port = None, + protocol = '', + remote_ip = '', + remote_port = None, + ) + """ + + def testConnection(self): + """Test Connection""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_dns_query.py b/test/test_dns_query.py new file mode 100644 index 00000000..c3363b10 --- /dev/null +++ b/test/test_dns_query.py @@ -0,0 +1,56 @@ +# 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 + + +import unittest + +from revengai.models.dns_query import DnsQuery + +class TestDnsQuery(unittest.TestCase): + """DnsQuery unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DnsQuery: + """Test DnsQuery + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `DnsQuery` + """ + model = DnsQuery() + if include_optional: + return DnsQuery( + domain = '', + events = [ + { + 'key' : null + } + ] + ) + else: + return DnsQuery( + domain = '', + ) + """ + + def testDnsQuery(self): + """Test DnsQuery""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_drakvuf_file_metadata.py b/test/test_drakvuf_file_metadata.py new file mode 100644 index 00000000..46790b10 --- /dev/null +++ b/test/test_drakvuf_file_metadata.py @@ -0,0 +1,56 @@ +# 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 + + +import unittest + +from revengai.models.drakvuf_file_metadata import DrakvufFileMetadata + +class TestDrakvufFileMetadata(unittest.TestCase): + """DrakvufFileMetadata unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DrakvufFileMetadata: + """Test DrakvufFileMetadata + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `DrakvufFileMetadata` + """ + model = DrakvufFileMetadata() + if include_optional: + return DrakvufFileMetadata( + mime_type = '', + name = '', + sha256 = '', + type = '', + type_id = '' + ) + else: + return DrakvufFileMetadata( + name = '', + sha256 = '', + ) + """ + + def testDrakvufFileMetadata(self): + """Test DrakvufFileMetadata""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_dynamic_execution_status_response.py b/test/test_dynamic_execution_status_response.py new file mode 100644 index 00000000..1af16c38 --- /dev/null +++ b/test/test_dynamic_execution_status_response.py @@ -0,0 +1,52 @@ +# 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 + + +import unittest + +from revengai.models.dynamic_execution_status_response import DynamicExecutionStatusResponse + +class TestDynamicExecutionStatusResponse(unittest.TestCase): + """DynamicExecutionStatusResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DynamicExecutionStatusResponse: + """Test DynamicExecutionStatusResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `DynamicExecutionStatusResponse` + """ + model = DynamicExecutionStatusResponse() + if include_optional: + return DynamicExecutionStatusResponse( + error_message = '', + status = '' + ) + else: + return DynamicExecutionStatusResponse( + status = '', + ) + """ + + def testDynamicExecutionStatusResponse(self): + """Test DynamicExecutionStatusResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_extracted_url.py b/test/test_extracted_url.py new file mode 100644 index 00000000..e74061a9 --- /dev/null +++ b/test/test_extracted_url.py @@ -0,0 +1,56 @@ +# 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 + + +import unittest + +from revengai.models.extracted_url import ExtractedURL + +class TestExtractedURL(unittest.TestCase): + """ExtractedURL unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ExtractedURL: + """Test ExtractedURL + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ExtractedURL` + """ + model = ExtractedURL() + if include_optional: + return ExtractedURL( + events = [ + { + 'key' : null + } + ], + url = '' + ) + else: + return ExtractedURL( + url = '', + ) + """ + + def testExtractedURL(self): + """Test ExtractedURL""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_file_activity_entry.py b/test/test_file_activity_entry.py new file mode 100644 index 00000000..35c2d924 --- /dev/null +++ b/test/test_file_activity_entry.py @@ -0,0 +1,56 @@ +# 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 + + +import unittest + +from revengai.models.file_activity_entry import FileActivityEntry + +class TestFileActivityEntry(unittest.TestCase): + """FileActivityEntry unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> FileActivityEntry: + """Test FileActivityEntry + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `FileActivityEntry` + """ + model = FileActivityEntry() + if include_optional: + return FileActivityEntry( + events = [ + { + 'key' : null + } + ], + path = '' + ) + else: + return FileActivityEntry( + path = '', + ) + """ + + def testFileActivityEntry(self): + """Test FileActivityEntry""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_http_request.py b/test/test_http_request.py new file mode 100644 index 00000000..a3849832 --- /dev/null +++ b/test/test_http_request.py @@ -0,0 +1,71 @@ +# 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 + + +import unittest + +from revengai.models.http_request import HttpRequest + +class TestHttpRequest(unittest.TestCase): + """HttpRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> HttpRequest: + """Test HttpRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `HttpRequest` + """ + model = HttpRequest() + if include_optional: + return HttpRequest( + events = [ + { + 'key' : null + } + ], + extra_headers = [ + '' + ], + flags = 56, + password = '', + path = '', + post_data = '', + proxy = '', + proxy_bypass = '', + referer = '', + server_name = '', + server_port = 56, + service = 56, + user_agent = '', + username = '', + verb = '', + version = '' + ) + else: + return HttpRequest( + ) + """ + + def testHttpRequest(self): + """Test HttpRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_memdump_entry.py b/test/test_memdump_entry.py new file mode 100644 index 00000000..aeaa59b5 --- /dev/null +++ b/test/test_memdump_entry.py @@ -0,0 +1,67 @@ +# 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 + + +import unittest + +from revengai.models.memdump_entry import MemdumpEntry + +class TestMemdumpEntry(unittest.TestCase): + """MemdumpEntry unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> MemdumpEntry: + """Test MemdumpEntry + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `MemdumpEntry` + """ + model = MemdumpEntry() + if include_optional: + return MemdumpEntry( + address = '', + dump_reason = '', + file_type = '', + filename = '', + index = 56, + is_pe = True, + method = '', + mime_type = '', + sha256 = '', + size = 56, + target_addr = '', + target_process = 56 + ) + else: + return MemdumpEntry( + address = '', + dump_reason = '', + filename = '', + index = 56, + method = '', + size = 56, + ) + """ + + def testMemdumpEntry(self): + """Test MemdumpEntry""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_module_load_entry.py b/test/test_module_load_entry.py new file mode 100644 index 00000000..e718041f --- /dev/null +++ b/test/test_module_load_entry.py @@ -0,0 +1,56 @@ +# 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 + + +import unittest + +from revengai.models.module_load_entry import ModuleLoadEntry + +class TestModuleLoadEntry(unittest.TestCase): + """ModuleLoadEntry unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ModuleLoadEntry: + """Test ModuleLoadEntry + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ModuleLoadEntry` + """ + model = ModuleLoadEntry() + if include_optional: + return ModuleLoadEntry( + modules = { + 'key' : '' + }, + pid = 56, + process_name = '', + process_seqid = 56 + ) + else: + return ModuleLoadEntry( + pid = 56, + ) + """ + + def testModuleLoadEntry(self): + """Test ModuleLoadEntry""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_mutex_entry.py b/test/test_mutex_entry.py new file mode 100644 index 00000000..f41cad94 --- /dev/null +++ b/test/test_mutex_entry.py @@ -0,0 +1,56 @@ +# 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 + + +import unittest + +from revengai.models.mutex_entry import MutexEntry + +class TestMutexEntry(unittest.TestCase): + """MutexEntry unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> MutexEntry: + """Test MutexEntry + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `MutexEntry` + """ + model = MutexEntry() + if include_optional: + return MutexEntry( + events = [ + { + 'key' : null + } + ], + name = '' + ) + else: + return MutexEntry( + name = '', + ) + """ + + def testMutexEntry(self): + """Test MutexEntry""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_network_activity.py b/test/test_network_activity.py new file mode 100644 index 00000000..51c788d5 --- /dev/null +++ b/test/test_network_activity.py @@ -0,0 +1,69 @@ +# 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 + + +import unittest + +from revengai.models.network_activity import NetworkActivity + +class TestNetworkActivity(unittest.TestCase): + """NetworkActivity unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> NetworkActivity: + """Test NetworkActivity + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `NetworkActivity` + """ + model = NetworkActivity() + if include_optional: + return NetworkActivity( + connections = [ + { + 'key' : null + } + ], + dns_queries = [ + { + 'key' : null + } + ], + extracted_urls = [ + { + 'key' : null + } + ], + http_requests = [ + { + 'key' : null + } + ] + ) + else: + return NetworkActivity( + ) + """ + + def testNetworkActivity(self): + """Test NetworkActivity""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_process_activity_entry.py b/test/test_process_activity_entry.py new file mode 100644 index 00000000..b16433c2 --- /dev/null +++ b/test/test_process_activity_entry.py @@ -0,0 +1,65 @@ +# 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 + + +import unittest + +from revengai.models.process_activity_entry import ProcessActivityEntry + +class TestProcessActivityEntry(unittest.TestCase): + """ProcessActivityEntry unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ProcessActivityEntry: + """Test ProcessActivityEntry + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ProcessActivityEntry` + """ + model = ProcessActivityEntry() + if include_optional: + return ProcessActivityEntry( + args = [ + '' + ], + child_seqid = 56, + events = [ + { + 'key' : null + } + ], + exit_code = 56, + exit_code_str = '', + name = '', + pid = 56 + ) + else: + return ProcessActivityEntry( + child_seqid = 56, + name = '', + pid = 56, + ) + """ + + def testProcessActivityEntry(self): + """Test ProcessActivityEntry""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_process_memdumps.py b/test/test_process_memdumps.py new file mode 100644 index 00000000..e8e9a790 --- /dev/null +++ b/test/test_process_memdumps.py @@ -0,0 +1,56 @@ +# 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 + + +import unittest + +from revengai.models.process_memdumps import ProcessMemdumps + +class TestProcessMemdumps(unittest.TestCase): + """ProcessMemdumps unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ProcessMemdumps: + """Test ProcessMemdumps + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ProcessMemdumps` + """ + model = ProcessMemdumps() + if include_optional: + return ProcessMemdumps( + dumps = [ + { + 'key' : null + } + ], + process_seqid = 56 + ) + else: + return ProcessMemdumps( + process_seqid = 56, + ) + """ + + def testProcessMemdumps(self): + """Test ProcessMemdumps""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_process_node.py b/test/test_process_node.py new file mode 100644 index 00000000..3efe0c71 --- /dev/null +++ b/test/test_process_node.py @@ -0,0 +1,70 @@ +# 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 + + +import unittest + +from revengai.models.process_node import ProcessNode + +class TestProcessNode(unittest.TestCase): + """ProcessNode unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ProcessNode: + """Test ProcessNode + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ProcessNode` + """ + model = ProcessNode() + if include_optional: + return ProcessNode( + args = [ + '' + ], + attributed = True, + children = [ + { + 'key' : null + } + ], + exit_code = 56, + exit_code_str = '', + exited_at = 1.337, + killed_by = 56, + name = '', + pid = 56, + seqid = 56, + started_at = 1.337 + ) + else: + return ProcessNode( + attributed = True, + name = '', + pid = 56, + seqid = 56, + ) + """ + + def testProcessNode(self): + """Test ProcessNode""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_process_tree.py b/test/test_process_tree.py new file mode 100644 index 00000000..705461e1 --- /dev/null +++ b/test/test_process_tree.py @@ -0,0 +1,55 @@ +# 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 + + +import unittest + +from revengai.models.process_tree import ProcessTree + +class TestProcessTree(unittest.TestCase): + """ProcessTree unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ProcessTree: + """Test ProcessTree + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ProcessTree` + """ + model = ProcessTree() + if include_optional: + return ProcessTree( + nodes = [ + { + 'key' : null + } + ], + sample_seqid = 56 + ) + else: + return ProcessTree( + ) + """ + + def testProcessTree(self): + """Test ProcessTree""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_registry_operation.py b/test/test_registry_operation.py new file mode 100644 index 00000000..5b19977c --- /dev/null +++ b/test/test_registry_operation.py @@ -0,0 +1,56 @@ +# 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 + + +import unittest + +from revengai.models.registry_operation import RegistryOperation + +class TestRegistryOperation(unittest.TestCase): + """RegistryOperation unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> RegistryOperation: + """Test RegistryOperation + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `RegistryOperation` + """ + model = RegistryOperation() + if include_optional: + return RegistryOperation( + events = [ + { + 'key' : null + } + ], + key = '' + ) + else: + return RegistryOperation( + key = '', + ) + """ + + def testRegistryOperation(self): + """Test RegistryOperation""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_report_event.py b/test/test_report_event.py new file mode 100644 index 00000000..dbd27d07 --- /dev/null +++ b/test/test_report_event.py @@ -0,0 +1,61 @@ +# 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 + + +import unittest + +from revengai.models.report_event import ReportEvent + +class TestReportEvent(unittest.TestCase): + """ReportEvent unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ReportEvent: + """Test ReportEvent + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ReportEvent` + """ + model = ReportEvent() + if include_optional: + return ReportEvent( + api_calls = [ + { + 'key' : null + } + ], + process_seqid = 56, + total_bytes_requested = 56, + type = '', + value = '', + value_name = '', + write_count = 56 + ) + else: + return ReportEvent( + type = '', + ) + """ + + def testReportEvent(self): + """Test ReportEvent""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_report_info.py b/test/test_report_info.py new file mode 100644 index 00000000..29916a11 --- /dev/null +++ b/test/test_report_info.py @@ -0,0 +1,62 @@ +# 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 + + +import unittest + +from revengai.models.report_info import ReportInfo + +class TestReportInfo(unittest.TestCase): + """ReportInfo unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ReportInfo: + """Test ReportInfo + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ReportInfo` + """ + model = ReportInfo() + if include_optional: + return ReportInfo( + file = { + 'key' : null + }, + id = '', + options = { + 'key' : null + }, + os_profile = '', + status = '', + time_analysis_finished = '', + time_execution_started = '', + time_started = '' + ) + else: + return ReportInfo( + id = '', + ) + """ + + def testReportInfo(self): + """Test ReportInfo""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_report_options.py b/test/test_report_options.py new file mode 100644 index 00000000..d0dc4b42 --- /dev/null +++ b/test/test_report_options.py @@ -0,0 +1,63 @@ +# 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 + + +import unittest + +from revengai.models.report_options import ReportOptions + +class TestReportOptions(unittest.TestCase): + """ReportOptions unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ReportOptions: + """Test ReportOptions + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ReportOptions` + """ + model = ReportOptions() + if include_optional: + return ReportOptions( + archive_entry_path = '', + extract_archive = True, + guest_target_directory = '', + guest_working_directory = '', + net_enable = True, + os_profile = '', + plugins = [ + '' + ], + preset = '', + sample_filename = '', + start_command = '', + start_method = '', + timeout = 56 + ) + else: + return ReportOptions( + ) + """ + + def testReportOptions(self): + """Test ReportOptions""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_sandbox_options.py b/test/test_sandbox_options.py index d222b069..2f7f14cb 100644 --- a/test/test_sandbox_options.py +++ b/test/test_sandbox_options.py @@ -35,7 +35,9 @@ def make_instance(self, include_optional) -> SandboxOptions: if include_optional: return SandboxOptions( enabled = True, - command_line_args = '' + command_line_args = '', + start_method = 'standard_user_process', + timeout = 120 ) else: return SandboxOptions( diff --git a/test/test_sandbox_start_method.py b/test/test_sandbox_start_method.py new file mode 100644 index 00000000..f5e8a502 --- /dev/null +++ b/test/test_sandbox_start_method.py @@ -0,0 +1,32 @@ +# 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 + + +import unittest + +from revengai.models.sandbox_start_method import SandboxStartMethod + +class TestSandboxStartMethod(unittest.TestCase): + """SandboxStartMethod unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testSandboxStartMethod(self): + """Test SandboxStartMethod""" + # inst = SandboxStartMethod() + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_sandbox_timeout.py b/test/test_sandbox_timeout.py new file mode 100644 index 00000000..eb3d939d --- /dev/null +++ b/test/test_sandbox_timeout.py @@ -0,0 +1,32 @@ +# 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 + + +import unittest + +from revengai.models.sandbox_timeout import SandboxTimeout + +class TestSandboxTimeout(unittest.TestCase): + """SandboxTimeout unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testSandboxTimeout(self): + """Test SandboxTimeout""" + # inst = SandboxTimeout() + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_scheduled_task_entry.py b/test/test_scheduled_task_entry.py new file mode 100644 index 00000000..610ac58f --- /dev/null +++ b/test/test_scheduled_task_entry.py @@ -0,0 +1,64 @@ +# 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 + + +import unittest + +from revengai.models.scheduled_task_entry import ScheduledTaskEntry + +class TestScheduledTaskEntry(unittest.TestCase): + """ScheduledTaskEntry unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ScheduledTaskEntry: + """Test ScheduledTaskEntry + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ScheduledTaskEntry` + """ + model = ScheduledTaskEntry() + if include_optional: + return ScheduledTaskEntry( + command = '', + day = '', + end_date = '', + events = [ + { + 'key' : null + } + ], + executable = '', + modifier = '', + run_as = '', + schedule_type = '', + start_date = '', + start_time = '', + task_name = '' + ) + else: + return ScheduledTaskEntry( + ) + """ + + def testScheduledTaskEntry(self): + """Test ScheduledTaskEntry""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_service_entry.py b/test/test_service_entry.py new file mode 100644 index 00000000..98544875 --- /dev/null +++ b/test/test_service_entry.py @@ -0,0 +1,59 @@ +# 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 + + +import unittest + +from revengai.models.service_entry import ServiceEntry + +class TestServiceEntry(unittest.TestCase): + """ServiceEntry unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ServiceEntry: + """Test ServiceEntry + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ServiceEntry` + """ + model = ServiceEntry() + if include_optional: + return ServiceEntry( + binary_path = '', + display_name = '', + events = [ + { + 'key' : null + } + ], + name = '', + service_type = '', + start_type = '' + ) + else: + return ServiceEntry( + ) + """ + + def testServiceEntry(self): + """Test ServiceEntry""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_startup_info.py b/test/test_startup_info.py new file mode 100644 index 00000000..abc236e7 --- /dev/null +++ b/test/test_startup_info.py @@ -0,0 +1,56 @@ +# 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 + + +import unittest + +from revengai.models.startup_info import StartupInfo + +class TestStartupInfo(unittest.TestCase): + """StartupInfo unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> StartupInfo: + """Test StartupInfo + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `StartupInfo` + """ + model = StartupInfo() + if include_optional: + return StartupInfo( + arguments = '', + error = '', + error_code = '', + pid = 56, + process = 56, + process_name = '', + status = '' + ) + else: + return StartupInfo( + ) + """ + + def testStartupInfo(self): + """Test StartupInfo""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_ttp.py b/test/test_ttp.py new file mode 100644 index 00000000..696adb60 --- /dev/null +++ b/test/test_ttp.py @@ -0,0 +1,62 @@ +# 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 + + +import unittest + +from revengai.models.ttp import Ttp + +class TestTtp(unittest.TestCase): + """Ttp unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Ttp: + """Test Ttp + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `Ttp` + """ + model = Ttp() + if include_optional: + return Ttp( + attck = [ + '' + ], + mbc = [ + null + ], + name = '', + namespace = '', + process_seqids = [ + 56 + ], + score = 56 + ) + else: + return Ttp( + score = 56, + ) + """ + + def testTtp(self): + """Test Ttp""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main()