revengai 1.86.0__py3-none-any.whl → 1.89.2__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 +13 -1
- revengai/api/functions_core_api.py +627 -25
- revengai/api_client.py +1 -1
- revengai/configuration.py +2 -2
- revengai/models/__init__.py +6 -0
- revengai/models/analysis_function_matching_request.py +98 -0
- revengai/models/function_matching_batch_response.py +117 -0
- revengai/models/function_matching_filters.py +103 -0
- revengai/models/function_matching_request.py +102 -0
- revengai/models/function_matching_result_with_best_match.py +106 -0
- revengai/models/matched_function.py +114 -0
- {revengai-1.86.0.dist-info → revengai-1.89.2.dist-info}/METADATA +9 -1
- {revengai-1.86.0.dist-info → revengai-1.89.2.dist-info}/RECORD +14 -8
- {revengai-1.86.0.dist-info → revengai-1.89.2.dist-info}/WHEEL +0 -0
|
@@ -0,0 +1,114 @@
|
|
|
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, StrictBool, StrictFloat, StrictInt, StrictStr
|
|
20
|
+
from typing import Any, ClassVar, Dict, List, Optional, Union
|
|
21
|
+
from typing import Optional, Set
|
|
22
|
+
from typing_extensions import Self
|
|
23
|
+
|
|
24
|
+
class MatchedFunction(BaseModel):
|
|
25
|
+
"""
|
|
26
|
+
MatchedFunction
|
|
27
|
+
""" # noqa: E501
|
|
28
|
+
function_id: StrictInt
|
|
29
|
+
binary_id: StrictInt
|
|
30
|
+
function_name: StrictStr
|
|
31
|
+
function_vaddr: StrictInt
|
|
32
|
+
mangled_name: Optional[StrictStr]
|
|
33
|
+
debug: StrictBool
|
|
34
|
+
binary_name: StrictStr
|
|
35
|
+
sha_256_hash: StrictStr
|
|
36
|
+
analysis_id: StrictInt
|
|
37
|
+
similarity: Optional[Union[StrictFloat, StrictInt]] = None
|
|
38
|
+
__properties: ClassVar[List[str]] = ["function_id", "binary_id", "function_name", "function_vaddr", "mangled_name", "debug", "binary_name", "sha_256_hash", "analysis_id", "similarity"]
|
|
39
|
+
|
|
40
|
+
model_config = ConfigDict(
|
|
41
|
+
populate_by_name=True,
|
|
42
|
+
validate_assignment=True,
|
|
43
|
+
protected_namespaces=(),
|
|
44
|
+
)
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
def to_str(self) -> str:
|
|
48
|
+
"""Returns the string representation of the model using alias"""
|
|
49
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
50
|
+
|
|
51
|
+
def to_json(self) -> str:
|
|
52
|
+
"""Returns the JSON representation of the model using alias"""
|
|
53
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
54
|
+
return json.dumps(self.to_dict())
|
|
55
|
+
|
|
56
|
+
@classmethod
|
|
57
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
58
|
+
"""Create an instance of MatchedFunction from a JSON string"""
|
|
59
|
+
return cls.from_dict(json.loads(json_str))
|
|
60
|
+
|
|
61
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
62
|
+
"""Return the dictionary representation of the model using alias.
|
|
63
|
+
|
|
64
|
+
This has the following differences from calling pydantic's
|
|
65
|
+
`self.model_dump(by_alias=True)`:
|
|
66
|
+
|
|
67
|
+
* `None` is only added to the output dict for nullable fields that
|
|
68
|
+
were set at model initialization. Other fields with value `None`
|
|
69
|
+
are ignored.
|
|
70
|
+
"""
|
|
71
|
+
excluded_fields: Set[str] = set([
|
|
72
|
+
])
|
|
73
|
+
|
|
74
|
+
_dict = self.model_dump(
|
|
75
|
+
by_alias=True,
|
|
76
|
+
exclude=excluded_fields,
|
|
77
|
+
exclude_none=True,
|
|
78
|
+
)
|
|
79
|
+
# set to None if mangled_name (nullable) is None
|
|
80
|
+
# and model_fields_set contains the field
|
|
81
|
+
if self.mangled_name is None and "mangled_name" in self.model_fields_set:
|
|
82
|
+
_dict['mangled_name'] = None
|
|
83
|
+
|
|
84
|
+
# set to None if similarity (nullable) is None
|
|
85
|
+
# and model_fields_set contains the field
|
|
86
|
+
if self.similarity is None and "similarity" in self.model_fields_set:
|
|
87
|
+
_dict['similarity'] = None
|
|
88
|
+
|
|
89
|
+
return _dict
|
|
90
|
+
|
|
91
|
+
@classmethod
|
|
92
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
93
|
+
"""Create an instance of MatchedFunction from a dict"""
|
|
94
|
+
if obj is None:
|
|
95
|
+
return None
|
|
96
|
+
|
|
97
|
+
if not isinstance(obj, dict):
|
|
98
|
+
return cls.model_validate(obj)
|
|
99
|
+
|
|
100
|
+
_obj = cls.model_validate({
|
|
101
|
+
"function_id": obj.get("function_id"),
|
|
102
|
+
"binary_id": obj.get("binary_id"),
|
|
103
|
+
"function_name": obj.get("function_name"),
|
|
104
|
+
"function_vaddr": obj.get("function_vaddr"),
|
|
105
|
+
"mangled_name": obj.get("mangled_name"),
|
|
106
|
+
"debug": obj.get("debug"),
|
|
107
|
+
"binary_name": obj.get("binary_name"),
|
|
108
|
+
"sha_256_hash": obj.get("sha_256_hash"),
|
|
109
|
+
"analysis_id": obj.get("analysis_id"),
|
|
110
|
+
"similarity": obj.get("similarity")
|
|
111
|
+
})
|
|
112
|
+
return _obj
|
|
113
|
+
|
|
114
|
+
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: revengai
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.89.2
|
|
4
4
|
Summary: RevEng.AI API
|
|
5
5
|
Project-URL: Repository, https://github.com/RevEngAI/revengai-python
|
|
6
6
|
Keywords: RevEng.AI API
|
|
@@ -136,7 +136,9 @@ Class | Method | HTTP request | Description
|
|
|
136
136
|
*FunctionsBlockCommentsApi* | [**generate_block_comments_for_function**](docs/FunctionsBlockCommentsApi.md#generate_block_comments_for_function) | **POST** /v2/functions/{function_id}/block-comments | Generate block comments for a function
|
|
137
137
|
*FunctionsBlockCommentsApi* | [**generate_overview_comment_for_function**](docs/FunctionsBlockCommentsApi.md#generate_overview_comment_for_function) | **POST** /v2/functions/{function_id}/block-comments/overview | Generate overview comment for a function
|
|
138
138
|
*FunctionsCoreApi* | [**ai_unstrip**](docs/FunctionsCoreApi.md#ai_unstrip) | **POST** /v2/analyses/{analysis_id}/functions/ai-unstrip | Performs matching and auto-unstrip for an analysis and its functions
|
|
139
|
+
*FunctionsCoreApi* | [**analysis_function_matching**](docs/FunctionsCoreApi.md#analysis_function_matching) | **POST** /v2/analyses/{analysis_id}/functions/matches | Perform matching for the functions of an analysis
|
|
139
140
|
*FunctionsCoreApi* | [**auto_unstrip**](docs/FunctionsCoreApi.md#auto_unstrip) | **POST** /v2/analyses/{analysis_id}/functions/auto-unstrip | Performs matching and auto-unstrip for an analysis and its functions
|
|
141
|
+
*FunctionsCoreApi* | [**batch_function_matching**](docs/FunctionsCoreApi.md#batch_function_matching) | **POST** /v2/functions/matches | Perform function matching for an arbitrary batch of functions, binaries or collections
|
|
140
142
|
*FunctionsCoreApi* | [**cancel_ai_unstrip**](docs/FunctionsCoreApi.md#cancel_ai_unstrip) | **DELETE** /v2/analyses/{analysis_id}/functions/ai-unstrip/cancel | Cancels a running ai-unstrip
|
|
141
143
|
*FunctionsCoreApi* | [**cancel_auto_unstrip**](docs/FunctionsCoreApi.md#cancel_auto_unstrip) | **DELETE** /v2/analyses/{analysis_id}/functions/unstrip/cancel | Cancels a running auto-unstrip
|
|
142
144
|
*FunctionsCoreApi* | [**get_analysis_strings**](docs/FunctionsCoreApi.md#get_analysis_strings) | **GET** /v2/analyses/{analysis_id}/functions/strings | Get string information found in the Analysis
|
|
@@ -183,6 +185,7 @@ Class | Method | HTTP request | Description
|
|
|
183
185
|
- [AnalysisCreateResponse](docs/AnalysisCreateResponse.md)
|
|
184
186
|
- [AnalysisDetailResponse](docs/AnalysisDetailResponse.md)
|
|
185
187
|
- [AnalysisFunctionMapping](docs/AnalysisFunctionMapping.md)
|
|
188
|
+
- [AnalysisFunctionMatchingRequest](docs/AnalysisFunctionMatchingRequest.md)
|
|
186
189
|
- [AnalysisFunctions](docs/AnalysisFunctions.md)
|
|
187
190
|
- [AnalysisRecord](docs/AnalysisRecord.md)
|
|
188
191
|
- [AnalysisScope](docs/AnalysisScope.md)
|
|
@@ -369,6 +372,10 @@ Class | Method | HTTP request | Description
|
|
|
369
372
|
- [FunctionLocalVariableResponse](docs/FunctionLocalVariableResponse.md)
|
|
370
373
|
- [FunctionMapping](docs/FunctionMapping.md)
|
|
371
374
|
- [FunctionMappingFull](docs/FunctionMappingFull.md)
|
|
375
|
+
- [FunctionMatchingBatchResponse](docs/FunctionMatchingBatchResponse.md)
|
|
376
|
+
- [FunctionMatchingFilters](docs/FunctionMatchingFilters.md)
|
|
377
|
+
- [FunctionMatchingRequest](docs/FunctionMatchingRequest.md)
|
|
378
|
+
- [FunctionMatchingResultWithBestMatch](docs/FunctionMatchingResultWithBestMatch.md)
|
|
372
379
|
- [FunctionNameConfidenceBody](docs/FunctionNameConfidenceBody.md)
|
|
373
380
|
- [FunctionNameHistory](docs/FunctionNameHistory.md)
|
|
374
381
|
- [FunctionNameInput](docs/FunctionNameInput.md)
|
|
@@ -403,6 +410,7 @@ Class | Method | HTTP request | Description
|
|
|
403
410
|
- [LoginRequest](docs/LoginRequest.md)
|
|
404
411
|
- [LoginResponse](docs/LoginResponse.md)
|
|
405
412
|
- [Logs](docs/Logs.md)
|
|
413
|
+
- [MatchedFunction](docs/MatchedFunction.md)
|
|
406
414
|
- [MatchedFunctionSuggestion](docs/MatchedFunctionSuggestion.md)
|
|
407
415
|
- [MetaModel](docs/MetaModel.md)
|
|
408
416
|
- [ModelName](docs/ModelName.md)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
revengai/__init__.py,sha256=
|
|
2
|
-
revengai/api_client.py,sha256=
|
|
1
|
+
revengai/__init__.py,sha256=FWVFLadbHuMoeMa2Fa18W5sHSAZeD3-_TPGEPU3NEbc,44069
|
|
2
|
+
revengai/api_client.py,sha256=B9oCt2W3mz2Q23mxxN-wCawNSDeO3bEzTzylcrKSqnY,27670
|
|
3
3
|
revengai/api_response.py,sha256=eMxw1mpmJcoGZ3gs9z6jM4oYoZ10Gjk333s9sKxGv7s,652
|
|
4
|
-
revengai/configuration.py,sha256=
|
|
4
|
+
revengai/configuration.py,sha256=Ezak3oZ-UWHvb_0vFKtsAdWmJK-RX6V2yxAOmRnglyo,18749
|
|
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
|
|
@@ -19,14 +19,14 @@ revengai/api/external_sources_api.py,sha256=JMyVAoivo6AsgeNekXnSk5BZh02APn9bzojo
|
|
|
19
19
|
revengai/api/firmware_api.py,sha256=IPkGAJ-gxmuNcz2sUM6ip-9N2DZujqLJWwhiLvUQBOA,24150
|
|
20
20
|
revengai/api/functions_ai_decompilation_api.py,sha256=ecFO-ENq9W7EoikKueY3McecKAw2fz44ZchYw6QJ29c,109824
|
|
21
21
|
revengai/api/functions_block_comments_api.py,sha256=SilDkZYrrJ2_6j-Hh-ZNTUZKp1G9XE9aUwVbDzev5Co,35480
|
|
22
|
-
revengai/api/functions_core_api.py,sha256=
|
|
22
|
+
revengai/api/functions_core_api.py,sha256=aK3szgh3LRltaMoUt2_8fiPWUFS9GBPKotcPYoRvkbs,162988
|
|
23
23
|
revengai/api/functions_data_types_api.py,sha256=Fzu4oI6kTwSE820_cGjr09N_G3uGOa4DUiyPFwOqvx4,73869
|
|
24
24
|
revengai/api/functions_decompilation_api.py,sha256=nEvYHPFoonmKSAf_t4_voC3SfoDd-O9sisSfA-5hiJo,83262
|
|
25
25
|
revengai/api/functions_renaming_history_api.py,sha256=L2CDadLnZrA0oNxhJfTSLLiMDz0Z4583Q8zLEj-Ze2I,47441
|
|
26
26
|
revengai/api/functions_threat_score_api.py,sha256=RYbCaX71r2ssv7VxUrcezT8dSdU5K5ipHD6yR592k6I,23867
|
|
27
27
|
revengai/api/models_api.py,sha256=bqukeUMctErkaX5mH8Rm3iPKEHQOCx-JT-P8_KV_iP8,11319
|
|
28
28
|
revengai/api/search_api.py,sha256=Kzo7KfP4nY1-YsoCHxVOQm3Vn89kFjcnUV7oNdaw5z0,65835
|
|
29
|
-
revengai/models/__init__.py,sha256=
|
|
29
|
+
revengai/models/__init__.py,sha256=UXuW7FhCIMc3s_K4LeAQjVWxeFs2UKlcGzVQouA_vkk,23746
|
|
30
30
|
revengai/models/addr.py,sha256=-2N-UQsOiZ0eyEAQ7ssk0of8W2fBrXeYdTZXuVt3SZs,4787
|
|
31
31
|
revengai/models/ai_decompilation_rating.py,sha256=gyay27QJwToUNtK9NARyw731Sg8GFRTufGGUABVYyfo,722
|
|
32
32
|
revengai/models/ai_unstrip_request.py,sha256=loSXNdHATJmY5yttiUCE-lLEOkuE63qVDTz8U0eCAIc,2596
|
|
@@ -36,6 +36,7 @@ revengai/models/analysis_create_request.py,sha256=6hU94Fi47hrxXQ-wX1jRuDrDi1GQym
|
|
|
36
36
|
revengai/models/analysis_create_response.py,sha256=aaO3-lJ65iBGe5lnyW8exHb9qByDaWfF2hOVKrWkN-I,2628
|
|
37
37
|
revengai/models/analysis_detail_response.py,sha256=KPyzlSbu9TU7itVlhGusJVSszrZAkuC8dMg1welYZeM,4170
|
|
38
38
|
revengai/models/analysis_function_mapping.py,sha256=_8LOSaBOgsFKLeqvoizbU2FSHtekA7aNrM7deIJyM4k,2886
|
|
39
|
+
revengai/models/analysis_function_matching_request.py,sha256=a03YZsFHA_BLW_DARHPeDYZ7CBFAEG0C66d9TSLDgaY,3434
|
|
39
40
|
revengai/models/analysis_functions.py,sha256=N1TKQuw33I9dw-i07kLus36k2bcAXQVm2oc1Ycfrgdw,3067
|
|
40
41
|
revengai/models/analysis_record.py,sha256=DxnERhF-s5AilH804yKtMAOyXhhjWQsq0ned1ji5t5Q,5516
|
|
41
42
|
revengai/models/analysis_scope.py,sha256=azpsUux2axe4QKwQ4FbW30HbazYYVFP-e68F9zp33-4,668
|
|
@@ -222,6 +223,10 @@ revengai/models/function_info_output.py,sha256=iIxkZ6_KFSoz0NhbBXyNi7knPvWcIp-hm
|
|
|
222
223
|
revengai/models/function_local_variable_response.py,sha256=llv5alvfVXqxE3Cs6vt7qnQNyfwj4PBoxq_Sim65jic,2733
|
|
223
224
|
revengai/models/function_mapping.py,sha256=X4fa-lcMfO-40eVMtSTUPRpJlxdSZNEdzPTEOR0uAlg,2924
|
|
224
225
|
revengai/models/function_mapping_full.py,sha256=dax345vnk25zSPVVpAmCFrrOWXzFXW6OnhSs9zVIKpI,11948
|
|
226
|
+
revengai/models/function_matching_batch_response.py,sha256=VT-WIbiOfLl2HPbRUTyKC8a5l6D1XLgNsJQfgiaW1_I,4270
|
|
227
|
+
revengai/models/function_matching_filters.py,sha256=O5F1PIcPhbumH8z-4KbG7JNoUsx_H3wBZQU9kCZ_boI,3710
|
|
228
|
+
revengai/models/function_matching_request.py,sha256=nEyqOxsdo61bUQCbTNxsCh0lX5WSPOyT1jVLJbzwdnc,3797
|
|
229
|
+
revengai/models/function_matching_result_with_best_match.py,sha256=dfWeaKkEJ0k_stJMIs-Yh3yKlDD2TRZioeHdG33JGtM,3826
|
|
225
230
|
revengai/models/function_name_confidence_body.py,sha256=Dz8HvTUDn5YcyCie-KMXmOdy8yF8PD-m0XzwpRyyQmg,3415
|
|
226
231
|
revengai/models/function_name_history.py,sha256=INu3KWYUpQMFfWy6oWl5iSaxrlayKr-wvuiahRCzinI,3265
|
|
227
232
|
revengai/models/function_name_input.py,sha256=zKzb0qAJBZKadixsWnRfkTnFHdNGtS2i13QgSeHr4c0,2538
|
|
@@ -256,6 +261,7 @@ revengai/models/list_collection_results.py,sha256=ZYGFTvOQfI234u67tURX8J0jwb6q-A
|
|
|
256
261
|
revengai/models/login_request.py,sha256=48uYtkWFL_Q-hN64P1f15ExGJvbab9XLymBtDduQvg0,2684
|
|
257
262
|
revengai/models/login_response.py,sha256=O35cqntoQ68IdYCBtHTYhPXlDqw8CIlnK-bNjf6QMO0,2461
|
|
258
263
|
revengai/models/logs.py,sha256=cV_V-xN6q-yTd7eL-X89ugqz5ifWPsFPo6qYFgpS_Pw,2419
|
|
264
|
+
revengai/models/matched_function.py,sha256=PaGTuFUlpR_jLL8JZGA4Raa-wGtcoeGuyyIwB4EYX5w,3802
|
|
259
265
|
revengai/models/matched_function_suggestion.py,sha256=eNMKuAyJ94joT5It020lSujrporie50-ii_OCOk3KhY,2900
|
|
260
266
|
revengai/models/meta_model.py,sha256=GbyFJZ9kwvK1Gqg8QnJ1GHpaMs8cMht6j-MY1k0YSt0,2943
|
|
261
267
|
revengai/models/model_name.py,sha256=lVKok5pWyLcN1rhq1IYccC7uQQrPdyz1oohYRUMRrmw,1271
|
|
@@ -333,6 +339,6 @@ revengai/models/vulnerabilities.py,sha256=9t6uoZd3svWyfcZJjmj6zP731Dp47Apb25y8Qt
|
|
|
333
339
|
revengai/models/vulnerability.py,sha256=P7rAOAYU5JLLpcRr824-YJgZba5kPb_J9ALV3tSNfLQ,3688
|
|
334
340
|
revengai/models/vulnerability_type.py,sha256=SyOgfMmELYYc_H84oPkikBpjwngtG5Qw9Q_86a2TPr8,866
|
|
335
341
|
revengai/models/workspace.py,sha256=chjU62GFvByEmaNd6luMNQVQLP3wlPx1zJgGJ_yyMLA,676
|
|
336
|
-
revengai-1.
|
|
337
|
-
revengai-1.
|
|
338
|
-
revengai-1.
|
|
342
|
+
revengai-1.89.2.dist-info/METADATA,sha256=X6Bg7yy8U2rs5eKKAV_1hSie7UH7jgz6jrkHcD0jjco,42416
|
|
343
|
+
revengai-1.89.2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
344
|
+
revengai-1.89.2.dist-info/RECORD,,
|
|
File without changes
|