revengai 1.75.0__py3-none-any.whl → 1.79.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 CHANGED
@@ -13,7 +13,7 @@
13
13
  """ # noqa: E501
14
14
 
15
15
 
16
- __version__ = "v1.75.0"
16
+ __version__ = "v1.79.0"
17
17
 
18
18
  # Define package exports
19
19
  __all__ = [
@@ -55,6 +55,7 @@ __all__ = [
55
55
  "AnalysisCreateRequest",
56
56
  "AnalysisCreateResponse",
57
57
  "AnalysisDetailResponse",
58
+ "AnalysisFunctionMapping",
58
59
  "AnalysisFunctions",
59
60
  "AnalysisRecord",
60
61
  "AnalysisScope",
@@ -79,6 +80,7 @@ __all__ = [
79
80
  "BaseResponse",
80
81
  "BaseResponseAnalysisCreateResponse",
81
82
  "BaseResponseAnalysisDetailResponse",
83
+ "BaseResponseAnalysisFunctionMapping",
82
84
  "BaseResponseAnalysisFunctions",
83
85
  "BaseResponseAnalysisStringsResponse",
84
86
  "BaseResponseAnalysisTags",
@@ -238,6 +240,7 @@ __all__ = [
238
240
  "FunctionInfoInputFuncDepsInner",
239
241
  "FunctionInfoOutput",
240
242
  "FunctionLocalVariableResponse",
243
+ "FunctionMapping",
241
244
  "FunctionMappingFull",
242
245
  "FunctionNameConfidenceBody",
243
246
  "FunctionNameHistory",
@@ -398,6 +401,7 @@ from revengai.models.analysis_config import AnalysisConfig as AnalysisConfig
398
401
  from revengai.models.analysis_create_request import AnalysisCreateRequest as AnalysisCreateRequest
399
402
  from revengai.models.analysis_create_response import AnalysisCreateResponse as AnalysisCreateResponse
400
403
  from revengai.models.analysis_detail_response import AnalysisDetailResponse as AnalysisDetailResponse
404
+ from revengai.models.analysis_function_mapping import AnalysisFunctionMapping as AnalysisFunctionMapping
401
405
  from revengai.models.analysis_functions import AnalysisFunctions as AnalysisFunctions
402
406
  from revengai.models.analysis_record import AnalysisRecord as AnalysisRecord
403
407
  from revengai.models.analysis_scope import AnalysisScope as AnalysisScope
@@ -422,6 +426,7 @@ from revengai.models.auto_unstrip_response import AutoUnstripResponse as AutoUns
422
426
  from revengai.models.base_response import BaseResponse as BaseResponse
423
427
  from revengai.models.base_response_analysis_create_response import BaseResponseAnalysisCreateResponse as BaseResponseAnalysisCreateResponse
424
428
  from revengai.models.base_response_analysis_detail_response import BaseResponseAnalysisDetailResponse as BaseResponseAnalysisDetailResponse
429
+ from revengai.models.base_response_analysis_function_mapping import BaseResponseAnalysisFunctionMapping as BaseResponseAnalysisFunctionMapping
425
430
  from revengai.models.base_response_analysis_functions import BaseResponseAnalysisFunctions as BaseResponseAnalysisFunctions
426
431
  from revengai.models.base_response_analysis_strings_response import BaseResponseAnalysisStringsResponse as BaseResponseAnalysisStringsResponse
427
432
  from revengai.models.base_response_analysis_tags import BaseResponseAnalysisTags as BaseResponseAnalysisTags
@@ -581,6 +586,7 @@ from revengai.models.function_info_input import FunctionInfoInput as FunctionInf
581
586
  from revengai.models.function_info_input_func_deps_inner import FunctionInfoInputFuncDepsInner as FunctionInfoInputFuncDepsInner
582
587
  from revengai.models.function_info_output import FunctionInfoOutput as FunctionInfoOutput
583
588
  from revengai.models.function_local_variable_response import FunctionLocalVariableResponse as FunctionLocalVariableResponse
589
+ from revengai.models.function_mapping import FunctionMapping as FunctionMapping
584
590
  from revengai.models.function_mapping_full import FunctionMappingFull as FunctionMappingFull
585
591
  from revengai.models.function_name_confidence_body import FunctionNameConfidenceBody as FunctionNameConfidenceBody
586
592
  from revengai.models.function_name_history import FunctionNameHistory as FunctionNameHistory
@@ -25,6 +25,7 @@ from revengai.models.analysis_update_tags_request import AnalysisUpdateTagsReque
25
25
  from revengai.models.app_api_rest_v2_analyses_enums_order_by import AppApiRestV2AnalysesEnumsOrderBy
26
26
  from revengai.models.base_response_analysis_create_response import BaseResponseAnalysisCreateResponse
27
27
  from revengai.models.base_response_analysis_detail_response import BaseResponseAnalysisDetailResponse
28
+ from revengai.models.base_response_analysis_function_mapping import BaseResponseAnalysisFunctionMapping
28
29
  from revengai.models.base_response_analysis_update_tags_response import BaseResponseAnalysisUpdateTagsResponse
29
30
  from revengai.models.base_response_basic import BaseResponseBasic
30
31
  from revengai.models.base_response_binary_ann_list_response import BaseResponseBinaryAnnListResponse
@@ -1233,6 +1234,285 @@ class AnalysesCoreApi:
1233
1234
 
1234
1235
 
1235
1236
 
1237
+ @validate_call
1238
+ def get_analysis_function_map(
1239
+ self,
1240
+ analysis_id: StrictInt,
1241
+ authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = None,
1242
+ _request_timeout: Union[
1243
+ None,
1244
+ Annotated[StrictFloat, Field(gt=0)],
1245
+ Tuple[
1246
+ Annotated[StrictFloat, Field(gt=0)],
1247
+ Annotated[StrictFloat, Field(gt=0)]
1248
+ ]
1249
+ ] = None,
1250
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1251
+ _content_type: Optional[StrictStr] = None,
1252
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1253
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1254
+ ) -> BaseResponseAnalysisFunctionMapping:
1255
+ """Get Analysis Function Map
1256
+
1257
+ Returns three maps: a map of function ids to function addresses, it's inverse and a map of function addresses to function names.
1258
+
1259
+ :param analysis_id: (required)
1260
+ :type analysis_id: int
1261
+ :param authorization: API Key bearer token
1262
+ :type authorization: str
1263
+ :param _request_timeout: timeout setting for this request. If one
1264
+ number provided, it will be total request
1265
+ timeout. It can also be a pair (tuple) of
1266
+ (connection, read) timeouts.
1267
+ :type _request_timeout: int, tuple(int, int), optional
1268
+ :param _request_auth: set to override the auth_settings for an a single
1269
+ request; this effectively ignores the
1270
+ authentication in the spec for a single request.
1271
+ :type _request_auth: dict, optional
1272
+ :param _content_type: force content-type for the request.
1273
+ :type _content_type: str, Optional
1274
+ :param _headers: set to override the headers for a single
1275
+ request; this effectively ignores the headers
1276
+ in the spec for a single request.
1277
+ :type _headers: dict, optional
1278
+ :param _host_index: set to override the host_index for a single
1279
+ request; this effectively ignores the host_index
1280
+ in the spec for a single request.
1281
+ :type _host_index: int, optional
1282
+ :return: Returns the result object.
1283
+ """ # noqa: E501
1284
+
1285
+ _param = self._get_analysis_function_map_serialize(
1286
+ analysis_id=analysis_id,
1287
+ authorization=authorization,
1288
+ _request_auth=_request_auth,
1289
+ _content_type=_content_type,
1290
+ _headers=_headers,
1291
+ _host_index=_host_index
1292
+ )
1293
+
1294
+ _response_types_map: Dict[str, Optional[str]] = {
1295
+ '200': "BaseResponseAnalysisFunctionMapping",
1296
+ '422': "BaseResponse",
1297
+ }
1298
+ response_data = self.api_client.call_api(
1299
+ *_param,
1300
+ _request_timeout=_request_timeout
1301
+ )
1302
+ response_data.read()
1303
+ return self.api_client.response_deserialize(
1304
+ response_data=response_data,
1305
+ response_types_map=_response_types_map,
1306
+ ).data
1307
+
1308
+
1309
+ @validate_call
1310
+ def get_analysis_function_map_with_http_info(
1311
+ self,
1312
+ analysis_id: StrictInt,
1313
+ authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = None,
1314
+ _request_timeout: Union[
1315
+ None,
1316
+ Annotated[StrictFloat, Field(gt=0)],
1317
+ Tuple[
1318
+ Annotated[StrictFloat, Field(gt=0)],
1319
+ Annotated[StrictFloat, Field(gt=0)]
1320
+ ]
1321
+ ] = None,
1322
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1323
+ _content_type: Optional[StrictStr] = None,
1324
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1325
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1326
+ ) -> ApiResponse[BaseResponseAnalysisFunctionMapping]:
1327
+ """Get Analysis Function Map
1328
+
1329
+ Returns three maps: a map of function ids to function addresses, it's inverse and a map of function addresses to function names.
1330
+
1331
+ :param analysis_id: (required)
1332
+ :type analysis_id: int
1333
+ :param authorization: API Key bearer token
1334
+ :type authorization: str
1335
+ :param _request_timeout: timeout setting for this request. If one
1336
+ number provided, it will be total request
1337
+ timeout. It can also be a pair (tuple) of
1338
+ (connection, read) timeouts.
1339
+ :type _request_timeout: int, tuple(int, int), optional
1340
+ :param _request_auth: set to override the auth_settings for an a single
1341
+ request; this effectively ignores the
1342
+ authentication in the spec for a single request.
1343
+ :type _request_auth: dict, optional
1344
+ :param _content_type: force content-type for the request.
1345
+ :type _content_type: str, Optional
1346
+ :param _headers: set to override the headers for a single
1347
+ request; this effectively ignores the headers
1348
+ in the spec for a single request.
1349
+ :type _headers: dict, optional
1350
+ :param _host_index: set to override the host_index for a single
1351
+ request; this effectively ignores the host_index
1352
+ in the spec for a single request.
1353
+ :type _host_index: int, optional
1354
+ :return: Returns the result object.
1355
+ """ # noqa: E501
1356
+
1357
+ _param = self._get_analysis_function_map_serialize(
1358
+ analysis_id=analysis_id,
1359
+ authorization=authorization,
1360
+ _request_auth=_request_auth,
1361
+ _content_type=_content_type,
1362
+ _headers=_headers,
1363
+ _host_index=_host_index
1364
+ )
1365
+
1366
+ _response_types_map: Dict[str, Optional[str]] = {
1367
+ '200': "BaseResponseAnalysisFunctionMapping",
1368
+ '422': "BaseResponse",
1369
+ }
1370
+ response_data = self.api_client.call_api(
1371
+ *_param,
1372
+ _request_timeout=_request_timeout
1373
+ )
1374
+ response_data.read()
1375
+ return self.api_client.response_deserialize(
1376
+ response_data=response_data,
1377
+ response_types_map=_response_types_map,
1378
+ )
1379
+
1380
+
1381
+ @validate_call
1382
+ def get_analysis_function_map_without_preload_content(
1383
+ self,
1384
+ analysis_id: StrictInt,
1385
+ authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = None,
1386
+ _request_timeout: Union[
1387
+ None,
1388
+ Annotated[StrictFloat, Field(gt=0)],
1389
+ Tuple[
1390
+ Annotated[StrictFloat, Field(gt=0)],
1391
+ Annotated[StrictFloat, Field(gt=0)]
1392
+ ]
1393
+ ] = None,
1394
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1395
+ _content_type: Optional[StrictStr] = None,
1396
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1397
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1398
+ ) -> RESTResponseType:
1399
+ """Get Analysis Function Map
1400
+
1401
+ Returns three maps: a map of function ids to function addresses, it's inverse and a map of function addresses to function names.
1402
+
1403
+ :param analysis_id: (required)
1404
+ :type analysis_id: int
1405
+ :param authorization: API Key bearer token
1406
+ :type authorization: str
1407
+ :param _request_timeout: timeout setting for this request. If one
1408
+ number provided, it will be total request
1409
+ timeout. It can also be a pair (tuple) of
1410
+ (connection, read) timeouts.
1411
+ :type _request_timeout: int, tuple(int, int), optional
1412
+ :param _request_auth: set to override the auth_settings for an a single
1413
+ request; this effectively ignores the
1414
+ authentication in the spec for a single request.
1415
+ :type _request_auth: dict, optional
1416
+ :param _content_type: force content-type for the request.
1417
+ :type _content_type: str, Optional
1418
+ :param _headers: set to override the headers for a single
1419
+ request; this effectively ignores the headers
1420
+ in the spec for a single request.
1421
+ :type _headers: dict, optional
1422
+ :param _host_index: set to override the host_index for a single
1423
+ request; this effectively ignores the host_index
1424
+ in the spec for a single request.
1425
+ :type _host_index: int, optional
1426
+ :return: Returns the result object.
1427
+ """ # noqa: E501
1428
+
1429
+ _param = self._get_analysis_function_map_serialize(
1430
+ analysis_id=analysis_id,
1431
+ authorization=authorization,
1432
+ _request_auth=_request_auth,
1433
+ _content_type=_content_type,
1434
+ _headers=_headers,
1435
+ _host_index=_host_index
1436
+ )
1437
+
1438
+ _response_types_map: Dict[str, Optional[str]] = {
1439
+ '200': "BaseResponseAnalysisFunctionMapping",
1440
+ '422': "BaseResponse",
1441
+ }
1442
+ response_data = self.api_client.call_api(
1443
+ *_param,
1444
+ _request_timeout=_request_timeout
1445
+ )
1446
+ return response_data.response
1447
+
1448
+
1449
+ def _get_analysis_function_map_serialize(
1450
+ self,
1451
+ analysis_id,
1452
+ authorization,
1453
+ _request_auth,
1454
+ _content_type,
1455
+ _headers,
1456
+ _host_index,
1457
+ ) -> RequestSerialized:
1458
+
1459
+ _host = None
1460
+
1461
+ _collection_formats: Dict[str, str] = {
1462
+ }
1463
+
1464
+ _path_params: Dict[str, str] = {}
1465
+ _query_params: List[Tuple[str, str]] = []
1466
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1467
+ _form_params: List[Tuple[str, str]] = []
1468
+ _files: Dict[
1469
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1470
+ ] = {}
1471
+ _body_params: Optional[bytes] = None
1472
+
1473
+ # process the path parameters
1474
+ if analysis_id is not None:
1475
+ _path_params['analysis_id'] = analysis_id
1476
+ # process the query parameters
1477
+ # process the header parameters
1478
+ if authorization is not None:
1479
+ _header_params['authorization'] = authorization
1480
+ # process the form parameters
1481
+ # process the body parameter
1482
+
1483
+
1484
+ # set the HTTP header `Accept`
1485
+ if 'Accept' not in _header_params:
1486
+ _header_params['Accept'] = self.api_client.select_header_accept(
1487
+ [
1488
+ 'application/json'
1489
+ ]
1490
+ )
1491
+
1492
+
1493
+ # authentication setting
1494
+ _auth_settings: List[str] = [
1495
+ 'APIKey'
1496
+ ]
1497
+
1498
+ return self.api_client.param_serialize(
1499
+ method='GET',
1500
+ resource_path='/v2/analyses/{analysis_id}/func_maps',
1501
+ path_params=_path_params,
1502
+ query_params=_query_params,
1503
+ header_params=_header_params,
1504
+ body=_body_params,
1505
+ post_params=_form_params,
1506
+ files=_files,
1507
+ auth_settings=_auth_settings,
1508
+ collection_formats=_collection_formats,
1509
+ _host=_host,
1510
+ _request_auth=_request_auth
1511
+ )
1512
+
1513
+
1514
+
1515
+
1236
1516
  @validate_call
1237
1517
  def get_analysis_logs(
1238
1518
  self,
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.75.0/python'
93
+ self.user_agent = 'OpenAPI-Generator/v1.79.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.75.0\n"\
533
- "SDK Package Version: v1.75.0".\
532
+ "Version of the API: v1.79.0\n"\
533
+ "SDK Package Version: v1.79.0".\
534
534
  format(env=sys.platform, pyversion=sys.version)
535
535
 
536
536
  def get_host_settings(self) -> List[HostSetting]:
@@ -21,6 +21,7 @@ from revengai.models.analysis_config import AnalysisConfig
21
21
  from revengai.models.analysis_create_request import AnalysisCreateRequest
22
22
  from revengai.models.analysis_create_response import AnalysisCreateResponse
23
23
  from revengai.models.analysis_detail_response import AnalysisDetailResponse
24
+ from revengai.models.analysis_function_mapping import AnalysisFunctionMapping
24
25
  from revengai.models.analysis_functions import AnalysisFunctions
25
26
  from revengai.models.analysis_record import AnalysisRecord
26
27
  from revengai.models.analysis_scope import AnalysisScope
@@ -45,6 +46,7 @@ from revengai.models.auto_unstrip_response import AutoUnstripResponse
45
46
  from revengai.models.base_response import BaseResponse
46
47
  from revengai.models.base_response_analysis_create_response import BaseResponseAnalysisCreateResponse
47
48
  from revengai.models.base_response_analysis_detail_response import BaseResponseAnalysisDetailResponse
49
+ from revengai.models.base_response_analysis_function_mapping import BaseResponseAnalysisFunctionMapping
48
50
  from revengai.models.base_response_analysis_functions import BaseResponseAnalysisFunctions
49
51
  from revengai.models.base_response_analysis_strings_response import BaseResponseAnalysisStringsResponse
50
52
  from revengai.models.base_response_analysis_tags import BaseResponseAnalysisTags
@@ -204,6 +206,7 @@ from revengai.models.function_info_input import FunctionInfoInput
204
206
  from revengai.models.function_info_input_func_deps_inner import FunctionInfoInputFuncDepsInner
205
207
  from revengai.models.function_info_output import FunctionInfoOutput
206
208
  from revengai.models.function_local_variable_response import FunctionLocalVariableResponse
209
+ from revengai.models.function_mapping import FunctionMapping
207
210
  from revengai.models.function_mapping_full import FunctionMappingFull
208
211
  from revengai.models.function_name_confidence_body import FunctionNameConfidenceBody
209
212
  from revengai.models.function_name_history import FunctionNameHistory
@@ -0,0 +1,90 @@
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
20
+ from typing import Any, ClassVar, Dict, List
21
+ from revengai.models.function_mapping import FunctionMapping
22
+ from typing import Optional, Set
23
+ from typing_extensions import Self
24
+
25
+ class AnalysisFunctionMapping(BaseModel):
26
+ """
27
+ AnalysisFunctionMapping
28
+ """ # noqa: E501
29
+ function_maps: FunctionMapping = Field(description="A map of function ids to function addresses for the analysis, and it's inverse.")
30
+ __properties: ClassVar[List[str]] = ["function_maps"]
31
+
32
+ model_config = ConfigDict(
33
+ populate_by_name=True,
34
+ validate_assignment=True,
35
+ protected_namespaces=(),
36
+ )
37
+
38
+
39
+ def to_str(self) -> str:
40
+ """Returns the string representation of the model using alias"""
41
+ return pprint.pformat(self.model_dump(by_alias=True))
42
+
43
+ def to_json(self) -> str:
44
+ """Returns the JSON representation of the model using alias"""
45
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
46
+ return json.dumps(self.to_dict())
47
+
48
+ @classmethod
49
+ def from_json(cls, json_str: str) -> Optional[Self]:
50
+ """Create an instance of AnalysisFunctionMapping from a JSON string"""
51
+ return cls.from_dict(json.loads(json_str))
52
+
53
+ def to_dict(self) -> Dict[str, Any]:
54
+ """Return the dictionary representation of the model using alias.
55
+
56
+ This has the following differences from calling pydantic's
57
+ `self.model_dump(by_alias=True)`:
58
+
59
+ * `None` is only added to the output dict for nullable fields that
60
+ were set at model initialization. Other fields with value `None`
61
+ are ignored.
62
+ """
63
+ excluded_fields: Set[str] = set([
64
+ ])
65
+
66
+ _dict = self.model_dump(
67
+ by_alias=True,
68
+ exclude=excluded_fields,
69
+ exclude_none=True,
70
+ )
71
+ # override the default output from pydantic by calling `to_dict()` of function_maps
72
+ if self.function_maps:
73
+ _dict['function_maps'] = self.function_maps.to_dict()
74
+ return _dict
75
+
76
+ @classmethod
77
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
78
+ """Create an instance of AnalysisFunctionMapping from a dict"""
79
+ if obj is None:
80
+ return None
81
+
82
+ if not isinstance(obj, dict):
83
+ return cls.model_validate(obj)
84
+
85
+ _obj = cls.model_validate({
86
+ "function_maps": FunctionMapping.from_dict(obj["function_maps"]) if obj.get("function_maps") is not None else None
87
+ })
88
+ return _obj
89
+
90
+
@@ -0,0 +1,125 @@
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, StrictStr
20
+ from typing import Any, ClassVar, Dict, List, Optional
21
+ from revengai.models.analysis_function_mapping import AnalysisFunctionMapping
22
+ from revengai.models.error_model import ErrorModel
23
+ from revengai.models.meta_model import MetaModel
24
+ from typing import Optional, Set
25
+ from typing_extensions import Self
26
+
27
+ class BaseResponseAnalysisFunctionMapping(BaseModel):
28
+ """
29
+ BaseResponseAnalysisFunctionMapping
30
+ """ # noqa: E501
31
+ status: Optional[StrictBool] = Field(default=True, description="Response status on whether the request succeeded")
32
+ data: Optional[AnalysisFunctionMapping] = None
33
+ message: Optional[StrictStr] = None
34
+ errors: Optional[List[ErrorModel]] = None
35
+ meta: Optional[MetaModel] = Field(default=None, description="Metadata")
36
+ __properties: ClassVar[List[str]] = ["status", "data", "message", "errors", "meta"]
37
+
38
+ model_config = ConfigDict(
39
+ populate_by_name=True,
40
+ validate_assignment=True,
41
+ protected_namespaces=(),
42
+ )
43
+
44
+
45
+ def to_str(self) -> str:
46
+ """Returns the string representation of the model using alias"""
47
+ return pprint.pformat(self.model_dump(by_alias=True))
48
+
49
+ def to_json(self) -> str:
50
+ """Returns the JSON representation of the model using alias"""
51
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
52
+ return json.dumps(self.to_dict())
53
+
54
+ @classmethod
55
+ def from_json(cls, json_str: str) -> Optional[Self]:
56
+ """Create an instance of BaseResponseAnalysisFunctionMapping from a JSON string"""
57
+ return cls.from_dict(json.loads(json_str))
58
+
59
+ def to_dict(self) -> Dict[str, Any]:
60
+ """Return the dictionary representation of the model using alias.
61
+
62
+ This has the following differences from calling pydantic's
63
+ `self.model_dump(by_alias=True)`:
64
+
65
+ * `None` is only added to the output dict for nullable fields that
66
+ were set at model initialization. Other fields with value `None`
67
+ are ignored.
68
+ """
69
+ excluded_fields: Set[str] = set([
70
+ ])
71
+
72
+ _dict = self.model_dump(
73
+ by_alias=True,
74
+ exclude=excluded_fields,
75
+ exclude_none=True,
76
+ )
77
+ # override the default output from pydantic by calling `to_dict()` of data
78
+ if self.data:
79
+ _dict['data'] = self.data.to_dict()
80
+ # override the default output from pydantic by calling `to_dict()` of each item in errors (list)
81
+ _items = []
82
+ if self.errors:
83
+ for _item_errors in self.errors:
84
+ if _item_errors:
85
+ _items.append(_item_errors.to_dict())
86
+ _dict['errors'] = _items
87
+ # override the default output from pydantic by calling `to_dict()` of meta
88
+ if self.meta:
89
+ _dict['meta'] = self.meta.to_dict()
90
+ # set to None if data (nullable) is None
91
+ # and model_fields_set contains the field
92
+ if self.data is None and "data" in self.model_fields_set:
93
+ _dict['data'] = None
94
+
95
+ # set to None if message (nullable) is None
96
+ # and model_fields_set contains the field
97
+ if self.message is None and "message" in self.model_fields_set:
98
+ _dict['message'] = None
99
+
100
+ # set to None if errors (nullable) is None
101
+ # and model_fields_set contains the field
102
+ if self.errors is None and "errors" in self.model_fields_set:
103
+ _dict['errors'] = None
104
+
105
+ return _dict
106
+
107
+ @classmethod
108
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
109
+ """Create an instance of BaseResponseAnalysisFunctionMapping from a dict"""
110
+ if obj is None:
111
+ return None
112
+
113
+ if not isinstance(obj, dict):
114
+ return cls.model_validate(obj)
115
+
116
+ _obj = cls.model_validate({
117
+ "status": obj.get("status") if obj.get("status") is not None else True,
118
+ "data": AnalysisFunctionMapping.from_dict(obj["data"]) if obj.get("data") is not None else None,
119
+ "message": obj.get("message"),
120
+ "errors": [ErrorModel.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None,
121
+ "meta": MetaModel.from_dict(obj["meta"]) if obj.get("meta") is not None else None
122
+ })
123
+ return _obj
124
+
125
+
@@ -0,0 +1,90 @@
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, StrictInt, StrictStr
20
+ from typing import Any, ClassVar, Dict, List
21
+ from typing import Optional, Set
22
+ from typing_extensions import Self
23
+
24
+ class FunctionMapping(BaseModel):
25
+ """
26
+ FunctionMapping
27
+ """ # noqa: E501
28
+ function_map: Dict[str, StrictInt] = Field(description="Mapping of remote function ids to local function addresses")
29
+ inverse_function_map: Dict[str, StrictInt] = Field(description="Mapping of local function addresses to remote function ids")
30
+ name_map: Dict[str, StrictStr] = Field(description="Mapping of local function addresses to function names")
31
+ __properties: ClassVar[List[str]] = ["function_map", "inverse_function_map", "name_map"]
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 FunctionMapping 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
+ return _dict
73
+
74
+ @classmethod
75
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
76
+ """Create an instance of FunctionMapping from a dict"""
77
+ if obj is None:
78
+ return None
79
+
80
+ if not isinstance(obj, dict):
81
+ return cls.model_validate(obj)
82
+
83
+ _obj = cls.model_validate({
84
+ "function_map": obj.get("function_map"),
85
+ "inverse_function_map": obj.get("inverse_function_map"),
86
+ "name_map": obj.get("name_map")
87
+ })
88
+ return _obj
89
+
90
+
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: revengai
3
- Version: 1.75.0
3
+ Version: 1.79.0
4
4
  Summary: RevEng.AI API
5
5
  Project-URL: Repository, https://github.com/RevEngAI/revengai-python
6
6
  Keywords: RevEng.AI API
@@ -63,6 +63,7 @@ Class | Method | HTTP request | Description
63
63
  *AnalysesCoreApi* | [**delete_analysis**](docs/AnalysesCoreApi.md#delete_analysis) | **DELETE** /v2/analyses/{analysis_id} | Delete Analysis
64
64
  *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
65
65
  *AnalysesCoreApi* | [**get_analysis_basic_info**](docs/AnalysesCoreApi.md#get_analysis_basic_info) | **GET** /v2/analyses/{analysis_id}/basic | Gets basic analysis information
66
+ *AnalysesCoreApi* | [**get_analysis_function_map**](docs/AnalysesCoreApi.md#get_analysis_function_map) | **GET** /v2/analyses/{analysis_id}/func_maps | Get Analysis Function Map
66
67
  *AnalysesCoreApi* | [**get_analysis_logs**](docs/AnalysesCoreApi.md#get_analysis_logs) | **GET** /v2/analyses/{analysis_id}/logs | Gets the logs of an analysis
67
68
  *AnalysesCoreApi* | [**get_analysis_params**](docs/AnalysesCoreApi.md#get_analysis_params) | **GET** /v2/analyses/{analysis_id}/params | Gets analysis param information
68
69
  *AnalysesCoreApi* | [**get_analysis_status**](docs/AnalysesCoreApi.md#get_analysis_status) | **GET** /v2/analyses/{analysis_id}/status | Gets the status of an analysis
@@ -183,6 +184,7 @@ Class | Method | HTTP request | Description
183
184
  - [AnalysisCreateRequest](docs/AnalysisCreateRequest.md)
184
185
  - [AnalysisCreateResponse](docs/AnalysisCreateResponse.md)
185
186
  - [AnalysisDetailResponse](docs/AnalysisDetailResponse.md)
187
+ - [AnalysisFunctionMapping](docs/AnalysisFunctionMapping.md)
186
188
  - [AnalysisFunctions](docs/AnalysisFunctions.md)
187
189
  - [AnalysisRecord](docs/AnalysisRecord.md)
188
190
  - [AnalysisScope](docs/AnalysisScope.md)
@@ -207,6 +209,7 @@ Class | Method | HTTP request | Description
207
209
  - [BaseResponse](docs/BaseResponse.md)
208
210
  - [BaseResponseAnalysisCreateResponse](docs/BaseResponseAnalysisCreateResponse.md)
209
211
  - [BaseResponseAnalysisDetailResponse](docs/BaseResponseAnalysisDetailResponse.md)
212
+ - [BaseResponseAnalysisFunctionMapping](docs/BaseResponseAnalysisFunctionMapping.md)
210
213
  - [BaseResponseAnalysisFunctions](docs/BaseResponseAnalysisFunctions.md)
211
214
  - [BaseResponseAnalysisStringsResponse](docs/BaseResponseAnalysisStringsResponse.md)
212
215
  - [BaseResponseAnalysisTags](docs/BaseResponseAnalysisTags.md)
@@ -366,6 +369,7 @@ Class | Method | HTTP request | Description
366
369
  - [FunctionInfoInputFuncDepsInner](docs/FunctionInfoInputFuncDepsInner.md)
367
370
  - [FunctionInfoOutput](docs/FunctionInfoOutput.md)
368
371
  - [FunctionLocalVariableResponse](docs/FunctionLocalVariableResponse.md)
372
+ - [FunctionMapping](docs/FunctionMapping.md)
369
373
  - [FunctionMappingFull](docs/FunctionMappingFull.md)
370
374
  - [FunctionNameConfidenceBody](docs/FunctionNameConfidenceBody.md)
371
375
  - [FunctionNameHistory](docs/FunctionNameHistory.md)
@@ -1,13 +1,13 @@
1
- revengai/__init__.py,sha256=wqiuncvn-Lsj_Osq-dCfx6hl35IbVsWYQirnjoG9YCA,43020
2
- revengai/api_client.py,sha256=rUGKBpd1u5jaSq9bfYJaqoG4FS-BiygkkjKF7oDgWZE,27670
1
+ revengai/__init__.py,sha256=9Q8-GB4zichj6cstzpItOS-qys9iRyYv800jhoS6GfQ,43445
2
+ revengai/api_client.py,sha256=LL1XBZAIdrL50Xry_WjUIexjz0dDszC0MAePnj589C8,27670
3
3
  revengai/api_response.py,sha256=eMxw1mpmJcoGZ3gs9z6jM4oYoZ10Gjk333s9sKxGv7s,652
4
- revengai/configuration.py,sha256=ZkyDl6hX788qITEg3c-cnEWBIpj_FBxfdYQ_dqvrJZI,18749
4
+ revengai/configuration.py,sha256=cawkDpwOdW1LGp2LcQDE_l01m2ZKBcOHJiN1Y7OmIQo,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=Kaz3uLxevn9UOxR7lOkLZVIcjl5AxUoB6hK7tn2KXBs,183627
10
+ revengai/api/analyses_core_api.py,sha256=lcnaGDlp921oDfF_3w5iXzPj8kg8ybp27X1LMGqHqt0,194954
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=VrEjMKQ6FdrKnid0zk7jghmgz2pZibPTwi3lnqsfA_c,23163
29
+ revengai/models/__init__.py,sha256=WeAm7NvfOAG1SuX-RgafRz4lbO1VtWqdyhIoqlKrlMw,23406
30
30
  revengai/models/addr.py,sha256=-2N-UQsOiZ0eyEAQ7ssk0of8W2fBrXeYdTZXuVt3SZs,4787
31
31
  revengai/models/ai_decompilation_rating.py,sha256=_Ucm2tiqUnnb5XjGSwAJ18ID0eZvGjVRqk-mL0SwJAI,698
32
32
  revengai/models/ai_unstrip_request.py,sha256=loSXNdHATJmY5yttiUCE-lLEOkuE63qVDTz8U0eCAIc,2596
@@ -35,6 +35,7 @@ revengai/models/analysis_config.py,sha256=AHM6VTaWJ69WfbANGqLOYjOmqCrcN-XO5rtv6q
35
35
  revengai/models/analysis_create_request.py,sha256=6hU94Fi47hrxXQ-wX1jRuDrDi1GQymEbjoZd9rqdS6U,5510
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
+ revengai/models/analysis_function_mapping.py,sha256=_8LOSaBOgsFKLeqvoizbU2FSHtekA7aNrM7deIJyM4k,2886
38
39
  revengai/models/analysis_functions.py,sha256=N1TKQuw33I9dw-i07kLus36k2bcAXQVm2oc1Ycfrgdw,3067
39
40
  revengai/models/analysis_record.py,sha256=L538tQRScvfk9tr3L_Vqo5PiLvK0jAbBTXanLyvmsJc,5013
40
41
  revengai/models/analysis_scope.py,sha256=azpsUux2axe4QKwQ4FbW30HbazYYVFP-e68F9zp33-4,668
@@ -60,6 +61,7 @@ revengai/models/auto_unstrip_response.py,sha256=Mu2GzeIc8vL2PRIdAT7BWzQa38PyhEzq
60
61
  revengai/models/base_response.py,sha256=U1Hwv1TXztjpxHxXGwGk46egAYs49jfzEfr1nTajMjg,4526
61
62
  revengai/models/base_response_analysis_create_response.py,sha256=bwA1vMqKgLUDcElBvuvTH2jo8tvx0mjfbMOnoniswbE,4682
62
63
  revengai/models/base_response_analysis_detail_response.py,sha256=233L-ucrjTQhgwKeqiwlxW_C_Vrp4u4_pikrCti1F7Y,4682
64
+ revengai/models/base_response_analysis_function_mapping.py,sha256=JiypPq36Om24A5xMlAw-J9KxtpU9y6-goKHjpEGNlTI,4690
63
65
  revengai/models/base_response_analysis_functions.py,sha256=73wAD-8VUh6dMuwnxSXi6_xZ9YCE-eUaeEKaUd3yTrY,4641
64
66
  revengai/models/base_response_analysis_strings_response.py,sha256=GAbjdsI625BY87KX502ZPvbC2xGcbyEcwNNVfrmATZU,4690
65
67
  revengai/models/base_response_analysis_tags.py,sha256=WbqupzDQHmEB1d1clDQnWUl3bQZzcogVrZ_SOtSsp-o,4601
@@ -219,6 +221,7 @@ revengai/models/function_info_input.py,sha256=w2WZ4xjp0nZ_gea4NrcMl5huksF-8QZB74
219
221
  revengai/models/function_info_input_func_deps_inner.py,sha256=oNrQvHiraXX74EjnQ5M-xYwNIrRngk9sePKq3ANct5w,6292
220
222
  revengai/models/function_info_output.py,sha256=iIxkZ6_KFSoz0NhbBXyNi7knPvWcIp-hmA2H51VoH6Y,3707
221
223
  revengai/models/function_local_variable_response.py,sha256=llv5alvfVXqxE3Cs6vt7qnQNyfwj4PBoxq_Sim65jic,2733
224
+ revengai/models/function_mapping.py,sha256=X4fa-lcMfO-40eVMtSTUPRpJlxdSZNEdzPTEOR0uAlg,2924
222
225
  revengai/models/function_mapping_full.py,sha256=dax345vnk25zSPVVpAmCFrrOWXzFXW6OnhSs9zVIKpI,11948
223
226
  revengai/models/function_name_confidence_body.py,sha256=Dz8HvTUDn5YcyCie-KMXmOdy8yF8PD-m0XzwpRyyQmg,3415
224
227
  revengai/models/function_name_history.py,sha256=INu3KWYUpQMFfWy6oWl5iSaxrlayKr-wvuiahRCzinI,3265
@@ -334,6 +337,6 @@ revengai/models/vulnerabilities.py,sha256=9t6uoZd3svWyfcZJjmj6zP731Dp47Apb25y8Qt
334
337
  revengai/models/vulnerability.py,sha256=P7rAOAYU5JLLpcRr824-YJgZba5kPb_J9ALV3tSNfLQ,3688
335
338
  revengai/models/vulnerability_type.py,sha256=SyOgfMmELYYc_H84oPkikBpjwngtG5Qw9Q_86a2TPr8,866
336
339
  revengai/models/workspace.py,sha256=chjU62GFvByEmaNd6luMNQVQLP3wlPx1zJgGJ_yyMLA,676
337
- revengai-1.75.0.dist-info/METADATA,sha256=lS8RlzEdyKsICi3Nj2ph_K0-JcKWIML4iB5TmZMquVE,41549
338
- revengai-1.75.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
339
- revengai-1.75.0.dist-info/RECORD,,
340
+ revengai-1.79.0.dist-info/METADATA,sha256=7s0kP4Sag5nD0OKxED0mpCNWbfg9-_IbRGN2ALeLOvU,41921
341
+ revengai-1.79.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
342
+ revengai-1.79.0.dist-info/RECORD,,