diff --git a/.sdk-version b/.sdk-version index b1d18bc..b77e3cc 100644 --- a/.sdk-version +++ b/.sdk-version @@ -1 +1 @@ -v2.3.0 +v2.8.0 diff --git a/README.md b/README.md index cd86602..b267022 100644 --- a/README.md +++ b/README.md @@ -47,7 +47,6 @@ Class | Method | HTTP request | Description *AnalysesCommentsApi* | [**update_analysis_comment**](docs/AnalysesCommentsApi.md#update_analysis_comment) | **PATCH** /v2/analyses/{analysis_id}/comments/{comment_id} | Update a comment *AnalysesCoreApi* | [**create_analysis**](docs/AnalysesCoreApi.md#create_analysis) | **POST** /v2/analyses | Create Analysis *AnalysesCoreApi* | [**delete_analysis**](docs/AnalysesCoreApi.md#delete_analysis) | **DELETE** /v2/analyses/{analysis_id} | Delete Analysis -*AnalysesCoreApi* | [**find_similar_functions_batch**](docs/AnalysesCoreApi.md#find_similar_functions_batch) | **POST** /v2/analyses/{analysis_id}/similarity/functions | Batch Symbol ANN using Analysis ID *AnalysesCoreApi* | [**get_analysis_basic_info**](docs/AnalysesCoreApi.md#get_analysis_basic_info) | **GET** /v2/analyses/{analysis_id}/basic | Gets basic analysis information *AnalysesCoreApi* | [**get_analysis_function_map**](docs/AnalysesCoreApi.md#get_analysis_function_map) | **GET** /v2/analyses/{analysis_id}/func_maps | Get Analysis Function Map *AnalysesCoreApi* | [**get_analysis_logs**](docs/AnalysesCoreApi.md#get_analysis_logs) | **GET** /v2/analyses/{analysis_id}/logs | Gets the logs of an analysis @@ -95,10 +94,6 @@ Class | Method | HTTP request | Description *CollectionsApi* | [**update_collection**](docs/CollectionsApi.md#update_collection) | **PATCH** /v2/collections/{collection_id} | Updates a collection *CollectionsApi* | [**update_collection_binaries**](docs/CollectionsApi.md#update_collection_binaries) | **PATCH** /v2/collections/{collection_id}/binaries | Updates a collection binaries *CollectionsApi* | [**update_collection_tags**](docs/CollectionsApi.md#update_collection_tags) | **PATCH** /v2/collections/{collection_id}/tags | Updates a collection tags -*ConfidenceApi* | [**get_analysis_tag_score**](docs/ConfidenceApi.md#get_analysis_tag_score) | **POST** /v2/confidence/analysis/{analysis_id}/tag_score | Calculate Tag Confidence Score for an Analysis -*ConfidenceApi* | [**get_analysis_threat_score**](docs/ConfidenceApi.md#get_analysis_threat_score) | **GET** /v2/confidence/analysis/{analysis_id}/threat_score | Calculate Threat Score for Binary -*ConfidenceApi* | [**get_functions_name_score**](docs/ConfidenceApi.md#get_functions_name_score) | **POST** /v2/confidence/functions/name_score | Calculate function name confidence for a set of Functions -*ConfidenceApi* | [**get_functions_threat_score**](docs/ConfidenceApi.md#get_functions_threat_score) | **POST** /v2/confidence/functions/threat_score | Calculate Threat Score for a set of Functions *ExternalSourcesApi* | [**create_external_task_mb**](docs/ExternalSourcesApi.md#create_external_task_mb) | **POST** /v2/analysis/{analysis_id}/external/mb | Pulls data from VirusTotal *ExternalSourcesApi* | [**create_external_task_vt**](docs/ExternalSourcesApi.md#create_external_task_vt) | **POST** /v2/analysis/{analysis_id}/external/vt | Pulls data from VirusTotal *ExternalSourcesApi* | [**get_mb_data**](docs/ExternalSourcesApi.md#get_mb_data) | **GET** /v2/analysis/{analysis_id}/external/mb | Get MalwareBazaar data @@ -131,7 +126,6 @@ Class | Method | HTTP request | Description *FunctionsCoreApi* | [**get_function_capabilities**](docs/FunctionsCoreApi.md#get_function_capabilities) | **GET** /v2/functions/{function_id}/capabilities | Retrieve a functions capabilities *FunctionsCoreApi* | [**get_function_details**](docs/FunctionsCoreApi.md#get_function_details) | **GET** /v2/functions/{function_id} | Get function details *FunctionsCoreApi* | [**get_function_strings**](docs/FunctionsCoreApi.md#get_function_strings) | **GET** /v2/functions/{function_id}/strings | Get string information found in the function -*FunctionsCoreApi* | [**get_similar_functions**](docs/FunctionsCoreApi.md#get_similar_functions) | **GET** /v2/functions/{function_id}/similar-functions | Get list of similar functions *FunctionsDataTypesApi* | [**generate_function_data_types_for_analysis**](docs/FunctionsDataTypesApi.md#generate_function_data_types_for_analysis) | **POST** /v2/analyses/{analysis_id}/functions/data_types | Generate Function Data Types *FunctionsDataTypesApi* | [**generate_function_data_types_for_functions**](docs/FunctionsDataTypesApi.md#generate_function_data_types_for_functions) | **POST** /v2/functions/data_types | Generate Function Data Types for an arbitrary list of functions *FunctionsDataTypesApi* | [**get_function_data_types**](docs/FunctionsDataTypesApi.md#get_function_data_types) | **GET** /v2/analyses/{analysis_id}/functions/{function_id}/data_types | Get Function Data Types @@ -158,7 +152,6 @@ Class | Method | HTTP request | Description ## Documentation For Models - - [ANNFunction](docs/ANNFunction.md) - [Addr](docs/Addr.md) - [AiDecompilationRating](docs/AiDecompilationRating.md) - [AiUnstripRequest](docs/AiUnstripRequest.md) @@ -205,7 +198,6 @@ Class | Method | HTTP request | Description - [BaseResponseBlockCommentsGenerationForFunctionResponse](docs/BaseResponseBlockCommentsGenerationForFunctionResponse.md) - [BaseResponseBlockCommentsOverviewGenerationResponse](docs/BaseResponseBlockCommentsOverviewGenerationResponse.md) - [BaseResponseBool](docs/BaseResponseBool.md) - - [BaseResponseBoxPlotConfidence](docs/BaseResponseBoxPlotConfidence.md) - [BaseResponseCalleesCallerFunctionsResponse](docs/BaseResponseCalleesCallerFunctionsResponse.md) - [BaseResponseCapabilities](docs/BaseResponseCapabilities.md) - [BaseResponseCheckSecurityChecksTaskResponse](docs/BaseResponseCheckSecurityChecksTaskResponse.md) @@ -238,16 +230,12 @@ Class | Method | HTTP request | Description - [BaseResponseListCollectionResults](docs/BaseResponseListCollectionResults.md) - [BaseResponseListCommentResponse](docs/BaseResponseListCommentResponse.md) - [BaseResponseListDieMatch](docs/BaseResponseListDieMatch.md) - - [BaseResponseListFunctionBoxPlotConfidence](docs/BaseResponseListFunctionBoxPlotConfidence.md) - [BaseResponseListFunctionNameHistory](docs/BaseResponseListFunctionNameHistory.md) - [BaseResponseListSBOM](docs/BaseResponseListSBOM.md) - - [BaseResponseListSimilarFunctionsResponse](docs/BaseResponseListSimilarFunctionsResponse.md) - - [BaseResponseListTagOriginBoxPlotConfidence](docs/BaseResponseListTagOriginBoxPlotConfidence.md) - [BaseResponseListUserActivityResponse](docs/BaseResponseListUserActivityResponse.md) - [BaseResponseLoginResponse](docs/BaseResponseLoginResponse.md) - [BaseResponseLogs](docs/BaseResponseLogs.md) - [BaseResponseModelsResponse](docs/BaseResponseModelsResponse.md) - - [BaseResponseNearestNeighborAnalysis](docs/BaseResponseNearestNeighborAnalysis.md) - [BaseResponseNetworkOverviewResponse](docs/BaseResponseNetworkOverviewResponse.md) - [BaseResponseParams](docs/BaseResponseParams.md) - [BaseResponseProcessDumps](docs/BaseResponseProcessDumps.md) @@ -276,7 +264,6 @@ Class | Method | HTTP request | Description - [BinaryTaskStatus](docs/BinaryTaskStatus.md) - [Block](docs/Block.md) - [BlockCommentsGenerationForFunctionResponse](docs/BlockCommentsGenerationForFunctionResponse.md) - - [BoxPlotConfidence](docs/BoxPlotConfidence.md) - [CalleeFunctionInfo](docs/CalleeFunctionInfo.md) - [CalleesCallerFunctionsResponse](docs/CalleesCallerFunctionsResponse.md) - [CallerFunctionInfo](docs/CallerFunctionInfo.md) @@ -332,7 +319,6 @@ Class | Method | HTTP request | Description - [FunctionBlockResponse](docs/FunctionBlockResponse.md) - [FunctionBlocksResponse](docs/FunctionBlocksResponse.md) - [FunctionBoundary](docs/FunctionBoundary.md) - - [FunctionBoxPlotConfidence](docs/FunctionBoxPlotConfidence.md) - [FunctionCapabilityResponse](docs/FunctionCapabilityResponse.md) - [FunctionCommentCreateRequest](docs/FunctionCommentCreateRequest.md) - [FunctionDataTypes](docs/FunctionDataTypes.md) @@ -351,9 +337,7 @@ Class | Method | HTTP request | Description - [FunctionMatchingFilters](docs/FunctionMatchingFilters.md) - [FunctionMatchingRequest](docs/FunctionMatchingRequest.md) - [FunctionMatchingResultWithBestMatch](docs/FunctionMatchingResultWithBestMatch.md) - - [FunctionNameConfidenceBody](docs/FunctionNameConfidenceBody.md) - [FunctionNameHistory](docs/FunctionNameHistory.md) - - [FunctionNameInput](docs/FunctionNameInput.md) - [FunctionParamResponse](docs/FunctionParamResponse.md) - [FunctionRename](docs/FunctionRename.md) - [FunctionRenameMap](docs/FunctionRenameMap.md) @@ -390,13 +374,11 @@ Class | Method | HTTP request | Description - [ModelName](docs/ModelName.md) - [ModelsResponse](docs/ModelsResponse.md) - [NameConfidence](docs/NameConfidence.md) - - [NearestNeighbor](docs/NearestNeighbor.md) - [NetworkOverviewDns](docs/NetworkOverviewDns.md) - [NetworkOverviewDnsAnswer](docs/NetworkOverviewDnsAnswer.md) - [NetworkOverviewMetadata](docs/NetworkOverviewMetadata.md) - [NetworkOverviewResponse](docs/NetworkOverviewResponse.md) - [Order](docs/Order.md) - - [Origin](docs/Origin.md) - [PDBDebugModel](docs/PDBDebugModel.md) - [PEModel](docs/PEModel.md) - [PaginationModel](docs/PaginationModel.md) @@ -423,7 +405,6 @@ Class | Method | HTTP request | Description - [SecurityChecksResult](docs/SecurityChecksResult.md) - [SecurityModel](docs/SecurityModel.md) - [SeverityType](docs/SeverityType.md) - - [SimilarFunctionsResponse](docs/SimilarFunctionsResponse.md) - [SingleCodeCertificateModel](docs/SingleCodeCertificateModel.md) - [SingleCodeSignatureModel](docs/SingleCodeSignatureModel.md) - [SinglePDBEntryModel](docs/SinglePDBEntryModel.md) @@ -441,15 +422,11 @@ Class | Method | HTTP request | Description - [TTPSElement](docs/TTPSElement.md) - [TTPSOccurance](docs/TTPSOccurance.md) - [Tag](docs/Tag.md) - - [TagConfidenceBody](docs/TagConfidenceBody.md) - - [TagOriginBoxPlotConfidence](docs/TagOriginBoxPlotConfidence.md) - [TagResponse](docs/TagResponse.md) - [TagSearchResponse](docs/TagSearchResponse.md) - [TagSearchResult](docs/TagSearchResult.md) - - [Tags](docs/Tags.md) - [TaskResponse](docs/TaskResponse.md) - [TaskStatus](docs/TaskStatus.md) - - [ThreatScoreFunctionBody](docs/ThreatScoreFunctionBody.md) - [TimestampModel](docs/TimestampModel.md) - [TypeDefinition](docs/TypeDefinition.md) - [UpdateFunctionDataTypes](docs/UpdateFunctionDataTypes.md) diff --git a/docs/ANNFunction.md b/docs/ANNFunction.md deleted file mode 100644 index 87e7cbb..0000000 --- a/docs/ANNFunction.md +++ /dev/null @@ -1,35 +0,0 @@ -# ANNFunction - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**limit** | **int** | The amount of neighbours per function ID | [optional] [default to 5] -**distance** | **float** | The distance between two neighbours | [optional] [default to 0.1] -**analysis_search_ids** | **List[Optional[int]]** | Perform a search on functions within a list of analyses | [optional] [default to []] -**collection_search_ids** | **List[Optional[int]]** | Search only within these collections | [optional] [default to []] -**search_binary_ids** | **List[int]** | | [optional] -**search_function_ids** | **List[int]** | | [optional] -**debug_only** | **bool** | Searches for only functions which are debug | [optional] [default to False] - -## Example - -```python -from revengai.models.ann_function import ANNFunction - -# TODO update the JSON string below -json = "{}" -# create an instance of ANNFunction from a JSON string -ann_function_instance = ANNFunction.from_json(json) -# print the JSON string representation of the object -print(ANNFunction.to_json()) - -# convert the object into a dict -ann_function_dict = ann_function_instance.to_dict() -# create an instance of ANNFunction from a dict -ann_function_from_dict = ANNFunction.from_dict(ann_function_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/AnalysesCoreApi.md b/docs/AnalysesCoreApi.md index 5aadf91..a725c12 100644 --- a/docs/AnalysesCoreApi.md +++ b/docs/AnalysesCoreApi.md @@ -6,7 +6,6 @@ Method | HTTP request | Description ------------- | ------------- | ------------- [**create_analysis**](AnalysesCoreApi.md#create_analysis) | **POST** /v2/analyses | Create Analysis [**delete_analysis**](AnalysesCoreApi.md#delete_analysis) | **DELETE** /v2/analyses/{analysis_id} | Delete Analysis -[**find_similar_functions_batch**](AnalysesCoreApi.md#find_similar_functions_batch) | **POST** /v2/analyses/{analysis_id}/similarity/functions | Batch Symbol ANN using Analysis ID [**get_analysis_basic_info**](AnalysesCoreApi.md#get_analysis_basic_info) | **GET** /v2/analyses/{analysis_id}/basic | Gets basic analysis information [**get_analysis_function_map**](AnalysesCoreApi.md#get_analysis_function_map) | **GET** /v2/analyses/{analysis_id}/func_maps | Get Analysis Function Map [**get_analysis_logs**](AnalysesCoreApi.md#get_analysis_logs) | **GET** /v2/analyses/{analysis_id}/logs | Gets the logs of an analysis @@ -186,89 +185,6 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **find_similar_functions_batch** -> BaseResponseNearestNeighborAnalysis find_similar_functions_batch(analysis_id, ann_function) - -Batch Symbol ANN using Analysis ID - -Takes a analysis ID and returns the nearest functions within the database that match those functions - -### Example - -* Api Key Authentication (APIKey): - -```python -import revengai -from revengai.models.ann_function import ANNFunction -from revengai.models.base_response_nearest_neighbor_analysis import BaseResponseNearestNeighborAnalysis -from revengai.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.reveng.ai -# See configuration.py for a list of all supported configuration parameters. -configuration = revengai.Configuration( - host = "https://api.reveng.ai" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: APIKey -configuration.api_key['APIKey'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['APIKey'] = 'Bearer' - -# Enter a context with an instance of the API client -with revengai.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = revengai.AnalysesCoreApi(api_client) - analysis_id = 56 # int | - ann_function = revengai.ANNFunction() # ANNFunction | - - try: - # Batch Symbol ANN using Analysis ID - api_response = api_instance.find_similar_functions_batch(analysis_id, ann_function) - print("The response of AnalysesCoreApi->find_similar_functions_batch:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling AnalysesCoreApi->find_similar_functions_batch: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **analysis_id** | **int**| | - **ann_function** | [**ANNFunction**](ANNFunction.md)| | - -### Return type - -[**BaseResponseNearestNeighborAnalysis**](BaseResponseNearestNeighborAnalysis.md) - -### Authorization - -[APIKey](../README.md#APIKey) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successful Response | - | -**422** | Invalid request parameters | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - # **get_analysis_basic_info** > BaseResponseBasic get_analysis_basic_info(analysis_id) diff --git a/docs/BaseResponseBoxPlotConfidence.md b/docs/BaseResponseBoxPlotConfidence.md deleted file mode 100644 index 0a57f06..0000000 --- a/docs/BaseResponseBoxPlotConfidence.md +++ /dev/null @@ -1,33 +0,0 @@ -# BaseResponseBoxPlotConfidence - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**status** | **bool** | Response status on whether the request succeeded | [optional] [default to True] -**data** | [**BoxPlotConfidence**](BoxPlotConfidence.md) | | [optional] -**message** | **str** | | [optional] -**errors** | [**List[ErrorModel]**](ErrorModel.md) | | [optional] -**meta** | [**MetaModel**](MetaModel.md) | Metadata | [optional] - -## Example - -```python -from revengai.models.base_response_box_plot_confidence import BaseResponseBoxPlotConfidence - -# TODO update the JSON string below -json = "{}" -# create an instance of BaseResponseBoxPlotConfidence from a JSON string -base_response_box_plot_confidence_instance = BaseResponseBoxPlotConfidence.from_json(json) -# print the JSON string representation of the object -print(BaseResponseBoxPlotConfidence.to_json()) - -# convert the object into a dict -base_response_box_plot_confidence_dict = base_response_box_plot_confidence_instance.to_dict() -# create an instance of BaseResponseBoxPlotConfidence from a dict -base_response_box_plot_confidence_from_dict = BaseResponseBoxPlotConfidence.from_dict(base_response_box_plot_confidence_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/BaseResponseListFunctionBoxPlotConfidence.md b/docs/BaseResponseListFunctionBoxPlotConfidence.md deleted file mode 100644 index 719da56..0000000 --- a/docs/BaseResponseListFunctionBoxPlotConfidence.md +++ /dev/null @@ -1,33 +0,0 @@ -# BaseResponseListFunctionBoxPlotConfidence - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**status** | **bool** | Response status on whether the request succeeded | [optional] [default to True] -**data** | [**List[FunctionBoxPlotConfidence]**](FunctionBoxPlotConfidence.md) | | [optional] -**message** | **str** | | [optional] -**errors** | [**List[ErrorModel]**](ErrorModel.md) | | [optional] -**meta** | [**MetaModel**](MetaModel.md) | Metadata | [optional] - -## Example - -```python -from revengai.models.base_response_list_function_box_plot_confidence import BaseResponseListFunctionBoxPlotConfidence - -# TODO update the JSON string below -json = "{}" -# create an instance of BaseResponseListFunctionBoxPlotConfidence from a JSON string -base_response_list_function_box_plot_confidence_instance = BaseResponseListFunctionBoxPlotConfidence.from_json(json) -# print the JSON string representation of the object -print(BaseResponseListFunctionBoxPlotConfidence.to_json()) - -# convert the object into a dict -base_response_list_function_box_plot_confidence_dict = base_response_list_function_box_plot_confidence_instance.to_dict() -# create an instance of BaseResponseListFunctionBoxPlotConfidence from a dict -base_response_list_function_box_plot_confidence_from_dict = BaseResponseListFunctionBoxPlotConfidence.from_dict(base_response_list_function_box_plot_confidence_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/BaseResponseListSimilarFunctionsResponse.md b/docs/BaseResponseListSimilarFunctionsResponse.md deleted file mode 100644 index 06c0ddb..0000000 --- a/docs/BaseResponseListSimilarFunctionsResponse.md +++ /dev/null @@ -1,33 +0,0 @@ -# BaseResponseListSimilarFunctionsResponse - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**status** | **bool** | Response status on whether the request succeeded | [optional] [default to True] -**data** | [**List[SimilarFunctionsResponse]**](SimilarFunctionsResponse.md) | | [optional] -**message** | **str** | | [optional] -**errors** | [**List[ErrorModel]**](ErrorModel.md) | | [optional] -**meta** | [**MetaModel**](MetaModel.md) | Metadata | [optional] - -## Example - -```python -from revengai.models.base_response_list_similar_functions_response import BaseResponseListSimilarFunctionsResponse - -# TODO update the JSON string below -json = "{}" -# create an instance of BaseResponseListSimilarFunctionsResponse from a JSON string -base_response_list_similar_functions_response_instance = BaseResponseListSimilarFunctionsResponse.from_json(json) -# print the JSON string representation of the object -print(BaseResponseListSimilarFunctionsResponse.to_json()) - -# convert the object into a dict -base_response_list_similar_functions_response_dict = base_response_list_similar_functions_response_instance.to_dict() -# create an instance of BaseResponseListSimilarFunctionsResponse from a dict -base_response_list_similar_functions_response_from_dict = BaseResponseListSimilarFunctionsResponse.from_dict(base_response_list_similar_functions_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/BaseResponseListTagOriginBoxPlotConfidence.md b/docs/BaseResponseListTagOriginBoxPlotConfidence.md deleted file mode 100644 index 933ec97..0000000 --- a/docs/BaseResponseListTagOriginBoxPlotConfidence.md +++ /dev/null @@ -1,33 +0,0 @@ -# BaseResponseListTagOriginBoxPlotConfidence - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**status** | **bool** | Response status on whether the request succeeded | [optional] [default to True] -**data** | [**List[TagOriginBoxPlotConfidence]**](TagOriginBoxPlotConfidence.md) | | [optional] -**message** | **str** | | [optional] -**errors** | [**List[ErrorModel]**](ErrorModel.md) | | [optional] -**meta** | [**MetaModel**](MetaModel.md) | Metadata | [optional] - -## Example - -```python -from revengai.models.base_response_list_tag_origin_box_plot_confidence import BaseResponseListTagOriginBoxPlotConfidence - -# TODO update the JSON string below -json = "{}" -# create an instance of BaseResponseListTagOriginBoxPlotConfidence from a JSON string -base_response_list_tag_origin_box_plot_confidence_instance = BaseResponseListTagOriginBoxPlotConfidence.from_json(json) -# print the JSON string representation of the object -print(BaseResponseListTagOriginBoxPlotConfidence.to_json()) - -# convert the object into a dict -base_response_list_tag_origin_box_plot_confidence_dict = base_response_list_tag_origin_box_plot_confidence_instance.to_dict() -# create an instance of BaseResponseListTagOriginBoxPlotConfidence from a dict -base_response_list_tag_origin_box_plot_confidence_from_dict = BaseResponseListTagOriginBoxPlotConfidence.from_dict(base_response_list_tag_origin_box_plot_confidence_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/BaseResponseNearestNeighborAnalysis.md b/docs/BaseResponseNearestNeighborAnalysis.md deleted file mode 100644 index e31b0bd..0000000 --- a/docs/BaseResponseNearestNeighborAnalysis.md +++ /dev/null @@ -1,33 +0,0 @@ -# BaseResponseNearestNeighborAnalysis - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**status** | **bool** | Response status on whether the request succeeded | [optional] [default to True] -**data** | **Dict[str, Dict[str, NearestNeighbor]]** | | [optional] -**message** | **str** | | [optional] -**errors** | [**List[ErrorModel]**](ErrorModel.md) | | [optional] -**meta** | [**MetaModel**](MetaModel.md) | Metadata | [optional] - -## Example - -```python -from revengai.models.base_response_nearest_neighbor_analysis import BaseResponseNearestNeighborAnalysis - -# TODO update the JSON string below -json = "{}" -# create an instance of BaseResponseNearestNeighborAnalysis from a JSON string -base_response_nearest_neighbor_analysis_instance = BaseResponseNearestNeighborAnalysis.from_json(json) -# print the JSON string representation of the object -print(BaseResponseNearestNeighborAnalysis.to_json()) - -# convert the object into a dict -base_response_nearest_neighbor_analysis_dict = base_response_nearest_neighbor_analysis_instance.to_dict() -# create an instance of BaseResponseNearestNeighborAnalysis from a dict -base_response_nearest_neighbor_analysis_from_dict = BaseResponseNearestNeighborAnalysis.from_dict(base_response_nearest_neighbor_analysis_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/BoxPlotConfidence.md b/docs/BoxPlotConfidence.md deleted file mode 100644 index 46d0933..0000000 --- a/docs/BoxPlotConfidence.md +++ /dev/null @@ -1,36 +0,0 @@ -# BoxPlotConfidence - -Format for confidence - returned in the box plot format - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**min** | **float** | | -**max** | **float** | | -**average** | **float** | | -**upper_quartile** | **float** | | -**lower_quartile** | **float** | | -**positive_count** | **int** | | -**negative_count** | **int** | | - -## Example - -```python -from revengai.models.box_plot_confidence import BoxPlotConfidence - -# TODO update the JSON string below -json = "{}" -# create an instance of BoxPlotConfidence from a JSON string -box_plot_confidence_instance = BoxPlotConfidence.from_json(json) -# print the JSON string representation of the object -print(BoxPlotConfidence.to_json()) - -# convert the object into a dict -box_plot_confidence_dict = box_plot_confidence_instance.to_dict() -# create an instance of BoxPlotConfidence from a dict -box_plot_confidence_from_dict = BoxPlotConfidence.from_dict(box_plot_confidence_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/ConfidenceApi.md b/docs/ConfidenceApi.md deleted file mode 100644 index f5a4bc4..0000000 --- a/docs/ConfidenceApi.md +++ /dev/null @@ -1,337 +0,0 @@ -# revengai.ConfidenceApi - -All URIs are relative to *https://api.reveng.ai* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**get_analysis_tag_score**](ConfidenceApi.md#get_analysis_tag_score) | **POST** /v2/confidence/analysis/{analysis_id}/tag_score | Calculate Tag Confidence Score for an Analysis -[**get_analysis_threat_score**](ConfidenceApi.md#get_analysis_threat_score) | **GET** /v2/confidence/analysis/{analysis_id}/threat_score | Calculate Threat Score for Binary -[**get_functions_name_score**](ConfidenceApi.md#get_functions_name_score) | **POST** /v2/confidence/functions/name_score | Calculate function name confidence for a set of Functions -[**get_functions_threat_score**](ConfidenceApi.md#get_functions_threat_score) | **POST** /v2/confidence/functions/threat_score | Calculate Threat Score for a set of Functions - - -# **get_analysis_tag_score** -> BaseResponseListTagOriginBoxPlotConfidence get_analysis_tag_score(analysis_id, tag_confidence_body) - -Calculate Tag Confidence Score for an Analysis - -Accepts a analysis ID and a list of tags, returns the confidence score for each tag in the list - -### Example - -* Api Key Authentication (APIKey): - -```python -import revengai -from revengai.models.base_response_list_tag_origin_box_plot_confidence import BaseResponseListTagOriginBoxPlotConfidence -from revengai.models.tag_confidence_body import TagConfidenceBody -from revengai.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.reveng.ai -# See configuration.py for a list of all supported configuration parameters. -configuration = revengai.Configuration( - host = "https://api.reveng.ai" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: APIKey -configuration.api_key['APIKey'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['APIKey'] = 'Bearer' - -# Enter a context with an instance of the API client -with revengai.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = revengai.ConfidenceApi(api_client) - analysis_id = 56 # int | The analysis to calculate the tag scores for - tag_confidence_body = revengai.TagConfidenceBody() # TagConfidenceBody | - - try: - # Calculate Tag Confidence Score for an Analysis - api_response = api_instance.get_analysis_tag_score(analysis_id, tag_confidence_body) - print("The response of ConfidenceApi->get_analysis_tag_score:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling ConfidenceApi->get_analysis_tag_score: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **analysis_id** | **int**| The analysis to calculate the tag scores for | - **tag_confidence_body** | [**TagConfidenceBody**](TagConfidenceBody.md)| | - -### Return type - -[**BaseResponseListTagOriginBoxPlotConfidence**](BaseResponseListTagOriginBoxPlotConfidence.md) - -### Authorization - -[APIKey](../README.md#APIKey) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successful Response | - | -**422** | Invalid request parameters | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **get_analysis_threat_score** -> BaseResponseBoxPlotConfidence get_analysis_threat_score(analysis_id) - -Calculate Threat Score for Binary - -Accepts a binary ID and returns the threat score for that binary - -### Example - -* Api Key Authentication (APIKey): - -```python -import revengai -from revengai.models.base_response_box_plot_confidence import BaseResponseBoxPlotConfidence -from revengai.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.reveng.ai -# See configuration.py for a list of all supported configuration parameters. -configuration = revengai.Configuration( - host = "https://api.reveng.ai" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: APIKey -configuration.api_key['APIKey'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['APIKey'] = 'Bearer' - -# Enter a context with an instance of the API client -with revengai.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = revengai.ConfidenceApi(api_client) - analysis_id = 56 # int | The analysis to calculate the threat score for - - try: - # Calculate Threat Score for Binary - api_response = api_instance.get_analysis_threat_score(analysis_id) - print("The response of ConfidenceApi->get_analysis_threat_score:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling ConfidenceApi->get_analysis_threat_score: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **analysis_id** | **int**| The analysis to calculate the threat score for | - -### Return type - -[**BaseResponseBoxPlotConfidence**](BaseResponseBoxPlotConfidence.md) - -### Authorization - -[APIKey](../README.md#APIKey) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successful Response | - | -**422** | Invalid request parameters | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **get_functions_name_score** -> BaseResponseListFunctionBoxPlotConfidence get_functions_name_score(function_name_confidence_body) - -Calculate function name confidence for a set of Functions - -Accepts a list of function ids mapped to a function name, for each function we return a confidence score in that being the correct name for each function. Each function must be from the same model, or you may find some functions missing in the return. - -### Example - -* Api Key Authentication (APIKey): - -```python -import revengai -from revengai.models.base_response_list_function_box_plot_confidence import BaseResponseListFunctionBoxPlotConfidence -from revengai.models.function_name_confidence_body import FunctionNameConfidenceBody -from revengai.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.reveng.ai -# See configuration.py for a list of all supported configuration parameters. -configuration = revengai.Configuration( - host = "https://api.reveng.ai" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: APIKey -configuration.api_key['APIKey'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['APIKey'] = 'Bearer' - -# Enter a context with an instance of the API client -with revengai.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = revengai.ConfidenceApi(api_client) - function_name_confidence_body = revengai.FunctionNameConfidenceBody() # FunctionNameConfidenceBody | - - try: - # Calculate function name confidence for a set of Functions - api_response = api_instance.get_functions_name_score(function_name_confidence_body) - print("The response of ConfidenceApi->get_functions_name_score:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling ConfidenceApi->get_functions_name_score: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **function_name_confidence_body** | [**FunctionNameConfidenceBody**](FunctionNameConfidenceBody.md)| | - -### Return type - -[**BaseResponseListFunctionBoxPlotConfidence**](BaseResponseListFunctionBoxPlotConfidence.md) - -### Authorization - -[APIKey](../README.md#APIKey) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successful Response | - | -**422** | Invalid request parameters | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **get_functions_threat_score** -> BaseResponseListFunctionBoxPlotConfidence get_functions_threat_score(threat_score_function_body) - -Calculate Threat Score for a set of Functions - -Accepts a list of function ids and returns the threat score for each function. Each function must be from the same model, or you may find some functions missing in the return. - -### Example - -* Api Key Authentication (APIKey): - -```python -import revengai -from revengai.models.base_response_list_function_box_plot_confidence import BaseResponseListFunctionBoxPlotConfidence -from revengai.models.threat_score_function_body import ThreatScoreFunctionBody -from revengai.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.reveng.ai -# See configuration.py for a list of all supported configuration parameters. -configuration = revengai.Configuration( - host = "https://api.reveng.ai" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: APIKey -configuration.api_key['APIKey'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['APIKey'] = 'Bearer' - -# Enter a context with an instance of the API client -with revengai.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = revengai.ConfidenceApi(api_client) - threat_score_function_body = revengai.ThreatScoreFunctionBody() # ThreatScoreFunctionBody | - - try: - # Calculate Threat Score for a set of Functions - api_response = api_instance.get_functions_threat_score(threat_score_function_body) - print("The response of ConfidenceApi->get_functions_threat_score:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling ConfidenceApi->get_functions_threat_score: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **threat_score_function_body** | [**ThreatScoreFunctionBody**](ThreatScoreFunctionBody.md)| | - -### Return type - -[**BaseResponseListFunctionBoxPlotConfidence**](BaseResponseListFunctionBoxPlotConfidence.md) - -### Authorization - -[APIKey](../README.md#APIKey) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successful Response | - | -**422** | Invalid request parameters | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/docs/ELFRelocation.md b/docs/ELFRelocation.md index 146cc64..eb57829 100644 --- a/docs/ELFRelocation.md +++ b/docs/ELFRelocation.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **address** | **int** | | -**type** | **int** | | +**type** | **str** | | **size** | **int** | | **addend** | **int** | | **symbol_name** | **str** | | diff --git a/docs/FunctionBoxPlotConfidence.md b/docs/FunctionBoxPlotConfidence.md deleted file mode 100644 index 9eeebf0..0000000 --- a/docs/FunctionBoxPlotConfidence.md +++ /dev/null @@ -1,30 +0,0 @@ -# FunctionBoxPlotConfidence - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**function_id** | **int** | | -**box_plot** | [**BoxPlotConfidence**](BoxPlotConfidence.md) | | - -## Example - -```python -from revengai.models.function_box_plot_confidence import FunctionBoxPlotConfidence - -# TODO update the JSON string below -json = "{}" -# create an instance of FunctionBoxPlotConfidence from a JSON string -function_box_plot_confidence_instance = FunctionBoxPlotConfidence.from_json(json) -# print the JSON string representation of the object -print(FunctionBoxPlotConfidence.to_json()) - -# convert the object into a dict -function_box_plot_confidence_dict = function_box_plot_confidence_instance.to_dict() -# create an instance of FunctionBoxPlotConfidence from a dict -function_box_plot_confidence_from_dict = FunctionBoxPlotConfidence.from_dict(function_box_plot_confidence_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/FunctionNameConfidenceBody.md b/docs/FunctionNameConfidenceBody.md deleted file mode 100644 index e93a6ac..0000000 --- a/docs/FunctionNameConfidenceBody.md +++ /dev/null @@ -1,30 +0,0 @@ -# FunctionNameConfidenceBody - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**functions** | [**List[FunctionNameInput]**](FunctionNameInput.md) | List of function ids and the function names they want to check confidence for | [optional] -**is_debug** | **bool** | Flag to match only to a debug function | [optional] [default to False] - -## Example - -```python -from revengai.models.function_name_confidence_body import FunctionNameConfidenceBody - -# TODO update the JSON string below -json = "{}" -# create an instance of FunctionNameConfidenceBody from a JSON string -function_name_confidence_body_instance = FunctionNameConfidenceBody.from_json(json) -# print the JSON string representation of the object -print(FunctionNameConfidenceBody.to_json()) - -# convert the object into a dict -function_name_confidence_body_dict = function_name_confidence_body_instance.to_dict() -# create an instance of FunctionNameConfidenceBody from a dict -function_name_confidence_body_from_dict = FunctionNameConfidenceBody.from_dict(function_name_confidence_body_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/FunctionNameInput.md b/docs/FunctionNameInput.md deleted file mode 100644 index 79f3893..0000000 --- a/docs/FunctionNameInput.md +++ /dev/null @@ -1,30 +0,0 @@ -# FunctionNameInput - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**function_id** | **int** | | -**function_name** | **str** | | - -## Example - -```python -from revengai.models.function_name_input import FunctionNameInput - -# TODO update the JSON string below -json = "{}" -# create an instance of FunctionNameInput from a JSON string -function_name_input_instance = FunctionNameInput.from_json(json) -# print the JSON string representation of the object -print(FunctionNameInput.to_json()) - -# convert the object into a dict -function_name_input_dict = function_name_input_instance.to_dict() -# create an instance of FunctionNameInput from a dict -function_name_input_from_dict = FunctionNameInput.from_dict(function_name_input_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/FunctionsCoreApi.md b/docs/FunctionsCoreApi.md index 583757a..6bfd469 100644 --- a/docs/FunctionsCoreApi.md +++ b/docs/FunctionsCoreApi.md @@ -16,7 +16,6 @@ Method | HTTP request | Description [**get_function_capabilities**](FunctionsCoreApi.md#get_function_capabilities) | **GET** /v2/functions/{function_id}/capabilities | Retrieve a functions capabilities [**get_function_details**](FunctionsCoreApi.md#get_function_details) | **GET** /v2/functions/{function_id} | Get function details [**get_function_strings**](FunctionsCoreApi.md#get_function_strings) | **GET** /v2/functions/{function_id}/strings | Get string information found in the function -[**get_similar_functions**](FunctionsCoreApi.md#get_similar_functions) | **GET** /v2/functions/{function_id}/similar-functions | Get list of similar functions # **ai_unstrip** @@ -999,93 +998,3 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **get_similar_functions** -> BaseResponseListSimilarFunctionsResponse get_similar_functions(function_id, limit=limit, distance=distance, collection_ids=collection_ids, debug=debug, debug_types=debug_types, binary_ids=binary_ids) - -Get list of similar functions - -### Example - -* Api Key Authentication (APIKey): - -```python -import revengai -from revengai.models.base_response_list_similar_functions_response import BaseResponseListSimilarFunctionsResponse -from revengai.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.reveng.ai -# See configuration.py for a list of all supported configuration parameters. -configuration = revengai.Configuration( - host = "https://api.reveng.ai" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: APIKey -configuration.api_key['APIKey'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['APIKey'] = 'Bearer' - -# Enter a context with an instance of the API client -with revengai.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = revengai.FunctionsCoreApi(api_client) - function_id = 56 # int | - limit = 20 # int | Number of similar functions to return (optional) (default to 20) - distance = 1.0 # float | Maximum cosine distance (optional) (default to 1.0) - collection_ids = [] # List[Optional[int]] | Collection filtering by IDs (optional) (default to []) - debug = False # bool | Only return matching debug functions (optional) (default to False) - debug_types = ["SYSTEM"] # List[str] | If limiting results to functions with debug names, which type of debug names to include? (optional) (default to ["SYSTEM"]) - binary_ids = [] # List[Optional[int]] | Limit similar functions to specific binaries (optional) (default to []) - - try: - # Get list of similar functions - api_response = api_instance.get_similar_functions(function_id, limit=limit, distance=distance, collection_ids=collection_ids, debug=debug, debug_types=debug_types, binary_ids=binary_ids) - print("The response of FunctionsCoreApi->get_similar_functions:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling FunctionsCoreApi->get_similar_functions: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **function_id** | **int**| | - **limit** | **int**| Number of similar functions to return | [optional] [default to 20] - **distance** | **float**| Maximum cosine distance | [optional] [default to 1.0] - **collection_ids** | [**List[Optional[int]]**](int.md)| Collection filtering by IDs | [optional] [default to []] - **debug** | **bool**| Only return matching debug functions | [optional] [default to False] - **debug_types** | [**List[str]**](str.md)| If limiting results to functions with debug names, which type of debug names to include? | [optional] [default to ["SYSTEM"]] - **binary_ids** | [**List[Optional[int]]**](int.md)| Limit similar functions to specific binaries | [optional] [default to []] - -### Return type - -[**BaseResponseListSimilarFunctionsResponse**](BaseResponseListSimilarFunctionsResponse.md) - -### Authorization - -[APIKey](../README.md#APIKey) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successful Response | - | -**422** | Invalid request parameters | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/docs/FunctionsDetailResponse.md b/docs/FunctionsDetailResponse.md index 7b1213b..20ae267 100644 --- a/docs/FunctionsDetailResponse.md +++ b/docs/FunctionsDetailResponse.md @@ -14,6 +14,7 @@ Name | Type | Description | Notes **binary_name** | **str** | | **sha_256_hash** | **str** | | **debug_hash** | **str** | | +**debug** | **bool** | | **embedding_3d** | **List[float]** | | [optional] **embedding_1d** | **List[float]** | | [optional] diff --git a/docs/NearestNeighbor.md b/docs/NearestNeighbor.md deleted file mode 100644 index abb7b0f..0000000 --- a/docs/NearestNeighbor.md +++ /dev/null @@ -1,36 +0,0 @@ -# NearestNeighbor - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**distance** | **float** | | -**nearest_neighbor_analysis_id** | **int** | | -**nearest_neighbor_analysis_name** | **str** | | -**nearest_neighbor_function_name** | **str** | | -**nearest_neighbor_function_name_mangled** | **str** | | -**nearest_neighbor_binary_id** | **int** | | -**nearest_neighbor_sha_256_hash** | **str** | | -**nearest_neighbor_debug** | **bool** | | - -## Example - -```python -from revengai.models.nearest_neighbor import NearestNeighbor - -# TODO update the JSON string below -json = "{}" -# create an instance of NearestNeighbor from a JSON string -nearest_neighbor_instance = NearestNeighbor.from_json(json) -# print the JSON string representation of the object -print(NearestNeighbor.to_json()) - -# convert the object into a dict -nearest_neighbor_dict = nearest_neighbor_instance.to_dict() -# create an instance of NearestNeighbor from a dict -nearest_neighbor_from_dict = NearestNeighbor.from_dict(nearest_neighbor_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/Origin.md b/docs/Origin.md deleted file mode 100644 index e067563..0000000 --- a/docs/Origin.md +++ /dev/null @@ -1,24 +0,0 @@ -# Origin - - -## Enum - -* `REV_ENG_MINUS_MALWARE` (value: `'RevEng-Malware'`) - -* `REV_ENG_MINUS_LIBRARY` (value: `'RevEng-Library'`) - -* `REV_ENG_MINUS_BENIGN` (value: `'RevEng-Benign'`) - -* `REVENG` (value: `'RevEng'`) - -* `REV_ENG_MINUS_HEURISTIC` (value: `'RevEng-Heuristic'`) - -* `REV_ENG_MINUS_UNKNOWN` (value: `'RevEng-Unknown'`) - -* `VIRUSTOTAL` (value: `'VirusTotal'`) - -* `MALWAREBAZAAR` (value: `'MalwareBazaar'`) - -[[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/SimilarFunctionsResponse.md b/docs/SimilarFunctionsResponse.md deleted file mode 100644 index dd3c2e7..0000000 --- a/docs/SimilarFunctionsResponse.md +++ /dev/null @@ -1,36 +0,0 @@ -# SimilarFunctionsResponse - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**function_id** | **int** | | -**function_name** | **str** | | -**binary_id** | **int** | | -**binary_name** | **str** | | -**distance** | **float** | | -**embedding_3d** | **List[float]** | | -**embedding_1d** | **List[float]** | | -**sha_256_hash** | **str** | | - -## Example - -```python -from revengai.models.similar_functions_response import SimilarFunctionsResponse - -# TODO update the JSON string below -json = "{}" -# create an instance of SimilarFunctionsResponse from a JSON string -similar_functions_response_instance = SimilarFunctionsResponse.from_json(json) -# print the JSON string representation of the object -print(SimilarFunctionsResponse.to_json()) - -# convert the object into a dict -similar_functions_response_dict = similar_functions_response_instance.to_dict() -# create an instance of SimilarFunctionsResponse from a dict -similar_functions_response_from_dict = SimilarFunctionsResponse.from_dict(similar_functions_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/TagConfidenceBody.md b/docs/TagConfidenceBody.md deleted file mode 100644 index ee5d2fe..0000000 --- a/docs/TagConfidenceBody.md +++ /dev/null @@ -1,29 +0,0 @@ -# TagConfidenceBody - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**tags** | [**List[Tags]**](Tags.md) | | - -## Example - -```python -from revengai.models.tag_confidence_body import TagConfidenceBody - -# TODO update the JSON string below -json = "{}" -# create an instance of TagConfidenceBody from a JSON string -tag_confidence_body_instance = TagConfidenceBody.from_json(json) -# print the JSON string representation of the object -print(TagConfidenceBody.to_json()) - -# convert the object into a dict -tag_confidence_body_dict = tag_confidence_body_instance.to_dict() -# create an instance of TagConfidenceBody from a dict -tag_confidence_body_from_dict = TagConfidenceBody.from_dict(tag_confidence_body_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/TagOriginBoxPlotConfidence.md b/docs/TagOriginBoxPlotConfidence.md deleted file mode 100644 index 3fb5dcb..0000000 --- a/docs/TagOriginBoxPlotConfidence.md +++ /dev/null @@ -1,30 +0,0 @@ -# TagOriginBoxPlotConfidence - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**tag** | [**Tags**](Tags.md) | | -**box_plot** | [**BoxPlotConfidence**](BoxPlotConfidence.md) | | - -## Example - -```python -from revengai.models.tag_origin_box_plot_confidence import TagOriginBoxPlotConfidence - -# TODO update the JSON string below -json = "{}" -# create an instance of TagOriginBoxPlotConfidence from a JSON string -tag_origin_box_plot_confidence_instance = TagOriginBoxPlotConfidence.from_json(json) -# print the JSON string representation of the object -print(TagOriginBoxPlotConfidence.to_json()) - -# convert the object into a dict -tag_origin_box_plot_confidence_dict = tag_origin_box_plot_confidence_instance.to_dict() -# create an instance of TagOriginBoxPlotConfidence from a dict -tag_origin_box_plot_confidence_from_dict = TagOriginBoxPlotConfidence.from_dict(tag_origin_box_plot_confidence_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/Tags.md b/docs/Tags.md deleted file mode 100644 index 5cd630b..0000000 --- a/docs/Tags.md +++ /dev/null @@ -1,30 +0,0 @@ -# Tags - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**tag** | **str** | The tag name | -**origin** | [**Origin**](Origin.md) | The origin of the tag | - -## Example - -```python -from revengai.models.tags import Tags - -# TODO update the JSON string below -json = "{}" -# create an instance of Tags from a JSON string -tags_instance = Tags.from_json(json) -# print the JSON string representation of the object -print(Tags.to_json()) - -# convert the object into a dict -tags_dict = tags_instance.to_dict() -# create an instance of Tags from a dict -tags_from_dict = Tags.from_dict(tags_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/ThreatScoreFunctionBody.md b/docs/ThreatScoreFunctionBody.md deleted file mode 100644 index 7bd1989..0000000 --- a/docs/ThreatScoreFunctionBody.md +++ /dev/null @@ -1,29 +0,0 @@ -# ThreatScoreFunctionBody - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**function_ids** | **List[int]** | List of function IDs to calculate threat score for | [optional] - -## Example - -```python -from revengai.models.threat_score_function_body import ThreatScoreFunctionBody - -# TODO update the JSON string below -json = "{}" -# create an instance of ThreatScoreFunctionBody from a JSON string -threat_score_function_body_instance = ThreatScoreFunctionBody.from_json(json) -# print the JSON string representation of the object -print(ThreatScoreFunctionBody.to_json()) - -# convert the object into a dict -threat_score_function_body_dict = threat_score_function_body_instance.to_dict() -# create an instance of ThreatScoreFunctionBody from a dict -threat_score_function_body_from_dict = ThreatScoreFunctionBody.from_dict(threat_score_function_body_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/revengai/__init__.py b/revengai/__init__.py index 2565bff..6b3f9e7 100644 --- a/revengai/__init__.py +++ b/revengai/__init__.py @@ -13,7 +13,7 @@ """ # noqa: E501 -__version__ = "v2.3.0" +__version__ = "v2.8.0" # Define package exports __all__ = [ @@ -25,7 +25,6 @@ "AuthenticationUsersApi", "BinariesApi", "CollectionsApi", - "ConfidenceApi", "ExternalSourcesApi", "FirmwareApi", "FunctionsAIDecompilationApi", @@ -45,7 +44,6 @@ "ApiKeyError", "ApiAttributeError", "ApiException", - "ANNFunction", "Addr", "AiDecompilationRating", "AiUnstripRequest", @@ -92,7 +90,6 @@ "BaseResponseBlockCommentsGenerationForFunctionResponse", "BaseResponseBlockCommentsOverviewGenerationResponse", "BaseResponseBool", - "BaseResponseBoxPlotConfidence", "BaseResponseCalleesCallerFunctionsResponse", "BaseResponseCapabilities", "BaseResponseCheckSecurityChecksTaskResponse", @@ -125,16 +122,12 @@ "BaseResponseListCollectionResults", "BaseResponseListCommentResponse", "BaseResponseListDieMatch", - "BaseResponseListFunctionBoxPlotConfidence", "BaseResponseListFunctionNameHistory", "BaseResponseListSBOM", - "BaseResponseListSimilarFunctionsResponse", - "BaseResponseListTagOriginBoxPlotConfidence", "BaseResponseListUserActivityResponse", "BaseResponseLoginResponse", "BaseResponseLogs", "BaseResponseModelsResponse", - "BaseResponseNearestNeighborAnalysis", "BaseResponseNetworkOverviewResponse", "BaseResponseParams", "BaseResponseProcessDumps", @@ -163,7 +156,6 @@ "BinaryTaskStatus", "Block", "BlockCommentsGenerationForFunctionResponse", - "BoxPlotConfidence", "CalleeFunctionInfo", "CalleesCallerFunctionsResponse", "CallerFunctionInfo", @@ -219,7 +211,6 @@ "FunctionBlockResponse", "FunctionBlocksResponse", "FunctionBoundary", - "FunctionBoxPlotConfidence", "FunctionCapabilityResponse", "FunctionCommentCreateRequest", "FunctionDataTypes", @@ -238,9 +229,7 @@ "FunctionMatchingFilters", "FunctionMatchingRequest", "FunctionMatchingResultWithBestMatch", - "FunctionNameConfidenceBody", "FunctionNameHistory", - "FunctionNameInput", "FunctionParamResponse", "FunctionRename", "FunctionRenameMap", @@ -277,13 +266,11 @@ "ModelName", "ModelsResponse", "NameConfidence", - "NearestNeighbor", "NetworkOverviewDns", "NetworkOverviewDnsAnswer", "NetworkOverviewMetadata", "NetworkOverviewResponse", "Order", - "Origin", "PDBDebugModel", "PEModel", "PaginationModel", @@ -310,7 +297,6 @@ "SecurityChecksResult", "SecurityModel", "SeverityType", - "SimilarFunctionsResponse", "SingleCodeCertificateModel", "SingleCodeSignatureModel", "SinglePDBEntryModel", @@ -328,15 +314,11 @@ "TTPSElement", "TTPSOccurance", "Tag", - "TagConfidenceBody", - "TagOriginBoxPlotConfidence", "TagResponse", "TagSearchResponse", "TagSearchResult", - "Tags", "TaskResponse", "TaskStatus", - "ThreatScoreFunctionBody", "TimestampModel", "TypeDefinition", "UpdateFunctionDataTypes", @@ -359,7 +341,6 @@ from revengai.api.authentication_users_api import AuthenticationUsersApi as AuthenticationUsersApi from revengai.api.binaries_api import BinariesApi as BinariesApi from revengai.api.collections_api import CollectionsApi as CollectionsApi -from revengai.api.confidence_api import ConfidenceApi as ConfidenceApi from revengai.api.external_sources_api import ExternalSourcesApi as ExternalSourcesApi from revengai.api.firmware_api import FirmwareApi as FirmwareApi from revengai.api.functions_ai_decompilation_api import FunctionsAIDecompilationApi as FunctionsAIDecompilationApi @@ -383,7 +364,6 @@ from revengai.exceptions import ApiException as ApiException # import models into sdk package -from revengai.models.ann_function import ANNFunction as ANNFunction from revengai.models.addr import Addr as Addr from revengai.models.ai_decompilation_rating import AiDecompilationRating as AiDecompilationRating from revengai.models.ai_unstrip_request import AiUnstripRequest as AiUnstripRequest @@ -430,7 +410,6 @@ from revengai.models.base_response_block_comments_generation_for_function_response import BaseResponseBlockCommentsGenerationForFunctionResponse as BaseResponseBlockCommentsGenerationForFunctionResponse from revengai.models.base_response_block_comments_overview_generation_response import BaseResponseBlockCommentsOverviewGenerationResponse as BaseResponseBlockCommentsOverviewGenerationResponse from revengai.models.base_response_bool import BaseResponseBool as BaseResponseBool -from revengai.models.base_response_box_plot_confidence import BaseResponseBoxPlotConfidence as BaseResponseBoxPlotConfidence from revengai.models.base_response_callees_caller_functions_response import BaseResponseCalleesCallerFunctionsResponse as BaseResponseCalleesCallerFunctionsResponse from revengai.models.base_response_capabilities import BaseResponseCapabilities as BaseResponseCapabilities from revengai.models.base_response_check_security_checks_task_response import BaseResponseCheckSecurityChecksTaskResponse as BaseResponseCheckSecurityChecksTaskResponse @@ -463,16 +442,12 @@ from revengai.models.base_response_list_collection_results import BaseResponseListCollectionResults as BaseResponseListCollectionResults from revengai.models.base_response_list_comment_response import BaseResponseListCommentResponse as BaseResponseListCommentResponse from revengai.models.base_response_list_die_match import BaseResponseListDieMatch as BaseResponseListDieMatch -from revengai.models.base_response_list_function_box_plot_confidence import BaseResponseListFunctionBoxPlotConfidence as BaseResponseListFunctionBoxPlotConfidence from revengai.models.base_response_list_function_name_history import BaseResponseListFunctionNameHistory as BaseResponseListFunctionNameHistory from revengai.models.base_response_list_sbom import BaseResponseListSBOM as BaseResponseListSBOM -from revengai.models.base_response_list_similar_functions_response import BaseResponseListSimilarFunctionsResponse as BaseResponseListSimilarFunctionsResponse -from revengai.models.base_response_list_tag_origin_box_plot_confidence import BaseResponseListTagOriginBoxPlotConfidence as BaseResponseListTagOriginBoxPlotConfidence from revengai.models.base_response_list_user_activity_response import BaseResponseListUserActivityResponse as BaseResponseListUserActivityResponse from revengai.models.base_response_login_response import BaseResponseLoginResponse as BaseResponseLoginResponse from revengai.models.base_response_logs import BaseResponseLogs as BaseResponseLogs from revengai.models.base_response_models_response import BaseResponseModelsResponse as BaseResponseModelsResponse -from revengai.models.base_response_nearest_neighbor_analysis import BaseResponseNearestNeighborAnalysis as BaseResponseNearestNeighborAnalysis from revengai.models.base_response_network_overview_response import BaseResponseNetworkOverviewResponse as BaseResponseNetworkOverviewResponse from revengai.models.base_response_params import BaseResponseParams as BaseResponseParams from revengai.models.base_response_process_dumps import BaseResponseProcessDumps as BaseResponseProcessDumps @@ -501,7 +476,6 @@ from revengai.models.binary_task_status import BinaryTaskStatus as BinaryTaskStatus from revengai.models.block import Block as Block from revengai.models.block_comments_generation_for_function_response import BlockCommentsGenerationForFunctionResponse as BlockCommentsGenerationForFunctionResponse -from revengai.models.box_plot_confidence import BoxPlotConfidence as BoxPlotConfidence from revengai.models.callee_function_info import CalleeFunctionInfo as CalleeFunctionInfo from revengai.models.callees_caller_functions_response import CalleesCallerFunctionsResponse as CalleesCallerFunctionsResponse from revengai.models.caller_function_info import CallerFunctionInfo as CallerFunctionInfo @@ -557,7 +531,6 @@ from revengai.models.function_block_response import FunctionBlockResponse as FunctionBlockResponse from revengai.models.function_blocks_response import FunctionBlocksResponse as FunctionBlocksResponse from revengai.models.function_boundary import FunctionBoundary as FunctionBoundary -from revengai.models.function_box_plot_confidence import FunctionBoxPlotConfidence as FunctionBoxPlotConfidence from revengai.models.function_capability_response import FunctionCapabilityResponse as FunctionCapabilityResponse from revengai.models.function_comment_create_request import FunctionCommentCreateRequest as FunctionCommentCreateRequest from revengai.models.function_data_types import FunctionDataTypes as FunctionDataTypes @@ -576,9 +549,7 @@ from revengai.models.function_matching_filters import FunctionMatchingFilters as FunctionMatchingFilters from revengai.models.function_matching_request import FunctionMatchingRequest as FunctionMatchingRequest from revengai.models.function_matching_result_with_best_match import FunctionMatchingResultWithBestMatch as FunctionMatchingResultWithBestMatch -from revengai.models.function_name_confidence_body import FunctionNameConfidenceBody as FunctionNameConfidenceBody from revengai.models.function_name_history import FunctionNameHistory as FunctionNameHistory -from revengai.models.function_name_input import FunctionNameInput as FunctionNameInput from revengai.models.function_param_response import FunctionParamResponse as FunctionParamResponse from revengai.models.function_rename import FunctionRename as FunctionRename from revengai.models.function_rename_map import FunctionRenameMap as FunctionRenameMap @@ -615,13 +586,11 @@ from revengai.models.model_name import ModelName as ModelName from revengai.models.models_response import ModelsResponse as ModelsResponse from revengai.models.name_confidence import NameConfidence as NameConfidence -from revengai.models.nearest_neighbor import NearestNeighbor as NearestNeighbor from revengai.models.network_overview_dns import NetworkOverviewDns as NetworkOverviewDns from revengai.models.network_overview_dns_answer import NetworkOverviewDnsAnswer as NetworkOverviewDnsAnswer from revengai.models.network_overview_metadata import NetworkOverviewMetadata as NetworkOverviewMetadata from revengai.models.network_overview_response import NetworkOverviewResponse as NetworkOverviewResponse from revengai.models.order import Order as Order -from revengai.models.origin import Origin as Origin 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 @@ -648,7 +617,6 @@ from revengai.models.security_checks_result import SecurityChecksResult as SecurityChecksResult from revengai.models.security_model import SecurityModel as SecurityModel from revengai.models.severity_type import SeverityType as SeverityType -from revengai.models.similar_functions_response import SimilarFunctionsResponse as SimilarFunctionsResponse 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 @@ -666,15 +634,11 @@ from revengai.models.ttps_element import TTPSElement as TTPSElement from revengai.models.ttps_occurance import TTPSOccurance as TTPSOccurance from revengai.models.tag import Tag as Tag -from revengai.models.tag_confidence_body import TagConfidenceBody as TagConfidenceBody -from revengai.models.tag_origin_box_plot_confidence import TagOriginBoxPlotConfidence as TagOriginBoxPlotConfidence from revengai.models.tag_response import TagResponse as TagResponse from revengai.models.tag_search_response import TagSearchResponse as TagSearchResponse from revengai.models.tag_search_result import TagSearchResult as TagSearchResult -from revengai.models.tags import Tags as Tags from revengai.models.task_response import TaskResponse as TaskResponse from revengai.models.task_status import TaskStatus as TaskStatus -from revengai.models.threat_score_function_body import ThreatScoreFunctionBody as ThreatScoreFunctionBody from revengai.models.timestamp_model import TimestampModel as TimestampModel from revengai.models.type_definition import TypeDefinition as TypeDefinition from revengai.models.update_function_data_types import UpdateFunctionDataTypes as UpdateFunctionDataTypes diff --git a/revengai/api/__init__.py b/revengai/api/__init__.py index e4e7c87..8d6f02d 100644 --- a/revengai/api/__init__.py +++ b/revengai/api/__init__.py @@ -9,7 +9,6 @@ from revengai.api.authentication_users_api import AuthenticationUsersApi from revengai.api.binaries_api import BinariesApi from revengai.api.collections_api import CollectionsApi -from revengai.api.confidence_api import ConfidenceApi from revengai.api.external_sources_api import ExternalSourcesApi from revengai.api.firmware_api import FirmwareApi from revengai.api.functions_ai_decompilation_api import FunctionsAIDecompilationApi diff --git a/revengai/api/analyses_core_api.py b/revengai/api/analyses_core_api.py index 6e734bc..9d67007 100644 --- a/revengai/api/analyses_core_api.py +++ b/revengai/api/analyses_core_api.py @@ -18,7 +18,6 @@ from pydantic import Field, StrictBool, StrictBytes, StrictInt, StrictStr from typing import Any, List, Optional, Tuple, Union from typing_extensions import Annotated -from revengai.models.ann_function import ANNFunction from revengai.models.analysis_create_request import AnalysisCreateRequest from revengai.models.analysis_update_request import AnalysisUpdateRequest from revengai.models.analysis_update_tags_request import AnalysisUpdateTagsRequest @@ -32,7 +31,6 @@ from revengai.models.base_response_created import BaseResponseCreated from revengai.models.base_response_dict import BaseResponseDict from revengai.models.base_response_logs import BaseResponseLogs -from revengai.models.base_response_nearest_neighbor_analysis import BaseResponseNearestNeighborAnalysis from revengai.models.base_response_params import BaseResponseParams from revengai.models.base_response_recent import BaseResponseRecent from revengai.models.base_response_status import BaseResponseStatus @@ -617,298 +615,6 @@ def _delete_analysis_serialize( - @validate_call - def find_similar_functions_batch( - self, - analysis_id: StrictInt, - ann_function: ANNFunction, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> BaseResponseNearestNeighborAnalysis: - """Batch Symbol ANN using Analysis ID - - Takes a analysis ID and returns the nearest functions within the database that match those functions - - :param analysis_id: (required) - :type analysis_id: int - :param ann_function: (required) - :type ann_function: ANNFunction - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._find_similar_functions_batch_serialize( - analysis_id=analysis_id, - ann_function=ann_function, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "BaseResponseNearestNeighborAnalysis", - '422': "BaseResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def find_similar_functions_batch_with_http_info( - self, - analysis_id: StrictInt, - ann_function: ANNFunction, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[BaseResponseNearestNeighborAnalysis]: - """Batch Symbol ANN using Analysis ID - - Takes a analysis ID and returns the nearest functions within the database that match those functions - - :param analysis_id: (required) - :type analysis_id: int - :param ann_function: (required) - :type ann_function: ANNFunction - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._find_similar_functions_batch_serialize( - analysis_id=analysis_id, - ann_function=ann_function, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "BaseResponseNearestNeighborAnalysis", - '422': "BaseResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def find_similar_functions_batch_without_preload_content( - self, - analysis_id: StrictInt, - ann_function: ANNFunction, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Batch Symbol ANN using Analysis ID - - Takes a analysis ID and returns the nearest functions within the database that match those functions - - :param analysis_id: (required) - :type analysis_id: int - :param ann_function: (required) - :type ann_function: ANNFunction - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._find_similar_functions_batch_serialize( - analysis_id=analysis_id, - ann_function=ann_function, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "BaseResponseNearestNeighborAnalysis", - '422': "BaseResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _find_similar_functions_batch_serialize( - self, - analysis_id, - ann_function, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if analysis_id is not None: - _path_params['analysis_id'] = analysis_id - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - if ann_function is not None: - _body_params = ann_function - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'APIKey' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/v2/analyses/{analysis_id}/similarity/functions', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - @validate_call def get_analysis_basic_info( self, diff --git a/revengai/api/confidence_api.py b/revengai/api/confidence_api.py deleted file mode 100644 index 4a3fc12..0000000 --- a/revengai/api/confidence_api.py +++ /dev/null @@ -1,1152 +0,0 @@ -# coding: utf-8 - -""" - RevEng.AI API - - RevEng.AI is Similarity Search Engine for executable binaries - - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - -import warnings -from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Any, Dict, List, Optional, Tuple, Union -from typing_extensions import Annotated - -from pydantic import Field, StrictInt -from typing_extensions import Annotated -from revengai.models.base_response_box_plot_confidence import BaseResponseBoxPlotConfidence -from revengai.models.base_response_list_function_box_plot_confidence import BaseResponseListFunctionBoxPlotConfidence -from revengai.models.base_response_list_tag_origin_box_plot_confidence import BaseResponseListTagOriginBoxPlotConfidence -from revengai.models.function_name_confidence_body import FunctionNameConfidenceBody -from revengai.models.tag_confidence_body import TagConfidenceBody -from revengai.models.threat_score_function_body import ThreatScoreFunctionBody - -from revengai.api_client import ApiClient, RequestSerialized -from revengai.api_response import ApiResponse -from revengai.rest import RESTResponseType - - -class ConfidenceApi: - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - def __init__(self, api_client=None) -> None: - if api_client is None: - api_client = ApiClient.get_default() - self.api_client = api_client - - - @validate_call - def get_analysis_tag_score( - self, - analysis_id: Annotated[StrictInt, Field(description="The analysis to calculate the tag scores for")], - tag_confidence_body: TagConfidenceBody, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> BaseResponseListTagOriginBoxPlotConfidence: - """Calculate Tag Confidence Score for an Analysis - - Accepts a analysis ID and a list of tags, returns the confidence score for each tag in the list - - :param analysis_id: The analysis to calculate the tag scores for (required) - :type analysis_id: int - :param tag_confidence_body: (required) - :type tag_confidence_body: TagConfidenceBody - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_analysis_tag_score_serialize( - analysis_id=analysis_id, - tag_confidence_body=tag_confidence_body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "BaseResponseListTagOriginBoxPlotConfidence", - '422': "BaseResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def get_analysis_tag_score_with_http_info( - self, - analysis_id: Annotated[StrictInt, Field(description="The analysis to calculate the tag scores for")], - tag_confidence_body: TagConfidenceBody, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[BaseResponseListTagOriginBoxPlotConfidence]: - """Calculate Tag Confidence Score for an Analysis - - Accepts a analysis ID and a list of tags, returns the confidence score for each tag in the list - - :param analysis_id: The analysis to calculate the tag scores for (required) - :type analysis_id: int - :param tag_confidence_body: (required) - :type tag_confidence_body: TagConfidenceBody - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_analysis_tag_score_serialize( - analysis_id=analysis_id, - tag_confidence_body=tag_confidence_body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "BaseResponseListTagOriginBoxPlotConfidence", - '422': "BaseResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def get_analysis_tag_score_without_preload_content( - self, - analysis_id: Annotated[StrictInt, Field(description="The analysis to calculate the tag scores for")], - tag_confidence_body: TagConfidenceBody, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Calculate Tag Confidence Score for an Analysis - - Accepts a analysis ID and a list of tags, returns the confidence score for each tag in the list - - :param analysis_id: The analysis to calculate the tag scores for (required) - :type analysis_id: int - :param tag_confidence_body: (required) - :type tag_confidence_body: TagConfidenceBody - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_analysis_tag_score_serialize( - analysis_id=analysis_id, - tag_confidence_body=tag_confidence_body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "BaseResponseListTagOriginBoxPlotConfidence", - '422': "BaseResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _get_analysis_tag_score_serialize( - self, - analysis_id, - tag_confidence_body, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if analysis_id is not None: - _path_params['analysis_id'] = analysis_id - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - if tag_confidence_body is not None: - _body_params = tag_confidence_body - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'APIKey' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/v2/confidence/analysis/{analysis_id}/tag_score', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def get_analysis_threat_score( - self, - analysis_id: Annotated[StrictInt, Field(description="The analysis to calculate the threat score for")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> BaseResponseBoxPlotConfidence: - """Calculate Threat Score for Binary - - Accepts a binary ID and returns the threat score for that binary - - :param analysis_id: The analysis to calculate the threat score for (required) - :type analysis_id: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_analysis_threat_score_serialize( - analysis_id=analysis_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "BaseResponseBoxPlotConfidence", - '422': "BaseResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def get_analysis_threat_score_with_http_info( - self, - analysis_id: Annotated[StrictInt, Field(description="The analysis to calculate the threat score for")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[BaseResponseBoxPlotConfidence]: - """Calculate Threat Score for Binary - - Accepts a binary ID and returns the threat score for that binary - - :param analysis_id: The analysis to calculate the threat score for (required) - :type analysis_id: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_analysis_threat_score_serialize( - analysis_id=analysis_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "BaseResponseBoxPlotConfidence", - '422': "BaseResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def get_analysis_threat_score_without_preload_content( - self, - analysis_id: Annotated[StrictInt, Field(description="The analysis to calculate the threat score for")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Calculate Threat Score for Binary - - Accepts a binary ID and returns the threat score for that binary - - :param analysis_id: The analysis to calculate the threat score for (required) - :type analysis_id: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_analysis_threat_score_serialize( - analysis_id=analysis_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "BaseResponseBoxPlotConfidence", - '422': "BaseResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _get_analysis_threat_score_serialize( - self, - analysis_id, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if analysis_id is not None: - _path_params['analysis_id'] = analysis_id - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'APIKey' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/v2/confidence/analysis/{analysis_id}/threat_score', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def get_functions_name_score( - self, - function_name_confidence_body: FunctionNameConfidenceBody, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> BaseResponseListFunctionBoxPlotConfidence: - """Calculate function name confidence for a set of Functions - - Accepts a list of function ids mapped to a function name, for each function we return a confidence score in that being the correct name for each function. Each function must be from the same model, or you may find some functions missing in the return. - - :param function_name_confidence_body: (required) - :type function_name_confidence_body: FunctionNameConfidenceBody - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_functions_name_score_serialize( - function_name_confidence_body=function_name_confidence_body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "BaseResponseListFunctionBoxPlotConfidence", - '422': "BaseResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def get_functions_name_score_with_http_info( - self, - function_name_confidence_body: FunctionNameConfidenceBody, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[BaseResponseListFunctionBoxPlotConfidence]: - """Calculate function name confidence for a set of Functions - - Accepts a list of function ids mapped to a function name, for each function we return a confidence score in that being the correct name for each function. Each function must be from the same model, or you may find some functions missing in the return. - - :param function_name_confidence_body: (required) - :type function_name_confidence_body: FunctionNameConfidenceBody - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_functions_name_score_serialize( - function_name_confidence_body=function_name_confidence_body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "BaseResponseListFunctionBoxPlotConfidence", - '422': "BaseResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def get_functions_name_score_without_preload_content( - self, - function_name_confidence_body: FunctionNameConfidenceBody, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Calculate function name confidence for a set of Functions - - Accepts a list of function ids mapped to a function name, for each function we return a confidence score in that being the correct name for each function. Each function must be from the same model, or you may find some functions missing in the return. - - :param function_name_confidence_body: (required) - :type function_name_confidence_body: FunctionNameConfidenceBody - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_functions_name_score_serialize( - function_name_confidence_body=function_name_confidence_body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "BaseResponseListFunctionBoxPlotConfidence", - '422': "BaseResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _get_functions_name_score_serialize( - self, - function_name_confidence_body, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - if function_name_confidence_body is not None: - _body_params = function_name_confidence_body - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'APIKey' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/v2/confidence/functions/name_score', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def get_functions_threat_score( - self, - threat_score_function_body: ThreatScoreFunctionBody, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> BaseResponseListFunctionBoxPlotConfidence: - """Calculate Threat Score for a set of Functions - - Accepts a list of function ids and returns the threat score for each function. Each function must be from the same model, or you may find some functions missing in the return. - - :param threat_score_function_body: (required) - :type threat_score_function_body: ThreatScoreFunctionBody - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_functions_threat_score_serialize( - threat_score_function_body=threat_score_function_body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "BaseResponseListFunctionBoxPlotConfidence", - '422': "BaseResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def get_functions_threat_score_with_http_info( - self, - threat_score_function_body: ThreatScoreFunctionBody, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[BaseResponseListFunctionBoxPlotConfidence]: - """Calculate Threat Score for a set of Functions - - Accepts a list of function ids and returns the threat score for each function. Each function must be from the same model, or you may find some functions missing in the return. - - :param threat_score_function_body: (required) - :type threat_score_function_body: ThreatScoreFunctionBody - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_functions_threat_score_serialize( - threat_score_function_body=threat_score_function_body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "BaseResponseListFunctionBoxPlotConfidence", - '422': "BaseResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def get_functions_threat_score_without_preload_content( - self, - threat_score_function_body: ThreatScoreFunctionBody, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Calculate Threat Score for a set of Functions - - Accepts a list of function ids and returns the threat score for each function. Each function must be from the same model, or you may find some functions missing in the return. - - :param threat_score_function_body: (required) - :type threat_score_function_body: ThreatScoreFunctionBody - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_functions_threat_score_serialize( - threat_score_function_body=threat_score_function_body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "BaseResponseListFunctionBoxPlotConfidence", - '422': "BaseResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _get_functions_threat_score_serialize( - self, - threat_score_function_body, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - if threat_score_function_body is not None: - _body_params = threat_score_function_body - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'APIKey' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/v2/confidence/functions/threat_score', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - diff --git a/revengai/api/functions_core_api.py b/revengai/api/functions_core_api.py index 7fcd3ed..216995a 100644 --- a/revengai/api/functions_core_api.py +++ b/revengai/api/functions_core_api.py @@ -15,8 +15,8 @@ from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from pydantic import Field, StrictBool, StrictInt, StrictStr, field_validator -from typing import List, Optional, Union +from pydantic import Field, StrictInt, StrictStr +from typing import Optional from typing_extensions import Annotated from revengai.models.ai_unstrip_request import AiUnstripRequest from revengai.models.analysis_function_matching_request import AnalysisFunctionMatchingRequest @@ -28,7 +28,6 @@ from revengai.models.base_response_function_capability_response import BaseResponseFunctionCapabilityResponse from revengai.models.base_response_function_strings_response import BaseResponseFunctionStringsResponse from revengai.models.base_response_functions_detail_response import BaseResponseFunctionsDetailResponse -from revengai.models.base_response_list_similar_functions_response import BaseResponseListSimilarFunctionsResponse from revengai.models.function_matching_batch_response import FunctionMatchingBatchResponse from revengai.models.function_matching_request import FunctionMatchingRequest @@ -3429,369 +3428,3 @@ def _get_function_strings_serialize( ) - - - @validate_call - def get_similar_functions( - self, - function_id: StrictInt, - limit: Annotated[Optional[StrictInt], Field(description="Number of similar functions to return")] = None, - distance: Annotated[Optional[Union[Annotated[float, Field(le=1.0, strict=True, ge=0.0)], Annotated[int, Field(le=1, strict=True, ge=0)]]], Field(description="Maximum cosine distance")] = None, - collection_ids: Annotated[Optional[List[Optional[StrictInt]]], Field(description="Collection filtering by IDs")] = None, - debug: Annotated[Optional[StrictBool], Field(description="Only return matching debug functions")] = None, - debug_types: Annotated[Optional[List[StrictStr]], Field(description="If limiting results to functions with debug names, which type of debug names to include?")] = None, - binary_ids: Annotated[Optional[List[Optional[StrictInt]]], Field(description="Limit similar functions to specific binaries")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> BaseResponseListSimilarFunctionsResponse: - """Get list of similar functions - - - :param function_id: (required) - :type function_id: int - :param limit: Number of similar functions to return - :type limit: int - :param distance: Maximum cosine distance - :type distance: float - :param collection_ids: Collection filtering by IDs - :type collection_ids: List[Optional[int]] - :param debug: Only return matching debug functions - :type debug: bool - :param debug_types: If limiting results to functions with debug names, which type of debug names to include? - :type debug_types: List[str] - :param binary_ids: Limit similar functions to specific binaries - :type binary_ids: List[Optional[int]] - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_similar_functions_serialize( - function_id=function_id, - limit=limit, - distance=distance, - collection_ids=collection_ids, - debug=debug, - debug_types=debug_types, - binary_ids=binary_ids, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "BaseResponseListSimilarFunctionsResponse", - '422': "BaseResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def get_similar_functions_with_http_info( - self, - function_id: StrictInt, - limit: Annotated[Optional[StrictInt], Field(description="Number of similar functions to return")] = None, - distance: Annotated[Optional[Union[Annotated[float, Field(le=1.0, strict=True, ge=0.0)], Annotated[int, Field(le=1, strict=True, ge=0)]]], Field(description="Maximum cosine distance")] = None, - collection_ids: Annotated[Optional[List[Optional[StrictInt]]], Field(description="Collection filtering by IDs")] = None, - debug: Annotated[Optional[StrictBool], Field(description="Only return matching debug functions")] = None, - debug_types: Annotated[Optional[List[StrictStr]], Field(description="If limiting results to functions with debug names, which type of debug names to include?")] = None, - binary_ids: Annotated[Optional[List[Optional[StrictInt]]], Field(description="Limit similar functions to specific binaries")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[BaseResponseListSimilarFunctionsResponse]: - """Get list of similar functions - - - :param function_id: (required) - :type function_id: int - :param limit: Number of similar functions to return - :type limit: int - :param distance: Maximum cosine distance - :type distance: float - :param collection_ids: Collection filtering by IDs - :type collection_ids: List[Optional[int]] - :param debug: Only return matching debug functions - :type debug: bool - :param debug_types: If limiting results to functions with debug names, which type of debug names to include? - :type debug_types: List[str] - :param binary_ids: Limit similar functions to specific binaries - :type binary_ids: List[Optional[int]] - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_similar_functions_serialize( - function_id=function_id, - limit=limit, - distance=distance, - collection_ids=collection_ids, - debug=debug, - debug_types=debug_types, - binary_ids=binary_ids, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "BaseResponseListSimilarFunctionsResponse", - '422': "BaseResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def get_similar_functions_without_preload_content( - self, - function_id: StrictInt, - limit: Annotated[Optional[StrictInt], Field(description="Number of similar functions to return")] = None, - distance: Annotated[Optional[Union[Annotated[float, Field(le=1.0, strict=True, ge=0.0)], Annotated[int, Field(le=1, strict=True, ge=0)]]], Field(description="Maximum cosine distance")] = None, - collection_ids: Annotated[Optional[List[Optional[StrictInt]]], Field(description="Collection filtering by IDs")] = None, - debug: Annotated[Optional[StrictBool], Field(description="Only return matching debug functions")] = None, - debug_types: Annotated[Optional[List[StrictStr]], Field(description="If limiting results to functions with debug names, which type of debug names to include?")] = None, - binary_ids: Annotated[Optional[List[Optional[StrictInt]]], Field(description="Limit similar functions to specific binaries")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Get list of similar functions - - - :param function_id: (required) - :type function_id: int - :param limit: Number of similar functions to return - :type limit: int - :param distance: Maximum cosine distance - :type distance: float - :param collection_ids: Collection filtering by IDs - :type collection_ids: List[Optional[int]] - :param debug: Only return matching debug functions - :type debug: bool - :param debug_types: If limiting results to functions with debug names, which type of debug names to include? - :type debug_types: List[str] - :param binary_ids: Limit similar functions to specific binaries - :type binary_ids: List[Optional[int]] - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_similar_functions_serialize( - function_id=function_id, - limit=limit, - distance=distance, - collection_ids=collection_ids, - debug=debug, - debug_types=debug_types, - binary_ids=binary_ids, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "BaseResponseListSimilarFunctionsResponse", - '422': "BaseResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _get_similar_functions_serialize( - self, - function_id, - limit, - distance, - collection_ids, - debug, - debug_types, - binary_ids, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - 'collection_ids': 'multi', - 'debug_types': 'multi', - 'binary_ids': 'multi', - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if function_id is not None: - _path_params['function_id'] = function_id - # process the query parameters - if limit is not None: - - _query_params.append(('limit', limit)) - - if distance is not None: - - _query_params.append(('distance', distance)) - - if collection_ids is not None: - - _query_params.append(('collection_ids', collection_ids)) - - if debug is not None: - - _query_params.append(('debug', debug)) - - if debug_types is not None: - - _query_params.append(('debug_types', debug_types)) - - if binary_ids is not None: - - _query_params.append(('binary_ids', binary_ids)) - - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'APIKey' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/v2/functions/{function_id}/similar-functions', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - diff --git a/revengai/api_client.py b/revengai/api_client.py index 544c97b..d70d1ce 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/v2.3.0/python' + self.user_agent = 'OpenAPI-Generator/v2.8.0/python' self.client_side_validation = configuration.client_side_validation def __enter__(self): diff --git a/revengai/configuration.py b/revengai/configuration.py index d93d060..0020ccb 100644 --- a/revengai/configuration.py +++ b/revengai/configuration.py @@ -529,8 +529,8 @@ def to_debug_report(self) -> str: return "Python SDK Debug Report:\n"\ "OS: {env}\n"\ "Python Version: {pyversion}\n"\ - "Version of the API: v2.3.0\n"\ - "SDK Package Version: v2.3.0".\ + "Version of the API: v2.8.0\n"\ + "SDK Package Version: v2.8.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 7f8c8e0..5887412 100644 --- a/revengai/models/__init__.py +++ b/revengai/models/__init__.py @@ -12,7 +12,6 @@ """ # noqa: E501 # import models into model package -from revengai.models.ann_function import ANNFunction from revengai.models.addr import Addr from revengai.models.ai_decompilation_rating import AiDecompilationRating from revengai.models.ai_unstrip_request import AiUnstripRequest @@ -59,7 +58,6 @@ from revengai.models.base_response_block_comments_generation_for_function_response import BaseResponseBlockCommentsGenerationForFunctionResponse from revengai.models.base_response_block_comments_overview_generation_response import BaseResponseBlockCommentsOverviewGenerationResponse from revengai.models.base_response_bool import BaseResponseBool -from revengai.models.base_response_box_plot_confidence import BaseResponseBoxPlotConfidence from revengai.models.base_response_callees_caller_functions_response import BaseResponseCalleesCallerFunctionsResponse from revengai.models.base_response_capabilities import BaseResponseCapabilities from revengai.models.base_response_check_security_checks_task_response import BaseResponseCheckSecurityChecksTaskResponse @@ -92,16 +90,12 @@ from revengai.models.base_response_list_collection_results import BaseResponseListCollectionResults from revengai.models.base_response_list_comment_response import BaseResponseListCommentResponse from revengai.models.base_response_list_die_match import BaseResponseListDieMatch -from revengai.models.base_response_list_function_box_plot_confidence import BaseResponseListFunctionBoxPlotConfidence from revengai.models.base_response_list_function_name_history import BaseResponseListFunctionNameHistory from revengai.models.base_response_list_sbom import BaseResponseListSBOM -from revengai.models.base_response_list_similar_functions_response import BaseResponseListSimilarFunctionsResponse -from revengai.models.base_response_list_tag_origin_box_plot_confidence import BaseResponseListTagOriginBoxPlotConfidence from revengai.models.base_response_list_user_activity_response import BaseResponseListUserActivityResponse from revengai.models.base_response_login_response import BaseResponseLoginResponse from revengai.models.base_response_logs import BaseResponseLogs from revengai.models.base_response_models_response import BaseResponseModelsResponse -from revengai.models.base_response_nearest_neighbor_analysis import BaseResponseNearestNeighborAnalysis from revengai.models.base_response_network_overview_response import BaseResponseNetworkOverviewResponse from revengai.models.base_response_params import BaseResponseParams from revengai.models.base_response_process_dumps import BaseResponseProcessDumps @@ -130,7 +124,6 @@ from revengai.models.binary_task_status import BinaryTaskStatus from revengai.models.block import Block from revengai.models.block_comments_generation_for_function_response import BlockCommentsGenerationForFunctionResponse -from revengai.models.box_plot_confidence import BoxPlotConfidence from revengai.models.callee_function_info import CalleeFunctionInfo from revengai.models.callees_caller_functions_response import CalleesCallerFunctionsResponse from revengai.models.caller_function_info import CallerFunctionInfo @@ -186,7 +179,6 @@ from revengai.models.function_block_response import FunctionBlockResponse from revengai.models.function_blocks_response import FunctionBlocksResponse from revengai.models.function_boundary import FunctionBoundary -from revengai.models.function_box_plot_confidence import FunctionBoxPlotConfidence from revengai.models.function_capability_response import FunctionCapabilityResponse from revengai.models.function_comment_create_request import FunctionCommentCreateRequest from revengai.models.function_data_types import FunctionDataTypes @@ -205,9 +197,7 @@ from revengai.models.function_matching_filters import FunctionMatchingFilters from revengai.models.function_matching_request import FunctionMatchingRequest from revengai.models.function_matching_result_with_best_match import FunctionMatchingResultWithBestMatch -from revengai.models.function_name_confidence_body import FunctionNameConfidenceBody from revengai.models.function_name_history import FunctionNameHistory -from revengai.models.function_name_input import FunctionNameInput from revengai.models.function_param_response import FunctionParamResponse from revengai.models.function_rename import FunctionRename from revengai.models.function_rename_map import FunctionRenameMap @@ -244,13 +234,11 @@ from revengai.models.model_name import ModelName from revengai.models.models_response import ModelsResponse from revengai.models.name_confidence import NameConfidence -from revengai.models.nearest_neighbor import NearestNeighbor from revengai.models.network_overview_dns import NetworkOverviewDns from revengai.models.network_overview_dns_answer import NetworkOverviewDnsAnswer from revengai.models.network_overview_metadata import NetworkOverviewMetadata from revengai.models.network_overview_response import NetworkOverviewResponse from revengai.models.order import Order -from revengai.models.origin import Origin from revengai.models.pdb_debug_model import PDBDebugModel from revengai.models.pe_model import PEModel from revengai.models.pagination_model import PaginationModel @@ -277,7 +265,6 @@ from revengai.models.security_checks_result import SecurityChecksResult from revengai.models.security_model import SecurityModel from revengai.models.severity_type import SeverityType -from revengai.models.similar_functions_response import SimilarFunctionsResponse 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 @@ -295,15 +282,11 @@ from revengai.models.ttps_element import TTPSElement from revengai.models.ttps_occurance import TTPSOccurance from revengai.models.tag import Tag -from revengai.models.tag_confidence_body import TagConfidenceBody -from revengai.models.tag_origin_box_plot_confidence import TagOriginBoxPlotConfidence from revengai.models.tag_response import TagResponse from revengai.models.tag_search_response import TagSearchResponse from revengai.models.tag_search_result import TagSearchResult -from revengai.models.tags import Tags from revengai.models.task_response import TaskResponse from revengai.models.task_status import TaskStatus -from revengai.models.threat_score_function_body import ThreatScoreFunctionBody from revengai.models.timestamp_model import TimestampModel from revengai.models.type_definition import TypeDefinition from revengai.models.update_function_data_types import UpdateFunctionDataTypes diff --git a/revengai/models/ann_function.py b/revengai/models/ann_function.py deleted file mode 100644 index e7efb84..0000000 --- a/revengai/models/ann_function.py +++ /dev/null @@ -1,122 +0,0 @@ -# coding: utf-8 - -""" - RevEng.AI API - - RevEng.AI is Similarity Search Engine for executable binaries - - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt -from typing import Any, ClassVar, Dict, List, Optional, Union -from typing_extensions import Annotated -from typing import Optional, Set -from typing_extensions import Self - -class ANNFunction(BaseModel): - """ - ANNFunction - """ # noqa: E501 - limit: Optional[StrictInt] = Field(default=5, description="The amount of neighbours per function ID") - distance: Optional[Union[StrictFloat, StrictInt]] = Field(default=0.1, description="The distance between two neighbours") - analysis_search_ids: Optional[List[Optional[StrictInt]]] = Field(default=None, description="Perform a search on functions within a list of analyses") - collection_search_ids: Optional[Annotated[List[Optional[StrictInt]], Field(max_length=5)]] = Field(default=None, description="Search only within these collections") - search_binary_ids: Optional[List[StrictInt]] = None - search_function_ids: Optional[List[StrictInt]] = None - debug_only: Optional[StrictBool] = Field(default=False, description="Searches for only functions which are debug") - additional_properties: Dict[str, Any] = {} - __properties: ClassVar[List[str]] = ["limit", "distance", "analysis_search_ids", "collection_search_ids", "search_binary_ids", "search_function_ids", "debug_only"] - - 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 ANNFunction 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 search_binary_ids (nullable) is None - # and model_fields_set contains the field - if self.search_binary_ids is None and "search_binary_ids" in self.model_fields_set: - _dict['search_binary_ids'] = None - - # set to None if search_function_ids (nullable) is None - # and model_fields_set contains the field - if self.search_function_ids is None and "search_function_ids" in self.model_fields_set: - _dict['search_function_ids'] = None - - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ANNFunction from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "limit": obj.get("limit") if obj.get("limit") is not None else 5, - "distance": obj.get("distance") if obj.get("distance") is not None else 0.1, - "analysis_search_ids": obj.get("analysis_search_ids"), - "collection_search_ids": obj.get("collection_search_ids"), - "search_binary_ids": obj.get("search_binary_ids"), - "search_function_ids": obj.get("search_function_ids"), - "debug_only": obj.get("debug_only") if obj.get("debug_only") is not None else False - }) - # 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/base_response_box_plot_confidence.py b/revengai/models/base_response_box_plot_confidence.py deleted file mode 100644 index 975afe9..0000000 --- a/revengai/models/base_response_box_plot_confidence.py +++ /dev/null @@ -1,125 +0,0 @@ -# coding: utf-8 - -""" - RevEng.AI API - - RevEng.AI is Similarity Search Engine for executable binaries - - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from revengai.models.box_plot_confidence import BoxPlotConfidence -from revengai.models.error_model import ErrorModel -from revengai.models.meta_model import MetaModel -from typing import Optional, Set -from typing_extensions import Self - -class BaseResponseBoxPlotConfidence(BaseModel): - """ - BaseResponseBoxPlotConfidence - """ # noqa: E501 - status: Optional[StrictBool] = Field(default=True, description="Response status on whether the request succeeded") - data: Optional[BoxPlotConfidence] = None - message: Optional[StrictStr] = None - errors: Optional[List[ErrorModel]] = None - meta: Optional[MetaModel] = Field(default=None, description="Metadata") - __properties: ClassVar[List[str]] = ["status", "data", "message", "errors", "meta"] - - 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 BaseResponseBoxPlotConfidence 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. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of data - if self.data: - _dict['data'] = self.data.to_dict() - # override the default output from pydantic by calling `to_dict()` of each item in errors (list) - _items = [] - if self.errors: - for _item_errors in self.errors: - if _item_errors: - _items.append(_item_errors.to_dict()) - _dict['errors'] = _items - # override the default output from pydantic by calling `to_dict()` of meta - if self.meta: - _dict['meta'] = self.meta.to_dict() - # set to None if data (nullable) is None - # and model_fields_set contains the field - if self.data is None and "data" in self.model_fields_set: - _dict['data'] = None - - # set to None if message (nullable) is None - # and model_fields_set contains the field - if self.message is None and "message" in self.model_fields_set: - _dict['message'] = None - - # set to None if errors (nullable) is None - # and model_fields_set contains the field - if self.errors is None and "errors" in self.model_fields_set: - _dict['errors'] = None - - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of BaseResponseBoxPlotConfidence from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "status": obj.get("status") if obj.get("status") is not None else True, - "data": BoxPlotConfidence.from_dict(obj["data"]) if obj.get("data") is not None else None, - "message": obj.get("message"), - "errors": [ErrorModel.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None, - "meta": MetaModel.from_dict(obj["meta"]) if obj.get("meta") is not None else None - }) - return _obj - - diff --git a/revengai/models/base_response_list_function_box_plot_confidence.py b/revengai/models/base_response_list_function_box_plot_confidence.py deleted file mode 100644 index dbd2d18..0000000 --- a/revengai/models/base_response_list_function_box_plot_confidence.py +++ /dev/null @@ -1,129 +0,0 @@ -# coding: utf-8 - -""" - RevEng.AI API - - RevEng.AI is Similarity Search Engine for executable binaries - - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from revengai.models.error_model import ErrorModel -from revengai.models.function_box_plot_confidence import FunctionBoxPlotConfidence -from revengai.models.meta_model import MetaModel -from typing import Optional, Set -from typing_extensions import Self - -class BaseResponseListFunctionBoxPlotConfidence(BaseModel): - """ - BaseResponseListFunctionBoxPlotConfidence - """ # noqa: E501 - status: Optional[StrictBool] = Field(default=True, description="Response status on whether the request succeeded") - data: Optional[List[FunctionBoxPlotConfidence]] = None - message: Optional[StrictStr] = None - errors: Optional[List[ErrorModel]] = None - meta: Optional[MetaModel] = Field(default=None, description="Metadata") - __properties: ClassVar[List[str]] = ["status", "data", "message", "errors", "meta"] - - 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 BaseResponseListFunctionBoxPlotConfidence 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. - """ - excluded_fields: Set[str] = set([ - ]) - - _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 data (list) - _items = [] - if self.data: - for _item_data in self.data: - if _item_data: - _items.append(_item_data.to_dict()) - _dict['data'] = _items - # override the default output from pydantic by calling `to_dict()` of each item in errors (list) - _items = [] - if self.errors: - for _item_errors in self.errors: - if _item_errors: - _items.append(_item_errors.to_dict()) - _dict['errors'] = _items - # override the default output from pydantic by calling `to_dict()` of meta - if self.meta: - _dict['meta'] = self.meta.to_dict() - # set to None if data (nullable) is None - # and model_fields_set contains the field - if self.data is None and "data" in self.model_fields_set: - _dict['data'] = None - - # set to None if message (nullable) is None - # and model_fields_set contains the field - if self.message is None and "message" in self.model_fields_set: - _dict['message'] = None - - # set to None if errors (nullable) is None - # and model_fields_set contains the field - if self.errors is None and "errors" in self.model_fields_set: - _dict['errors'] = None - - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of BaseResponseListFunctionBoxPlotConfidence from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "status": obj.get("status") if obj.get("status") is not None else True, - "data": [FunctionBoxPlotConfidence.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None, - "message": obj.get("message"), - "errors": [ErrorModel.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None, - "meta": MetaModel.from_dict(obj["meta"]) if obj.get("meta") is not None else None - }) - return _obj - - diff --git a/revengai/models/base_response_list_similar_functions_response.py b/revengai/models/base_response_list_similar_functions_response.py deleted file mode 100644 index c646d42..0000000 --- a/revengai/models/base_response_list_similar_functions_response.py +++ /dev/null @@ -1,129 +0,0 @@ -# coding: utf-8 - -""" - RevEng.AI API - - RevEng.AI is Similarity Search Engine for executable binaries - - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from revengai.models.error_model import ErrorModel -from revengai.models.meta_model import MetaModel -from revengai.models.similar_functions_response import SimilarFunctionsResponse -from typing import Optional, Set -from typing_extensions import Self - -class BaseResponseListSimilarFunctionsResponse(BaseModel): - """ - BaseResponseListSimilarFunctionsResponse - """ # noqa: E501 - status: Optional[StrictBool] = Field(default=True, description="Response status on whether the request succeeded") - data: Optional[List[SimilarFunctionsResponse]] = None - message: Optional[StrictStr] = None - errors: Optional[List[ErrorModel]] = None - meta: Optional[MetaModel] = Field(default=None, description="Metadata") - __properties: ClassVar[List[str]] = ["status", "data", "message", "errors", "meta"] - - 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 BaseResponseListSimilarFunctionsResponse 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. - """ - excluded_fields: Set[str] = set([ - ]) - - _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 data (list) - _items = [] - if self.data: - for _item_data in self.data: - if _item_data: - _items.append(_item_data.to_dict()) - _dict['data'] = _items - # override the default output from pydantic by calling `to_dict()` of each item in errors (list) - _items = [] - if self.errors: - for _item_errors in self.errors: - if _item_errors: - _items.append(_item_errors.to_dict()) - _dict['errors'] = _items - # override the default output from pydantic by calling `to_dict()` of meta - if self.meta: - _dict['meta'] = self.meta.to_dict() - # set to None if data (nullable) is None - # and model_fields_set contains the field - if self.data is None and "data" in self.model_fields_set: - _dict['data'] = None - - # set to None if message (nullable) is None - # and model_fields_set contains the field - if self.message is None and "message" in self.model_fields_set: - _dict['message'] = None - - # set to None if errors (nullable) is None - # and model_fields_set contains the field - if self.errors is None and "errors" in self.model_fields_set: - _dict['errors'] = None - - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of BaseResponseListSimilarFunctionsResponse from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "status": obj.get("status") if obj.get("status") is not None else True, - "data": [SimilarFunctionsResponse.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None, - "message": obj.get("message"), - "errors": [ErrorModel.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None, - "meta": MetaModel.from_dict(obj["meta"]) if obj.get("meta") is not None else None - }) - return _obj - - diff --git a/revengai/models/base_response_list_tag_origin_box_plot_confidence.py b/revengai/models/base_response_list_tag_origin_box_plot_confidence.py deleted file mode 100644 index 6829a83..0000000 --- a/revengai/models/base_response_list_tag_origin_box_plot_confidence.py +++ /dev/null @@ -1,129 +0,0 @@ -# coding: utf-8 - -""" - RevEng.AI API - - RevEng.AI is Similarity Search Engine for executable binaries - - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from revengai.models.error_model import ErrorModel -from revengai.models.meta_model import MetaModel -from revengai.models.tag_origin_box_plot_confidence import TagOriginBoxPlotConfidence -from typing import Optional, Set -from typing_extensions import Self - -class BaseResponseListTagOriginBoxPlotConfidence(BaseModel): - """ - BaseResponseListTagOriginBoxPlotConfidence - """ # noqa: E501 - status: Optional[StrictBool] = Field(default=True, description="Response status on whether the request succeeded") - data: Optional[List[TagOriginBoxPlotConfidence]] = None - message: Optional[StrictStr] = None - errors: Optional[List[ErrorModel]] = None - meta: Optional[MetaModel] = Field(default=None, description="Metadata") - __properties: ClassVar[List[str]] = ["status", "data", "message", "errors", "meta"] - - 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 BaseResponseListTagOriginBoxPlotConfidence 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. - """ - excluded_fields: Set[str] = set([ - ]) - - _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 data (list) - _items = [] - if self.data: - for _item_data in self.data: - if _item_data: - _items.append(_item_data.to_dict()) - _dict['data'] = _items - # override the default output from pydantic by calling `to_dict()` of each item in errors (list) - _items = [] - if self.errors: - for _item_errors in self.errors: - if _item_errors: - _items.append(_item_errors.to_dict()) - _dict['errors'] = _items - # override the default output from pydantic by calling `to_dict()` of meta - if self.meta: - _dict['meta'] = self.meta.to_dict() - # set to None if data (nullable) is None - # and model_fields_set contains the field - if self.data is None and "data" in self.model_fields_set: - _dict['data'] = None - - # set to None if message (nullable) is None - # and model_fields_set contains the field - if self.message is None and "message" in self.model_fields_set: - _dict['message'] = None - - # set to None if errors (nullable) is None - # and model_fields_set contains the field - if self.errors is None and "errors" in self.model_fields_set: - _dict['errors'] = None - - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of BaseResponseListTagOriginBoxPlotConfidence from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "status": obj.get("status") if obj.get("status") is not None else True, - "data": [TagOriginBoxPlotConfidence.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None, - "message": obj.get("message"), - "errors": [ErrorModel.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None, - "meta": MetaModel.from_dict(obj["meta"]) if obj.get("meta") is not None else None - }) - return _obj - - diff --git a/revengai/models/base_response_nearest_neighbor_analysis.py b/revengai/models/base_response_nearest_neighbor_analysis.py deleted file mode 100644 index eef5770..0000000 --- a/revengai/models/base_response_nearest_neighbor_analysis.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - RevEng.AI API - - RevEng.AI is Similarity Search Engine for executable binaries - - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from revengai.models.error_model import ErrorModel -from revengai.models.meta_model import MetaModel -from revengai.models.nearest_neighbor import NearestNeighbor -from typing import Optional, Set -from typing_extensions import Self - -class BaseResponseNearestNeighborAnalysis(BaseModel): - """ - BaseResponseNearestNeighborAnalysis - """ # noqa: E501 - status: Optional[StrictBool] = Field(default=True, description="Response status on whether the request succeeded") - data: Optional[Dict[str, Dict[str, NearestNeighbor]]] = None - message: Optional[StrictStr] = None - errors: Optional[List[ErrorModel]] = None - meta: Optional[MetaModel] = Field(default=None, description="Metadata") - __properties: ClassVar[List[str]] = ["status", "data", "message", "errors", "meta"] - - 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 BaseResponseNearestNeighborAnalysis 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. - """ - excluded_fields: Set[str] = set([ - ]) - - _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 value in data (dict) - _field_dict = {} - if self.data: - for _key_data in self.data: - if self.data[_key_data]: - _field_dict[_key_data] = self.data[_key_data].to_dict() - _dict['data'] = _field_dict - # override the default output from pydantic by calling `to_dict()` of each item in errors (list) - _items = [] - if self.errors: - for _item_errors in self.errors: - if _item_errors: - _items.append(_item_errors.to_dict()) - _dict['errors'] = _items - # override the default output from pydantic by calling `to_dict()` of meta - if self.meta: - _dict['meta'] = self.meta.to_dict() - # set to None if message (nullable) is None - # and model_fields_set contains the field - if self.message is None and "message" in self.model_fields_set: - _dict['message'] = None - - # set to None if errors (nullable) is None - # and model_fields_set contains the field - if self.errors is None and "errors" in self.model_fields_set: - _dict['errors'] = None - - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of BaseResponseNearestNeighborAnalysis from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "status": obj.get("status") if obj.get("status") is not None else True, - "data": dict( - (_k, dict( - (_ik, NearestNeighbor.from_dict(_iv)) - for _ik, _iv in _v.items() - ) - if _v is not None - else None - ) - for _k, _v in obj.get("data").items() - ) - if obj.get("data") is not None - else None, - "message": obj.get("message"), - "errors": [ErrorModel.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None, - "meta": MetaModel.from_dict(obj["meta"]) if obj.get("meta") is not None else None - }) - return _obj - - diff --git a/revengai/models/box_plot_confidence.py b/revengai/models/box_plot_confidence.py deleted file mode 100644 index a42b3e8..0000000 --- a/revengai/models/box_plot_confidence.py +++ /dev/null @@ -1,98 +0,0 @@ -# coding: utf-8 - -""" - RevEng.AI API - - RevEng.AI is Similarity Search Engine for executable binaries - - 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, StrictFloat, StrictInt -from typing import Any, ClassVar, Dict, List, Union -from typing import Optional, Set -from typing_extensions import Self - -class BoxPlotConfidence(BaseModel): - """ - Format for confidence - returned in the box plot format - """ # noqa: E501 - min: Union[StrictFloat, StrictInt] - max: Union[StrictFloat, StrictInt] - average: Union[StrictFloat, StrictInt] - upper_quartile: Union[StrictFloat, StrictInt] - lower_quartile: Union[StrictFloat, StrictInt] - positive_count: StrictInt - negative_count: StrictInt - __properties: ClassVar[List[str]] = ["min", "max", "average", "upper_quartile", "lower_quartile", "positive_count", "negative_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 BoxPlotConfidence 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. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of BoxPlotConfidence from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "min": obj.get("min"), - "max": obj.get("max"), - "average": obj.get("average"), - "upper_quartile": obj.get("upper_quartile"), - "lower_quartile": obj.get("lower_quartile"), - "positive_count": obj.get("positive_count"), - "negative_count": obj.get("negative_count") - }) - return _obj - - diff --git a/revengai/models/elf_relocation.py b/revengai/models/elf_relocation.py index f515021..111d562 100644 --- a/revengai/models/elf_relocation.py +++ b/revengai/models/elf_relocation.py @@ -26,7 +26,7 @@ class ELFRelocation(BaseModel): ELFRelocation """ # noqa: E501 address: StrictInt - type: StrictInt + type: StrictStr size: StrictInt addend: StrictInt symbol_name: StrictStr diff --git a/revengai/models/function_box_plot_confidence.py b/revengai/models/function_box_plot_confidence.py deleted file mode 100644 index b62884d..0000000 --- a/revengai/models/function_box_plot_confidence.py +++ /dev/null @@ -1,92 +0,0 @@ -# coding: utf-8 - -""" - RevEng.AI API - - RevEng.AI is Similarity Search Engine for executable binaries - - 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 -from revengai.models.box_plot_confidence import BoxPlotConfidence -from typing import Optional, Set -from typing_extensions import Self - -class FunctionBoxPlotConfidence(BaseModel): - """ - FunctionBoxPlotConfidence - """ # noqa: E501 - function_id: StrictInt - box_plot: BoxPlotConfidence - __properties: ClassVar[List[str]] = ["function_id", "box_plot"] - - 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 FunctionBoxPlotConfidence 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. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of box_plot - if self.box_plot: - _dict['box_plot'] = self.box_plot.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of FunctionBoxPlotConfidence from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "function_id": obj.get("function_id"), - "box_plot": BoxPlotConfidence.from_dict(obj["box_plot"]) if obj.get("box_plot") is not None else None - }) - return _obj - - diff --git a/revengai/models/function_name_confidence_body.py b/revengai/models/function_name_confidence_body.py deleted file mode 100644 index 03f9180..0000000 --- a/revengai/models/function_name_confidence_body.py +++ /dev/null @@ -1,97 +0,0 @@ -# coding: utf-8 - -""" - RevEng.AI API - - RevEng.AI is Similarity Search Engine for executable binaries - - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictBool -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated -from revengai.models.function_name_input import FunctionNameInput -from typing import Optional, Set -from typing_extensions import Self - -class FunctionNameConfidenceBody(BaseModel): - """ - FunctionNameConfidenceBody - """ # noqa: E501 - functions: Optional[Annotated[List[FunctionNameInput], Field(min_length=1, max_length=100)]] = Field(default=None, description="List of function ids and the function names they want to check confidence for") - is_debug: Optional[StrictBool] = Field(default=False, description="Flag to match only to a debug function") - __properties: ClassVar[List[str]] = ["functions", "is_debug"] - - 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 FunctionNameConfidenceBody 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. - """ - excluded_fields: Set[str] = set([ - ]) - - _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 functions (list) - _items = [] - if self.functions: - for _item_functions in self.functions: - if _item_functions: - _items.append(_item_functions.to_dict()) - _dict['functions'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of FunctionNameConfidenceBody from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "functions": [FunctionNameInput.from_dict(_item) for _item in obj["functions"]] if obj.get("functions") is not None else None, - "is_debug": obj.get("is_debug") if obj.get("is_debug") is not None else False - }) - return _obj - - diff --git a/revengai/models/function_name_input.py b/revengai/models/function_name_input.py deleted file mode 100644 index 00d7dc7..0000000 --- a/revengai/models/function_name_input.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding: utf-8 - -""" - RevEng.AI API - - RevEng.AI is Similarity Search Engine for executable binaries - - 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 -from typing import Optional, Set -from typing_extensions import Self - -class FunctionNameInput(BaseModel): - """ - FunctionNameInput - """ # noqa: E501 - function_id: StrictInt - function_name: StrictStr - __properties: ClassVar[List[str]] = ["function_id", "function_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 FunctionNameInput 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. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of FunctionNameInput from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "function_id": obj.get("function_id"), - "function_name": obj.get("function_name") - }) - return _obj - - diff --git a/revengai/models/functions_detail_response.py b/revengai/models/functions_detail_response.py index 1e80034..75131e0 100644 --- a/revengai/models/functions_detail_response.py +++ b/revengai/models/functions_detail_response.py @@ -16,7 +16,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, StrictFloat, StrictInt, StrictStr +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 @@ -34,9 +34,10 @@ class FunctionsDetailResponse(BaseModel): binary_name: StrictStr sha_256_hash: StrictStr debug_hash: Optional[StrictStr] + debug: StrictBool embedding_3d: Optional[List[Union[StrictFloat, StrictInt]]] = None embedding_1d: Optional[List[Union[StrictFloat, StrictInt]]] = None - __properties: ClassVar[List[str]] = ["function_id", "function_name", "function_vaddr", "function_size", "analysis_id", "binary_id", "binary_name", "sha_256_hash", "debug_hash", "embedding_3d", "embedding_1d"] + __properties: ClassVar[List[str]] = ["function_id", "function_name", "function_vaddr", "function_size", "analysis_id", "binary_id", "binary_name", "sha_256_hash", "debug_hash", "debug", "embedding_3d", "embedding_1d"] model_config = ConfigDict( populate_by_name=True, @@ -113,6 +114,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "binary_name": obj.get("binary_name"), "sha_256_hash": obj.get("sha_256_hash"), "debug_hash": obj.get("debug_hash"), + "debug": obj.get("debug"), "embedding_3d": obj.get("embedding_3d"), "embedding_1d": obj.get("embedding_1d") }) diff --git a/revengai/models/nearest_neighbor.py b/revengai/models/nearest_neighbor.py deleted file mode 100644 index fe6ac49..0000000 --- a/revengai/models/nearest_neighbor.py +++ /dev/null @@ -1,105 +0,0 @@ -# coding: utf-8 - -""" - RevEng.AI API - - RevEng.AI is Similarity Search Engine for executable binaries - - 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 NearestNeighbor(BaseModel): - """ - NearestNeighbor - """ # noqa: E501 - distance: Union[StrictFloat, StrictInt] - nearest_neighbor_analysis_id: StrictInt - nearest_neighbor_analysis_name: StrictStr - nearest_neighbor_function_name: StrictStr - nearest_neighbor_function_name_mangled: Optional[StrictStr] - nearest_neighbor_binary_id: StrictInt - nearest_neighbor_sha_256_hash: StrictStr - nearest_neighbor_debug: StrictBool - __properties: ClassVar[List[str]] = ["distance", "nearest_neighbor_analysis_id", "nearest_neighbor_analysis_name", "nearest_neighbor_function_name", "nearest_neighbor_function_name_mangled", "nearest_neighbor_binary_id", "nearest_neighbor_sha_256_hash", "nearest_neighbor_debug"] - - 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 NearestNeighbor 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. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # set to None if nearest_neighbor_function_name_mangled (nullable) is None - # and model_fields_set contains the field - if self.nearest_neighbor_function_name_mangled is None and "nearest_neighbor_function_name_mangled" in self.model_fields_set: - _dict['nearest_neighbor_function_name_mangled'] = None - - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of NearestNeighbor from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "distance": obj.get("distance"), - "nearest_neighbor_analysis_id": obj.get("nearest_neighbor_analysis_id"), - "nearest_neighbor_analysis_name": obj.get("nearest_neighbor_analysis_name"), - "nearest_neighbor_function_name": obj.get("nearest_neighbor_function_name"), - "nearest_neighbor_function_name_mangled": obj.get("nearest_neighbor_function_name_mangled"), - "nearest_neighbor_binary_id": obj.get("nearest_neighbor_binary_id"), - "nearest_neighbor_sha_256_hash": obj.get("nearest_neighbor_sha_256_hash"), - "nearest_neighbor_debug": obj.get("nearest_neighbor_debug") - }) - return _obj - - diff --git a/revengai/models/origin.py b/revengai/models/origin.py deleted file mode 100644 index 76b8400..0000000 --- a/revengai/models/origin.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding: utf-8 - -""" - RevEng.AI API - - RevEng.AI is Similarity Search Engine for executable binaries - - 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 Origin(str, Enum): - """ - Origin - """ - - """ - allowed enum values - """ - REV_ENG_MINUS_MALWARE = 'RevEng-Malware' - REV_ENG_MINUS_LIBRARY = 'RevEng-Library' - REV_ENG_MINUS_BENIGN = 'RevEng-Benign' - REVENG = 'RevEng' - REV_ENG_MINUS_HEURISTIC = 'RevEng-Heuristic' - REV_ENG_MINUS_UNKNOWN = 'RevEng-Unknown' - VIRUSTOTAL = 'VirusTotal' - MALWAREBAZAAR = 'MalwareBazaar' - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of Origin from a JSON string""" - return cls(json.loads(json_str)) - - diff --git a/revengai/models/similar_functions_response.py b/revengai/models/similar_functions_response.py deleted file mode 100644 index 5f006f5..0000000 --- a/revengai/models/similar_functions_response.py +++ /dev/null @@ -1,100 +0,0 @@ -# coding: utf-8 - -""" - RevEng.AI API - - RevEng.AI is Similarity Search Engine for executable binaries - - 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, StrictFloat, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Union -from typing import Optional, Set -from typing_extensions import Self - -class SimilarFunctionsResponse(BaseModel): - """ - SimilarFunctionsResponse - """ # noqa: E501 - function_id: StrictInt - function_name: StrictStr - binary_id: StrictInt - binary_name: StrictStr - distance: Union[StrictFloat, StrictInt] - embedding_3d: List[Union[StrictFloat, StrictInt]] - embedding_1d: List[Union[StrictFloat, StrictInt]] - sha_256_hash: StrictStr - __properties: ClassVar[List[str]] = ["function_id", "function_name", "binary_id", "binary_name", "distance", "embedding_3d", "embedding_1d", "sha_256_hash"] - - 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 SimilarFunctionsResponse 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. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of SimilarFunctionsResponse from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "function_id": obj.get("function_id"), - "function_name": obj.get("function_name"), - "binary_id": obj.get("binary_id"), - "binary_name": obj.get("binary_name"), - "distance": obj.get("distance"), - "embedding_3d": obj.get("embedding_3d"), - "embedding_1d": obj.get("embedding_1d"), - "sha_256_hash": obj.get("sha_256_hash") - }) - return _obj - - diff --git a/revengai/models/tag_confidence_body.py b/revengai/models/tag_confidence_body.py deleted file mode 100644 index b604cd4..0000000 --- a/revengai/models/tag_confidence_body.py +++ /dev/null @@ -1,95 +0,0 @@ -# coding: utf-8 - -""" - RevEng.AI API - - RevEng.AI is Similarity Search Engine for executable binaries - - 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 -from typing import Any, ClassVar, Dict, List -from typing_extensions import Annotated -from revengai.models.tags import Tags -from typing import Optional, Set -from typing_extensions import Self - -class TagConfidenceBody(BaseModel): - """ - TagConfidenceBody - """ # noqa: E501 - tags: Annotated[List[Tags], Field(min_length=1, max_length=10)] - __properties: ClassVar[List[str]] = ["tags"] - - 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 TagConfidenceBody 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. - """ - excluded_fields: Set[str] = set([ - ]) - - _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 tags (list) - _items = [] - if self.tags: - for _item_tags in self.tags: - if _item_tags: - _items.append(_item_tags.to_dict()) - _dict['tags'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of TagConfidenceBody from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "tags": [Tags.from_dict(_item) for _item in obj["tags"]] if obj.get("tags") is not None else None - }) - return _obj - - diff --git a/revengai/models/tag_origin_box_plot_confidence.py b/revengai/models/tag_origin_box_plot_confidence.py deleted file mode 100644 index 6f7ce34..0000000 --- a/revengai/models/tag_origin_box_plot_confidence.py +++ /dev/null @@ -1,96 +0,0 @@ -# coding: utf-8 - -""" - RevEng.AI API - - RevEng.AI is Similarity Search Engine for executable binaries - - 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 -from revengai.models.box_plot_confidence import BoxPlotConfidence -from revengai.models.tags import Tags -from typing import Optional, Set -from typing_extensions import Self - -class TagOriginBoxPlotConfidence(BaseModel): - """ - TagOriginBoxPlotConfidence - """ # noqa: E501 - tag: Tags - box_plot: BoxPlotConfidence - __properties: ClassVar[List[str]] = ["tag", "box_plot"] - - 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 TagOriginBoxPlotConfidence 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. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of tag - if self.tag: - _dict['tag'] = self.tag.to_dict() - # override the default output from pydantic by calling `to_dict()` of box_plot - if self.box_plot: - _dict['box_plot'] = self.box_plot.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of TagOriginBoxPlotConfidence from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "tag": Tags.from_dict(obj["tag"]) if obj.get("tag") is not None else None, - "box_plot": BoxPlotConfidence.from_dict(obj["box_plot"]) if obj.get("box_plot") is not None else None - }) - return _obj - - diff --git a/revengai/models/tags.py b/revengai/models/tags.py deleted file mode 100644 index be76a18..0000000 --- a/revengai/models/tags.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding: utf-8 - -""" - RevEng.AI API - - RevEng.AI is Similarity Search Engine for executable binaries - - 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 -from revengai.models.origin import Origin -from typing import Optional, Set -from typing_extensions import Self - -class Tags(BaseModel): - """ - Tags - """ # noqa: E501 - tag: StrictStr = Field(description="The tag name") - origin: Origin = Field(description="The origin of the tag") - __properties: ClassVar[List[str]] = ["tag", "origin"] - - 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 Tags 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. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of Tags from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "tag": obj.get("tag"), - "origin": obj.get("origin") - }) - return _obj - - diff --git a/revengai/models/threat_score_function_body.py b/revengai/models/threat_score_function_body.py deleted file mode 100644 index 95b8725..0000000 --- a/revengai/models/threat_score_function_body.py +++ /dev/null @@ -1,87 +0,0 @@ -# coding: utf-8 - -""" - RevEng.AI API - - RevEng.AI is Similarity Search Engine for executable binaries - - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictInt -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated -from typing import Optional, Set -from typing_extensions import Self - -class ThreatScoreFunctionBody(BaseModel): - """ - ThreatScoreFunctionBody - """ # noqa: E501 - function_ids: Optional[Annotated[List[StrictInt], Field(min_length=1, max_length=100)]] = Field(default=None, description="List of function IDs to calculate threat score for") - __properties: ClassVar[List[str]] = ["function_ids"] - - 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 ThreatScoreFunctionBody 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. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ThreatScoreFunctionBody from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "function_ids": obj.get("function_ids") - }) - return _obj - - diff --git a/test/test_analyses_core_api.py b/test/test_analyses_core_api.py index 8da5b60..6a8d972 100644 --- a/test/test_analyses_core_api.py +++ b/test/test_analyses_core_api.py @@ -39,13 +39,6 @@ def test_delete_analysis(self) -> None: """ pass - def test_find_similar_functions_batch(self) -> None: - """Test case for find_similar_functions_batch - - Batch Symbol ANN using Analysis ID - """ - pass - def test_get_analysis_basic_info(self) -> None: """Test case for get_analysis_basic_info diff --git a/test/test_ann_function.py b/test/test_ann_function.py deleted file mode 100644 index 41a9b65..0000000 --- a/test/test_ann_function.py +++ /dev/null @@ -1,64 +0,0 @@ -# coding: utf-8 - -""" - RevEng.AI API - - RevEng.AI is Similarity Search Engine for executable binaries - - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from revengai.models.ann_function import ANNFunction - -class TestANNFunction(unittest.TestCase): - """ANNFunction unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ANNFunction: - """Test ANNFunction - 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 `ANNFunction` - """ - model = ANNFunction() - if include_optional: - return ANNFunction( - limit = 56, - distance = 1.337, - analysis_search_ids = [ - 56 - ], - collection_search_ids = [ - 56 - ], - search_binary_ids = [ - 56 - ], - search_function_ids = [ - 56 - ], - debug_only = True - ) - else: - return ANNFunction( - ) - """ - - def testANNFunction(self): - """Test ANNFunction""" - # 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_base_response_binary_additional_response.py b/test/test_base_response_binary_additional_response.py index 51722a7..0e65132 100644 --- a/test/test_base_response_binary_additional_response.py +++ b/test/test_base_response_binary_additional_response.py @@ -200,7 +200,7 @@ def make_instance(self, include_optional) -> BaseResponseBinaryAdditionalRespons relocations = [ revengai.models.elf_relocation.ELFRelocation( address = 56, - type = 56, + type = '', size = 56, addend = 56, symbol_name = '', diff --git a/test/test_base_response_box_plot_confidence.py b/test/test_base_response_box_plot_confidence.py deleted file mode 100644 index 025cb48..0000000 --- a/test/test_base_response_box_plot_confidence.py +++ /dev/null @@ -1,69 +0,0 @@ -# coding: utf-8 - -""" - RevEng.AI API - - RevEng.AI is Similarity Search Engine for executable binaries - - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from revengai.models.base_response_box_plot_confidence import BaseResponseBoxPlotConfidence - -class TestBaseResponseBoxPlotConfidence(unittest.TestCase): - """BaseResponseBoxPlotConfidence unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> BaseResponseBoxPlotConfidence: - """Test BaseResponseBoxPlotConfidence - 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 `BaseResponseBoxPlotConfidence` - """ - model = BaseResponseBoxPlotConfidence() - if include_optional: - return BaseResponseBoxPlotConfidence( - status = True, - data = revengai.models.box_plot_confidence.BoxPlotConfidence( - min = 1.337, - max = 1.337, - average = 1.337, - upper_quartile = 1.337, - lower_quartile = 1.337, - positive_count = 56, - negative_count = 56, ), - message = '', - errors = [ - revengai.models.error_model.ErrorModel( - code = '', - message = '', ) - ], - meta = revengai.models.meta_model.MetaModel( - pagination = revengai.models.pagination_model.PaginationModel( - page_size = 56, - page_number = 56, - has_next_page = True, ), ) - ) - else: - return BaseResponseBoxPlotConfidence( - ) - """ - - def testBaseResponseBoxPlotConfidence(self): - """Test BaseResponseBoxPlotConfidence""" - # 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_base_response_functions_detail_response.py b/test/test_base_response_functions_detail_response.py index 1c1e031..0571b09 100644 --- a/test/test_base_response_functions_detail_response.py +++ b/test/test_base_response_functions_detail_response.py @@ -45,6 +45,7 @@ def make_instance(self, include_optional) -> BaseResponseFunctionsDetailResponse binary_name = '', sha_256_hash = '', debug_hash = '', + debug = True, embedding_3d = [ 1.337 ], diff --git a/test/test_base_response_list_function_box_plot_confidence.py b/test/test_base_response_list_function_box_plot_confidence.py deleted file mode 100644 index e33876d..0000000 --- a/test/test_base_response_list_function_box_plot_confidence.py +++ /dev/null @@ -1,73 +0,0 @@ -# coding: utf-8 - -""" - RevEng.AI API - - RevEng.AI is Similarity Search Engine for executable binaries - - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from revengai.models.base_response_list_function_box_plot_confidence import BaseResponseListFunctionBoxPlotConfidence - -class TestBaseResponseListFunctionBoxPlotConfidence(unittest.TestCase): - """BaseResponseListFunctionBoxPlotConfidence unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> BaseResponseListFunctionBoxPlotConfidence: - """Test BaseResponseListFunctionBoxPlotConfidence - 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 `BaseResponseListFunctionBoxPlotConfidence` - """ - model = BaseResponseListFunctionBoxPlotConfidence() - if include_optional: - return BaseResponseListFunctionBoxPlotConfidence( - status = True, - data = [ - revengai.models.function_box_plot_confidence.FunctionBoxPlotConfidence( - function_id = 56, - box_plot = revengai.models.box_plot_confidence.BoxPlotConfidence( - min = 1.337, - max = 1.337, - average = 1.337, - upper_quartile = 1.337, - lower_quartile = 1.337, - positive_count = 56, - negative_count = 56, ), ) - ], - message = '', - errors = [ - revengai.models.error_model.ErrorModel( - code = '', - message = '', ) - ], - meta = revengai.models.meta_model.MetaModel( - pagination = revengai.models.pagination_model.PaginationModel( - page_size = 56, - page_number = 56, - has_next_page = True, ), ) - ) - else: - return BaseResponseListFunctionBoxPlotConfidence( - ) - """ - - def testBaseResponseListFunctionBoxPlotConfidence(self): - """Test BaseResponseListFunctionBoxPlotConfidence""" - # 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_base_response_list_similar_functions_response.py b/test/test_base_response_list_similar_functions_response.py deleted file mode 100644 index 8f9497c..0000000 --- a/test/test_base_response_list_similar_functions_response.py +++ /dev/null @@ -1,76 +0,0 @@ -# coding: utf-8 - -""" - RevEng.AI API - - RevEng.AI is Similarity Search Engine for executable binaries - - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from revengai.models.base_response_list_similar_functions_response import BaseResponseListSimilarFunctionsResponse - -class TestBaseResponseListSimilarFunctionsResponse(unittest.TestCase): - """BaseResponseListSimilarFunctionsResponse unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> BaseResponseListSimilarFunctionsResponse: - """Test BaseResponseListSimilarFunctionsResponse - 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 `BaseResponseListSimilarFunctionsResponse` - """ - model = BaseResponseListSimilarFunctionsResponse() - if include_optional: - return BaseResponseListSimilarFunctionsResponse( - status = True, - data = [ - revengai.models.similar_functions_response.SimilarFunctionsResponse( - function_id = 56, - function_name = '', - binary_id = 56, - binary_name = '', - distance = 1.337, - embedding_3d = [ - 1.337 - ], - embedding_1d = [ - 1.337 - ], - sha_256_hash = '', ) - ], - message = '', - errors = [ - revengai.models.error_model.ErrorModel( - code = '', - message = '', ) - ], - meta = revengai.models.meta_model.MetaModel( - pagination = revengai.models.pagination_model.PaginationModel( - page_size = 56, - page_number = 56, - has_next_page = True, ), ) - ) - else: - return BaseResponseListSimilarFunctionsResponse( - ) - """ - - def testBaseResponseListSimilarFunctionsResponse(self): - """Test BaseResponseListSimilarFunctionsResponse""" - # 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_base_response_list_tag_origin_box_plot_confidence.py b/test/test_base_response_list_tag_origin_box_plot_confidence.py deleted file mode 100644 index 65458e0..0000000 --- a/test/test_base_response_list_tag_origin_box_plot_confidence.py +++ /dev/null @@ -1,75 +0,0 @@ -# coding: utf-8 - -""" - RevEng.AI API - - RevEng.AI is Similarity Search Engine for executable binaries - - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from revengai.models.base_response_list_tag_origin_box_plot_confidence import BaseResponseListTagOriginBoxPlotConfidence - -class TestBaseResponseListTagOriginBoxPlotConfidence(unittest.TestCase): - """BaseResponseListTagOriginBoxPlotConfidence unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> BaseResponseListTagOriginBoxPlotConfidence: - """Test BaseResponseListTagOriginBoxPlotConfidence - 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 `BaseResponseListTagOriginBoxPlotConfidence` - """ - model = BaseResponseListTagOriginBoxPlotConfidence() - if include_optional: - return BaseResponseListTagOriginBoxPlotConfidence( - status = True, - data = [ - revengai.models.tag_origin_box_plot_confidence.TagOriginBoxPlotConfidence( - tag = revengai.models.tags.Tags( - tag = '', - origin = 'RevEng-Malware', ), - box_plot = revengai.models.box_plot_confidence.BoxPlotConfidence( - min = 1.337, - max = 1.337, - average = 1.337, - upper_quartile = 1.337, - lower_quartile = 1.337, - positive_count = 56, - negative_count = 56, ), ) - ], - message = '', - errors = [ - revengai.models.error_model.ErrorModel( - code = '', - message = '', ) - ], - meta = revengai.models.meta_model.MetaModel( - pagination = revengai.models.pagination_model.PaginationModel( - page_size = 56, - page_number = 56, - has_next_page = True, ), ) - ) - else: - return BaseResponseListTagOriginBoxPlotConfidence( - ) - """ - - def testBaseResponseListTagOriginBoxPlotConfidence(self): - """Test BaseResponseListTagOriginBoxPlotConfidence""" - # 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_base_response_nearest_neighbor_analysis.py b/test/test_base_response_nearest_neighbor_analysis.py deleted file mode 100644 index 0a9add7..0000000 --- a/test/test_base_response_nearest_neighbor_analysis.py +++ /dev/null @@ -1,74 +0,0 @@ -# coding: utf-8 - -""" - RevEng.AI API - - RevEng.AI is Similarity Search Engine for executable binaries - - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from revengai.models.base_response_nearest_neighbor_analysis import BaseResponseNearestNeighborAnalysis - -class TestBaseResponseNearestNeighborAnalysis(unittest.TestCase): - """BaseResponseNearestNeighborAnalysis unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> BaseResponseNearestNeighborAnalysis: - """Test BaseResponseNearestNeighborAnalysis - 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 `BaseResponseNearestNeighborAnalysis` - """ - model = BaseResponseNearestNeighborAnalysis() - if include_optional: - return BaseResponseNearestNeighborAnalysis( - status = True, - data = { - 'key' : { - 'key' : revengai.models.nearest_neighbor.NearestNeighbor( - distance = 1.337, - nearest_neighbor_analysis_id = 56, - nearest_neighbor_analysis_name = '', - nearest_neighbor_function_name = '', - nearest_neighbor_function_name_mangled = '', - nearest_neighbor_binary_id = 56, - nearest_neighbor_sha_256_hash = '', - nearest_neighbor_debug = True, ) - } - }, - message = '', - errors = [ - revengai.models.error_model.ErrorModel( - code = '', - message = '', ) - ], - meta = revengai.models.meta_model.MetaModel( - pagination = revengai.models.pagination_model.PaginationModel( - page_size = 56, - page_number = 56, - has_next_page = True, ), ) - ) - else: - return BaseResponseNearestNeighborAnalysis( - ) - """ - - def testBaseResponseNearestNeighborAnalysis(self): - """Test BaseResponseNearestNeighborAnalysis""" - # 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_binary_additional_details_data_response.py b/test/test_binary_additional_details_data_response.py index 18c5e79..54d5b91 100644 --- a/test/test_binary_additional_details_data_response.py +++ b/test/test_binary_additional_details_data_response.py @@ -196,7 +196,7 @@ def make_instance(self, include_optional) -> BinaryAdditionalDetailsDataResponse relocations = [ revengai.models.elf_relocation.ELFRelocation( address = 56, - type = 56, + type = '', size = 56, addend = 56, symbol_name = '', diff --git a/test/test_binary_additional_response.py b/test/test_binary_additional_response.py index d09c2aa..c8a76a9 100644 --- a/test/test_binary_additional_response.py +++ b/test/test_binary_additional_response.py @@ -198,7 +198,7 @@ def make_instance(self, include_optional) -> BinaryAdditionalResponse: relocations = [ revengai.models.elf_relocation.ELFRelocation( address = 56, - type = 56, + type = '', size = 56, addend = 56, symbol_name = '', @@ -397,7 +397,7 @@ def make_instance(self, include_optional) -> BinaryAdditionalResponse: relocations = [ revengai.models.elf_relocation.ELFRelocation( address = 56, - type = 56, + type = '', size = 56, addend = 56, symbol_name = '', diff --git a/test/test_box_plot_confidence.py b/test/test_box_plot_confidence.py deleted file mode 100644 index 3480cc6..0000000 --- a/test/test_box_plot_confidence.py +++ /dev/null @@ -1,63 +0,0 @@ -# coding: utf-8 - -""" - RevEng.AI API - - RevEng.AI is Similarity Search Engine for executable binaries - - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from revengai.models.box_plot_confidence import BoxPlotConfidence - -class TestBoxPlotConfidence(unittest.TestCase): - """BoxPlotConfidence unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> BoxPlotConfidence: - """Test BoxPlotConfidence - 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 `BoxPlotConfidence` - """ - model = BoxPlotConfidence() - if include_optional: - return BoxPlotConfidence( - min = 1.337, - max = 1.337, - average = 1.337, - upper_quartile = 1.337, - lower_quartile = 1.337, - positive_count = 56, - negative_count = 56 - ) - else: - return BoxPlotConfidence( - min = 1.337, - max = 1.337, - average = 1.337, - upper_quartile = 1.337, - lower_quartile = 1.337, - positive_count = 56, - negative_count = 56, - ) - """ - - def testBoxPlotConfidence(self): - """Test BoxPlotConfidence""" - # 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_confidence_api.py b/test/test_confidence_api.py deleted file mode 100644 index 4dd141d..0000000 --- a/test/test_confidence_api.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding: utf-8 - -""" - RevEng.AI API - - RevEng.AI is Similarity Search Engine for executable binaries - - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from revengai.api.confidence_api import ConfidenceApi - - -class TestConfidenceApi(unittest.TestCase): - """ConfidenceApi unit test stubs""" - - def setUp(self) -> None: - self.api = ConfidenceApi() - - def tearDown(self) -> None: - pass - - def test_get_analysis_tag_score(self) -> None: - """Test case for get_analysis_tag_score - - Calculate Tag Confidence Score for an Analysis - """ - pass - - def test_get_analysis_threat_score(self) -> None: - """Test case for get_analysis_threat_score - - Calculate Threat Score for Binary - """ - pass - - def test_get_functions_name_score(self) -> None: - """Test case for get_functions_name_score - - Calculate function name confidence for a set of Functions - """ - pass - - def test_get_functions_threat_score(self) -> None: - """Test case for get_functions_threat_score - - Calculate Threat Score for a set of Functions - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_elf_model.py b/test/test_elf_model.py index 2359ecb..9bd92c4 100644 --- a/test/test_elf_model.py +++ b/test/test_elf_model.py @@ -96,7 +96,7 @@ def make_instance(self, include_optional) -> ELFModel: relocations = [ revengai.models.elf_relocation.ELFRelocation( address = 56, - type = 56, + type = '', size = 56, addend = 56, symbol_name = '', @@ -192,7 +192,7 @@ def make_instance(self, include_optional) -> ELFModel: relocations = [ revengai.models.elf_relocation.ELFRelocation( address = 56, - type = 56, + type = '', size = 56, addend = 56, symbol_name = '', diff --git a/test/test_elf_relocation.py b/test/test_elf_relocation.py index b7b2500..97fd9d0 100644 --- a/test/test_elf_relocation.py +++ b/test/test_elf_relocation.py @@ -35,7 +35,7 @@ def make_instance(self, include_optional) -> ELFRelocation: if include_optional: return ELFRelocation( address = 56, - type = 56, + type = '', size = 56, addend = 56, symbol_name = '', @@ -45,7 +45,7 @@ def make_instance(self, include_optional) -> ELFRelocation: else: return ELFRelocation( address = 56, - type = 56, + type = '', size = 56, addend = 56, symbol_name = '', diff --git a/test/test_function_box_plot_confidence.py b/test/test_function_box_plot_confidence.py deleted file mode 100644 index e9e0e64..0000000 --- a/test/test_function_box_plot_confidence.py +++ /dev/null @@ -1,67 +0,0 @@ -# coding: utf-8 - -""" - RevEng.AI API - - RevEng.AI is Similarity Search Engine for executable binaries - - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from revengai.models.function_box_plot_confidence import FunctionBoxPlotConfidence - -class TestFunctionBoxPlotConfidence(unittest.TestCase): - """FunctionBoxPlotConfidence unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> FunctionBoxPlotConfidence: - """Test FunctionBoxPlotConfidence - 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 `FunctionBoxPlotConfidence` - """ - model = FunctionBoxPlotConfidence() - if include_optional: - return FunctionBoxPlotConfidence( - function_id = 56, - box_plot = revengai.models.box_plot_confidence.BoxPlotConfidence( - min = 1.337, - max = 1.337, - average = 1.337, - upper_quartile = 1.337, - lower_quartile = 1.337, - positive_count = 56, - negative_count = 56, ) - ) - else: - return FunctionBoxPlotConfidence( - function_id = 56, - box_plot = revengai.models.box_plot_confidence.BoxPlotConfidence( - min = 1.337, - max = 1.337, - average = 1.337, - upper_quartile = 1.337, - lower_quartile = 1.337, - positive_count = 56, - negative_count = 56, ), - ) - """ - - def testFunctionBoxPlotConfidence(self): - """Test FunctionBoxPlotConfidence""" - # 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_function_name_confidence_body.py b/test/test_function_name_confidence_body.py deleted file mode 100644 index a4c040b..0000000 --- a/test/test_function_name_confidence_body.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding: utf-8 - -""" - RevEng.AI API - - RevEng.AI is Similarity Search Engine for executable binaries - - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from revengai.models.function_name_confidence_body import FunctionNameConfidenceBody - -class TestFunctionNameConfidenceBody(unittest.TestCase): - """FunctionNameConfidenceBody unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> FunctionNameConfidenceBody: - """Test FunctionNameConfidenceBody - 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 `FunctionNameConfidenceBody` - """ - model = FunctionNameConfidenceBody() - if include_optional: - return FunctionNameConfidenceBody( - functions = [ - revengai.models.function_name_input.FunctionNameInput( - function_id = 56, - function_name = '', ) - ], - is_debug = True - ) - else: - return FunctionNameConfidenceBody( - ) - """ - - def testFunctionNameConfidenceBody(self): - """Test FunctionNameConfidenceBody""" - # 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_function_name_input.py b/test/test_function_name_input.py deleted file mode 100644 index 44954b3..0000000 --- a/test/test_function_name_input.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding: utf-8 - -""" - RevEng.AI API - - RevEng.AI is Similarity Search Engine for executable binaries - - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from revengai.models.function_name_input import FunctionNameInput - -class TestFunctionNameInput(unittest.TestCase): - """FunctionNameInput unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> FunctionNameInput: - """Test FunctionNameInput - 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 `FunctionNameInput` - """ - model = FunctionNameInput() - if include_optional: - return FunctionNameInput( - function_id = 56, - function_name = '' - ) - else: - return FunctionNameInput( - function_id = 56, - function_name = '', - ) - """ - - def testFunctionNameInput(self): - """Test FunctionNameInput""" - # 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_functions_core_api.py b/test/test_functions_core_api.py index cf0ad96..44b4b39 100644 --- a/test/test_functions_core_api.py +++ b/test/test_functions_core_api.py @@ -109,13 +109,6 @@ def test_get_function_strings(self) -> None: """ pass - def test_get_similar_functions(self) -> None: - """Test case for get_similar_functions - - Get list of similar functions - """ - pass - if __name__ == '__main__': unittest.main() diff --git a/test/test_functions_detail_response.py b/test/test_functions_detail_response.py index b291839..b6e8080 100644 --- a/test/test_functions_detail_response.py +++ b/test/test_functions_detail_response.py @@ -43,6 +43,7 @@ def make_instance(self, include_optional) -> FunctionsDetailResponse: binary_name = '', sha_256_hash = '', debug_hash = '', + debug = True, embedding_3d = [ 1.337 ], @@ -61,6 +62,7 @@ def make_instance(self, include_optional) -> FunctionsDetailResponse: binary_name = '', sha_256_hash = '', debug_hash = '', + debug = True, ) """ diff --git a/test/test_nearest_neighbor.py b/test/test_nearest_neighbor.py deleted file mode 100644 index 5aaaa1b..0000000 --- a/test/test_nearest_neighbor.py +++ /dev/null @@ -1,65 +0,0 @@ -# coding: utf-8 - -""" - RevEng.AI API - - RevEng.AI is Similarity Search Engine for executable binaries - - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from revengai.models.nearest_neighbor import NearestNeighbor - -class TestNearestNeighbor(unittest.TestCase): - """NearestNeighbor unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> NearestNeighbor: - """Test NearestNeighbor - 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 `NearestNeighbor` - """ - model = NearestNeighbor() - if include_optional: - return NearestNeighbor( - distance = 1.337, - nearest_neighbor_analysis_id = 56, - nearest_neighbor_analysis_name = '', - nearest_neighbor_function_name = '', - nearest_neighbor_function_name_mangled = '', - nearest_neighbor_binary_id = 56, - nearest_neighbor_sha_256_hash = '', - nearest_neighbor_debug = True - ) - else: - return NearestNeighbor( - distance = 1.337, - nearest_neighbor_analysis_id = 56, - nearest_neighbor_analysis_name = '', - nearest_neighbor_function_name = '', - nearest_neighbor_function_name_mangled = '', - nearest_neighbor_binary_id = 56, - nearest_neighbor_sha_256_hash = '', - nearest_neighbor_debug = True, - ) - """ - - def testNearestNeighbor(self): - """Test NearestNeighbor""" - # 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_origin.py b/test/test_origin.py deleted file mode 100644 index 2eab0e6..0000000 --- a/test/test_origin.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding: utf-8 - -""" - RevEng.AI API - - RevEng.AI is Similarity Search Engine for executable binaries - - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from revengai.models.origin import Origin - -class TestOrigin(unittest.TestCase): - """Origin unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testOrigin(self): - """Test Origin""" - # inst = Origin() - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_similar_functions_response.py b/test/test_similar_functions_response.py deleted file mode 100644 index 8ce4326..0000000 --- a/test/test_similar_functions_response.py +++ /dev/null @@ -1,73 +0,0 @@ -# coding: utf-8 - -""" - RevEng.AI API - - RevEng.AI is Similarity Search Engine for executable binaries - - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from revengai.models.similar_functions_response import SimilarFunctionsResponse - -class TestSimilarFunctionsResponse(unittest.TestCase): - """SimilarFunctionsResponse unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> SimilarFunctionsResponse: - """Test SimilarFunctionsResponse - 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 `SimilarFunctionsResponse` - """ - model = SimilarFunctionsResponse() - if include_optional: - return SimilarFunctionsResponse( - function_id = 56, - function_name = '', - binary_id = 56, - binary_name = '', - distance = 1.337, - embedding_3d = [ - 1.337 - ], - embedding_1d = [ - 1.337 - ], - sha_256_hash = '' - ) - else: - return SimilarFunctionsResponse( - function_id = 56, - function_name = '', - binary_id = 56, - binary_name = '', - distance = 1.337, - embedding_3d = [ - 1.337 - ], - embedding_1d = [ - 1.337 - ], - sha_256_hash = '', - ) - """ - - def testSimilarFunctionsResponse(self): - """Test SimilarFunctionsResponse""" - # 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_tag_confidence_body.py b/test/test_tag_confidence_body.py deleted file mode 100644 index 831ea50..0000000 --- a/test/test_tag_confidence_body.py +++ /dev/null @@ -1,59 +0,0 @@ -# coding: utf-8 - -""" - RevEng.AI API - - RevEng.AI is Similarity Search Engine for executable binaries - - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from revengai.models.tag_confidence_body import TagConfidenceBody - -class TestTagConfidenceBody(unittest.TestCase): - """TagConfidenceBody unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> TagConfidenceBody: - """Test TagConfidenceBody - 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 `TagConfidenceBody` - """ - model = TagConfidenceBody() - if include_optional: - return TagConfidenceBody( - tags = [ - revengai.models.tags.Tags( - tag = '', - origin = 'RevEng-Malware', ) - ] - ) - else: - return TagConfidenceBody( - tags = [ - revengai.models.tags.Tags( - tag = '', - origin = 'RevEng-Malware', ) - ], - ) - """ - - def testTagConfidenceBody(self): - """Test TagConfidenceBody""" - # 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_tag_origin_box_plot_confidence.py b/test/test_tag_origin_box_plot_confidence.py deleted file mode 100644 index a8cc7cf..0000000 --- a/test/test_tag_origin_box_plot_confidence.py +++ /dev/null @@ -1,71 +0,0 @@ -# coding: utf-8 - -""" - RevEng.AI API - - RevEng.AI is Similarity Search Engine for executable binaries - - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from revengai.models.tag_origin_box_plot_confidence import TagOriginBoxPlotConfidence - -class TestTagOriginBoxPlotConfidence(unittest.TestCase): - """TagOriginBoxPlotConfidence unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> TagOriginBoxPlotConfidence: - """Test TagOriginBoxPlotConfidence - 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 `TagOriginBoxPlotConfidence` - """ - model = TagOriginBoxPlotConfidence() - if include_optional: - return TagOriginBoxPlotConfidence( - tag = revengai.models.tags.Tags( - tag = '', - origin = 'RevEng-Malware', ), - box_plot = revengai.models.box_plot_confidence.BoxPlotConfidence( - min = 1.337, - max = 1.337, - average = 1.337, - upper_quartile = 1.337, - lower_quartile = 1.337, - positive_count = 56, - negative_count = 56, ) - ) - else: - return TagOriginBoxPlotConfidence( - tag = revengai.models.tags.Tags( - tag = '', - origin = 'RevEng-Malware', ), - box_plot = revengai.models.box_plot_confidence.BoxPlotConfidence( - min = 1.337, - max = 1.337, - average = 1.337, - upper_quartile = 1.337, - lower_quartile = 1.337, - positive_count = 56, - negative_count = 56, ), - ) - """ - - def testTagOriginBoxPlotConfidence(self): - """Test TagOriginBoxPlotConfidence""" - # 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_tags.py b/test/test_tags.py deleted file mode 100644 index cbbab84..0000000 --- a/test/test_tags.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding: utf-8 - -""" - RevEng.AI API - - RevEng.AI is Similarity Search Engine for executable binaries - - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from revengai.models.tags import Tags - -class TestTags(unittest.TestCase): - """Tags unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> Tags: - """Test Tags - 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 `Tags` - """ - model = Tags() - if include_optional: - return Tags( - tag = '', - origin = 'RevEng-Malware' - ) - else: - return Tags( - tag = '', - origin = 'RevEng-Malware', - ) - """ - - def testTags(self): - """Test Tags""" - # 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_threat_score_function_body.py b/test/test_threat_score_function_body.py deleted file mode 100644 index 466a1e8..0000000 --- a/test/test_threat_score_function_body.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding: utf-8 - -""" - RevEng.AI API - - RevEng.AI is Similarity Search Engine for executable binaries - - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from revengai.models.threat_score_function_body import ThreatScoreFunctionBody - -class TestThreatScoreFunctionBody(unittest.TestCase): - """ThreatScoreFunctionBody unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ThreatScoreFunctionBody: - """Test ThreatScoreFunctionBody - 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 `ThreatScoreFunctionBody` - """ - model = ThreatScoreFunctionBody() - if include_optional: - return ThreatScoreFunctionBody( - function_ids = [ - 56 - ] - ) - else: - return ThreatScoreFunctionBody( - ) - """ - - def testThreatScoreFunctionBody(self): - """Test ThreatScoreFunctionBody""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main()