From 44aebbaf93c691fe63014c0e74ebe611bb941f84 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 26 Mar 2026 14:28:29 +0000 Subject: [PATCH] Update SDK to version v3.55.2 - Generated from OpenAPI spec version v3.55.2 - Auto-generated by GitHub Actions --- .sdk-version | 2 +- README.md | 8 +- docs/AnalysesCoreApi.md | 84 +++++ docs/AnalysesResultsMetadataApi.md | 81 ----- docs/AnalysisFunctionMatchingRequest.md | 4 +- docs/AnalysisStringInput.md | 32 ++ docs/AutoUnstripRequest.md | 4 +- docs/BaseResponseCommunities.md | 33 -- docs/Communities.md | 32 -- docs/CommunityMatchPercentages.md | 32 -- docs/FunctionMatchingRequest.md | 2 +- docs/FunctionString.md | 1 + docs/FunctionsAIDecompilationApi.md | 4 +- docs/PutAnalysisStringsRequest.md | 29 ++ docs/StringFunctions.md | 1 + docs/StringSource.md | 14 + revengai/__init__.py | 14 +- revengai/api/analyses_core_api.py | 293 ++++++++++++++++++ revengai/api/analyses_results_metadata_api.py | 279 ----------------- .../api/functions_ai_decompilation_api.py | 12 +- revengai/api_client.py | 2 +- revengai/configuration.py | 4 +- revengai/models/__init__.py | 6 +- .../analysis_function_matching_request.py | 6 +- ...ercentages.py => analysis_string_input.py} | 29 +- revengai/models/auto_unstrip_request.py | 8 +- revengai/models/base_response_communities.py | 125 -------- revengai/models/function_matching_request.py | 4 +- revengai/models/function_string.py | 9 +- revengai/models/name_confidence.py | 2 +- ...ies.py => put_analysis_strings_request.py} | 36 +-- revengai/models/string_functions.py | 9 +- revengai/models/string_source.py | 37 +++ test/test_analyses_core_api.py | 7 + test/test_analyses_results_metadata_api.py | 7 - ...test_analysis_function_matching_request.py | 8 +- ...tages.py => test_analysis_string_input.py} | 36 +-- test/test_analysis_strings_response.py | 6 +- test/test_auto_unstrip_request.py | 6 +- ...base_response_analysis_strings_response.py | 3 +- test/test_base_response_communities.py | 76 ----- ...base_response_function_strings_response.py | 3 +- test/test_communities.py | 77 ----- test/test_function_match.py | 2 +- test/test_function_matching_request.py | 8 +- test/test_function_matching_response.py | 2 +- test/test_function_string.py | 3 +- test/test_function_strings_response.py | 6 +- test/test_name_confidence.py | 4 +- test/test_put_analysis_strings_request.py | 61 ++++ test/test_string_functions.py | 3 +- test/test_string_source.py | 32 ++ 52 files changed, 721 insertions(+), 867 deletions(-) create mode 100644 docs/AnalysisStringInput.md delete mode 100644 docs/BaseResponseCommunities.md delete mode 100644 docs/Communities.md delete mode 100644 docs/CommunityMatchPercentages.md create mode 100644 docs/PutAnalysisStringsRequest.md create mode 100644 docs/StringSource.md rename revengai/models/{community_match_percentages.py => analysis_string_input.py} (70%) delete mode 100644 revengai/models/base_response_communities.py rename revengai/models/{communities.py => put_analysis_strings_request.py} (57%) create mode 100644 revengai/models/string_source.py rename test/{test_community_match_percentages.py => test_analysis_string_input.py} (51%) delete mode 100644 test/test_base_response_communities.py delete mode 100644 test/test_communities.py create mode 100644 test/test_put_analysis_strings_request.py create mode 100644 test/test_string_source.py diff --git a/.sdk-version b/.sdk-version index 100a28e..f22d573 100644 --- a/.sdk-version +++ b/.sdk-version @@ -1 +1 @@ -v3.51.0 +v3.55.2 diff --git a/README.md b/README.md index 95350b8..4e71ad9 100644 --- a/README.md +++ b/README.md @@ -56,6 +56,7 @@ Class | Method | HTTP request | Description *AnalysesCoreApi* | [**insert_analysis_log**](docs/AnalysesCoreApi.md#insert_analysis_log) | **POST** /v2/analyses/{analysis_id}/logs | Insert a log entry for an analysis *AnalysesCoreApi* | [**list_analyses**](docs/AnalysesCoreApi.md#list_analyses) | **GET** /v2/analyses/list | Gets the most recent analyses *AnalysesCoreApi* | [**lookup_binary_id**](docs/AnalysesCoreApi.md#lookup_binary_id) | **GET** /v2/analyses/lookup/{binary_id} | Gets the analysis ID from binary ID +*AnalysesCoreApi* | [**put_analysis_strings**](docs/AnalysesCoreApi.md#put_analysis_strings) | **PUT** /v2/analyses/{analysis_id}/strings | Add strings to the analysis *AnalysesCoreApi* | [**requeue_analysis**](docs/AnalysesCoreApi.md#requeue_analysis) | **POST** /v2/analyses/{analysis_id}/requeue | Requeue Analysis *AnalysesCoreApi* | [**update_analysis**](docs/AnalysesCoreApi.md#update_analysis) | **PATCH** /v2/analyses/{analysis_id} | Update Analysis *AnalysesCoreApi* | [**update_analysis_tags**](docs/AnalysesCoreApi.md#update_analysis_tags) | **PATCH** /v2/analyses/{analysis_id}/tags | Update Analysis Tags @@ -69,7 +70,6 @@ Class | Method | HTTP request | Description *AnalysesDynamicExecutionApi* | [**get_ttps**](docs/AnalysesDynamicExecutionApi.md#get_ttps) | **GET** /v2/analyses/{analysis_id}/dynamic-execution/ttps | Get the dynamic execution results for ttps *AnalysesResultsMetadataApi* | [**get_analysis_functions_paginated**](docs/AnalysesResultsMetadataApi.md#get_analysis_functions_paginated) | **GET** /v2/analyses/{analysis_id}/functions | Get functions from analysis *AnalysesResultsMetadataApi* | [**get_capabilities**](docs/AnalysesResultsMetadataApi.md#get_capabilities) | **GET** /v2/analyses/{analysis_id}/capabilities | Gets the capabilities from the analysis -*AnalysesResultsMetadataApi* | [**get_communities**](docs/AnalysesResultsMetadataApi.md#get_communities) | **GET** /v2/analyses/{analysis_id}/communities | Gets the communities found in the analysis *AnalysesResultsMetadataApi* | [**get_functions_list**](docs/AnalysesResultsMetadataApi.md#get_functions_list) | **GET** /v2/analyses/{analysis_id}/functions/list | Gets functions from analysis *AnalysesResultsMetadataApi* | [**get_pdf**](docs/AnalysesResultsMetadataApi.md#get_pdf) | **GET** /v2/analyses/{analysis_id}/pdf | Gets the PDF found in the analysis *AnalysesResultsMetadataApi* | [**get_sbom**](docs/AnalysesResultsMetadataApi.md#get_sbom) | **GET** /v2/analyses/{analysis_id}/sbom | Gets the software-bill-of-materials (SBOM) found in the analysis @@ -178,6 +178,7 @@ Class | Method | HTTP request | Description - [AnalysisStage](docs/AnalysisStage.md) - [AnalysisStageStatus](docs/AnalysisStageStatus.md) - [AnalysisStagesResponse](docs/AnalysisStagesResponse.md) + - [AnalysisStringInput](docs/AnalysisStringInput.md) - [AnalysisStringsResponse](docs/AnalysisStringsResponse.md) - [AnalysisStringsStatusResponse](docs/AnalysisStringsStatusResponse.md) - [AnalysisTags](docs/AnalysisTags.md) @@ -225,7 +226,6 @@ Class | Method | HTTP request | Description - [BaseResponseCollectionSearchResponse](docs/BaseResponseCollectionSearchResponse.md) - [BaseResponseCollectionTagsUpdateResponse](docs/BaseResponseCollectionTagsUpdateResponse.md) - [BaseResponseCommentResponse](docs/BaseResponseCommentResponse.md) - - [BaseResponseCommunities](docs/BaseResponseCommunities.md) - [BaseResponseConfigResponse](docs/BaseResponseConfigResponse.md) - [BaseResponseCreated](docs/BaseResponseCreated.md) - [BaseResponseDict](docs/BaseResponseDict.md) @@ -309,8 +309,6 @@ Class | Method | HTTP request | Description - [CommentBase](docs/CommentBase.md) - [CommentResponse](docs/CommentResponse.md) - [CommentUpdateRequest](docs/CommentUpdateRequest.md) - - [Communities](docs/Communities.md) - - [CommunityMatchPercentages](docs/CommunityMatchPercentages.md) - [ConfidenceType](docs/ConfidenceType.md) - [ConfigResponse](docs/ConfigResponse.md) - [Context](docs/Context.md) @@ -417,6 +415,7 @@ Class | Method | HTTP request | Description - [ProcessDumpsData](docs/ProcessDumpsData.md) - [ProcessRegistry](docs/ProcessRegistry.md) - [ProcessTree](docs/ProcessTree.md) + - [PutAnalysisStringsRequest](docs/PutAnalysisStringsRequest.md) - [QueuedSecurityChecksTaskResponse](docs/QueuedSecurityChecksTaskResponse.md) - [ReAnalysisForm](docs/ReAnalysisForm.md) - [Recent](docs/Recent.md) @@ -442,6 +441,7 @@ Class | Method | HTTP request | Description - [StatusInput](docs/StatusInput.md) - [StatusOutput](docs/StatusOutput.md) - [StringFunctions](docs/StringFunctions.md) + - [StringSource](docs/StringSource.md) - [Structure](docs/Structure.md) - [StructureMember](docs/StructureMember.md) - [Symbols](docs/Symbols.md) diff --git a/docs/AnalysesCoreApi.md b/docs/AnalysesCoreApi.md index 683cf81..ef8ca3d 100644 --- a/docs/AnalysesCoreApi.md +++ b/docs/AnalysesCoreApi.md @@ -15,6 +15,7 @@ Method | HTTP request | Description [**insert_analysis_log**](AnalysesCoreApi.md#insert_analysis_log) | **POST** /v2/analyses/{analysis_id}/logs | Insert a log entry for an analysis [**list_analyses**](AnalysesCoreApi.md#list_analyses) | **GET** /v2/analyses/list | Gets the most recent analyses [**lookup_binary_id**](AnalysesCoreApi.md#lookup_binary_id) | **GET** /v2/analyses/lookup/{binary_id} | Gets the analysis ID from binary ID +[**put_analysis_strings**](AnalysesCoreApi.md#put_analysis_strings) | **PUT** /v2/analyses/{analysis_id}/strings | Add strings to the analysis [**requeue_analysis**](AnalysesCoreApi.md#requeue_analysis) | **POST** /v2/analyses/{analysis_id}/requeue | Requeue Analysis [**update_analysis**](AnalysesCoreApi.md#update_analysis) | **PATCH** /v2/analyses/{analysis_id} | Update Analysis [**update_analysis_tags**](AnalysesCoreApi.md#update_analysis_tags) | **PATCH** /v2/analyses/{analysis_id}/tags | Update Analysis Tags @@ -937,6 +938,89 @@ 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) +# **put_analysis_strings** +> BaseResponse put_analysis_strings(analysis_id, put_analysis_strings_request) + +Add strings to the analysis + +Add strings to the analysis. Rejects if any string already exists at the given vaddr. + +### Example + +* Api Key Authentication (APIKey): + +```python +import revengai +from revengai.models.base_response import BaseResponse +from revengai.models.put_analysis_strings_request import PutAnalysisStringsRequest +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 | + put_analysis_strings_request = revengai.PutAnalysisStringsRequest() # PutAnalysisStringsRequest | + + try: + # Add strings to the analysis + api_response = api_instance.put_analysis_strings(analysis_id, put_analysis_strings_request) + print("The response of AnalysesCoreApi->put_analysis_strings:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AnalysesCoreApi->put_analysis_strings: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **analysis_id** | **int**| | + **put_analysis_strings_request** | [**PutAnalysisStringsRequest**](PutAnalysisStringsRequest.md)| | + +### Return type + +[**BaseResponse**](BaseResponse.md) + +### Authorization + +[APIKey](../README.md#APIKey) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | 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) + # **requeue_analysis** > BaseResponseCreated requeue_analysis(analysis_id, re_analysis_form, x_rev_eng_application=x_rev_eng_application) diff --git a/docs/AnalysesResultsMetadataApi.md b/docs/AnalysesResultsMetadataApi.md index 46e3fe7..d547e07 100644 --- a/docs/AnalysesResultsMetadataApi.md +++ b/docs/AnalysesResultsMetadataApi.md @@ -6,7 +6,6 @@ Method | HTTP request | Description ------------- | ------------- | ------------- [**get_analysis_functions_paginated**](AnalysesResultsMetadataApi.md#get_analysis_functions_paginated) | **GET** /v2/analyses/{analysis_id}/functions | Get functions from analysis [**get_capabilities**](AnalysesResultsMetadataApi.md#get_capabilities) | **GET** /v2/analyses/{analysis_id}/capabilities | Gets the capabilities from the analysis -[**get_communities**](AnalysesResultsMetadataApi.md#get_communities) | **GET** /v2/analyses/{analysis_id}/communities | Gets the communities found in the analysis [**get_functions_list**](AnalysesResultsMetadataApi.md#get_functions_list) | **GET** /v2/analyses/{analysis_id}/functions/list | Gets functions from analysis [**get_pdf**](AnalysesResultsMetadataApi.md#get_pdf) | **GET** /v2/analyses/{analysis_id}/pdf | Gets the PDF found in the analysis [**get_sbom**](AnalysesResultsMetadataApi.md#get_sbom) | **GET** /v2/analyses/{analysis_id}/sbom | Gets the software-bill-of-materials (SBOM) found in the analysis @@ -176,86 +175,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) -# **get_communities** -> BaseResponseCommunities get_communities(analysis_id, user_name=user_name) - -Gets the communities found in the analysis - -### Example - -* Api Key Authentication (APIKey): - -```python -import revengai -from revengai.models.base_response_communities import BaseResponseCommunities -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.AnalysesResultsMetadataApi(api_client) - analysis_id = 56 # int | - user_name = 'user_name_example' # str | The user name to limit communities to (optional) - - try: - # Gets the communities found in the analysis - api_response = api_instance.get_communities(analysis_id, user_name=user_name) - print("The response of AnalysesResultsMetadataApi->get_communities:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling AnalysesResultsMetadataApi->get_communities: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **analysis_id** | **int**| | - **user_name** | **str**| The user name to limit communities to | [optional] - -### Return type - -[**BaseResponseCommunities**](BaseResponseCommunities.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_list** > BaseResponseAnalysisFunctions get_functions_list(analysis_id, search_term=search_term, min_v_addr=min_v_addr, max_v_addr=max_v_addr, include_embeddings=include_embeddings, page=page, page_size=page_size) diff --git a/docs/AnalysisFunctionMatchingRequest.md b/docs/AnalysisFunctionMatchingRequest.md index d14ad97..7596020 100644 --- a/docs/AnalysisFunctionMatchingRequest.md +++ b/docs/AnalysisFunctionMatchingRequest.md @@ -5,9 +5,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**min_similarity** | **float** | Minimum similarity expected for a match as a percentage, default is 90 | [optional] [default to 90.0] +**min_similarity** | **float** | Minimum similarity expected for a match as a percentage, default is 90 | [optional] [default to 90] **filters** | [**FunctionMatchingFilters**](FunctionMatchingFilters.md) | | [optional] -**results_per_function** | **int** | Maximum number of matches to return per function, default is 1, max is 10 | [optional] [default to 1] +**results_per_function** | **int** | Maximum number of matches to return per function, default is 1, max is 30 | [optional] [default to 1] **page** | **int** | Page number for paginated results, default is 1 (first page) | [optional] [default to 1] **page_size** | **int** | Number of functions to return per page, default is 0 (all functions), max is 1000 | [optional] [default to 0] **status_only** | **bool** | If set to true, only returns the status of the matching operation without the actual results | [optional] [default to False] diff --git a/docs/AnalysisStringInput.md b/docs/AnalysisStringInput.md new file mode 100644 index 0000000..b46349d --- /dev/null +++ b/docs/AnalysisStringInput.md @@ -0,0 +1,32 @@ +# AnalysisStringInput + +Input model for inserting a string into an analysis. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **str** | The string literal value | +**vaddr** | **int** | The virtual address of the string | +**source** | [**StringSource**](StringSource.md) | The source of the string | + +## Example + +```python +from revengai.models.analysis_string_input import AnalysisStringInput + +# TODO update the JSON string below +json = "{}" +# create an instance of AnalysisStringInput from a JSON string +analysis_string_input_instance = AnalysisStringInput.from_json(json) +# print the JSON string representation of the object +print(AnalysisStringInput.to_json()) + +# convert the object into a dict +analysis_string_input_dict = analysis_string_input_instance.to_dict() +# create an instance of AnalysisStringInput from a dict +analysis_string_input_from_dict = AnalysisStringInput.from_dict(analysis_string_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/AutoUnstripRequest.md b/docs/AutoUnstripRequest.md index 731818f..62f01d4 100644 --- a/docs/AutoUnstripRequest.md +++ b/docs/AutoUnstripRequest.md @@ -5,9 +5,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**min_similarity** | **float** | Minimum similarity expected for a match as a percentage, default is 90 | [optional] [default to 90.0] +**min_similarity** | **float** | Minimum similarity expected for a match as a percentage, default is 90 | [optional] [default to 90] **apply** | **bool** | Whether to apply the matched function names to the target binary, default is False | [optional] [default to False] -**confidence_threshold** | **float** | Confidence threshold for applying function names as a percentage, default is 90 | [optional] [default to 90.0] +**confidence_threshold** | **float** | Confidence threshold for applying function names as a percentage, default is 90 | [optional] [default to 90] **min_group_size** | **int** | Minimum number of matching functions required to consider for a match, default is 10 | [optional] [default to 10] **status_only** | **bool** | If set to true, only returns the status of the auto-unstrip operation without the actual results | [optional] [default to False] **no_cache** | **bool** | If set to true, forces the system to bypass any cached results and perform a fresh computation | [optional] [default to False] diff --git a/docs/BaseResponseCommunities.md b/docs/BaseResponseCommunities.md deleted file mode 100644 index 4021629..0000000 --- a/docs/BaseResponseCommunities.md +++ /dev/null @@ -1,33 +0,0 @@ -# BaseResponseCommunities - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**status** | **bool** | Response status on whether the request succeeded | [optional] [default to True] -**data** | [**Communities**](Communities.md) | | [optional] -**message** | **str** | | [optional] -**errors** | [**List[ErrorModel]**](ErrorModel.md) | | [optional] -**meta** | [**MetaModel**](MetaModel.md) | Metadata | [optional] - -## Example - -```python -from revengai.models.base_response_communities import BaseResponseCommunities - -# TODO update the JSON string below -json = "{}" -# create an instance of BaseResponseCommunities from a JSON string -base_response_communities_instance = BaseResponseCommunities.from_json(json) -# print the JSON string representation of the object -print(BaseResponseCommunities.to_json()) - -# convert the object into a dict -base_response_communities_dict = base_response_communities_instance.to_dict() -# create an instance of BaseResponseCommunities from a dict -base_response_communities_from_dict = BaseResponseCommunities.from_dict(base_response_communities_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/Communities.md b/docs/Communities.md deleted file mode 100644 index 530ba5a..0000000 --- a/docs/Communities.md +++ /dev/null @@ -1,32 +0,0 @@ -# Communities - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**total_functions** | **int** | The total number of matched community functions | -**total_matched_functions** | **int** | The total number of functions in the binary | -**direct_community_match_percentages** | [**List[CommunityMatchPercentages]**](CommunityMatchPercentages.md) | The list of directly matched communities | -**top_components** | **List[Dict[str, object]]** | The top components of the binary | - -## Example - -```python -from revengai.models.communities import Communities - -# TODO update the JSON string below -json = "{}" -# create an instance of Communities from a JSON string -communities_instance = Communities.from_json(json) -# print the JSON string representation of the object -print(Communities.to_json()) - -# convert the object into a dict -communities_dict = communities_instance.to_dict() -# create an instance of Communities from a dict -communities_from_dict = Communities.from_dict(communities_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/CommunityMatchPercentages.md b/docs/CommunityMatchPercentages.md deleted file mode 100644 index dbef60d..0000000 --- a/docs/CommunityMatchPercentages.md +++ /dev/null @@ -1,32 +0,0 @@ -# CommunityMatchPercentages - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**binary_name** | **str** | | -**binary_id** | **int** | | -**matched_communities_percent** | **float** | | -**unmatched_communities_percent** | **float** | | - -## Example - -```python -from revengai.models.community_match_percentages import CommunityMatchPercentages - -# TODO update the JSON string below -json = "{}" -# create an instance of CommunityMatchPercentages from a JSON string -community_match_percentages_instance = CommunityMatchPercentages.from_json(json) -# print the JSON string representation of the object -print(CommunityMatchPercentages.to_json()) - -# convert the object into a dict -community_match_percentages_dict = community_match_percentages_instance.to_dict() -# create an instance of CommunityMatchPercentages from a dict -community_match_percentages_from_dict = CommunityMatchPercentages.from_dict(community_match_percentages_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/FunctionMatchingRequest.md b/docs/FunctionMatchingRequest.md index 6eba45f..ca2976d 100644 --- a/docs/FunctionMatchingRequest.md +++ b/docs/FunctionMatchingRequest.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **model_id** | **int** | ID of the model used for function matching, used to determine the embedding model | **function_ids** | **List[int]** | ID's of functions to find matches for, must be at least one function ID | -**min_similarity** | **float** | Minimum similarity expected for a match as a percentage, default is 90 | [optional] [default to 90.0] +**min_similarity** | **float** | Minimum similarity expected for a match as a percentage, default is 90 | [optional] [default to 90] **filters** | [**FunctionMatchingFilters**](FunctionMatchingFilters.md) | | [optional] **results_per_function** | **int** | Maximum number of matches to return per function, default is 1, max is 50 | [optional] [default to 1] **page** | **int** | Page number for paginated results, default is 1 (first page) | [optional] [default to 1] diff --git a/docs/FunctionString.md b/docs/FunctionString.md index 43384de..3c5bb2d 100644 --- a/docs/FunctionString.md +++ b/docs/FunctionString.md @@ -7,6 +7,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **value** | **str** | The value of the string literal | **vaddr** | **int** | The vaddr of the string value | +**source** | [**StringSource**](StringSource.md) | The source of the string | [optional] ## Example diff --git a/docs/FunctionsAIDecompilationApi.md b/docs/FunctionsAIDecompilationApi.md index 2d9f89e..8223d8c 100644 --- a/docs/FunctionsAIDecompilationApi.md +++ b/docs/FunctionsAIDecompilationApi.md @@ -465,7 +465,7 @@ with revengai.ApiClient(configuration) as api_client: api_instance = revengai.FunctionsAIDecompilationApi(api_client) function_id = 56 # int | The ID of the function being decompiled summarise = True # bool | Generate a summary for the decompilation (optional) (default to True) - generate_inline_comments = True # bool | Generate inline comments for the decompilation (only works if summarise is enabled) (optional) (default to True) + generate_inline_comments = True # bool | Generate inline comments for the decompilation (optional) (default to True) try: # Polls AI Decompilation Process @@ -485,7 +485,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **function_id** | **int**| The ID of the function being decompiled | **summarise** | **bool**| Generate a summary for the decompilation | [optional] [default to True] - **generate_inline_comments** | **bool**| Generate inline comments for the decompilation (only works if summarise is enabled) | [optional] [default to True] + **generate_inline_comments** | **bool**| Generate inline comments for the decompilation | [optional] [default to True] ### Return type diff --git a/docs/PutAnalysisStringsRequest.md b/docs/PutAnalysisStringsRequest.md new file mode 100644 index 0000000..4180aad --- /dev/null +++ b/docs/PutAnalysisStringsRequest.md @@ -0,0 +1,29 @@ +# PutAnalysisStringsRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**strings** | [**List[AnalysisStringInput]**](AnalysisStringInput.md) | The strings to add to the analysis | + +## Example + +```python +from revengai.models.put_analysis_strings_request import PutAnalysisStringsRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of PutAnalysisStringsRequest from a JSON string +put_analysis_strings_request_instance = PutAnalysisStringsRequest.from_json(json) +# print the JSON string representation of the object +print(PutAnalysisStringsRequest.to_json()) + +# convert the object into a dict +put_analysis_strings_request_dict = put_analysis_strings_request_instance.to_dict() +# create an instance of PutAnalysisStringsRequest from a dict +put_analysis_strings_request_from_dict = PutAnalysisStringsRequest.from_dict(put_analysis_strings_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/StringFunctions.md b/docs/StringFunctions.md index 04fc697..975215c 100644 --- a/docs/StringFunctions.md +++ b/docs/StringFunctions.md @@ -8,6 +8,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **value** | **str** | The value of the string literal | **functions** | [**List[AppApiRestV2FunctionsResponsesFunction]**](AppApiRestV2FunctionsResponsesFunction.md) | The function ids the string literal was found within | +**source** | [**StringSource**](StringSource.md) | The source of the string | [optional] ## Example diff --git a/docs/StringSource.md b/docs/StringSource.md new file mode 100644 index 0000000..34f7cd4 --- /dev/null +++ b/docs/StringSource.md @@ -0,0 +1,14 @@ +# StringSource + + +## Enum + +* `SYSTEM` (value: `'SYSTEM'`) + +* `USER` (value: `'USER'`) + +* `AI_AGENT` (value: `'AI_AGENT'`) + +[[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 2e54b01..27d9ed7 100644 --- a/revengai/__init__.py +++ b/revengai/__init__.py @@ -13,7 +13,7 @@ """ # noqa: E501 -__version__ = "v3.51.0" +__version__ = "v3.55.2" # Define package exports __all__ = [ @@ -69,6 +69,7 @@ "AnalysisStage", "AnalysisStageStatus", "AnalysisStagesResponse", + "AnalysisStringInput", "AnalysisStringsResponse", "AnalysisStringsStatusResponse", "AnalysisTags", @@ -116,7 +117,6 @@ "BaseResponseCollectionSearchResponse", "BaseResponseCollectionTagsUpdateResponse", "BaseResponseCommentResponse", - "BaseResponseCommunities", "BaseResponseConfigResponse", "BaseResponseCreated", "BaseResponseDict", @@ -200,8 +200,6 @@ "CommentBase", "CommentResponse", "CommentUpdateRequest", - "Communities", - "CommunityMatchPercentages", "ConfidenceType", "ConfigResponse", "Context", @@ -308,6 +306,7 @@ "ProcessDumpsData", "ProcessRegistry", "ProcessTree", + "PutAnalysisStringsRequest", "QueuedSecurityChecksTaskResponse", "ReAnalysisForm", "Recent", @@ -333,6 +332,7 @@ "StatusInput", "StatusOutput", "StringFunctions", + "StringSource", "Structure", "StructureMember", "Symbols", @@ -421,6 +421,7 @@ from revengai.models.analysis_stage import AnalysisStage as AnalysisStage from revengai.models.analysis_stage_status import AnalysisStageStatus as AnalysisStageStatus from revengai.models.analysis_stages_response import AnalysisStagesResponse as AnalysisStagesResponse +from revengai.models.analysis_string_input import AnalysisStringInput as AnalysisStringInput from revengai.models.analysis_strings_response import AnalysisStringsResponse as AnalysisStringsResponse from revengai.models.analysis_strings_status_response import AnalysisStringsStatusResponse as AnalysisStringsStatusResponse from revengai.models.analysis_tags import AnalysisTags as AnalysisTags @@ -468,7 +469,6 @@ from revengai.models.base_response_collection_search_response import BaseResponseCollectionSearchResponse as BaseResponseCollectionSearchResponse from revengai.models.base_response_collection_tags_update_response import BaseResponseCollectionTagsUpdateResponse as BaseResponseCollectionTagsUpdateResponse from revengai.models.base_response_comment_response import BaseResponseCommentResponse as BaseResponseCommentResponse -from revengai.models.base_response_communities import BaseResponseCommunities as BaseResponseCommunities from revengai.models.base_response_config_response import BaseResponseConfigResponse as BaseResponseConfigResponse from revengai.models.base_response_created import BaseResponseCreated as BaseResponseCreated from revengai.models.base_response_dict import BaseResponseDict as BaseResponseDict @@ -552,8 +552,6 @@ from revengai.models.comment_base import CommentBase as CommentBase from revengai.models.comment_response import CommentResponse as CommentResponse from revengai.models.comment_update_request import CommentUpdateRequest as CommentUpdateRequest -from revengai.models.communities import Communities as Communities -from revengai.models.community_match_percentages import CommunityMatchPercentages as CommunityMatchPercentages from revengai.models.confidence_type import ConfidenceType as ConfidenceType from revengai.models.config_response import ConfigResponse as ConfigResponse from revengai.models.context import Context as Context @@ -660,6 +658,7 @@ from revengai.models.process_dumps_data import ProcessDumpsData as ProcessDumpsData from revengai.models.process_registry import ProcessRegistry as ProcessRegistry from revengai.models.process_tree import ProcessTree as ProcessTree +from revengai.models.put_analysis_strings_request import PutAnalysisStringsRequest as PutAnalysisStringsRequest from revengai.models.queued_security_checks_task_response import QueuedSecurityChecksTaskResponse as QueuedSecurityChecksTaskResponse from revengai.models.re_analysis_form import ReAnalysisForm as ReAnalysisForm from revengai.models.recent import Recent as Recent @@ -685,6 +684,7 @@ from revengai.models.status_input import StatusInput as StatusInput from revengai.models.status_output import StatusOutput as StatusOutput from revengai.models.string_functions import StringFunctions as StringFunctions +from revengai.models.string_source import StringSource as StringSource from revengai.models.structure import Structure as Structure from revengai.models.structure_member import StructureMember as StructureMember from revengai.models.symbols import Symbols as Symbols diff --git a/revengai/api/analyses_core_api.py b/revengai/api/analyses_core_api.py index 63e9479..352a2cd 100644 --- a/revengai/api/analyses_core_api.py +++ b/revengai/api/analyses_core_api.py @@ -41,6 +41,7 @@ from revengai.models.insert_analysis_log_request import InsertAnalysisLogRequest from revengai.models.model_name import ModelName from revengai.models.order import Order +from revengai.models.put_analysis_strings_request import PutAnalysisStringsRequest from revengai.models.re_analysis_form import ReAnalysisForm from revengai.models.status_input import StatusInput from revengai.models.upload_file_type import UploadFileType @@ -3225,6 +3226,298 @@ def _lookup_binary_id_serialize( + @validate_call + def put_analysis_strings( + self, + analysis_id: StrictInt, + put_analysis_strings_request: PutAnalysisStringsRequest, + _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, + ) -> BaseResponse: + """Add strings to the analysis + + Add strings to the analysis. Rejects if any string already exists at the given vaddr. + + :param analysis_id: (required) + :type analysis_id: int + :param put_analysis_strings_request: (required) + :type put_analysis_strings_request: PutAnalysisStringsRequest + :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._put_analysis_strings_serialize( + analysis_id=analysis_id, + put_analysis_strings_request=put_analysis_strings_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "BaseResponse", + '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 put_analysis_strings_with_http_info( + self, + analysis_id: StrictInt, + put_analysis_strings_request: PutAnalysisStringsRequest, + _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[BaseResponse]: + """Add strings to the analysis + + Add strings to the analysis. Rejects if any string already exists at the given vaddr. + + :param analysis_id: (required) + :type analysis_id: int + :param put_analysis_strings_request: (required) + :type put_analysis_strings_request: PutAnalysisStringsRequest + :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._put_analysis_strings_serialize( + analysis_id=analysis_id, + put_analysis_strings_request=put_analysis_strings_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "BaseResponse", + '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 put_analysis_strings_without_preload_content( + self, + analysis_id: StrictInt, + put_analysis_strings_request: PutAnalysisStringsRequest, + _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: + """Add strings to the analysis + + Add strings to the analysis. Rejects if any string already exists at the given vaddr. + + :param analysis_id: (required) + :type analysis_id: int + :param put_analysis_strings_request: (required) + :type put_analysis_strings_request: PutAnalysisStringsRequest + :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._put_analysis_strings_serialize( + analysis_id=analysis_id, + put_analysis_strings_request=put_analysis_strings_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "BaseResponse", + '422': "BaseResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _put_analysis_strings_serialize( + self, + analysis_id, + put_analysis_strings_request, + _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 put_analysis_strings_request is not None: + _body_params = put_analysis_strings_request + + + # 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='PUT', + resource_path='/v2/analyses/{analysis_id}/strings', + 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 requeue_analysis( self, diff --git a/revengai/api/analyses_results_metadata_api.py b/revengai/api/analyses_results_metadata_api.py index 7ce4f3f..71f51a9 100644 --- a/revengai/api/analyses_results_metadata_api.py +++ b/revengai/api/analyses_results_metadata_api.py @@ -22,7 +22,6 @@ from revengai.models.base_response_analysis_functions_list import BaseResponseAnalysisFunctionsList from revengai.models.base_response_analysis_tags import BaseResponseAnalysisTags from revengai.models.base_response_capabilities import BaseResponseCapabilities -from revengai.models.base_response_communities import BaseResponseCommunities from revengai.models.base_response_list_sbom import BaseResponseListSBOM from revengai.models.base_response_vulnerabilities import BaseResponseVulnerabilities @@ -603,284 +602,6 @@ def _get_capabilities_serialize( - @validate_call - def get_communities( - self, - analysis_id: StrictInt, - user_name: Annotated[Optional[StrictStr], Field(description="The user name to limit communities to")] = 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, - ) -> BaseResponseCommunities: - """Gets the communities found in the analysis - - - :param analysis_id: (required) - :type analysis_id: int - :param user_name: The user name to limit communities to - :type user_name: str - :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_communities_serialize( - analysis_id=analysis_id, - user_name=user_name, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "BaseResponseCommunities", - '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_communities_with_http_info( - self, - analysis_id: StrictInt, - user_name: Annotated[Optional[StrictStr], Field(description="The user name to limit communities to")] = 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[BaseResponseCommunities]: - """Gets the communities found in the analysis - - - :param analysis_id: (required) - :type analysis_id: int - :param user_name: The user name to limit communities to - :type user_name: str - :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_communities_serialize( - analysis_id=analysis_id, - user_name=user_name, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "BaseResponseCommunities", - '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_communities_without_preload_content( - self, - analysis_id: StrictInt, - user_name: Annotated[Optional[StrictStr], Field(description="The user name to limit communities to")] = 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: - """Gets the communities found in the analysis - - - :param analysis_id: (required) - :type analysis_id: int - :param user_name: The user name to limit communities to - :type user_name: str - :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_communities_serialize( - analysis_id=analysis_id, - user_name=user_name, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "BaseResponseCommunities", - '422': "BaseResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _get_communities_serialize( - self, - analysis_id, - user_name, - _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 - if user_name is not None: - - _query_params.append(('user_name', user_name)) - - # 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/analyses/{analysis_id}/communities', - 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_list( self, diff --git a/revengai/api/functions_ai_decompilation_api.py b/revengai/api/functions_ai_decompilation_api.py index a9be921..c376b48 100644 --- a/revengai/api/functions_ai_decompilation_api.py +++ b/revengai/api/functions_ai_decompilation_api.py @@ -1433,7 +1433,7 @@ def get_ai_decompilation_task_result( self, function_id: Annotated[StrictInt, Field(description="The ID of the function being decompiled")], summarise: Annotated[Optional[StrictBool], Field(description="Generate a summary for the decompilation")] = None, - generate_inline_comments: Annotated[Optional[StrictBool], Field(description="Generate inline comments for the decompilation (only works if summarise is enabled)")] = None, + generate_inline_comments: Annotated[Optional[StrictBool], Field(description="Generate inline comments for the decompilation")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1455,7 +1455,7 @@ def get_ai_decompilation_task_result( :type function_id: int :param summarise: Generate a summary for the decompilation :type summarise: bool - :param generate_inline_comments: Generate inline comments for the decompilation (only works if summarise is enabled) + :param generate_inline_comments: Generate inline comments for the decompilation :type generate_inline_comments: bool :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -1510,7 +1510,7 @@ def get_ai_decompilation_task_result_with_http_info( self, function_id: Annotated[StrictInt, Field(description="The ID of the function being decompiled")], summarise: Annotated[Optional[StrictBool], Field(description="Generate a summary for the decompilation")] = None, - generate_inline_comments: Annotated[Optional[StrictBool], Field(description="Generate inline comments for the decompilation (only works if summarise is enabled)")] = None, + generate_inline_comments: Annotated[Optional[StrictBool], Field(description="Generate inline comments for the decompilation")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1532,7 +1532,7 @@ def get_ai_decompilation_task_result_with_http_info( :type function_id: int :param summarise: Generate a summary for the decompilation :type summarise: bool - :param generate_inline_comments: Generate inline comments for the decompilation (only works if summarise is enabled) + :param generate_inline_comments: Generate inline comments for the decompilation :type generate_inline_comments: bool :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -1587,7 +1587,7 @@ def get_ai_decompilation_task_result_without_preload_content( self, function_id: Annotated[StrictInt, Field(description="The ID of the function being decompiled")], summarise: Annotated[Optional[StrictBool], Field(description="Generate a summary for the decompilation")] = None, - generate_inline_comments: Annotated[Optional[StrictBool], Field(description="Generate inline comments for the decompilation (only works if summarise is enabled)")] = None, + generate_inline_comments: Annotated[Optional[StrictBool], Field(description="Generate inline comments for the decompilation")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1609,7 +1609,7 @@ def get_ai_decompilation_task_result_without_preload_content( :type function_id: int :param summarise: Generate a summary for the decompilation :type summarise: bool - :param generate_inline_comments: Generate inline comments for the decompilation (only works if summarise is enabled) + :param generate_inline_comments: Generate inline comments for the decompilation :type generate_inline_comments: bool :param _request_timeout: timeout setting for this request. If one number provided, it will be total request diff --git a/revengai/api_client.py b/revengai/api_client.py index 1b03b6f..0c586a7 100644 --- a/revengai/api_client.py +++ b/revengai/api_client.py @@ -90,7 +90,7 @@ def __init__( self.default_headers[header_name] = header_value self.cookie = cookie # Set default User-Agent. - self.user_agent = 'OpenAPI-Generator/v3.51.0/python' + self.user_agent = 'OpenAPI-Generator/v3.55.2/python' self.client_side_validation = configuration.client_side_validation def __enter__(self): diff --git a/revengai/configuration.py b/revengai/configuration.py index 4ccfb14..675ce7b 100644 --- a/revengai/configuration.py +++ b/revengai/configuration.py @@ -533,8 +533,8 @@ def to_debug_report(self) -> str: return "Python SDK Debug Report:\n"\ "OS: {env}\n"\ "Python Version: {pyversion}\n"\ - "Version of the API: v3.51.0\n"\ - "SDK Package Version: v3.51.0".\ + "Version of the API: v3.55.2\n"\ + "SDK Package Version: v3.55.2".\ 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 9685658..ba899a3 100644 --- a/revengai/models/__init__.py +++ b/revengai/models/__init__.py @@ -34,6 +34,7 @@ from revengai.models.analysis_stage import AnalysisStage from revengai.models.analysis_stage_status import AnalysisStageStatus from revengai.models.analysis_stages_response import AnalysisStagesResponse +from revengai.models.analysis_string_input import AnalysisStringInput from revengai.models.analysis_strings_response import AnalysisStringsResponse from revengai.models.analysis_strings_status_response import AnalysisStringsStatusResponse from revengai.models.analysis_tags import AnalysisTags @@ -81,7 +82,6 @@ from revengai.models.base_response_collection_search_response import BaseResponseCollectionSearchResponse from revengai.models.base_response_collection_tags_update_response import BaseResponseCollectionTagsUpdateResponse from revengai.models.base_response_comment_response import BaseResponseCommentResponse -from revengai.models.base_response_communities import BaseResponseCommunities from revengai.models.base_response_config_response import BaseResponseConfigResponse from revengai.models.base_response_created import BaseResponseCreated from revengai.models.base_response_dict import BaseResponseDict @@ -165,8 +165,6 @@ from revengai.models.comment_base import CommentBase from revengai.models.comment_response import CommentResponse from revengai.models.comment_update_request import CommentUpdateRequest -from revengai.models.communities import Communities -from revengai.models.community_match_percentages import CommunityMatchPercentages from revengai.models.confidence_type import ConfidenceType from revengai.models.config_response import ConfigResponse from revengai.models.context import Context @@ -273,6 +271,7 @@ from revengai.models.process_dumps_data import ProcessDumpsData from revengai.models.process_registry import ProcessRegistry from revengai.models.process_tree import ProcessTree +from revengai.models.put_analysis_strings_request import PutAnalysisStringsRequest from revengai.models.queued_security_checks_task_response import QueuedSecurityChecksTaskResponse from revengai.models.re_analysis_form import ReAnalysisForm from revengai.models.recent import Recent @@ -298,6 +297,7 @@ from revengai.models.status_input import StatusInput from revengai.models.status_output import StatusOutput from revengai.models.string_functions import StringFunctions +from revengai.models.string_source import StringSource from revengai.models.structure import Structure from revengai.models.structure_member import StructureMember from revengai.models.symbols import Symbols diff --git a/revengai/models/analysis_function_matching_request.py b/revengai/models/analysis_function_matching_request.py index fc43078..95a7511 100644 --- a/revengai/models/analysis_function_matching_request.py +++ b/revengai/models/analysis_function_matching_request.py @@ -27,9 +27,9 @@ class AnalysisFunctionMatchingRequest(BaseModel): """ AnalysisFunctionMatchingRequest """ # noqa: E501 - min_similarity: Optional[Union[Annotated[float, Field(le=100.0, strict=True, ge=0.0)], Annotated[int, Field(le=100, strict=True, ge=0)]]] = Field(default=90.0, description="Minimum similarity expected for a match as a percentage, default is 90") + min_similarity: Optional[Union[Annotated[float, Field(le=100, strict=True, ge=0)], Annotated[int, Field(le=100, strict=True, ge=0)]]] = Field(default=90, description="Minimum similarity expected for a match as a percentage, default is 90") filters: Optional[FunctionMatchingFilters] = None - results_per_function: Optional[Annotated[int, Field(le=10, strict=True, ge=1)]] = Field(default=1, description="Maximum number of matches to return per function, default is 1, max is 10") + results_per_function: Optional[Annotated[int, Field(le=30, strict=True, ge=1)]] = Field(default=1, description="Maximum number of matches to return per function, default is 1, max is 30") page: Optional[Annotated[int, Field(strict=True, ge=1)]] = Field(default=1, description="Page number for paginated results, default is 1 (first page)") page_size: Optional[Annotated[int, Field(le=1000, strict=True, ge=0)]] = Field(default=0, description="Number of functions to return per page, default is 0 (all functions), max is 1000") status_only: Optional[StrictBool] = Field(default=False, description="If set to true, only returns the status of the matching operation without the actual results") @@ -96,7 +96,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "min_similarity": obj.get("min_similarity") if obj.get("min_similarity") is not None else 90.0, + "min_similarity": obj.get("min_similarity") if obj.get("min_similarity") is not None else 90, "filters": FunctionMatchingFilters.from_dict(obj["filters"]) if obj.get("filters") is not None else None, "results_per_function": obj.get("results_per_function") if obj.get("results_per_function") is not None else 1, "page": obj.get("page") if obj.get("page") is not None else 1, diff --git a/revengai/models/community_match_percentages.py b/revengai/models/analysis_string_input.py similarity index 70% rename from revengai/models/community_match_percentages.py rename to revengai/models/analysis_string_input.py index c5f38a1..7762d7d 100644 --- a/revengai/models/community_match_percentages.py +++ b/revengai/models/analysis_string_input.py @@ -16,20 +16,20 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, StrictFloat, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Union +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from revengai.models.string_source import StringSource from typing import Optional, Set from typing_extensions import Self -class CommunityMatchPercentages(BaseModel): +class AnalysisStringInput(BaseModel): """ - CommunityMatchPercentages + Input model for inserting a string into an analysis. """ # noqa: E501 - binary_name: StrictStr - binary_id: StrictInt - matched_communities_percent: Union[StrictFloat, StrictInt] - unmatched_communities_percent: Union[StrictFloat, StrictInt] - __properties: ClassVar[List[str]] = ["binary_name", "binary_id", "matched_communities_percent", "unmatched_communities_percent"] + value: StrictStr = Field(description="The string literal value") + vaddr: StrictInt = Field(description="The virtual address of the string") + source: StringSource = Field(description="The source of the string") + __properties: ClassVar[List[str]] = ["value", "vaddr", "source"] model_config = ConfigDict( populate_by_name=True, @@ -49,7 +49,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of CommunityMatchPercentages from a JSON string""" + """Create an instance of AnalysisStringInput from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -74,7 +74,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of CommunityMatchPercentages from a dict""" + """Create an instance of AnalysisStringInput from a dict""" if obj is None: return None @@ -82,10 +82,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "binary_name": obj.get("binary_name"), - "binary_id": obj.get("binary_id"), - "matched_communities_percent": obj.get("matched_communities_percent"), - "unmatched_communities_percent": obj.get("unmatched_communities_percent") + "value": obj.get("value"), + "vaddr": obj.get("vaddr"), + "source": obj.get("source") }) return _obj diff --git a/revengai/models/auto_unstrip_request.py b/revengai/models/auto_unstrip_request.py index dfe9c19..0d1ad24 100644 --- a/revengai/models/auto_unstrip_request.py +++ b/revengai/models/auto_unstrip_request.py @@ -26,9 +26,9 @@ class AutoUnstripRequest(BaseModel): """ AutoUnstripRequest """ # noqa: E501 - min_similarity: Optional[Union[Annotated[float, Field(le=100.0, strict=True, ge=0.0)], Annotated[int, Field(le=100, strict=True, ge=0)]]] = Field(default=90.0, description="Minimum similarity expected for a match as a percentage, default is 90") + min_similarity: Optional[Union[Annotated[float, Field(le=100, strict=True, ge=0)], Annotated[int, Field(le=100, strict=True, ge=0)]]] = Field(default=90, description="Minimum similarity expected for a match as a percentage, default is 90") apply: Optional[StrictBool] = Field(default=False, description="Whether to apply the matched function names to the target binary, default is False") - confidence_threshold: Optional[Union[Annotated[float, Field(le=100.0, strict=True, ge=0.0)], Annotated[int, Field(le=100, strict=True, ge=0)]]] = Field(default=90.0, description="Confidence threshold for applying function names as a percentage, default is 90") + confidence_threshold: Optional[Union[Annotated[float, Field(le=100, strict=True, ge=0)], Annotated[int, Field(le=100, strict=True, ge=0)]]] = Field(default=90, description="Confidence threshold for applying function names as a percentage, default is 90") min_group_size: Optional[Annotated[int, Field(le=20, strict=True, ge=1)]] = Field(default=10, description="Minimum number of matching functions required to consider for a match, default is 10") status_only: Optional[StrictBool] = Field(default=False, description="If set to true, only returns the status of the auto-unstrip operation without the actual results") no_cache: Optional[StrictBool] = Field(default=False, description="If set to true, forces the system to bypass any cached results and perform a fresh computation") @@ -86,9 +86,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "min_similarity": obj.get("min_similarity") if obj.get("min_similarity") is not None else 90.0, + "min_similarity": obj.get("min_similarity") if obj.get("min_similarity") is not None else 90, "apply": obj.get("apply") if obj.get("apply") is not None else False, - "confidence_threshold": obj.get("confidence_threshold") if obj.get("confidence_threshold") is not None else 90.0, + "confidence_threshold": obj.get("confidence_threshold") if obj.get("confidence_threshold") is not None else 90, "min_group_size": obj.get("min_group_size") if obj.get("min_group_size") is not None else 10, "status_only": obj.get("status_only") if obj.get("status_only") is not None else False, "no_cache": obj.get("no_cache") if obj.get("no_cache") is not None else False, diff --git a/revengai/models/base_response_communities.py b/revengai/models/base_response_communities.py deleted file mode 100644 index a9cba9d..0000000 --- a/revengai/models/base_response_communities.py +++ /dev/null @@ -1,125 +0,0 @@ -# coding: utf-8 - -""" - RevEng.AI API - - RevEng.AI is an AI-powered binary analysis platform for reverse engineering and malware analysis. It provides similarity search across executable binaries and functions, AI-driven decompilation, dynamic execution analysis, firmware unpacking, and integration with external threat intelligence sources like VirusTotal. - - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from revengai.models.communities import Communities -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 BaseResponseCommunities(BaseModel): - """ - BaseResponseCommunities - """ # noqa: E501 - status: Optional[StrictBool] = Field(default=True, description="Response status on whether the request succeeded") - data: Optional[Communities] = 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 BaseResponseCommunities 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 BaseResponseCommunities 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": Communities.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/function_matching_request.py b/revengai/models/function_matching_request.py index cc0b9f7..4a2a927 100644 --- a/revengai/models/function_matching_request.py +++ b/revengai/models/function_matching_request.py @@ -29,7 +29,7 @@ class FunctionMatchingRequest(BaseModel): """ # noqa: E501 model_id: StrictInt = Field(description="ID of the model used for function matching, used to determine the embedding model") function_ids: List[StrictInt] = Field(description="ID's of functions to find matches for, must be at least one function ID") - min_similarity: Optional[Union[Annotated[float, Field(le=100.0, strict=True, ge=0.0)], Annotated[int, Field(le=100, strict=True, ge=0)]]] = Field(default=90.0, description="Minimum similarity expected for a match as a percentage, default is 90") + min_similarity: Optional[Union[Annotated[float, Field(le=100, strict=True, ge=0)], Annotated[int, Field(le=100, strict=True, ge=0)]]] = Field(default=90, description="Minimum similarity expected for a match as a percentage, default is 90") filters: Optional[FunctionMatchingFilters] = None results_per_function: Optional[Annotated[int, Field(le=50, strict=True, ge=1)]] = Field(default=1, description="Maximum number of matches to return per function, default is 1, max is 50") page: Optional[Annotated[int, Field(strict=True, ge=1)]] = Field(default=1, description="Page number for paginated results, default is 1 (first page)") @@ -100,7 +100,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "model_id": obj.get("model_id"), "function_ids": obj.get("function_ids"), - "min_similarity": obj.get("min_similarity") if obj.get("min_similarity") is not None else 90.0, + "min_similarity": obj.get("min_similarity") if obj.get("min_similarity") is not None else 90, "filters": FunctionMatchingFilters.from_dict(obj["filters"]) if obj.get("filters") is not None else None, "results_per_function": obj.get("results_per_function") if obj.get("results_per_function") is not None else 1, "page": obj.get("page") if obj.get("page") is not None else 1, diff --git a/revengai/models/function_string.py b/revengai/models/function_string.py index 0bbfe00..ab8f451 100644 --- a/revengai/models/function_string.py +++ b/revengai/models/function_string.py @@ -17,7 +17,8 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List +from typing import Any, ClassVar, Dict, List, Optional +from revengai.models.string_source import StringSource from typing import Optional, Set from typing_extensions import Self @@ -27,7 +28,8 @@ class FunctionString(BaseModel): """ # noqa: E501 value: StrictStr = Field(description="The value of the string literal") vaddr: StrictInt = Field(description="The vaddr of the string value") - __properties: ClassVar[List[str]] = ["value", "vaddr"] + source: Optional[StringSource] = Field(default=None, description="The source of the string") + __properties: ClassVar[List[str]] = ["value", "vaddr", "source"] model_config = ConfigDict( populate_by_name=True, @@ -81,7 +83,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "value": obj.get("value"), - "vaddr": obj.get("vaddr") + "vaddr": obj.get("vaddr"), + "source": obj.get("source") }) return _obj diff --git a/revengai/models/name_confidence.py b/revengai/models/name_confidence.py index f303ea2..5b71f3a 100644 --- a/revengai/models/name_confidence.py +++ b/revengai/models/name_confidence.py @@ -27,7 +27,7 @@ class NameConfidence(BaseModel): NameConfidence """ # noqa: E501 name: StrictStr = Field(description="The suggested function name") - confidence: Union[Annotated[float, Field(le=100.0, strict=True, ge=0.0)], Annotated[int, Field(le=100, strict=True, ge=0)]] = Field(description="Confidence score as a percentage") + confidence: Union[Annotated[float, Field(le=100, strict=True, ge=0)], Annotated[int, Field(le=100, strict=True, ge=0)]] = Field(description="Confidence score as a percentage") __properties: ClassVar[List[str]] = ["name", "confidence"] model_config = ConfigDict( diff --git a/revengai/models/communities.py b/revengai/models/put_analysis_strings_request.py similarity index 57% rename from revengai/models/communities.py rename to revengai/models/put_analysis_strings_request.py index 159c2e8..5fa3072 100644 --- a/revengai/models/communities.py +++ b/revengai/models/put_analysis_strings_request.py @@ -16,21 +16,18 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictInt +from pydantic import BaseModel, ConfigDict, Field from typing import Any, ClassVar, Dict, List -from revengai.models.community_match_percentages import CommunityMatchPercentages +from revengai.models.analysis_string_input import AnalysisStringInput from typing import Optional, Set from typing_extensions import Self -class Communities(BaseModel): +class PutAnalysisStringsRequest(BaseModel): """ - Communities + PutAnalysisStringsRequest """ # noqa: E501 - total_functions: StrictInt = Field(description="The total number of matched community functions") - total_matched_functions: StrictInt = Field(description="The total number of functions in the binary") - direct_community_match_percentages: List[CommunityMatchPercentages] = Field(description="The list of directly matched communities") - top_components: List[Dict[str, Any]] = Field(description="The top components of the binary") - __properties: ClassVar[List[str]] = ["total_functions", "total_matched_functions", "direct_community_match_percentages", "top_components"] + strings: List[AnalysisStringInput] = Field(description="The strings to add to the analysis") + __properties: ClassVar[List[str]] = ["strings"] model_config = ConfigDict( populate_by_name=True, @@ -50,7 +47,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of Communities from a JSON string""" + """Create an instance of PutAnalysisStringsRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -71,18 +68,18 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # override the default output from pydantic by calling `to_dict()` of each item in direct_community_match_percentages (list) + # override the default output from pydantic by calling `to_dict()` of each item in strings (list) _items = [] - if self.direct_community_match_percentages: - for _item_direct_community_match_percentages in self.direct_community_match_percentages: - if _item_direct_community_match_percentages: - _items.append(_item_direct_community_match_percentages.to_dict()) - _dict['direct_community_match_percentages'] = _items + if self.strings: + for _item_strings in self.strings: + if _item_strings: + _items.append(_item_strings.to_dict()) + _dict['strings'] = _items return _dict @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of Communities from a dict""" + """Create an instance of PutAnalysisStringsRequest from a dict""" if obj is None: return None @@ -90,10 +87,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "total_functions": obj.get("total_functions"), - "total_matched_functions": obj.get("total_matched_functions"), - "direct_community_match_percentages": [CommunityMatchPercentages.from_dict(_item) for _item in obj["direct_community_match_percentages"]] if obj.get("direct_community_match_percentages") is not None else None, - "top_components": obj.get("top_components") + "strings": [AnalysisStringInput.from_dict(_item) for _item in obj["strings"]] if obj.get("strings") is not None else None }) return _obj diff --git a/revengai/models/string_functions.py b/revengai/models/string_functions.py index 5e89b47..5ec6443 100644 --- a/revengai/models/string_functions.py +++ b/revengai/models/string_functions.py @@ -17,8 +17,9 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List +from typing import Any, ClassVar, Dict, List, Optional from revengai.models.app_api_rest_v2_functions_responses_function import AppApiRestV2FunctionsResponsesFunction +from revengai.models.string_source import StringSource from typing import Optional, Set from typing_extensions import Self @@ -28,7 +29,8 @@ class StringFunctions(BaseModel): """ # noqa: E501 value: StrictStr = Field(description="The value of the string literal") functions: List[AppApiRestV2FunctionsResponsesFunction] = Field(description="The function ids the string literal was found within") - __properties: ClassVar[List[str]] = ["value", "functions"] + source: Optional[StringSource] = Field(default=None, description="The source of the string") + __properties: ClassVar[List[str]] = ["value", "functions", "source"] model_config = ConfigDict( populate_by_name=True, @@ -89,7 +91,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "value": obj.get("value"), - "functions": [AppApiRestV2FunctionsResponsesFunction.from_dict(_item) for _item in obj["functions"]] if obj.get("functions") is not None else None + "functions": [AppApiRestV2FunctionsResponsesFunction.from_dict(_item) for _item in obj["functions"]] if obj.get("functions") is not None else None, + "source": obj.get("source") }) return _obj diff --git a/revengai/models/string_source.py b/revengai/models/string_source.py new file mode 100644 index 0000000..5fbdc5e --- /dev/null +++ b/revengai/models/string_source.py @@ -0,0 +1,37 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is an AI-powered binary analysis platform for reverse engineering and malware analysis. It provides similarity search across executable binaries and functions, AI-driven decompilation, dynamic execution analysis, firmware unpacking, and integration with external threat intelligence sources like VirusTotal. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class StringSource(str, Enum): + """ + StringSource + """ + + """ + allowed enum values + """ + SYSTEM = 'SYSTEM' + USER = 'USER' + AI_AGENT = 'AI_AGENT' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of StringSource from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/test/test_analyses_core_api.py b/test/test_analyses_core_api.py index 68e2e05..acc8153 100644 --- a/test/test_analyses_core_api.py +++ b/test/test_analyses_core_api.py @@ -102,6 +102,13 @@ def test_lookup_binary_id(self) -> None: """ pass + def test_put_analysis_strings(self) -> None: + """Test case for put_analysis_strings + + Add strings to the analysis + """ + pass + def test_requeue_analysis(self) -> None: """Test case for requeue_analysis diff --git a/test/test_analyses_results_metadata_api.py b/test/test_analyses_results_metadata_api.py index 8cebbc5..ba81836 100644 --- a/test/test_analyses_results_metadata_api.py +++ b/test/test_analyses_results_metadata_api.py @@ -39,13 +39,6 @@ def test_get_capabilities(self) -> None: """ pass - def test_get_communities(self) -> None: - """Test case for get_communities - - Gets the communities found in the analysis - """ - pass - def test_get_functions_list(self) -> None: """Test case for get_functions_list diff --git a/test/test_analysis_function_matching_request.py b/test/test_analysis_function_matching_request.py index b69038e..3b9e689 100644 --- a/test/test_analysis_function_matching_request.py +++ b/test/test_analysis_function_matching_request.py @@ -34,7 +34,7 @@ def make_instance(self, include_optional) -> AnalysisFunctionMatchingRequest: model = AnalysisFunctionMatchingRequest() if include_optional: return AnalysisFunctionMatchingRequest( - min_similarity = 0.0, + min_similarity = 0, filters = revengai.models.function_matching_filters.FunctionMatchingFilters( binary_ids = [ 56 @@ -51,9 +51,9 @@ def make_instance(self, include_optional) -> AnalysisFunctionMatchingRequest: debug_types = [ 'USER' ], ), - results_per_function = 1.0, - page = 1.0, - page_size = 0.0, + results_per_function = 1, + page = 1, + page_size = 0, status_only = True, no_cache = True, use_canonical_names = True diff --git a/test/test_community_match_percentages.py b/test/test_analysis_string_input.py similarity index 51% rename from test/test_community_match_percentages.py rename to test/test_analysis_string_input.py index 432765f..dff58bb 100644 --- a/test/test_community_match_percentages.py +++ b/test/test_analysis_string_input.py @@ -13,10 +13,10 @@ import unittest -from revengai.models.community_match_percentages import CommunityMatchPercentages +from revengai.models.analysis_string_input import AnalysisStringInput -class TestCommunityMatchPercentages(unittest.TestCase): - """CommunityMatchPercentages unit test stubs""" +class TestAnalysisStringInput(unittest.TestCase): + """AnalysisStringInput unit test stubs""" def setUp(self): pass @@ -24,32 +24,30 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> CommunityMatchPercentages: - """Test CommunityMatchPercentages + def make_instance(self, include_optional) -> AnalysisStringInput: + """Test AnalysisStringInput 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 `CommunityMatchPercentages` + # uncomment below to create an instance of `AnalysisStringInput` """ - model = CommunityMatchPercentages() + model = AnalysisStringInput() if include_optional: - return CommunityMatchPercentages( - binary_name = '', - binary_id = 56, - matched_communities_percent = 1.337, - unmatched_communities_percent = 1.337 + return AnalysisStringInput( + value = '', + vaddr = 56, + source = 'SYSTEM' ) else: - return CommunityMatchPercentages( - binary_name = '', - binary_id = 56, - matched_communities_percent = 1.337, - unmatched_communities_percent = 1.337, + return AnalysisStringInput( + value = '', + vaddr = 56, + source = 'SYSTEM', ) """ - def testCommunityMatchPercentages(self): - """Test CommunityMatchPercentages""" + def testAnalysisStringInput(self): + """Test AnalysisStringInput""" # inst_req_only = self.make_instance(include_optional=False) # inst_req_and_optional = self.make_instance(include_optional=True) diff --git a/test/test_analysis_strings_response.py b/test/test_analysis_strings_response.py index 33152fc..51d34e9 100644 --- a/test/test_analysis_strings_response.py +++ b/test/test_analysis_strings_response.py @@ -41,7 +41,8 @@ def make_instance(self, include_optional) -> AnalysisStringsResponse: revengai.models.function.Function( function_id = 56, function_vaddr = 56, ) - ], ) + ], + source = 'SYSTEM', ) ], total_strings = 56 ) @@ -54,7 +55,8 @@ def make_instance(self, include_optional) -> AnalysisStringsResponse: revengai.models.function.Function( function_id = 56, function_vaddr = 56, ) - ], ) + ], + source = 'SYSTEM', ) ], total_strings = 56, ) diff --git a/test/test_auto_unstrip_request.py b/test/test_auto_unstrip_request.py index a309b2a..914c15f 100644 --- a/test/test_auto_unstrip_request.py +++ b/test/test_auto_unstrip_request.py @@ -34,10 +34,10 @@ def make_instance(self, include_optional) -> AutoUnstripRequest: model = AutoUnstripRequest() if include_optional: return AutoUnstripRequest( - min_similarity = 0.0, + min_similarity = 0, apply = True, - confidence_threshold = 0.0, - min_group_size = 1.0, + confidence_threshold = 0, + min_group_size = 1, status_only = True, no_cache = True, use_canonical_names = True diff --git a/test/test_base_response_analysis_strings_response.py b/test/test_base_response_analysis_strings_response.py index f61575c..bde9893 100644 --- a/test/test_base_response_analysis_strings_response.py +++ b/test/test_base_response_analysis_strings_response.py @@ -43,7 +43,8 @@ def make_instance(self, include_optional) -> BaseResponseAnalysisStringsResponse revengai.models.function.Function( function_id = 56, function_vaddr = 56, ) - ], ) + ], + source = 'SYSTEM', ) ], total_strings = 56, ), message = '', diff --git a/test/test_base_response_communities.py b/test/test_base_response_communities.py deleted file mode 100644 index f187767..0000000 --- a/test/test_base_response_communities.py +++ /dev/null @@ -1,76 +0,0 @@ -# coding: utf-8 - -""" - RevEng.AI API - - RevEng.AI is an AI-powered binary analysis platform for reverse engineering and malware analysis. It provides similarity search across executable binaries and functions, AI-driven decompilation, dynamic execution analysis, firmware unpacking, and integration with external threat intelligence sources like VirusTotal. - - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from revengai.models.base_response_communities import BaseResponseCommunities - -class TestBaseResponseCommunities(unittest.TestCase): - """BaseResponseCommunities unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> BaseResponseCommunities: - """Test BaseResponseCommunities - 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 `BaseResponseCommunities` - """ - model = BaseResponseCommunities() - if include_optional: - return BaseResponseCommunities( - status = True, - data = revengai.models.communities.Communities( - total_functions = 56, - total_matched_functions = 56, - direct_community_match_percentages = [ - revengai.models.community_match_percentages.CommunityMatchPercentages( - binary_name = '', - binary_id = 56, - matched_communities_percent = 1.337, - unmatched_communities_percent = 1.337, ) - ], - top_components = [ - { - 'key' : null - } - ], ), - 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 BaseResponseCommunities( - ) - """ - - def testBaseResponseCommunities(self): - """Test BaseResponseCommunities""" - # 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_function_strings_response.py b/test/test_base_response_function_strings_response.py index 98e11bc..fffffc9 100644 --- a/test/test_base_response_function_strings_response.py +++ b/test/test_base_response_function_strings_response.py @@ -39,7 +39,8 @@ def make_instance(self, include_optional) -> BaseResponseFunctionStringsResponse strings = [ revengai.models.function_string.FunctionString( value = '', - vaddr = 56, ) + vaddr = 56, + source = 'SYSTEM', ) ], total_strings = 56, ), message = '', diff --git a/test/test_communities.py b/test/test_communities.py deleted file mode 100644 index c9c095a..0000000 --- a/test/test_communities.py +++ /dev/null @@ -1,77 +0,0 @@ -# coding: utf-8 - -""" - RevEng.AI API - - RevEng.AI is an AI-powered binary analysis platform for reverse engineering and malware analysis. It provides similarity search across executable binaries and functions, AI-driven decompilation, dynamic execution analysis, firmware unpacking, and integration with external threat intelligence sources like VirusTotal. - - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from revengai.models.communities import Communities - -class TestCommunities(unittest.TestCase): - """Communities unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> Communities: - """Test Communities - 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 `Communities` - """ - model = Communities() - if include_optional: - return Communities( - total_functions = 56, - total_matched_functions = 56, - direct_community_match_percentages = [ - revengai.models.community_match_percentages.CommunityMatchPercentages( - binary_name = '', - binary_id = 56, - matched_communities_percent = 1.337, - unmatched_communities_percent = 1.337, ) - ], - top_components = [ - { - 'key' : null - } - ] - ) - else: - return Communities( - total_functions = 56, - total_matched_functions = 56, - direct_community_match_percentages = [ - revengai.models.community_match_percentages.CommunityMatchPercentages( - binary_name = '', - binary_id = 56, - matched_communities_percent = 1.337, - unmatched_communities_percent = 1.337, ) - ], - top_components = [ - { - 'key' : null - } - ], - ) - """ - - def testCommunities(self): - """Test Communities""" - # 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_match.py b/test/test_function_match.py index bf03963..d44daa3 100644 --- a/test/test_function_match.py +++ b/test/test_function_match.py @@ -52,7 +52,7 @@ def make_instance(self, include_optional) -> FunctionMatch: confidences = [ revengai.models.name_confidence.NameConfidence( name = '', - confidence = 0.0, ) + confidence = 0, ) ] ) else: diff --git a/test/test_function_matching_request.py b/test/test_function_matching_request.py index 740498b..72bd741 100644 --- a/test/test_function_matching_request.py +++ b/test/test_function_matching_request.py @@ -38,7 +38,7 @@ def make_instance(self, include_optional) -> FunctionMatchingRequest: function_ids = [ 56 ], - min_similarity = 0.0, + min_similarity = 0, filters = revengai.models.function_matching_filters.FunctionMatchingFilters( binary_ids = [ 56 @@ -55,9 +55,9 @@ def make_instance(self, include_optional) -> FunctionMatchingRequest: debug_types = [ 'USER' ], ), - results_per_function = 1.0, - page = 1.0, - page_size = 0.0, + results_per_function = 1, + page = 1, + page_size = 0, status_only = True, no_cache = True, use_canonical_names = True diff --git a/test/test_function_matching_response.py b/test/test_function_matching_response.py index 9438150..a69f123 100644 --- a/test/test_function_matching_response.py +++ b/test/test_function_matching_response.py @@ -60,7 +60,7 @@ def make_instance(self, include_optional) -> FunctionMatchingResponse: confidences = [ revengai.models.name_confidence.NameConfidence( name = '', - confidence = 0.0, ) + confidence = 0, ) ], ) ], num_matches = 56, diff --git a/test/test_function_string.py b/test/test_function_string.py index 47d739b..13e2e67 100644 --- a/test/test_function_string.py +++ b/test/test_function_string.py @@ -35,7 +35,8 @@ def make_instance(self, include_optional) -> FunctionString: if include_optional: return FunctionString( value = '', - vaddr = 56 + vaddr = 56, + source = 'SYSTEM' ) else: return FunctionString( diff --git a/test/test_function_strings_response.py b/test/test_function_strings_response.py index ecdb5cc..a01bb68 100644 --- a/test/test_function_strings_response.py +++ b/test/test_function_strings_response.py @@ -37,7 +37,8 @@ def make_instance(self, include_optional) -> FunctionStringsResponse: strings = [ revengai.models.function_string.FunctionString( value = '', - vaddr = 56, ) + vaddr = 56, + source = 'SYSTEM', ) ], total_strings = 56 ) @@ -46,7 +47,8 @@ def make_instance(self, include_optional) -> FunctionStringsResponse: strings = [ revengai.models.function_string.FunctionString( value = '', - vaddr = 56, ) + vaddr = 56, + source = 'SYSTEM', ) ], total_strings = 56, ) diff --git a/test/test_name_confidence.py b/test/test_name_confidence.py index 9567d7f..4b1f9c6 100644 --- a/test/test_name_confidence.py +++ b/test/test_name_confidence.py @@ -35,12 +35,12 @@ def make_instance(self, include_optional) -> NameConfidence: if include_optional: return NameConfidence( name = '', - confidence = 0.0 + confidence = 0 ) else: return NameConfidence( name = '', - confidence = 0.0, + confidence = 0, ) """ diff --git a/test/test_put_analysis_strings_request.py b/test/test_put_analysis_strings_request.py new file mode 100644 index 0000000..d95e885 --- /dev/null +++ b/test/test_put_analysis_strings_request.py @@ -0,0 +1,61 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is an AI-powered binary analysis platform for reverse engineering and malware analysis. It provides similarity search across executable binaries and functions, AI-driven decompilation, dynamic execution analysis, firmware unpacking, and integration with external threat intelligence sources like VirusTotal. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.put_analysis_strings_request import PutAnalysisStringsRequest + +class TestPutAnalysisStringsRequest(unittest.TestCase): + """PutAnalysisStringsRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PutAnalysisStringsRequest: + """Test PutAnalysisStringsRequest + 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 `PutAnalysisStringsRequest` + """ + model = PutAnalysisStringsRequest() + if include_optional: + return PutAnalysisStringsRequest( + strings = [ + revengai.models.analysis_string_input.AnalysisStringInput( + value = '', + vaddr = 56, + source = 'SYSTEM', ) + ] + ) + else: + return PutAnalysisStringsRequest( + strings = [ + revengai.models.analysis_string_input.AnalysisStringInput( + value = '', + vaddr = 56, + source = 'SYSTEM', ) + ], + ) + """ + + def testPutAnalysisStringsRequest(self): + """Test PutAnalysisStringsRequest""" + # 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_string_functions.py b/test/test_string_functions.py index 44a89ba..bdfbc38 100644 --- a/test/test_string_functions.py +++ b/test/test_string_functions.py @@ -39,7 +39,8 @@ def make_instance(self, include_optional) -> StringFunctions: revengai.models.function.Function( function_id = 56, function_vaddr = 56, ) - ] + ], + source = 'SYSTEM' ) else: return StringFunctions( diff --git a/test/test_string_source.py b/test/test_string_source.py new file mode 100644 index 0000000..925e709 --- /dev/null +++ b/test/test_string_source.py @@ -0,0 +1,32 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is an AI-powered binary analysis platform for reverse engineering and malware analysis. It provides similarity search across executable binaries and functions, AI-driven decompilation, dynamic execution analysis, firmware unpacking, and integration with external threat intelligence sources like VirusTotal. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.string_source import StringSource + +class TestStringSource(unittest.TestCase): + """StringSource unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testStringSource(self): + """Test StringSource""" + # inst = StringSource() + +if __name__ == '__main__': + unittest.main()