revengai 1.96.1__py3-none-any.whl → 2.0.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of revengai might be problematic. Click here for more details.
- revengai/__init__.py +3 -11
- revengai/api/analyses_core_api.py +16 -295
- revengai/api_client.py +1 -1
- revengai/configuration.py +2 -2
- revengai/models/__init__.py +1 -5
- revengai/models/{app_api_rest_v2_similarity_schema_ann_function.py → ann_function.py} +18 -16
- revengai/models/app_api_rest_v2_functions_responses_function.py +2 -2
- revengai/models/app_api_rest_v2_functions_types_function.py +4 -2
- revengai/models/function_matching_request.py +1 -1
- revengai/models/matched_function_suggestion.py +11 -4
- {revengai-1.96.1.dist-info → revengai-2.0.0.dist-info}/METADATA +2 -7
- {revengai-1.96.1.dist-info → revengai-2.0.0.dist-info}/RECORD +14 -18
- revengai/models/app_api_rest_v1_ann_schema_ann_function.py +0 -134
- revengai/models/function_batch_ann.py +0 -105
- revengai/models/search_binary_ids.py +0 -137
- revengai/models/search_function_ids.py +0 -137
- {revengai-1.96.1.dist-info → revengai-2.0.0.dist-info}/WHEEL +0 -0
- {revengai-1.96.1.dist-info → revengai-2.0.0.dist-info}/licenses/LICENSE.md +0 -0
|
@@ -26,13 +26,14 @@ class AppApiRestV2FunctionsTypesFunction(BaseModel):
|
|
|
26
26
|
AppApiRestV2FunctionsTypesFunction
|
|
27
27
|
""" # noqa: E501
|
|
28
28
|
function_id: StrictInt = Field(description="Function id")
|
|
29
|
-
function_name: StrictStr = Field(description="
|
|
29
|
+
function_name: StrictStr = Field(description="Demangled name of the function")
|
|
30
|
+
function_mangled_name: StrictStr = Field(description="Mangled name of the function")
|
|
30
31
|
function_vaddr: StrictInt = Field(description="Function virtual address")
|
|
31
32
|
function_size: StrictInt = Field(description="Function size")
|
|
32
33
|
debug: StrictBool = Field(description="Whether the function is debug")
|
|
33
34
|
embedding_3d: Optional[List[Union[StrictFloat, StrictInt]]]
|
|
34
35
|
embedding_1d: Optional[List[Union[StrictFloat, StrictInt]]]
|
|
35
|
-
__properties: ClassVar[List[str]] = ["function_id", "function_name", "function_vaddr", "function_size", "debug", "embedding_3d", "embedding_1d"]
|
|
36
|
+
__properties: ClassVar[List[str]] = ["function_id", "function_name", "function_mangled_name", "function_vaddr", "function_size", "debug", "embedding_3d", "embedding_1d"]
|
|
36
37
|
|
|
37
38
|
model_config = ConfigDict(
|
|
38
39
|
populate_by_name=True,
|
|
@@ -97,6 +98,7 @@ class AppApiRestV2FunctionsTypesFunction(BaseModel):
|
|
|
97
98
|
_obj = cls.model_validate({
|
|
98
99
|
"function_id": obj.get("function_id"),
|
|
99
100
|
"function_name": obj.get("function_name"),
|
|
101
|
+
"function_mangled_name": obj.get("function_mangled_name"),
|
|
100
102
|
"function_vaddr": obj.get("function_vaddr"),
|
|
101
103
|
"function_size": obj.get("function_size"),
|
|
102
104
|
"debug": obj.get("debug"),
|
|
@@ -31,7 +31,7 @@ class FunctionMatchingRequest(BaseModel):
|
|
|
31
31
|
function_ids: List[StrictInt] = Field(description="ID's of functions to find matches for, must be at least one function ID")
|
|
32
32
|
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")
|
|
33
33
|
filters: Optional[FunctionMatchingFilters] = None
|
|
34
|
-
results_per_function: Optional[Annotated[int, Field(le=
|
|
34
|
+
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")
|
|
35
35
|
page: Optional[Annotated[int, Field(strict=True, ge=1)]] = Field(default=1, description="Page number for paginated results, default is 1 (first page)")
|
|
36
36
|
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")
|
|
37
37
|
__properties: ClassVar[List[str]] = ["model_id", "function_ids", "min_similarity", "filters", "results_per_function", "page", "page_size"]
|
|
@@ -17,7 +17,7 @@ import re # noqa: F401
|
|
|
17
17
|
import json
|
|
18
18
|
|
|
19
19
|
from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
|
|
20
|
-
from typing import Any, ClassVar, Dict, List
|
|
20
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
21
21
|
from typing import Optional, Set
|
|
22
22
|
from typing_extensions import Self
|
|
23
23
|
|
|
@@ -27,8 +27,9 @@ class MatchedFunctionSuggestion(BaseModel):
|
|
|
27
27
|
""" # noqa: E501
|
|
28
28
|
function_id: StrictInt = Field(description="Unique identifier of the matched function")
|
|
29
29
|
function_vaddr: StrictInt = Field(description="Virtual address of the matched function")
|
|
30
|
-
suggested_name: StrictStr =
|
|
31
|
-
|
|
30
|
+
suggested_name: Optional[StrictStr] = None
|
|
31
|
+
suggested_demangled_name: StrictStr = Field(description="De-mangled name of the function group that contains the matched functions")
|
|
32
|
+
__properties: ClassVar[List[str]] = ["function_id", "function_vaddr", "suggested_name", "suggested_demangled_name"]
|
|
32
33
|
|
|
33
34
|
model_config = ConfigDict(
|
|
34
35
|
populate_by_name=True,
|
|
@@ -69,6 +70,11 @@ class MatchedFunctionSuggestion(BaseModel):
|
|
|
69
70
|
exclude=excluded_fields,
|
|
70
71
|
exclude_none=True,
|
|
71
72
|
)
|
|
73
|
+
# set to None if suggested_name (nullable) is None
|
|
74
|
+
# and model_fields_set contains the field
|
|
75
|
+
if self.suggested_name is None and "suggested_name" in self.model_fields_set:
|
|
76
|
+
_dict['suggested_name'] = None
|
|
77
|
+
|
|
72
78
|
return _dict
|
|
73
79
|
|
|
74
80
|
@classmethod
|
|
@@ -83,7 +89,8 @@ class MatchedFunctionSuggestion(BaseModel):
|
|
|
83
89
|
_obj = cls.model_validate({
|
|
84
90
|
"function_id": obj.get("function_id"),
|
|
85
91
|
"function_vaddr": obj.get("function_vaddr"),
|
|
86
|
-
"suggested_name": obj.get("suggested_name")
|
|
92
|
+
"suggested_name": obj.get("suggested_name"),
|
|
93
|
+
"suggested_demangled_name": obj.get("suggested_demangled_name")
|
|
87
94
|
})
|
|
88
95
|
return _obj
|
|
89
96
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: revengai
|
|
3
|
-
Version:
|
|
3
|
+
Version: 2.0.0
|
|
4
4
|
Summary: RevEng.AI API
|
|
5
5
|
Project-URL: Repository, https://github.com/RevEngAI/sdk-python
|
|
6
6
|
License-Expression: MIT
|
|
@@ -61,7 +61,6 @@ Class | Method | HTTP request | Description
|
|
|
61
61
|
*AnalysesCommentsApi* | [**delete_analysis_comment**](docs/AnalysesCommentsApi.md#delete_analysis_comment) | **DELETE** /v2/analyses/{analysis_id}/comments/{comment_id} | Delete a comment
|
|
62
62
|
*AnalysesCommentsApi* | [**get_analysis_comments**](docs/AnalysesCommentsApi.md#get_analysis_comments) | **GET** /v2/analyses/{analysis_id}/comments | Get comments for this analysis
|
|
63
63
|
*AnalysesCommentsApi* | [**update_analysis_comment**](docs/AnalysesCommentsApi.md#update_analysis_comment) | **PATCH** /v2/analyses/{analysis_id}/comments/{comment_id} | Update a comment
|
|
64
|
-
*AnalysesCoreApi* | [**batch_symbol_ann**](docs/AnalysesCoreApi.md#batch_symbol_ann) | **POST** /v1/ann/symbol/batch | Batch Symbol ANN using function IDs
|
|
65
64
|
*AnalysesCoreApi* | [**create_analysis**](docs/AnalysesCoreApi.md#create_analysis) | **POST** /v2/analyses | Create Analysis
|
|
66
65
|
*AnalysesCoreApi* | [**delete_analysis**](docs/AnalysesCoreApi.md#delete_analysis) | **DELETE** /v2/analyses/{analysis_id} | Delete Analysis
|
|
67
66
|
*AnalysesCoreApi* | [**find_similar_functions_batch**](docs/AnalysesCoreApi.md#find_similar_functions_batch) | **POST** /v2/analyses/{analysis_id}/similarity/functions | Batch Symbol ANN using Analysis ID
|
|
@@ -175,6 +174,7 @@ Class | Method | HTTP request | Description
|
|
|
175
174
|
|
|
176
175
|
## Documentation For Models
|
|
177
176
|
|
|
177
|
+
- [ANNFunction](docs/ANNFunction.md)
|
|
178
178
|
- [Addr](docs/Addr.md)
|
|
179
179
|
- [AiDecompilationRating](docs/AiDecompilationRating.md)
|
|
180
180
|
- [AiUnstripRequest](docs/AiUnstripRequest.md)
|
|
@@ -193,14 +193,12 @@ Class | Method | HTTP request | Description
|
|
|
193
193
|
- [AnalysisUpdateRequest](docs/AnalysisUpdateRequest.md)
|
|
194
194
|
- [AnalysisUpdateTagsRequest](docs/AnalysisUpdateTagsRequest.md)
|
|
195
195
|
- [AnalysisUpdateTagsResponse](docs/AnalysisUpdateTagsResponse.md)
|
|
196
|
-
- [AppApiRestV1AnnSchemaANNFunction](docs/AppApiRestV1AnnSchemaANNFunction.md)
|
|
197
196
|
- [AppApiRestV2AnalysesEnumsDynamicExecutionStatus](docs/AppApiRestV2AnalysesEnumsDynamicExecutionStatus.md)
|
|
198
197
|
- [AppApiRestV2AnalysesEnumsOrderBy](docs/AppApiRestV2AnalysesEnumsOrderBy.md)
|
|
199
198
|
- [AppApiRestV2AnalysesResponsesTagItem](docs/AppApiRestV2AnalysesResponsesTagItem.md)
|
|
200
199
|
- [AppApiRestV2CollectionsEnumsOrderBy](docs/AppApiRestV2CollectionsEnumsOrderBy.md)
|
|
201
200
|
- [AppApiRestV2FunctionsResponsesFunction](docs/AppApiRestV2FunctionsResponsesFunction.md)
|
|
202
201
|
- [AppApiRestV2FunctionsTypesFunction](docs/AppApiRestV2FunctionsTypesFunction.md)
|
|
203
|
-
- [AppApiRestV2SimilaritySchemaANNFunction](docs/AppApiRestV2SimilaritySchemaANNFunction.md)
|
|
204
202
|
- [AppServicesBinaryAnnSchemaTagItem](docs/AppServicesBinaryAnnSchemaTagItem.md)
|
|
205
203
|
- [AppServicesDynamicExecutionSchemasDynamicExecutionStatus](docs/AppServicesDynamicExecutionSchemasDynamicExecutionStatus.md)
|
|
206
204
|
- [Argument](docs/Argument.md)
|
|
@@ -346,7 +344,6 @@ Class | Method | HTTP request | Description
|
|
|
346
344
|
- [FileHashes](docs/FileHashes.md)
|
|
347
345
|
- [FileMetadata](docs/FileMetadata.md)
|
|
348
346
|
- [Filters](docs/Filters.md)
|
|
349
|
-
- [FunctionBatchAnn](docs/FunctionBatchAnn.md)
|
|
350
347
|
- [FunctionBlockDestinationResponse](docs/FunctionBlockDestinationResponse.md)
|
|
351
348
|
- [FunctionBlockResponse](docs/FunctionBlockResponse.md)
|
|
352
349
|
- [FunctionBlocksResponse](docs/FunctionBlocksResponse.md)
|
|
@@ -437,8 +434,6 @@ Class | Method | HTTP request | Description
|
|
|
437
434
|
- [SBOMPackage](docs/SBOMPackage.md)
|
|
438
435
|
- [SandboxOptions](docs/SandboxOptions.md)
|
|
439
436
|
- [ScrapeThirdPartyConfig](docs/ScrapeThirdPartyConfig.md)
|
|
440
|
-
- [SearchBinaryIds](docs/SearchBinaryIds.md)
|
|
441
|
-
- [SearchFunctionIds](docs/SearchFunctionIds.md)
|
|
442
437
|
- [SectionModel](docs/SectionModel.md)
|
|
443
438
|
- [SecurityChecksResponse](docs/SecurityChecksResponse.md)
|
|
444
439
|
- [SecurityChecksResult](docs/SecurityChecksResult.md)
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
revengai/__init__.py,sha256=
|
|
2
|
-
revengai/api_client.py,sha256=
|
|
1
|
+
revengai/__init__.py,sha256=lxXAiBjchq0EwbeRGS1UrZzRVwuRqvMlpLBSZxrUghM,42410
|
|
2
|
+
revengai/api_client.py,sha256=rbcyF287EKZh480L51fscMRAAJ-a92Tthn1x9_CqsRw,27669
|
|
3
3
|
revengai/api_response.py,sha256=eMxw1mpmJcoGZ3gs9z6jM4oYoZ10Gjk333s9sKxGv7s,652
|
|
4
|
-
revengai/configuration.py,sha256=
|
|
4
|
+
revengai/configuration.py,sha256=Oi6X4-NEYjKftABSafp1W0yQvSFZTTSQcrfsyy9cREg,18747
|
|
5
5
|
revengai/exceptions.py,sha256=IvdI9ZIZ9b2lSSKtIKMQDlG-5UPAedrjm3U4xfmGkso,6385
|
|
6
6
|
revengai/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
7
7
|
revengai/rest.py,sha256=T6Q2dcazhntqm288H33BKC1hf8NVdvmQWgaymlJo158,9376
|
|
8
8
|
revengai/api/__init__.py,sha256=ercHI6-ZXgrfZ-crplF-fSQbSXY4xPellnIkvTt68uc,1320
|
|
9
9
|
revengai/api/analyses_comments_api.py,sha256=p_3N8KmHSBsBtsiW0rAc_LtsM-X3NOJEP86-9VUknoc,46292
|
|
10
|
-
revengai/api/analyses_core_api.py,sha256=
|
|
10
|
+
revengai/api/analyses_core_api.py,sha256=XgXYrdfhAdnKbe9BGsDDqxTwlhW6j-tcoBSHdLX9eH4,172114
|
|
11
11
|
revengai/api/analyses_dynamic_execution_api.py,sha256=N1SlAlsokt8us_x11tJpjK5GSAk-kuEECNO9KqtO0dI,71948
|
|
12
12
|
revengai/api/analyses_results_metadata_api.py,sha256=jRUub32skTygbVgo4K81XLLsJlL__1I99EO55ctuVEw,73593
|
|
13
13
|
revengai/api/analyses_security_checks_api.py,sha256=YqdVI96mNOb7yyCX2gm3sDABbNr7BMO6jUtvmwKPctk,33219
|
|
@@ -25,7 +25,7 @@ revengai/api/functions_decompilation_api.py,sha256=93tId0XHIUo8zPdCwoFShyvZPbptn
|
|
|
25
25
|
revengai/api/functions_renaming_history_api.py,sha256=2VuhjQliFO0rDcwmnl4s5BA36xgEtps2_qZdsqQI6hw,44111
|
|
26
26
|
revengai/api/models_api.py,sha256=jZ1wY48GT0JsxY-DgcwkxF5uyQTqygUYOuF8De0BQnw,10402
|
|
27
27
|
revengai/api/search_api.py,sha256=WQslQMX-fExlxONkJVy4MMfQ0VnDxqzJumYc9dbcRp0,63402
|
|
28
|
-
revengai/models/__init__.py,sha256=
|
|
28
|
+
revengai/models/__init__.py,sha256=0C4kUgLYcwAFfFnhMch07vZWbIUkDHmasO4RHWapC7Q,22882
|
|
29
29
|
revengai/models/addr.py,sha256=-2N-UQsOiZ0eyEAQ7ssk0of8W2fBrXeYdTZXuVt3SZs,4787
|
|
30
30
|
revengai/models/ai_decompilation_rating.py,sha256=gyay27QJwToUNtK9NARyw731Sg8GFRTufGGUABVYyfo,722
|
|
31
31
|
revengai/models/ai_unstrip_request.py,sha256=loSXNdHATJmY5yttiUCE-lLEOkuE63qVDTz8U0eCAIc,2596
|
|
@@ -44,14 +44,13 @@ revengai/models/analysis_tags.py,sha256=bVeyZzwnPxmpuXdLk4Jpz0fLsjeRjw0kcBLgeiDv
|
|
|
44
44
|
revengai/models/analysis_update_request.py,sha256=J4IulQ18iPHjrDMpLn9_NzMg99_W7jS8eCK17feVAtE,3403
|
|
45
45
|
revengai/models/analysis_update_tags_request.py,sha256=nrJwzS_Yg3SOkvrRcGW6eWfoG_FZn4l9dAZpRQNbV7A,2436
|
|
46
46
|
revengai/models/analysis_update_tags_response.py,sha256=KRNesNAW57hCPatnsy7ACBZORuKvWfd2XITFLwqtdbA,2936
|
|
47
|
-
revengai/models/
|
|
47
|
+
revengai/models/ann_function.py,sha256=TGwBAPMXJRvMO218j5wvqSl_rFN4hL0slyd595T7xM4,4950
|
|
48
48
|
revengai/models/app_api_rest_v2_analyses_enums_dynamic_execution_status.py,sha256=x8VdW5OBlfoIoz3IV1HLN-SxeFh7798x6bHIggz7jF8,805
|
|
49
49
|
revengai/models/app_api_rest_v2_analyses_enums_order_by.py,sha256=Wpv3tfyAeBzN5_jkk4tBtYlJvUn8h0qudg4bvzBtKh8,739
|
|
50
50
|
revengai/models/app_api_rest_v2_analyses_responses_tag_item.py,sha256=Clh9pPBQKqeqeRiOZG4Fbh77pLPyKMCH3r3nU8Ej0Pc,2921
|
|
51
51
|
revengai/models/app_api_rest_v2_collections_enums_order_by.py,sha256=IVV9Auj0-HwTYYI0ZvJv-P3ciLOkq0l7MOyy0A5s92I,846
|
|
52
|
-
revengai/models/app_api_rest_v2_functions_responses_function.py,sha256=
|
|
53
|
-
revengai/models/app_api_rest_v2_functions_types_function.py,sha256=
|
|
54
|
-
revengai/models/app_api_rest_v2_similarity_schema_ann_function.py,sha256=atfQz2txuf_4MdDNFsnZabN_vMOGMnoyDjElT4VeAwY,5258
|
|
52
|
+
revengai/models/app_api_rest_v2_functions_responses_function.py,sha256=yGl8xqqkAfIPWNlT5IT2ICeUOlwr_mIKH4Irb7qr9XU,2682
|
|
53
|
+
revengai/models/app_api_rest_v2_functions_types_function.py,sha256=t3BttHuPogip0-MMl85lmIcc3wi_1dBcU1Ci-kEteTc,4071
|
|
55
54
|
revengai/models/app_services_binary_ann_schema_tag_item.py,sha256=m25sIz8KEsPES0XGjmOZFhmLNLmB-jsakfRUpRfiMks,2977
|
|
56
55
|
revengai/models/app_services_dynamic_execution_schemas_dynamic_execution_status.py,sha256=9e3LDnw0iNCbowQPFTkNyIqkzsCQyJLZrx6tqRska6o,2562
|
|
57
56
|
revengai/models/argument.py,sha256=QmWpJiohyzTVC1GLHg1IlgM5QyONnBF6FGK_mOYQL_Y,3148
|
|
@@ -197,7 +196,6 @@ revengai/models/file_format.py,sha256=XpwEBufxq3zDOZi0EvShwZhm-O6dEJ25ZxJ46zvuYe
|
|
|
197
196
|
revengai/models/file_hashes.py,sha256=vAjMRVvB9GBGar-FZiV8VkG_h0304S7UNEg0aclT9P8,4659
|
|
198
197
|
revengai/models/file_metadata.py,sha256=BK3oI8Iat5leNewoD8ApE5iH-wrffCAi1lNXbM5RVRE,2954
|
|
199
198
|
revengai/models/filters.py,sha256=BO4gsERH6_P4gsRcbleZNHFNeyg7N5ir6mTIsQbXwdM,758
|
|
200
|
-
revengai/models/function_batch_ann.py,sha256=85ems0hvPJVsMH89BuT7TPmqxIAVBci5ZPNBEFdN1tw,3291
|
|
201
199
|
revengai/models/function_block_destination_response.py,sha256=ffcxW67TIbLkO8P8D9_quP7J9T_PIgCZZXNSRIEii0I,3130
|
|
202
200
|
revengai/models/function_block_response.py,sha256=KxnssvtH_MUvgQH358TfVZofVKyRHQYftMX36N2zdBY,3960
|
|
203
201
|
revengai/models/function_blocks_response.py,sha256=8Eu3jA9GKCXVNX7viu3OQxJNsqUZMxBlg498eJ9HFA4,4847
|
|
@@ -219,7 +217,7 @@ revengai/models/function_mapping.py,sha256=EBO_jGfEjK7ihIdx-bWSHAT9EozB_S9JDeCLL
|
|
|
219
217
|
revengai/models/function_mapping_full.py,sha256=dax345vnk25zSPVVpAmCFrrOWXzFXW6OnhSs9zVIKpI,11948
|
|
220
218
|
revengai/models/function_matching_batch_response.py,sha256=oBglZULIjMvbrlzjymWNKSNERVzftWH7hHBRC3uMoP0,4952
|
|
221
219
|
revengai/models/function_matching_filters.py,sha256=O5F1PIcPhbumH8z-4KbG7JNoUsx_H3wBZQU9kCZ_boI,3710
|
|
222
|
-
revengai/models/function_matching_request.py,sha256=
|
|
220
|
+
revengai/models/function_matching_request.py,sha256=doC7Z1UCe0qD1vR0Iu400ni7a94D9WK_QN3GR_56H3I,4690
|
|
223
221
|
revengai/models/function_matching_result_with_best_match.py,sha256=87nF8Dq7b0bTmbpB_j5Upfsnv_hqAs_dZJ69zpLmQjs,4050
|
|
224
222
|
revengai/models/function_name_confidence_body.py,sha256=Dz8HvTUDn5YcyCie-KMXmOdy8yF8PD-m0XzwpRyyQmg,3415
|
|
225
223
|
revengai/models/function_name_history.py,sha256=INu3KWYUpQMFfWy6oWl5iSaxrlayKr-wvuiahRCzinI,3265
|
|
@@ -255,7 +253,7 @@ revengai/models/login_request.py,sha256=48uYtkWFL_Q-hN64P1f15ExGJvbab9XLymBtDduQ
|
|
|
255
253
|
revengai/models/login_response.py,sha256=O35cqntoQ68IdYCBtHTYhPXlDqw8CIlnK-bNjf6QMO0,2461
|
|
256
254
|
revengai/models/logs.py,sha256=cV_V-xN6q-yTd7eL-X89ugqz5ifWPsFPo6qYFgpS_Pw,2419
|
|
257
255
|
revengai/models/matched_function.py,sha256=UTMIoMa0xUSffexqQ5bjjSsehwFtjZ3-NDemz56Q1fM,4151
|
|
258
|
-
revengai/models/matched_function_suggestion.py,sha256=
|
|
256
|
+
revengai/models/matched_function_suggestion.py,sha256=UK5Yrw2xlJ0dcOKIga_Syi0Ly_rWjvio6KPzPNbuDDg,3322
|
|
259
257
|
revengai/models/meta_model.py,sha256=GbyFJZ9kwvK1Gqg8QnJ1GHpaMs8cMht6j-MY1k0YSt0,2943
|
|
260
258
|
revengai/models/model_name.py,sha256=lVKok5pWyLcN1rhq1IYccC7uQQrPdyz1oohYRUMRrmw,1271
|
|
261
259
|
revengai/models/models_response.py,sha256=Ooo2HYuSI4llHg1wUMmyOsisPAXkPhR1y5BSiKh9ckg,2472
|
|
@@ -288,8 +286,6 @@ revengai/models/sandbox_options.py,sha256=jJYc06yTvztjdjkpvk2YslXhfHvT6NmdiojvOm
|
|
|
288
286
|
revengai/models/sbom.py,sha256=inSblTx7S8VNVg9hTitCRQ5i3vbyf6I0UGypgRxDKtM,3050
|
|
289
287
|
revengai/models/sbom_package.py,sha256=k22hSemxxh0Gy1zCVmMSoZLbYeVLVfzHAOhbOXPXiSc,2555
|
|
290
288
|
revengai/models/scrape_third_party_config.py,sha256=eFNDHFm_VvBeKJxWt80Rh978UFUdtuWGdwrwUiT-hkE,2505
|
|
291
|
-
revengai/models/search_binary_ids.py,sha256=pfeUIYnI83YVjkH6PgjOHwTAJmgBHnjOgL33vmA9sxY,4906
|
|
292
|
-
revengai/models/search_function_ids.py,sha256=VygPIoqnz5PupiSaqsufz81Wt4hOJquiTbS8ydKCATI,4919
|
|
293
289
|
revengai/models/section_model.py,sha256=d-d9Aoo9TGyoc6ogxlVPFDZPgqrKzRwZ279zPDcGyTg,3026
|
|
294
290
|
revengai/models/security_checks_response.py,sha256=Y7-VqTZbspYzT9pq_-F3KBPqJRkXnG5x9iKe5Z-X9js,3127
|
|
295
291
|
revengai/models/security_checks_result.py,sha256=hZFO1d4rpYvMcX4AbzKOadcA8eb5UFEO7vqxVDm0Q7M,3255
|
|
@@ -333,7 +329,7 @@ revengai/models/vulnerabilities.py,sha256=9t6uoZd3svWyfcZJjmj6zP731Dp47Apb25y8Qt
|
|
|
333
329
|
revengai/models/vulnerability.py,sha256=P7rAOAYU5JLLpcRr824-YJgZba5kPb_J9ALV3tSNfLQ,3688
|
|
334
330
|
revengai/models/vulnerability_type.py,sha256=SyOgfMmELYYc_H84oPkikBpjwngtG5Qw9Q_86a2TPr8,866
|
|
335
331
|
revengai/models/workspace.py,sha256=chjU62GFvByEmaNd6luMNQVQLP3wlPx1zJgGJ_yyMLA,676
|
|
336
|
-
revengai-
|
|
337
|
-
revengai-
|
|
338
|
-
revengai-
|
|
339
|
-
revengai-
|
|
332
|
+
revengai-2.0.0.dist-info/METADATA,sha256=emDzBrRK-ANlwvLh7rqFtq11XI2sVvDqOZ3Ee28N4Go,40938
|
|
333
|
+
revengai-2.0.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
334
|
+
revengai-2.0.0.dist-info/licenses/LICENSE.md,sha256=z1S-x9w52sZDqbFdJi0kL5-FLP5CR2aQA0kW8m6scaw,1052
|
|
335
|
+
revengai-2.0.0.dist-info/RECORD,,
|
|
@@ -1,134 +0,0 @@
|
|
|
1
|
-
# coding: utf-8
|
|
2
|
-
|
|
3
|
-
"""
|
|
4
|
-
RevEng.AI API
|
|
5
|
-
|
|
6
|
-
RevEng.AI is Similarity Search Engine for executable binaries
|
|
7
|
-
|
|
8
|
-
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
9
|
-
|
|
10
|
-
Do not edit the class manually.
|
|
11
|
-
""" # noqa: E501
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
from __future__ import annotations
|
|
15
|
-
import pprint
|
|
16
|
-
import re # noqa: F401
|
|
17
|
-
import json
|
|
18
|
-
|
|
19
|
-
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr, field_validator
|
|
20
|
-
from typing import Any, ClassVar, Dict, List, Optional, Union
|
|
21
|
-
from typing_extensions import Annotated
|
|
22
|
-
from typing import Optional, Set
|
|
23
|
-
from typing_extensions import Self
|
|
24
|
-
|
|
25
|
-
class AppApiRestV1AnnSchemaANNFunction(BaseModel):
|
|
26
|
-
"""
|
|
27
|
-
AppApiRestV1AnnSchemaANNFunction
|
|
28
|
-
""" # noqa: E501
|
|
29
|
-
result_per_function: Optional[Annotated[int, Field(le=20, strict=True)]] = None
|
|
30
|
-
distance: Optional[Union[StrictFloat, StrictInt]] = None
|
|
31
|
-
function_id_list: List[Optional[StrictInt]] = Field(description="List of function ids to compare")
|
|
32
|
-
speculative_function_ids: Optional[List[Any]] = None
|
|
33
|
-
collection: Optional[List[Optional[StrictStr]]] = Field(default=None, description="Perform a search on functions within a list of collections")
|
|
34
|
-
collection_search_list: Optional[List[Optional[StrictInt]]] = Field(default=None, description="Perform a search on functions within a list of collections")
|
|
35
|
-
debug_mode: Optional[StrictBool] = None
|
|
36
|
-
debug_types: Optional[List[StrictStr]] = Field(default=None, description="If limiting results to functions with debug names, which type of debug names to include?")
|
|
37
|
-
binaries_search_list: Optional[List[Optional[StrictInt]]] = Field(default=None, description="Perform a search on functions within a list of analyses")
|
|
38
|
-
__properties: ClassVar[List[str]] = ["result_per_function", "distance", "function_id_list", "speculative_function_ids", "collection", "collection_search_list", "debug_mode", "debug_types", "binaries_search_list"]
|
|
39
|
-
|
|
40
|
-
@field_validator('debug_types')
|
|
41
|
-
def debug_types_validate_enum(cls, value):
|
|
42
|
-
"""Validates the enum"""
|
|
43
|
-
if value is None:
|
|
44
|
-
return value
|
|
45
|
-
|
|
46
|
-
for i in value:
|
|
47
|
-
if i not in set(['USER', 'SYSTEM', 'EXTERNAL']):
|
|
48
|
-
raise ValueError("each list item must be one of ('USER', 'SYSTEM', 'EXTERNAL')")
|
|
49
|
-
return value
|
|
50
|
-
|
|
51
|
-
model_config = ConfigDict(
|
|
52
|
-
populate_by_name=True,
|
|
53
|
-
validate_assignment=True,
|
|
54
|
-
protected_namespaces=(),
|
|
55
|
-
)
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
def to_str(self) -> str:
|
|
59
|
-
"""Returns the string representation of the model using alias"""
|
|
60
|
-
return pprint.pformat(self.model_dump(by_alias=True))
|
|
61
|
-
|
|
62
|
-
def to_json(self) -> str:
|
|
63
|
-
"""Returns the JSON representation of the model using alias"""
|
|
64
|
-
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
65
|
-
return json.dumps(self.to_dict())
|
|
66
|
-
|
|
67
|
-
@classmethod
|
|
68
|
-
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
69
|
-
"""Create an instance of AppApiRestV1AnnSchemaANNFunction from a JSON string"""
|
|
70
|
-
return cls.from_dict(json.loads(json_str))
|
|
71
|
-
|
|
72
|
-
def to_dict(self) -> Dict[str, Any]:
|
|
73
|
-
"""Return the dictionary representation of the model using alias.
|
|
74
|
-
|
|
75
|
-
This has the following differences from calling pydantic's
|
|
76
|
-
`self.model_dump(by_alias=True)`:
|
|
77
|
-
|
|
78
|
-
* `None` is only added to the output dict for nullable fields that
|
|
79
|
-
were set at model initialization. Other fields with value `None`
|
|
80
|
-
are ignored.
|
|
81
|
-
"""
|
|
82
|
-
excluded_fields: Set[str] = set([
|
|
83
|
-
])
|
|
84
|
-
|
|
85
|
-
_dict = self.model_dump(
|
|
86
|
-
by_alias=True,
|
|
87
|
-
exclude=excluded_fields,
|
|
88
|
-
exclude_none=True,
|
|
89
|
-
)
|
|
90
|
-
# set to None if result_per_function (nullable) is None
|
|
91
|
-
# and model_fields_set contains the field
|
|
92
|
-
if self.result_per_function is None and "result_per_function" in self.model_fields_set:
|
|
93
|
-
_dict['result_per_function'] = None
|
|
94
|
-
|
|
95
|
-
# set to None if distance (nullable) is None
|
|
96
|
-
# and model_fields_set contains the field
|
|
97
|
-
if self.distance is None and "distance" in self.model_fields_set:
|
|
98
|
-
_dict['distance'] = None
|
|
99
|
-
|
|
100
|
-
# set to None if speculative_function_ids (nullable) is None
|
|
101
|
-
# and model_fields_set contains the field
|
|
102
|
-
if self.speculative_function_ids is None and "speculative_function_ids" in self.model_fields_set:
|
|
103
|
-
_dict['speculative_function_ids'] = None
|
|
104
|
-
|
|
105
|
-
# set to None if debug_mode (nullable) is None
|
|
106
|
-
# and model_fields_set contains the field
|
|
107
|
-
if self.debug_mode is None and "debug_mode" in self.model_fields_set:
|
|
108
|
-
_dict['debug_mode'] = None
|
|
109
|
-
|
|
110
|
-
return _dict
|
|
111
|
-
|
|
112
|
-
@classmethod
|
|
113
|
-
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
114
|
-
"""Create an instance of AppApiRestV1AnnSchemaANNFunction from a dict"""
|
|
115
|
-
if obj is None:
|
|
116
|
-
return None
|
|
117
|
-
|
|
118
|
-
if not isinstance(obj, dict):
|
|
119
|
-
return cls.model_validate(obj)
|
|
120
|
-
|
|
121
|
-
_obj = cls.model_validate({
|
|
122
|
-
"result_per_function": obj.get("result_per_function"),
|
|
123
|
-
"distance": obj.get("distance"),
|
|
124
|
-
"function_id_list": obj.get("function_id_list"),
|
|
125
|
-
"speculative_function_ids": obj.get("speculative_function_ids"),
|
|
126
|
-
"collection": obj.get("collection"),
|
|
127
|
-
"collection_search_list": obj.get("collection_search_list"),
|
|
128
|
-
"debug_mode": obj.get("debug_mode"),
|
|
129
|
-
"debug_types": obj.get("debug_types"),
|
|
130
|
-
"binaries_search_list": obj.get("binaries_search_list")
|
|
131
|
-
})
|
|
132
|
-
return _obj
|
|
133
|
-
|
|
134
|
-
|
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
# coding: utf-8
|
|
2
|
-
|
|
3
|
-
"""
|
|
4
|
-
RevEng.AI API
|
|
5
|
-
|
|
6
|
-
RevEng.AI is Similarity Search Engine for executable binaries
|
|
7
|
-
|
|
8
|
-
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
9
|
-
|
|
10
|
-
Do not edit the class manually.
|
|
11
|
-
""" # noqa: E501
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
from __future__ import annotations
|
|
15
|
-
import pprint
|
|
16
|
-
import re # noqa: F401
|
|
17
|
-
import json
|
|
18
|
-
|
|
19
|
-
from pydantic import BaseModel, ConfigDict
|
|
20
|
-
from typing import Any, ClassVar, Dict, List, Optional
|
|
21
|
-
from typing import Optional, Set
|
|
22
|
-
from typing_extensions import Self
|
|
23
|
-
|
|
24
|
-
class FunctionBatchAnn(BaseModel):
|
|
25
|
-
"""
|
|
26
|
-
FunctionBatchAnn
|
|
27
|
-
""" # noqa: E501
|
|
28
|
-
success: Optional[Any] = None
|
|
29
|
-
settings: Optional[Any]
|
|
30
|
-
function_matches: Optional[Any]
|
|
31
|
-
__properties: ClassVar[List[str]] = ["success", "settings", "function_matches"]
|
|
32
|
-
|
|
33
|
-
model_config = ConfigDict(
|
|
34
|
-
populate_by_name=True,
|
|
35
|
-
validate_assignment=True,
|
|
36
|
-
protected_namespaces=(),
|
|
37
|
-
)
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
def to_str(self) -> str:
|
|
41
|
-
"""Returns the string representation of the model using alias"""
|
|
42
|
-
return pprint.pformat(self.model_dump(by_alias=True))
|
|
43
|
-
|
|
44
|
-
def to_json(self) -> str:
|
|
45
|
-
"""Returns the JSON representation of the model using alias"""
|
|
46
|
-
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
47
|
-
return json.dumps(self.to_dict())
|
|
48
|
-
|
|
49
|
-
@classmethod
|
|
50
|
-
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
51
|
-
"""Create an instance of FunctionBatchAnn from a JSON string"""
|
|
52
|
-
return cls.from_dict(json.loads(json_str))
|
|
53
|
-
|
|
54
|
-
def to_dict(self) -> Dict[str, Any]:
|
|
55
|
-
"""Return the dictionary representation of the model using alias.
|
|
56
|
-
|
|
57
|
-
This has the following differences from calling pydantic's
|
|
58
|
-
`self.model_dump(by_alias=True)`:
|
|
59
|
-
|
|
60
|
-
* `None` is only added to the output dict for nullable fields that
|
|
61
|
-
were set at model initialization. Other fields with value `None`
|
|
62
|
-
are ignored.
|
|
63
|
-
"""
|
|
64
|
-
excluded_fields: Set[str] = set([
|
|
65
|
-
])
|
|
66
|
-
|
|
67
|
-
_dict = self.model_dump(
|
|
68
|
-
by_alias=True,
|
|
69
|
-
exclude=excluded_fields,
|
|
70
|
-
exclude_none=True,
|
|
71
|
-
)
|
|
72
|
-
# set to None if success (nullable) is None
|
|
73
|
-
# and model_fields_set contains the field
|
|
74
|
-
if self.success is None and "success" in self.model_fields_set:
|
|
75
|
-
_dict['success'] = None
|
|
76
|
-
|
|
77
|
-
# set to None if settings (nullable) is None
|
|
78
|
-
# and model_fields_set contains the field
|
|
79
|
-
if self.settings is None and "settings" in self.model_fields_set:
|
|
80
|
-
_dict['settings'] = None
|
|
81
|
-
|
|
82
|
-
# set to None if function_matches (nullable) is None
|
|
83
|
-
# and model_fields_set contains the field
|
|
84
|
-
if self.function_matches is None and "function_matches" in self.model_fields_set:
|
|
85
|
-
_dict['function_matches'] = None
|
|
86
|
-
|
|
87
|
-
return _dict
|
|
88
|
-
|
|
89
|
-
@classmethod
|
|
90
|
-
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
91
|
-
"""Create an instance of FunctionBatchAnn from a dict"""
|
|
92
|
-
if obj is None:
|
|
93
|
-
return None
|
|
94
|
-
|
|
95
|
-
if not isinstance(obj, dict):
|
|
96
|
-
return cls.model_validate(obj)
|
|
97
|
-
|
|
98
|
-
_obj = cls.model_validate({
|
|
99
|
-
"success": obj.get("success"),
|
|
100
|
-
"settings": obj.get("settings"),
|
|
101
|
-
"function_matches": obj.get("function_matches")
|
|
102
|
-
})
|
|
103
|
-
return _obj
|
|
104
|
-
|
|
105
|
-
|
|
@@ -1,137 +0,0 @@
|
|
|
1
|
-
# coding: utf-8
|
|
2
|
-
|
|
3
|
-
"""
|
|
4
|
-
RevEng.AI API
|
|
5
|
-
|
|
6
|
-
RevEng.AI is Similarity Search Engine for executable binaries
|
|
7
|
-
|
|
8
|
-
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
9
|
-
|
|
10
|
-
Do not edit the class manually.
|
|
11
|
-
""" # noqa: E501
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
from __future__ import annotations
|
|
15
|
-
from inspect import getfullargspec
|
|
16
|
-
import json
|
|
17
|
-
import pprint
|
|
18
|
-
import re # noqa: F401
|
|
19
|
-
from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, ValidationError, field_validator
|
|
20
|
-
from typing import Any, List, Optional
|
|
21
|
-
from typing import Union, Any, List, Set, TYPE_CHECKING, Optional, Dict
|
|
22
|
-
from typing_extensions import Literal, Self
|
|
23
|
-
from pydantic import Field
|
|
24
|
-
|
|
25
|
-
SEARCHBINARYIDS_ANY_OF_SCHEMAS = ["List[int]", "object"]
|
|
26
|
-
|
|
27
|
-
class SearchBinaryIds(BaseModel):
|
|
28
|
-
"""
|
|
29
|
-
Optionally perform the search on matching functions from binaries in this list
|
|
30
|
-
"""
|
|
31
|
-
|
|
32
|
-
# data type: List[int]
|
|
33
|
-
anyof_schema_1_validator: Optional[List[StrictInt]] = None
|
|
34
|
-
# data type: object
|
|
35
|
-
anyof_schema_2_validator: Optional[Any] = None
|
|
36
|
-
if TYPE_CHECKING:
|
|
37
|
-
actual_instance: Optional[Union[List[int], object]] = None
|
|
38
|
-
else:
|
|
39
|
-
actual_instance: Any = None
|
|
40
|
-
any_of_schemas: Set[str] = { "List[int]", "object" }
|
|
41
|
-
|
|
42
|
-
model_config = {
|
|
43
|
-
"validate_assignment": True,
|
|
44
|
-
"protected_namespaces": (),
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
def __init__(self, *args, **kwargs) -> None:
|
|
48
|
-
if args:
|
|
49
|
-
if len(args) > 1:
|
|
50
|
-
raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`")
|
|
51
|
-
if kwargs:
|
|
52
|
-
raise ValueError("If a position argument is used, keyword arguments cannot be used.")
|
|
53
|
-
super().__init__(actual_instance=args[0])
|
|
54
|
-
else:
|
|
55
|
-
super().__init__(**kwargs)
|
|
56
|
-
|
|
57
|
-
@field_validator('actual_instance')
|
|
58
|
-
def actual_instance_must_validate_anyof(cls, v):
|
|
59
|
-
instance = SearchBinaryIds.model_construct()
|
|
60
|
-
error_messages = []
|
|
61
|
-
# validate data type: List[int]
|
|
62
|
-
try:
|
|
63
|
-
instance.anyof_schema_1_validator = v
|
|
64
|
-
return v
|
|
65
|
-
except (ValidationError, ValueError) as e:
|
|
66
|
-
error_messages.append(str(e))
|
|
67
|
-
# validate data type: object
|
|
68
|
-
try:
|
|
69
|
-
instance.anyof_schema_2_validator = v
|
|
70
|
-
return v
|
|
71
|
-
except (ValidationError, ValueError) as e:
|
|
72
|
-
error_messages.append(str(e))
|
|
73
|
-
if error_messages:
|
|
74
|
-
# no match
|
|
75
|
-
raise ValueError("No match found when setting the actual_instance in SearchBinaryIds with anyOf schemas: List[int], object. Details: " + ", ".join(error_messages))
|
|
76
|
-
else:
|
|
77
|
-
return v
|
|
78
|
-
|
|
79
|
-
@classmethod
|
|
80
|
-
def from_dict(cls, obj: Dict[str, Any]) -> Self:
|
|
81
|
-
return cls.from_json(json.dumps(obj))
|
|
82
|
-
|
|
83
|
-
@classmethod
|
|
84
|
-
def from_json(cls, json_str: str) -> Self:
|
|
85
|
-
"""Returns the object represented by the json string"""
|
|
86
|
-
instance = cls.model_construct()
|
|
87
|
-
error_messages = []
|
|
88
|
-
# deserialize data into List[int]
|
|
89
|
-
try:
|
|
90
|
-
# validation
|
|
91
|
-
instance.anyof_schema_1_validator = json.loads(json_str)
|
|
92
|
-
# assign value to actual_instance
|
|
93
|
-
instance.actual_instance = instance.anyof_schema_1_validator
|
|
94
|
-
return instance
|
|
95
|
-
except (ValidationError, ValueError) as e:
|
|
96
|
-
error_messages.append(str(e))
|
|
97
|
-
# deserialize data into object
|
|
98
|
-
try:
|
|
99
|
-
# validation
|
|
100
|
-
instance.anyof_schema_2_validator = json.loads(json_str)
|
|
101
|
-
# assign value to actual_instance
|
|
102
|
-
instance.actual_instance = instance.anyof_schema_2_validator
|
|
103
|
-
return instance
|
|
104
|
-
except (ValidationError, ValueError) as e:
|
|
105
|
-
error_messages.append(str(e))
|
|
106
|
-
|
|
107
|
-
if error_messages:
|
|
108
|
-
# no match
|
|
109
|
-
raise ValueError("No match found when deserializing the JSON string into SearchBinaryIds with anyOf schemas: List[int], object. Details: " + ", ".join(error_messages))
|
|
110
|
-
else:
|
|
111
|
-
return instance
|
|
112
|
-
|
|
113
|
-
def to_json(self) -> str:
|
|
114
|
-
"""Returns the JSON representation of the actual instance"""
|
|
115
|
-
if self.actual_instance is None:
|
|
116
|
-
return "null"
|
|
117
|
-
|
|
118
|
-
if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json):
|
|
119
|
-
return self.actual_instance.to_json()
|
|
120
|
-
else:
|
|
121
|
-
return json.dumps(self.actual_instance)
|
|
122
|
-
|
|
123
|
-
def to_dict(self) -> Optional[Union[Dict[str, Any], List[int], object]]:
|
|
124
|
-
"""Returns the dict representation of the actual instance"""
|
|
125
|
-
if self.actual_instance is None:
|
|
126
|
-
return None
|
|
127
|
-
|
|
128
|
-
if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict):
|
|
129
|
-
return self.actual_instance.to_dict()
|
|
130
|
-
else:
|
|
131
|
-
return self.actual_instance
|
|
132
|
-
|
|
133
|
-
def to_str(self) -> str:
|
|
134
|
-
"""Returns the string representation of the actual instance"""
|
|
135
|
-
return pprint.pformat(self.model_dump())
|
|
136
|
-
|
|
137
|
-
|