revengai 1.84.0__py3-none-any.whl → 1.86.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 +7 -3
- revengai/api/analyses_core_api.py +310 -16
- revengai/api_client.py +1 -1
- revengai/configuration.py +2 -2
- revengai/models/__init__.py +3 -1
- revengai/models/app_api_rest_v1_ann_schema_ann_function.py +134 -0
- revengai/models/{ann_function.py → app_api_rest_v2_similarity_schema_ann_function.py} +4 -4
- revengai/models/function_batch_ann.py +105 -0
- {revengai-1.84.0.dist-info → revengai-1.86.0.dist-info}/METADATA +5 -2
- {revengai-1.84.0.dist-info → revengai-1.86.0.dist-info}/RECORD +11 -9
- {revengai-1.84.0.dist-info → revengai-1.86.0.dist-info}/WHEEL +0 -0
revengai/__init__.py
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
""" # noqa: E501
|
|
14
14
|
|
|
15
15
|
|
|
16
|
-
__version__ = "v1.
|
|
16
|
+
__version__ = "v1.86.0"
|
|
17
17
|
|
|
18
18
|
# Define package exports
|
|
19
19
|
__all__ = [
|
|
@@ -46,7 +46,6 @@ __all__ = [
|
|
|
46
46
|
"ApiKeyError",
|
|
47
47
|
"ApiAttributeError",
|
|
48
48
|
"ApiException",
|
|
49
|
-
"ANNFunction",
|
|
50
49
|
"Addr",
|
|
51
50
|
"AiDecompilationRating",
|
|
52
51
|
"AiUnstripRequest",
|
|
@@ -65,12 +64,14 @@ __all__ = [
|
|
|
65
64
|
"AnalysisUpdateRequest",
|
|
66
65
|
"AnalysisUpdateTagsRequest",
|
|
67
66
|
"AnalysisUpdateTagsResponse",
|
|
67
|
+
"AppApiRestV1AnnSchemaANNFunction",
|
|
68
68
|
"AppApiRestV2AnalysesEnumsDynamicExecutionStatus",
|
|
69
69
|
"AppApiRestV2AnalysesEnumsOrderBy",
|
|
70
70
|
"AppApiRestV2AnalysesResponsesTagItem",
|
|
71
71
|
"AppApiRestV2CollectionsEnumsOrderBy",
|
|
72
72
|
"AppApiRestV2FunctionsResponsesFunction",
|
|
73
73
|
"AppApiRestV2FunctionsTypesFunction",
|
|
74
|
+
"AppApiRestV2SimilaritySchemaANNFunction",
|
|
74
75
|
"AppServicesBinaryAnnSchemaTagItem",
|
|
75
76
|
"AppServicesDynamicExecutionSchemasDynamicExecutionStatus",
|
|
76
77
|
"Argument",
|
|
@@ -220,6 +221,7 @@ __all__ = [
|
|
|
220
221
|
"FileMetadata",
|
|
221
222
|
"Filters",
|
|
222
223
|
"FunctionAnalysisThreatScoreData",
|
|
224
|
+
"FunctionBatchAnn",
|
|
223
225
|
"FunctionBlockDestinationResponse",
|
|
224
226
|
"FunctionBlockResponse",
|
|
225
227
|
"FunctionBlocksResponse",
|
|
@@ -386,7 +388,6 @@ from revengai.exceptions import ApiAttributeError as ApiAttributeError
|
|
|
386
388
|
from revengai.exceptions import ApiException as ApiException
|
|
387
389
|
|
|
388
390
|
# import models into sdk package
|
|
389
|
-
from revengai.models.ann_function import ANNFunction as ANNFunction
|
|
390
391
|
from revengai.models.addr import Addr as Addr
|
|
391
392
|
from revengai.models.ai_decompilation_rating import AiDecompilationRating as AiDecompilationRating
|
|
392
393
|
from revengai.models.ai_unstrip_request import AiUnstripRequest as AiUnstripRequest
|
|
@@ -405,12 +406,14 @@ from revengai.models.analysis_threat_score_data import AnalysisThreatScoreData a
|
|
|
405
406
|
from revengai.models.analysis_update_request import AnalysisUpdateRequest as AnalysisUpdateRequest
|
|
406
407
|
from revengai.models.analysis_update_tags_request import AnalysisUpdateTagsRequest as AnalysisUpdateTagsRequest
|
|
407
408
|
from revengai.models.analysis_update_tags_response import AnalysisUpdateTagsResponse as AnalysisUpdateTagsResponse
|
|
409
|
+
from revengai.models.app_api_rest_v1_ann_schema_ann_function import AppApiRestV1AnnSchemaANNFunction as AppApiRestV1AnnSchemaANNFunction
|
|
408
410
|
from revengai.models.app_api_rest_v2_analyses_enums_dynamic_execution_status import AppApiRestV2AnalysesEnumsDynamicExecutionStatus as AppApiRestV2AnalysesEnumsDynamicExecutionStatus
|
|
409
411
|
from revengai.models.app_api_rest_v2_analyses_enums_order_by import AppApiRestV2AnalysesEnumsOrderBy as AppApiRestV2AnalysesEnumsOrderBy
|
|
410
412
|
from revengai.models.app_api_rest_v2_analyses_responses_tag_item import AppApiRestV2AnalysesResponsesTagItem as AppApiRestV2AnalysesResponsesTagItem
|
|
411
413
|
from revengai.models.app_api_rest_v2_collections_enums_order_by import AppApiRestV2CollectionsEnumsOrderBy as AppApiRestV2CollectionsEnumsOrderBy
|
|
412
414
|
from revengai.models.app_api_rest_v2_functions_responses_function import AppApiRestV2FunctionsResponsesFunction as AppApiRestV2FunctionsResponsesFunction
|
|
413
415
|
from revengai.models.app_api_rest_v2_functions_types_function import AppApiRestV2FunctionsTypesFunction as AppApiRestV2FunctionsTypesFunction
|
|
416
|
+
from revengai.models.app_api_rest_v2_similarity_schema_ann_function import AppApiRestV2SimilaritySchemaANNFunction as AppApiRestV2SimilaritySchemaANNFunction
|
|
414
417
|
from revengai.models.app_services_binary_ann_schema_tag_item import AppServicesBinaryAnnSchemaTagItem as AppServicesBinaryAnnSchemaTagItem
|
|
415
418
|
from revengai.models.app_services_dynamic_execution_schemas_dynamic_execution_status import AppServicesDynamicExecutionSchemasDynamicExecutionStatus as AppServicesDynamicExecutionSchemasDynamicExecutionStatus
|
|
416
419
|
from revengai.models.argument import Argument as Argument
|
|
@@ -560,6 +563,7 @@ from revengai.models.file_hashes import FileHashes as FileHashes
|
|
|
560
563
|
from revengai.models.file_metadata import FileMetadata as FileMetadata
|
|
561
564
|
from revengai.models.filters import Filters as Filters
|
|
562
565
|
from revengai.models.function_analysis_threat_score_data import FunctionAnalysisThreatScoreData as FunctionAnalysisThreatScoreData
|
|
566
|
+
from revengai.models.function_batch_ann import FunctionBatchAnn as FunctionBatchAnn
|
|
563
567
|
from revengai.models.function_block_destination_response import FunctionBlockDestinationResponse as FunctionBlockDestinationResponse
|
|
564
568
|
from revengai.models.function_block_response import FunctionBlockResponse as FunctionBlockResponse
|
|
565
569
|
from revengai.models.function_blocks_response import FunctionBlocksResponse as FunctionBlocksResponse
|
|
@@ -18,11 +18,12 @@ from typing_extensions import Annotated
|
|
|
18
18
|
from pydantic import Field, StrictBool, StrictBytes, StrictInt, StrictStr
|
|
19
19
|
from typing import Any, List, Optional, Tuple, Union
|
|
20
20
|
from typing_extensions import Annotated
|
|
21
|
-
from revengai.models.ann_function import ANNFunction
|
|
22
21
|
from revengai.models.analysis_create_request import AnalysisCreateRequest
|
|
23
22
|
from revengai.models.analysis_update_request import AnalysisUpdateRequest
|
|
24
23
|
from revengai.models.analysis_update_tags_request import AnalysisUpdateTagsRequest
|
|
24
|
+
from revengai.models.app_api_rest_v1_ann_schema_ann_function import AppApiRestV1AnnSchemaANNFunction
|
|
25
25
|
from revengai.models.app_api_rest_v2_analyses_enums_order_by import AppApiRestV2AnalysesEnumsOrderBy
|
|
26
|
+
from revengai.models.app_api_rest_v2_similarity_schema_ann_function import AppApiRestV2SimilaritySchemaANNFunction
|
|
26
27
|
from revengai.models.base_response_analysis_create_response import BaseResponseAnalysisCreateResponse
|
|
27
28
|
from revengai.models.base_response_analysis_detail_response import BaseResponseAnalysisDetailResponse
|
|
28
29
|
from revengai.models.base_response_analysis_function_mapping import BaseResponseAnalysisFunctionMapping
|
|
@@ -39,6 +40,7 @@ from revengai.models.base_response_status import BaseResponseStatus
|
|
|
39
40
|
from revengai.models.base_response_upload_response import BaseResponseUploadResponse
|
|
40
41
|
from revengai.models.binary_ann_form import BinaryAnnForm
|
|
41
42
|
from revengai.models.dynamic_execution_status_input import DynamicExecutionStatusInput
|
|
43
|
+
from revengai.models.function_batch_ann import FunctionBatchAnn
|
|
42
44
|
from revengai.models.model_name import ModelName
|
|
43
45
|
from revengai.models.order import Order
|
|
44
46
|
from revengai.models.re_analysis_form import ReAnalysisForm
|
|
@@ -64,6 +66,298 @@ class AnalysesCoreApi:
|
|
|
64
66
|
self.api_client = api_client
|
|
65
67
|
|
|
66
68
|
|
|
69
|
+
@validate_call
|
|
70
|
+
def batch_symbol_ann(
|
|
71
|
+
self,
|
|
72
|
+
app_api_rest_v1_ann_schema_ann_function: AppApiRestV1AnnSchemaANNFunction,
|
|
73
|
+
authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = None,
|
|
74
|
+
_request_timeout: Union[
|
|
75
|
+
None,
|
|
76
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
77
|
+
Tuple[
|
|
78
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
79
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
80
|
+
]
|
|
81
|
+
] = None,
|
|
82
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
83
|
+
_content_type: Optional[StrictStr] = None,
|
|
84
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
85
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
86
|
+
) -> FunctionBatchAnn:
|
|
87
|
+
"""Batch Symbol ANN using function IDs
|
|
88
|
+
|
|
89
|
+
Takes in an input of functions ID's and settings and finds the nearest functions for each function that's within the database
|
|
90
|
+
|
|
91
|
+
:param app_api_rest_v1_ann_schema_ann_function: (required)
|
|
92
|
+
:type app_api_rest_v1_ann_schema_ann_function: AppApiRestV1AnnSchemaANNFunction
|
|
93
|
+
:param authorization: API Key bearer token
|
|
94
|
+
:type authorization: str
|
|
95
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
96
|
+
number provided, it will be total request
|
|
97
|
+
timeout. It can also be a pair (tuple) of
|
|
98
|
+
(connection, read) timeouts.
|
|
99
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
100
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
101
|
+
request; this effectively ignores the
|
|
102
|
+
authentication in the spec for a single request.
|
|
103
|
+
:type _request_auth: dict, optional
|
|
104
|
+
:param _content_type: force content-type for the request.
|
|
105
|
+
:type _content_type: str, Optional
|
|
106
|
+
:param _headers: set to override the headers for a single
|
|
107
|
+
request; this effectively ignores the headers
|
|
108
|
+
in the spec for a single request.
|
|
109
|
+
:type _headers: dict, optional
|
|
110
|
+
:param _host_index: set to override the host_index for a single
|
|
111
|
+
request; this effectively ignores the host_index
|
|
112
|
+
in the spec for a single request.
|
|
113
|
+
:type _host_index: int, optional
|
|
114
|
+
:return: Returns the result object.
|
|
115
|
+
""" # noqa: E501
|
|
116
|
+
|
|
117
|
+
_param = self._batch_symbol_ann_serialize(
|
|
118
|
+
app_api_rest_v1_ann_schema_ann_function=app_api_rest_v1_ann_schema_ann_function,
|
|
119
|
+
authorization=authorization,
|
|
120
|
+
_request_auth=_request_auth,
|
|
121
|
+
_content_type=_content_type,
|
|
122
|
+
_headers=_headers,
|
|
123
|
+
_host_index=_host_index
|
|
124
|
+
)
|
|
125
|
+
|
|
126
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
127
|
+
'200': "FunctionBatchAnn",
|
|
128
|
+
'422': "BaseResponse",
|
|
129
|
+
}
|
|
130
|
+
response_data = self.api_client.call_api(
|
|
131
|
+
*_param,
|
|
132
|
+
_request_timeout=_request_timeout
|
|
133
|
+
)
|
|
134
|
+
response_data.read()
|
|
135
|
+
return self.api_client.response_deserialize(
|
|
136
|
+
response_data=response_data,
|
|
137
|
+
response_types_map=_response_types_map,
|
|
138
|
+
).data
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
@validate_call
|
|
142
|
+
def batch_symbol_ann_with_http_info(
|
|
143
|
+
self,
|
|
144
|
+
app_api_rest_v1_ann_schema_ann_function: AppApiRestV1AnnSchemaANNFunction,
|
|
145
|
+
authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = None,
|
|
146
|
+
_request_timeout: Union[
|
|
147
|
+
None,
|
|
148
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
149
|
+
Tuple[
|
|
150
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
151
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
152
|
+
]
|
|
153
|
+
] = None,
|
|
154
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
155
|
+
_content_type: Optional[StrictStr] = None,
|
|
156
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
157
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
158
|
+
) -> ApiResponse[FunctionBatchAnn]:
|
|
159
|
+
"""Batch Symbol ANN using function IDs
|
|
160
|
+
|
|
161
|
+
Takes in an input of functions ID's and settings and finds the nearest functions for each function that's within the database
|
|
162
|
+
|
|
163
|
+
:param app_api_rest_v1_ann_schema_ann_function: (required)
|
|
164
|
+
:type app_api_rest_v1_ann_schema_ann_function: AppApiRestV1AnnSchemaANNFunction
|
|
165
|
+
:param authorization: API Key bearer token
|
|
166
|
+
:type authorization: str
|
|
167
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
168
|
+
number provided, it will be total request
|
|
169
|
+
timeout. It can also be a pair (tuple) of
|
|
170
|
+
(connection, read) timeouts.
|
|
171
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
172
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
173
|
+
request; this effectively ignores the
|
|
174
|
+
authentication in the spec for a single request.
|
|
175
|
+
:type _request_auth: dict, optional
|
|
176
|
+
:param _content_type: force content-type for the request.
|
|
177
|
+
:type _content_type: str, Optional
|
|
178
|
+
:param _headers: set to override the headers for a single
|
|
179
|
+
request; this effectively ignores the headers
|
|
180
|
+
in the spec for a single request.
|
|
181
|
+
:type _headers: dict, optional
|
|
182
|
+
:param _host_index: set to override the host_index for a single
|
|
183
|
+
request; this effectively ignores the host_index
|
|
184
|
+
in the spec for a single request.
|
|
185
|
+
:type _host_index: int, optional
|
|
186
|
+
:return: Returns the result object.
|
|
187
|
+
""" # noqa: E501
|
|
188
|
+
|
|
189
|
+
_param = self._batch_symbol_ann_serialize(
|
|
190
|
+
app_api_rest_v1_ann_schema_ann_function=app_api_rest_v1_ann_schema_ann_function,
|
|
191
|
+
authorization=authorization,
|
|
192
|
+
_request_auth=_request_auth,
|
|
193
|
+
_content_type=_content_type,
|
|
194
|
+
_headers=_headers,
|
|
195
|
+
_host_index=_host_index
|
|
196
|
+
)
|
|
197
|
+
|
|
198
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
199
|
+
'200': "FunctionBatchAnn",
|
|
200
|
+
'422': "BaseResponse",
|
|
201
|
+
}
|
|
202
|
+
response_data = self.api_client.call_api(
|
|
203
|
+
*_param,
|
|
204
|
+
_request_timeout=_request_timeout
|
|
205
|
+
)
|
|
206
|
+
response_data.read()
|
|
207
|
+
return self.api_client.response_deserialize(
|
|
208
|
+
response_data=response_data,
|
|
209
|
+
response_types_map=_response_types_map,
|
|
210
|
+
)
|
|
211
|
+
|
|
212
|
+
|
|
213
|
+
@validate_call
|
|
214
|
+
def batch_symbol_ann_without_preload_content(
|
|
215
|
+
self,
|
|
216
|
+
app_api_rest_v1_ann_schema_ann_function: AppApiRestV1AnnSchemaANNFunction,
|
|
217
|
+
authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = None,
|
|
218
|
+
_request_timeout: Union[
|
|
219
|
+
None,
|
|
220
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
221
|
+
Tuple[
|
|
222
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
223
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
224
|
+
]
|
|
225
|
+
] = None,
|
|
226
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
227
|
+
_content_type: Optional[StrictStr] = None,
|
|
228
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
229
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
230
|
+
) -> RESTResponseType:
|
|
231
|
+
"""Batch Symbol ANN using function IDs
|
|
232
|
+
|
|
233
|
+
Takes in an input of functions ID's and settings and finds the nearest functions for each function that's within the database
|
|
234
|
+
|
|
235
|
+
:param app_api_rest_v1_ann_schema_ann_function: (required)
|
|
236
|
+
:type app_api_rest_v1_ann_schema_ann_function: AppApiRestV1AnnSchemaANNFunction
|
|
237
|
+
:param authorization: API Key bearer token
|
|
238
|
+
:type authorization: str
|
|
239
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
240
|
+
number provided, it will be total request
|
|
241
|
+
timeout. It can also be a pair (tuple) of
|
|
242
|
+
(connection, read) timeouts.
|
|
243
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
244
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
245
|
+
request; this effectively ignores the
|
|
246
|
+
authentication in the spec for a single request.
|
|
247
|
+
:type _request_auth: dict, optional
|
|
248
|
+
:param _content_type: force content-type for the request.
|
|
249
|
+
:type _content_type: str, Optional
|
|
250
|
+
:param _headers: set to override the headers for a single
|
|
251
|
+
request; this effectively ignores the headers
|
|
252
|
+
in the spec for a single request.
|
|
253
|
+
:type _headers: dict, optional
|
|
254
|
+
:param _host_index: set to override the host_index for a single
|
|
255
|
+
request; this effectively ignores the host_index
|
|
256
|
+
in the spec for a single request.
|
|
257
|
+
:type _host_index: int, optional
|
|
258
|
+
:return: Returns the result object.
|
|
259
|
+
""" # noqa: E501
|
|
260
|
+
|
|
261
|
+
_param = self._batch_symbol_ann_serialize(
|
|
262
|
+
app_api_rest_v1_ann_schema_ann_function=app_api_rest_v1_ann_schema_ann_function,
|
|
263
|
+
authorization=authorization,
|
|
264
|
+
_request_auth=_request_auth,
|
|
265
|
+
_content_type=_content_type,
|
|
266
|
+
_headers=_headers,
|
|
267
|
+
_host_index=_host_index
|
|
268
|
+
)
|
|
269
|
+
|
|
270
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
271
|
+
'200': "FunctionBatchAnn",
|
|
272
|
+
'422': "BaseResponse",
|
|
273
|
+
}
|
|
274
|
+
response_data = self.api_client.call_api(
|
|
275
|
+
*_param,
|
|
276
|
+
_request_timeout=_request_timeout
|
|
277
|
+
)
|
|
278
|
+
return response_data.response
|
|
279
|
+
|
|
280
|
+
|
|
281
|
+
def _batch_symbol_ann_serialize(
|
|
282
|
+
self,
|
|
283
|
+
app_api_rest_v1_ann_schema_ann_function,
|
|
284
|
+
authorization,
|
|
285
|
+
_request_auth,
|
|
286
|
+
_content_type,
|
|
287
|
+
_headers,
|
|
288
|
+
_host_index,
|
|
289
|
+
) -> RequestSerialized:
|
|
290
|
+
|
|
291
|
+
_host = None
|
|
292
|
+
|
|
293
|
+
_collection_formats: Dict[str, str] = {
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
_path_params: Dict[str, str] = {}
|
|
297
|
+
_query_params: List[Tuple[str, str]] = []
|
|
298
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
299
|
+
_form_params: List[Tuple[str, str]] = []
|
|
300
|
+
_files: Dict[
|
|
301
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
302
|
+
] = {}
|
|
303
|
+
_body_params: Optional[bytes] = None
|
|
304
|
+
|
|
305
|
+
# process the path parameters
|
|
306
|
+
# process the query parameters
|
|
307
|
+
# process the header parameters
|
|
308
|
+
if authorization is not None:
|
|
309
|
+
_header_params['authorization'] = authorization
|
|
310
|
+
# process the form parameters
|
|
311
|
+
# process the body parameter
|
|
312
|
+
if app_api_rest_v1_ann_schema_ann_function is not None:
|
|
313
|
+
_body_params = app_api_rest_v1_ann_schema_ann_function
|
|
314
|
+
|
|
315
|
+
|
|
316
|
+
# set the HTTP header `Accept`
|
|
317
|
+
if 'Accept' not in _header_params:
|
|
318
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
319
|
+
[
|
|
320
|
+
'application/json'
|
|
321
|
+
]
|
|
322
|
+
)
|
|
323
|
+
|
|
324
|
+
# set the HTTP header `Content-Type`
|
|
325
|
+
if _content_type:
|
|
326
|
+
_header_params['Content-Type'] = _content_type
|
|
327
|
+
else:
|
|
328
|
+
_default_content_type = (
|
|
329
|
+
self.api_client.select_header_content_type(
|
|
330
|
+
[
|
|
331
|
+
'application/json'
|
|
332
|
+
]
|
|
333
|
+
)
|
|
334
|
+
)
|
|
335
|
+
if _default_content_type is not None:
|
|
336
|
+
_header_params['Content-Type'] = _default_content_type
|
|
337
|
+
|
|
338
|
+
# authentication setting
|
|
339
|
+
_auth_settings: List[str] = [
|
|
340
|
+
'APIKey'
|
|
341
|
+
]
|
|
342
|
+
|
|
343
|
+
return self.api_client.param_serialize(
|
|
344
|
+
method='POST',
|
|
345
|
+
resource_path='/v1/ann/symbol/batch',
|
|
346
|
+
path_params=_path_params,
|
|
347
|
+
query_params=_query_params,
|
|
348
|
+
header_params=_header_params,
|
|
349
|
+
body=_body_params,
|
|
350
|
+
post_params=_form_params,
|
|
351
|
+
files=_files,
|
|
352
|
+
auth_settings=_auth_settings,
|
|
353
|
+
collection_formats=_collection_formats,
|
|
354
|
+
_host=_host,
|
|
355
|
+
_request_auth=_request_auth
|
|
356
|
+
)
|
|
357
|
+
|
|
358
|
+
|
|
359
|
+
|
|
360
|
+
|
|
67
361
|
@validate_call
|
|
68
362
|
def create_analysis(
|
|
69
363
|
self,
|
|
@@ -651,7 +945,7 @@ class AnalysesCoreApi:
|
|
|
651
945
|
def find_similar_functions_batch(
|
|
652
946
|
self,
|
|
653
947
|
analysis_id: StrictInt,
|
|
654
|
-
|
|
948
|
+
app_api_rest_v2_similarity_schema_ann_function: AppApiRestV2SimilaritySchemaANNFunction,
|
|
655
949
|
authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = None,
|
|
656
950
|
_request_timeout: Union[
|
|
657
951
|
None,
|
|
@@ -672,8 +966,8 @@ class AnalysesCoreApi:
|
|
|
672
966
|
|
|
673
967
|
:param analysis_id: (required)
|
|
674
968
|
:type analysis_id: int
|
|
675
|
-
:param
|
|
676
|
-
:type
|
|
969
|
+
:param app_api_rest_v2_similarity_schema_ann_function: (required)
|
|
970
|
+
:type app_api_rest_v2_similarity_schema_ann_function: AppApiRestV2SimilaritySchemaANNFunction
|
|
677
971
|
:param authorization: API Key bearer token
|
|
678
972
|
:type authorization: str
|
|
679
973
|
:param _request_timeout: timeout setting for this request. If one
|
|
@@ -700,7 +994,7 @@ class AnalysesCoreApi:
|
|
|
700
994
|
|
|
701
995
|
_param = self._find_similar_functions_batch_serialize(
|
|
702
996
|
analysis_id=analysis_id,
|
|
703
|
-
|
|
997
|
+
app_api_rest_v2_similarity_schema_ann_function=app_api_rest_v2_similarity_schema_ann_function,
|
|
704
998
|
authorization=authorization,
|
|
705
999
|
_request_auth=_request_auth,
|
|
706
1000
|
_content_type=_content_type,
|
|
@@ -727,7 +1021,7 @@ class AnalysesCoreApi:
|
|
|
727
1021
|
def find_similar_functions_batch_with_http_info(
|
|
728
1022
|
self,
|
|
729
1023
|
analysis_id: StrictInt,
|
|
730
|
-
|
|
1024
|
+
app_api_rest_v2_similarity_schema_ann_function: AppApiRestV2SimilaritySchemaANNFunction,
|
|
731
1025
|
authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = None,
|
|
732
1026
|
_request_timeout: Union[
|
|
733
1027
|
None,
|
|
@@ -748,8 +1042,8 @@ class AnalysesCoreApi:
|
|
|
748
1042
|
|
|
749
1043
|
:param analysis_id: (required)
|
|
750
1044
|
:type analysis_id: int
|
|
751
|
-
:param
|
|
752
|
-
:type
|
|
1045
|
+
:param app_api_rest_v2_similarity_schema_ann_function: (required)
|
|
1046
|
+
:type app_api_rest_v2_similarity_schema_ann_function: AppApiRestV2SimilaritySchemaANNFunction
|
|
753
1047
|
:param authorization: API Key bearer token
|
|
754
1048
|
:type authorization: str
|
|
755
1049
|
:param _request_timeout: timeout setting for this request. If one
|
|
@@ -776,7 +1070,7 @@ class AnalysesCoreApi:
|
|
|
776
1070
|
|
|
777
1071
|
_param = self._find_similar_functions_batch_serialize(
|
|
778
1072
|
analysis_id=analysis_id,
|
|
779
|
-
|
|
1073
|
+
app_api_rest_v2_similarity_schema_ann_function=app_api_rest_v2_similarity_schema_ann_function,
|
|
780
1074
|
authorization=authorization,
|
|
781
1075
|
_request_auth=_request_auth,
|
|
782
1076
|
_content_type=_content_type,
|
|
@@ -803,7 +1097,7 @@ class AnalysesCoreApi:
|
|
|
803
1097
|
def find_similar_functions_batch_without_preload_content(
|
|
804
1098
|
self,
|
|
805
1099
|
analysis_id: StrictInt,
|
|
806
|
-
|
|
1100
|
+
app_api_rest_v2_similarity_schema_ann_function: AppApiRestV2SimilaritySchemaANNFunction,
|
|
807
1101
|
authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = None,
|
|
808
1102
|
_request_timeout: Union[
|
|
809
1103
|
None,
|
|
@@ -824,8 +1118,8 @@ class AnalysesCoreApi:
|
|
|
824
1118
|
|
|
825
1119
|
:param analysis_id: (required)
|
|
826
1120
|
:type analysis_id: int
|
|
827
|
-
:param
|
|
828
|
-
:type
|
|
1121
|
+
:param app_api_rest_v2_similarity_schema_ann_function: (required)
|
|
1122
|
+
:type app_api_rest_v2_similarity_schema_ann_function: AppApiRestV2SimilaritySchemaANNFunction
|
|
829
1123
|
:param authorization: API Key bearer token
|
|
830
1124
|
:type authorization: str
|
|
831
1125
|
:param _request_timeout: timeout setting for this request. If one
|
|
@@ -852,7 +1146,7 @@ class AnalysesCoreApi:
|
|
|
852
1146
|
|
|
853
1147
|
_param = self._find_similar_functions_batch_serialize(
|
|
854
1148
|
analysis_id=analysis_id,
|
|
855
|
-
|
|
1149
|
+
app_api_rest_v2_similarity_schema_ann_function=app_api_rest_v2_similarity_schema_ann_function,
|
|
856
1150
|
authorization=authorization,
|
|
857
1151
|
_request_auth=_request_auth,
|
|
858
1152
|
_content_type=_content_type,
|
|
@@ -874,7 +1168,7 @@ class AnalysesCoreApi:
|
|
|
874
1168
|
def _find_similar_functions_batch_serialize(
|
|
875
1169
|
self,
|
|
876
1170
|
analysis_id,
|
|
877
|
-
|
|
1171
|
+
app_api_rest_v2_similarity_schema_ann_function,
|
|
878
1172
|
authorization,
|
|
879
1173
|
_request_auth,
|
|
880
1174
|
_content_type,
|
|
@@ -905,8 +1199,8 @@ class AnalysesCoreApi:
|
|
|
905
1199
|
_header_params['authorization'] = authorization
|
|
906
1200
|
# process the form parameters
|
|
907
1201
|
# process the body parameter
|
|
908
|
-
if
|
|
909
|
-
_body_params =
|
|
1202
|
+
if app_api_rest_v2_similarity_schema_ann_function is not None:
|
|
1203
|
+
_body_params = app_api_rest_v2_similarity_schema_ann_function
|
|
910
1204
|
|
|
911
1205
|
|
|
912
1206
|
# set the HTTP header `Accept`
|
revengai/api_client.py
CHANGED
|
@@ -90,7 +90,7 @@ class ApiClient:
|
|
|
90
90
|
self.default_headers[header_name] = header_value
|
|
91
91
|
self.cookie = cookie
|
|
92
92
|
# Set default User-Agent.
|
|
93
|
-
self.user_agent = 'OpenAPI-Generator/v1.
|
|
93
|
+
self.user_agent = 'OpenAPI-Generator/v1.86.0/python'
|
|
94
94
|
self.client_side_validation = configuration.client_side_validation
|
|
95
95
|
|
|
96
96
|
def __enter__(self):
|
revengai/configuration.py
CHANGED
|
@@ -529,8 +529,8 @@ conf = revengai.Configuration(
|
|
|
529
529
|
return "Python SDK Debug Report:\n"\
|
|
530
530
|
"OS: {env}\n"\
|
|
531
531
|
"Python Version: {pyversion}\n"\
|
|
532
|
-
"Version of the API: v1.
|
|
533
|
-
"SDK Package Version: v1.
|
|
532
|
+
"Version of the API: v1.86.0\n"\
|
|
533
|
+
"SDK Package Version: v1.86.0".\
|
|
534
534
|
format(env=sys.platform, pyversion=sys.version)
|
|
535
535
|
|
|
536
536
|
def get_host_settings(self) -> List[HostSetting]:
|
revengai/models/__init__.py
CHANGED
|
@@ -12,7 +12,6 @@
|
|
|
12
12
|
""" # noqa: E501
|
|
13
13
|
|
|
14
14
|
# import models into model package
|
|
15
|
-
from revengai.models.ann_function import ANNFunction
|
|
16
15
|
from revengai.models.addr import Addr
|
|
17
16
|
from revengai.models.ai_decompilation_rating import AiDecompilationRating
|
|
18
17
|
from revengai.models.ai_unstrip_request import AiUnstripRequest
|
|
@@ -31,12 +30,14 @@ from revengai.models.analysis_threat_score_data import AnalysisThreatScoreData
|
|
|
31
30
|
from revengai.models.analysis_update_request import AnalysisUpdateRequest
|
|
32
31
|
from revengai.models.analysis_update_tags_request import AnalysisUpdateTagsRequest
|
|
33
32
|
from revengai.models.analysis_update_tags_response import AnalysisUpdateTagsResponse
|
|
33
|
+
from revengai.models.app_api_rest_v1_ann_schema_ann_function import AppApiRestV1AnnSchemaANNFunction
|
|
34
34
|
from revengai.models.app_api_rest_v2_analyses_enums_dynamic_execution_status import AppApiRestV2AnalysesEnumsDynamicExecutionStatus
|
|
35
35
|
from revengai.models.app_api_rest_v2_analyses_enums_order_by import AppApiRestV2AnalysesEnumsOrderBy
|
|
36
36
|
from revengai.models.app_api_rest_v2_analyses_responses_tag_item import AppApiRestV2AnalysesResponsesTagItem
|
|
37
37
|
from revengai.models.app_api_rest_v2_collections_enums_order_by import AppApiRestV2CollectionsEnumsOrderBy
|
|
38
38
|
from revengai.models.app_api_rest_v2_functions_responses_function import AppApiRestV2FunctionsResponsesFunction
|
|
39
39
|
from revengai.models.app_api_rest_v2_functions_types_function import AppApiRestV2FunctionsTypesFunction
|
|
40
|
+
from revengai.models.app_api_rest_v2_similarity_schema_ann_function import AppApiRestV2SimilaritySchemaANNFunction
|
|
40
41
|
from revengai.models.app_services_binary_ann_schema_tag_item import AppServicesBinaryAnnSchemaTagItem
|
|
41
42
|
from revengai.models.app_services_dynamic_execution_schemas_dynamic_execution_status import AppServicesDynamicExecutionSchemasDynamicExecutionStatus
|
|
42
43
|
from revengai.models.argument import Argument
|
|
@@ -186,6 +187,7 @@ from revengai.models.file_hashes import FileHashes
|
|
|
186
187
|
from revengai.models.file_metadata import FileMetadata
|
|
187
188
|
from revengai.models.filters import Filters
|
|
188
189
|
from revengai.models.function_analysis_threat_score_data import FunctionAnalysisThreatScoreData
|
|
190
|
+
from revengai.models.function_batch_ann import FunctionBatchAnn
|
|
189
191
|
from revengai.models.function_block_destination_response import FunctionBlockDestinationResponse
|
|
190
192
|
from revengai.models.function_block_response import FunctionBlockResponse
|
|
191
193
|
from revengai.models.function_blocks_response import FunctionBlocksResponse
|
|
@@ -0,0 +1,134 @@
|
|
|
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
|
+
|
|
@@ -24,9 +24,9 @@ from revengai.models.search_function_ids import SearchFunctionIds
|
|
|
24
24
|
from typing import Optional, Set
|
|
25
25
|
from typing_extensions import Self
|
|
26
26
|
|
|
27
|
-
class
|
|
27
|
+
class AppApiRestV2SimilaritySchemaANNFunction(BaseModel):
|
|
28
28
|
"""
|
|
29
|
-
|
|
29
|
+
AppApiRestV2SimilaritySchemaANNFunction
|
|
30
30
|
""" # noqa: E501
|
|
31
31
|
limit: Optional[StrictInt] = Field(default=5, description="The amount of neighbours per function ID")
|
|
32
32
|
distance: Optional[Union[StrictFloat, StrictInt]] = Field(default=0.1, description="The distance between two neighbours")
|
|
@@ -56,7 +56,7 @@ class ANNFunction(BaseModel):
|
|
|
56
56
|
|
|
57
57
|
@classmethod
|
|
58
58
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
59
|
-
"""Create an instance of
|
|
59
|
+
"""Create an instance of AppApiRestV2SimilaritySchemaANNFunction from a JSON string"""
|
|
60
60
|
return cls.from_dict(json.loads(json_str))
|
|
61
61
|
|
|
62
62
|
def to_dict(self) -> Dict[str, Any]:
|
|
@@ -94,7 +94,7 @@ class ANNFunction(BaseModel):
|
|
|
94
94
|
|
|
95
95
|
@classmethod
|
|
96
96
|
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
97
|
-
"""Create an instance of
|
|
97
|
+
"""Create an instance of AppApiRestV2SimilaritySchemaANNFunction from a dict"""
|
|
98
98
|
if obj is None:
|
|
99
99
|
return None
|
|
100
100
|
|
|
@@ -0,0 +1,105 @@
|
|
|
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,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: revengai
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.86.0
|
|
4
4
|
Summary: RevEng.AI API
|
|
5
5
|
Project-URL: Repository, https://github.com/RevEngAI/revengai-python
|
|
6
6
|
Keywords: RevEng.AI API
|
|
@@ -59,6 +59,7 @@ Class | Method | HTTP request | Description
|
|
|
59
59
|
*AnalysesCommentsApi* | [**delete_analysis_comment**](docs/AnalysesCommentsApi.md#delete_analysis_comment) | **DELETE** /v2/analyses/{analysis_id}/comments/{comment_id} | Delete a comment
|
|
60
60
|
*AnalysesCommentsApi* | [**get_analysis_comments**](docs/AnalysesCommentsApi.md#get_analysis_comments) | **GET** /v2/analyses/{analysis_id}/comments | Get comments for this analysis
|
|
61
61
|
*AnalysesCommentsApi* | [**update_analysis_comment**](docs/AnalysesCommentsApi.md#update_analysis_comment) | **PATCH** /v2/analyses/{analysis_id}/comments/{comment_id} | Update a comment
|
|
62
|
+
*AnalysesCoreApi* | [**batch_symbol_ann**](docs/AnalysesCoreApi.md#batch_symbol_ann) | **POST** /v1/ann/symbol/batch | Batch Symbol ANN using function IDs
|
|
62
63
|
*AnalysesCoreApi* | [**create_analysis**](docs/AnalysesCoreApi.md#create_analysis) | **POST** /v2/analyses | Create Analysis
|
|
63
64
|
*AnalysesCoreApi* | [**delete_analysis**](docs/AnalysesCoreApi.md#delete_analysis) | **DELETE** /v2/analyses/{analysis_id} | Delete Analysis
|
|
64
65
|
*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
|
|
@@ -173,7 +174,6 @@ Class | Method | HTTP request | Description
|
|
|
173
174
|
|
|
174
175
|
## Documentation For Models
|
|
175
176
|
|
|
176
|
-
- [ANNFunction](docs/ANNFunction.md)
|
|
177
177
|
- [Addr](docs/Addr.md)
|
|
178
178
|
- [AiDecompilationRating](docs/AiDecompilationRating.md)
|
|
179
179
|
- [AiUnstripRequest](docs/AiUnstripRequest.md)
|
|
@@ -192,12 +192,14 @@ Class | Method | HTTP request | Description
|
|
|
192
192
|
- [AnalysisUpdateRequest](docs/AnalysisUpdateRequest.md)
|
|
193
193
|
- [AnalysisUpdateTagsRequest](docs/AnalysisUpdateTagsRequest.md)
|
|
194
194
|
- [AnalysisUpdateTagsResponse](docs/AnalysisUpdateTagsResponse.md)
|
|
195
|
+
- [AppApiRestV1AnnSchemaANNFunction](docs/AppApiRestV1AnnSchemaANNFunction.md)
|
|
195
196
|
- [AppApiRestV2AnalysesEnumsDynamicExecutionStatus](docs/AppApiRestV2AnalysesEnumsDynamicExecutionStatus.md)
|
|
196
197
|
- [AppApiRestV2AnalysesEnumsOrderBy](docs/AppApiRestV2AnalysesEnumsOrderBy.md)
|
|
197
198
|
- [AppApiRestV2AnalysesResponsesTagItem](docs/AppApiRestV2AnalysesResponsesTagItem.md)
|
|
198
199
|
- [AppApiRestV2CollectionsEnumsOrderBy](docs/AppApiRestV2CollectionsEnumsOrderBy.md)
|
|
199
200
|
- [AppApiRestV2FunctionsResponsesFunction](docs/AppApiRestV2FunctionsResponsesFunction.md)
|
|
200
201
|
- [AppApiRestV2FunctionsTypesFunction](docs/AppApiRestV2FunctionsTypesFunction.md)
|
|
202
|
+
- [AppApiRestV2SimilaritySchemaANNFunction](docs/AppApiRestV2SimilaritySchemaANNFunction.md)
|
|
201
203
|
- [AppServicesBinaryAnnSchemaTagItem](docs/AppServicesBinaryAnnSchemaTagItem.md)
|
|
202
204
|
- [AppServicesDynamicExecutionSchemasDynamicExecutionStatus](docs/AppServicesDynamicExecutionSchemasDynamicExecutionStatus.md)
|
|
203
205
|
- [Argument](docs/Argument.md)
|
|
@@ -347,6 +349,7 @@ Class | Method | HTTP request | Description
|
|
|
347
349
|
- [FileMetadata](docs/FileMetadata.md)
|
|
348
350
|
- [Filters](docs/Filters.md)
|
|
349
351
|
- [FunctionAnalysisThreatScoreData](docs/FunctionAnalysisThreatScoreData.md)
|
|
352
|
+
- [FunctionBatchAnn](docs/FunctionBatchAnn.md)
|
|
350
353
|
- [FunctionBlockDestinationResponse](docs/FunctionBlockDestinationResponse.md)
|
|
351
354
|
- [FunctionBlockResponse](docs/FunctionBlockResponse.md)
|
|
352
355
|
- [FunctionBlocksResponse](docs/FunctionBlocksResponse.md)
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
revengai/__init__.py,sha256=
|
|
2
|
-
revengai/api_client.py,sha256=
|
|
1
|
+
revengai/__init__.py,sha256=b9yuw2wu9iVAcq2az2XMIZ2GmkNor0YpHo5MyGTEGXQ,43177
|
|
2
|
+
revengai/api_client.py,sha256=cRVOtlFvWH5sI5QAIgcynvjGFRgkElhUXk2wjUmHEp8,27670
|
|
3
3
|
revengai/api_response.py,sha256=eMxw1mpmJcoGZ3gs9z6jM4oYoZ10Gjk333s9sKxGv7s,652
|
|
4
|
-
revengai/configuration.py,sha256=
|
|
4
|
+
revengai/configuration.py,sha256=FB2PWD1OL9-rdvsh9iWLocTnlyATo6df5qiEzPovqpE,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
|
|
8
8
|
revengai/api/__init__.py,sha256=KS_1v_pNTcR2cIzEuwGEFq0f_-HmC6aGSgb1qaq2k90,1396
|
|
9
9
|
revengai/api/analyses_comments_api.py,sha256=L6NuM8bS3NJRt1b3WKdnZlYVE0YgdcZivNwGuQe5Gb4,49575
|
|
10
|
-
revengai/api/analyses_core_api.py,sha256=
|
|
10
|
+
revengai/api/analyses_core_api.py,sha256=NepmPQlWZ2YnBpAPHoK0rXjvsgw6lWjghaJWd8v-Sk0,197484
|
|
11
11
|
revengai/api/analyses_dynamic_execution_api.py,sha256=4vNnupRsuwNVNk7cPa-VFx2nnLtrokJpHu4YUOPwX_o,77682
|
|
12
12
|
revengai/api/analyses_results_metadata_api.py,sha256=NlwPugWgnvFLcth_p4DRk8kwBk76offi7y9zxHL5mxk,90181
|
|
13
13
|
revengai/api/analyses_security_checks_api.py,sha256=b1phfsLDO2kvmLaYtGjMVUkHUhRp63EEN3aJvTyX16o,35691
|
|
@@ -26,7 +26,7 @@ revengai/api/functions_renaming_history_api.py,sha256=L2CDadLnZrA0oNxhJfTSLLiMDz
|
|
|
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=A40qaEs21K8MhzEhH-IEdR3ZnKRzpJkN9_yj-pYnH7I,23238
|
|
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
|
|
@@ -45,13 +45,14 @@ revengai/models/analysis_threat_score_data.py,sha256=1bCfJF-PyKsy6tW7JH-RyouW7bH
|
|
|
45
45
|
revengai/models/analysis_update_request.py,sha256=J4IulQ18iPHjrDMpLn9_NzMg99_W7jS8eCK17feVAtE,3403
|
|
46
46
|
revengai/models/analysis_update_tags_request.py,sha256=nrJwzS_Yg3SOkvrRcGW6eWfoG_FZn4l9dAZpRQNbV7A,2436
|
|
47
47
|
revengai/models/analysis_update_tags_response.py,sha256=KRNesNAW57hCPatnsy7ACBZORuKvWfd2XITFLwqtdbA,2936
|
|
48
|
-
revengai/models/
|
|
48
|
+
revengai/models/app_api_rest_v1_ann_schema_ann_function.py,sha256=5nu-WjnyTP76Rz3IgMjw-YkuGWAlrtWknoiPWje_gec,5556
|
|
49
49
|
revengai/models/app_api_rest_v2_analyses_enums_dynamic_execution_status.py,sha256=x8VdW5OBlfoIoz3IV1HLN-SxeFh7798x6bHIggz7jF8,805
|
|
50
50
|
revengai/models/app_api_rest_v2_analyses_enums_order_by.py,sha256=Wpv3tfyAeBzN5_jkk4tBtYlJvUn8h0qudg4bvzBtKh8,739
|
|
51
51
|
revengai/models/app_api_rest_v2_analyses_responses_tag_item.py,sha256=Clh9pPBQKqeqeRiOZG4Fbh77pLPyKMCH3r3nU8Ej0Pc,2921
|
|
52
52
|
revengai/models/app_api_rest_v2_collections_enums_order_by.py,sha256=IVV9Auj0-HwTYYI0ZvJv-P3ciLOkq0l7MOyy0A5s92I,846
|
|
53
53
|
revengai/models/app_api_rest_v2_functions_responses_function.py,sha256=tZrWMSf_1tfRg-3P0x5VI-H2njrIMyYazLSIwjzlsoQ,2627
|
|
54
54
|
revengai/models/app_api_rest_v2_functions_types_function.py,sha256=_5c3oqbCqBO7ubRdycgt6yyxrHCKneibiWlNyoG1Uvc,3869
|
|
55
|
+
revengai/models/app_api_rest_v2_similarity_schema_ann_function.py,sha256=atfQz2txuf_4MdDNFsnZabN_vMOGMnoyDjElT4VeAwY,5258
|
|
55
56
|
revengai/models/app_services_binary_ann_schema_tag_item.py,sha256=m25sIz8KEsPES0XGjmOZFhmLNLmB-jsakfRUpRfiMks,2977
|
|
56
57
|
revengai/models/app_services_dynamic_execution_schemas_dynamic_execution_status.py,sha256=9e3LDnw0iNCbowQPFTkNyIqkzsCQyJLZrx6tqRska6o,2562
|
|
57
58
|
revengai/models/argument.py,sha256=QmWpJiohyzTVC1GLHg1IlgM5QyONnBF6FGK_mOYQL_Y,3148
|
|
@@ -201,6 +202,7 @@ revengai/models/file_hashes.py,sha256=vAjMRVvB9GBGar-FZiV8VkG_h0304S7UNEg0aclT9P
|
|
|
201
202
|
revengai/models/file_metadata.py,sha256=BK3oI8Iat5leNewoD8ApE5iH-wrffCAi1lNXbM5RVRE,2954
|
|
202
203
|
revengai/models/filters.py,sha256=BO4gsERH6_P4gsRcbleZNHFNeyg7N5ir6mTIsQbXwdM,758
|
|
203
204
|
revengai/models/function_analysis_threat_score_data.py,sha256=QixPeMcTvWOm4-ekkNsiPJkWW0iUePZ6qvAZ-h3Ds5k,3532
|
|
205
|
+
revengai/models/function_batch_ann.py,sha256=85ems0hvPJVsMH89BuT7TPmqxIAVBci5ZPNBEFdN1tw,3291
|
|
204
206
|
revengai/models/function_block_destination_response.py,sha256=ffcxW67TIbLkO8P8D9_quP7J9T_PIgCZZXNSRIEii0I,3130
|
|
205
207
|
revengai/models/function_block_response.py,sha256=KxnssvtH_MUvgQH358TfVZofVKyRHQYftMX36N2zdBY,3960
|
|
206
208
|
revengai/models/function_blocks_response.py,sha256=8Eu3jA9GKCXVNX7viu3OQxJNsqUZMxBlg498eJ9HFA4,4847
|
|
@@ -331,6 +333,6 @@ revengai/models/vulnerabilities.py,sha256=9t6uoZd3svWyfcZJjmj6zP731Dp47Apb25y8Qt
|
|
|
331
333
|
revengai/models/vulnerability.py,sha256=P7rAOAYU5JLLpcRr824-YJgZba5kPb_J9ALV3tSNfLQ,3688
|
|
332
334
|
revengai/models/vulnerability_type.py,sha256=SyOgfMmELYYc_H84oPkikBpjwngtG5Qw9Q_86a2TPr8,866
|
|
333
335
|
revengai/models/workspace.py,sha256=chjU62GFvByEmaNd6luMNQVQLP3wlPx1zJgGJ_yyMLA,676
|
|
334
|
-
revengai-1.
|
|
335
|
-
revengai-1.
|
|
336
|
-
revengai-1.
|
|
336
|
+
revengai-1.86.0.dist-info/METADATA,sha256=NDWb-sx3_UK__alTKD37NVQr7GSWhTeeA0FB5WI8om8,41570
|
|
337
|
+
revengai-1.86.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
338
|
+
revengai-1.86.0.dist-info/RECORD,,
|
|
File without changes
|