revengai 1.81.2__py3-none-any.whl → 1.85.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 +9 -9
- revengai/api/__init__.py +1 -0
- revengai/api/analyses_core_api.py +33 -16
- revengai/api/functions_ai_decompilation_api.py +3 -3
- revengai/api/functions_core_api.py +0 -309
- revengai/api/v1_api.py +334 -0
- revengai/api_client.py +1 -1
- revengai/configuration.py +2 -2
- revengai/models/__init__.py +3 -4
- revengai/models/ai_decompilation_rating.py +1 -0
- revengai/models/analysis_record.py +8 -2
- 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/{unstrip_request.py → function_batch_ann.py} +28 -14
- revengai/models/get_ai_decompilation_rating_response.py +11 -4
- revengai/models/matched_function_suggestion.py +2 -7
- revengai/models/upsert_ai_decomplation_rating_request.py +11 -4
- {revengai-1.81.2.dist-info → revengai-1.85.0.dist-info}/METADATA +5 -6
- {revengai-1.81.2.dist-info → revengai-1.85.0.dist-info}/RECORD +20 -20
- revengai/models/auto_unstrip_by_group_response.py +0 -131
- revengai/models/matched_function_group.py +0 -88
- {revengai-1.81.2.dist-info → revengai-1.85.0.dist-info}/WHEEL +0 -0
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,16 +30,17 @@ 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
|
|
43
|
-
from revengai.models.auto_unstrip_by_group_response import AutoUnstripByGroupResponse
|
|
44
44
|
from revengai.models.auto_unstrip_request import AutoUnstripRequest
|
|
45
45
|
from revengai.models.auto_unstrip_response import AutoUnstripResponse
|
|
46
46
|
from revengai.models.base_response import BaseResponse
|
|
@@ -187,6 +187,7 @@ from revengai.models.file_hashes import FileHashes
|
|
|
187
187
|
from revengai.models.file_metadata import FileMetadata
|
|
188
188
|
from revengai.models.filters import Filters
|
|
189
189
|
from revengai.models.function_analysis_threat_score_data import FunctionAnalysisThreatScoreData
|
|
190
|
+
from revengai.models.function_batch_ann import FunctionBatchAnn
|
|
190
191
|
from revengai.models.function_block_destination_response import FunctionBlockDestinationResponse
|
|
191
192
|
from revengai.models.function_block_response import FunctionBlockResponse
|
|
192
193
|
from revengai.models.function_blocks_response import FunctionBlocksResponse
|
|
@@ -240,7 +241,6 @@ from revengai.models.list_collection_results import ListCollectionResults
|
|
|
240
241
|
from revengai.models.login_request import LoginRequest
|
|
241
242
|
from revengai.models.login_response import LoginResponse
|
|
242
243
|
from revengai.models.logs import Logs
|
|
243
|
-
from revengai.models.matched_function_group import MatchedFunctionGroup
|
|
244
244
|
from revengai.models.matched_function_suggestion import MatchedFunctionSuggestion
|
|
245
245
|
from revengai.models.meta_model import MetaModel
|
|
246
246
|
from revengai.models.model_name import ModelName
|
|
@@ -309,7 +309,6 @@ from revengai.models.task_status import TaskStatus
|
|
|
309
309
|
from revengai.models.threat_score_function_body import ThreatScoreFunctionBody
|
|
310
310
|
from revengai.models.timestamp_model import TimestampModel
|
|
311
311
|
from revengai.models.type_definition import TypeDefinition
|
|
312
|
-
from revengai.models.unstrip_request import UnstripRequest
|
|
313
312
|
from revengai.models.update_function_data_types import UpdateFunctionDataTypes
|
|
314
313
|
from revengai.models.upload_file_type import UploadFileType
|
|
315
314
|
from revengai.models.upload_response import UploadResponse
|
|
@@ -31,16 +31,19 @@ class AnalysisRecord(BaseModel):
|
|
|
31
31
|
analysis_scope: StrictStr = Field(description="Scope of the analysis")
|
|
32
32
|
binary_id: StrictInt = Field(description="ID to identify the binary analyse")
|
|
33
33
|
model_id: StrictInt = Field(description="ID to identify the model used for analysis")
|
|
34
|
+
model_name: StrictStr = Field(description="Name of the model used for analysis")
|
|
34
35
|
status: StrictStr = Field(description="The current status of analysis")
|
|
35
36
|
creation: datetime = Field(description="The current status of analysis")
|
|
36
37
|
is_owner: StrictBool = Field(description="Whether the current user is the owner of a binary")
|
|
37
38
|
binary_name: StrictStr = Field(description="The name of the file uploaded")
|
|
38
39
|
sha_256_hash: StrictStr = Field(description="The hash of the binary")
|
|
40
|
+
function_boundaries_hash: StrictStr = Field(description="The hash of the function boundaries")
|
|
39
41
|
binary_size: StrictInt = Field(description="The size of the binary")
|
|
40
42
|
username: StrictStr = Field(description="The username of the analysis owner")
|
|
41
43
|
dynamic_execution_status: Optional[AppApiRestV2AnalysesEnumsDynamicExecutionStatus] = None
|
|
42
44
|
dynamic_execution_task_id: Optional[StrictInt] = None
|
|
43
|
-
|
|
45
|
+
base_address: StrictInt = Field(description="The base address of the binary")
|
|
46
|
+
__properties: ClassVar[List[str]] = ["analysis_id", "analysis_scope", "binary_id", "model_id", "model_name", "status", "creation", "is_owner", "binary_name", "sha_256_hash", "function_boundaries_hash", "binary_size", "username", "dynamic_execution_status", "dynamic_execution_task_id", "base_address"]
|
|
44
47
|
|
|
45
48
|
model_config = ConfigDict(
|
|
46
49
|
populate_by_name=True,
|
|
@@ -107,15 +110,18 @@ class AnalysisRecord(BaseModel):
|
|
|
107
110
|
"analysis_scope": obj.get("analysis_scope"),
|
|
108
111
|
"binary_id": obj.get("binary_id"),
|
|
109
112
|
"model_id": obj.get("model_id"),
|
|
113
|
+
"model_name": obj.get("model_name"),
|
|
110
114
|
"status": obj.get("status"),
|
|
111
115
|
"creation": obj.get("creation"),
|
|
112
116
|
"is_owner": obj.get("is_owner"),
|
|
113
117
|
"binary_name": obj.get("binary_name"),
|
|
114
118
|
"sha_256_hash": obj.get("sha_256_hash"),
|
|
119
|
+
"function_boundaries_hash": obj.get("function_boundaries_hash"),
|
|
115
120
|
"binary_size": obj.get("binary_size"),
|
|
116
121
|
"username": obj.get("username"),
|
|
117
122
|
"dynamic_execution_status": obj.get("dynamic_execution_status"),
|
|
118
|
-
"dynamic_execution_task_id": obj.get("dynamic_execution_task_id")
|
|
123
|
+
"dynamic_execution_task_id": obj.get("dynamic_execution_task_id"),
|
|
124
|
+
"base_address": obj.get("base_address")
|
|
119
125
|
})
|
|
120
126
|
return _obj
|
|
121
127
|
|
|
@@ -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
|
|
|
@@ -16,20 +16,19 @@ import pprint
|
|
|
16
16
|
import re # noqa: F401
|
|
17
17
|
import json
|
|
18
18
|
|
|
19
|
-
from pydantic import BaseModel, ConfigDict
|
|
20
|
-
from typing import Any, ClassVar, Dict, List, Optional
|
|
21
|
-
from typing_extensions import Annotated
|
|
19
|
+
from pydantic import BaseModel, ConfigDict
|
|
20
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
21
|
from typing import Optional, Set
|
|
23
22
|
from typing_extensions import Self
|
|
24
23
|
|
|
25
|
-
class
|
|
24
|
+
class FunctionBatchAnn(BaseModel):
|
|
26
25
|
"""
|
|
27
|
-
|
|
26
|
+
FunctionBatchAnn
|
|
28
27
|
""" # noqa: E501
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
__properties: ClassVar[List[str]] = ["
|
|
28
|
+
success: Optional[Any] = None
|
|
29
|
+
settings: Optional[Any]
|
|
30
|
+
function_matches: Optional[Any]
|
|
31
|
+
__properties: ClassVar[List[str]] = ["success", "settings", "function_matches"]
|
|
33
32
|
|
|
34
33
|
model_config = ConfigDict(
|
|
35
34
|
populate_by_name=True,
|
|
@@ -49,7 +48,7 @@ class UnstripRequest(BaseModel):
|
|
|
49
48
|
|
|
50
49
|
@classmethod
|
|
51
50
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
52
|
-
"""Create an instance of
|
|
51
|
+
"""Create an instance of FunctionBatchAnn from a JSON string"""
|
|
53
52
|
return cls.from_dict(json.loads(json_str))
|
|
54
53
|
|
|
55
54
|
def to_dict(self) -> Dict[str, Any]:
|
|
@@ -70,11 +69,26 @@ class UnstripRequest(BaseModel):
|
|
|
70
69
|
exclude=excluded_fields,
|
|
71
70
|
exclude_none=True,
|
|
72
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
|
+
|
|
73
87
|
return _dict
|
|
74
88
|
|
|
75
89
|
@classmethod
|
|
76
90
|
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
77
|
-
"""Create an instance of
|
|
91
|
+
"""Create an instance of FunctionBatchAnn from a dict"""
|
|
78
92
|
if obj is None:
|
|
79
93
|
return None
|
|
80
94
|
|
|
@@ -82,9 +96,9 @@ class UnstripRequest(BaseModel):
|
|
|
82
96
|
return cls.model_validate(obj)
|
|
83
97
|
|
|
84
98
|
_obj = cls.model_validate({
|
|
85
|
-
"
|
|
86
|
-
"
|
|
87
|
-
"
|
|
99
|
+
"success": obj.get("success"),
|
|
100
|
+
"settings": obj.get("settings"),
|
|
101
|
+
"function_matches": obj.get("function_matches")
|
|
88
102
|
})
|
|
89
103
|
return _obj
|
|
90
104
|
|
|
@@ -16,8 +16,8 @@ import pprint
|
|
|
16
16
|
import re # noqa: F401
|
|
17
17
|
import json
|
|
18
18
|
|
|
19
|
-
from pydantic import BaseModel, ConfigDict, Field
|
|
20
|
-
from typing import Any, ClassVar, Dict, List
|
|
19
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
|
20
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
21
21
|
from revengai.models.ai_decompilation_rating import AiDecompilationRating
|
|
22
22
|
from typing import Optional, Set
|
|
23
23
|
from typing_extensions import Self
|
|
@@ -27,7 +27,8 @@ class GetAiDecompilationRatingResponse(BaseModel):
|
|
|
27
27
|
GetAiDecompilationRatingResponse
|
|
28
28
|
""" # noqa: E501
|
|
29
29
|
rating: AiDecompilationRating = Field(description="The rating the user has given to the AI decompilation response")
|
|
30
|
-
|
|
30
|
+
reason: Optional[StrictStr]
|
|
31
|
+
__properties: ClassVar[List[str]] = ["rating", "reason"]
|
|
31
32
|
|
|
32
33
|
model_config = ConfigDict(
|
|
33
34
|
populate_by_name=True,
|
|
@@ -68,6 +69,11 @@ class GetAiDecompilationRatingResponse(BaseModel):
|
|
|
68
69
|
exclude=excluded_fields,
|
|
69
70
|
exclude_none=True,
|
|
70
71
|
)
|
|
72
|
+
# set to None if reason (nullable) is None
|
|
73
|
+
# and model_fields_set contains the field
|
|
74
|
+
if self.reason is None and "reason" in self.model_fields_set:
|
|
75
|
+
_dict['reason'] = None
|
|
76
|
+
|
|
71
77
|
return _dict
|
|
72
78
|
|
|
73
79
|
@classmethod
|
|
@@ -80,7 +86,8 @@ class GetAiDecompilationRatingResponse(BaseModel):
|
|
|
80
86
|
return cls.model_validate(obj)
|
|
81
87
|
|
|
82
88
|
_obj = cls.model_validate({
|
|
83
|
-
"rating": obj.get("rating")
|
|
89
|
+
"rating": obj.get("rating"),
|
|
90
|
+
"reason": obj.get("reason")
|
|
84
91
|
})
|
|
85
92
|
return _obj
|
|
86
93
|
|
|
@@ -17,7 +17,7 @@ import re # noqa: F401
|
|
|
17
17
|
import json
|
|
18
18
|
|
|
19
19
|
from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
|
|
20
|
-
from typing import Any, ClassVar, Dict, List
|
|
20
|
+
from typing import Any, ClassVar, Dict, List
|
|
21
21
|
from typing import Optional, Set
|
|
22
22
|
from typing_extensions import Self
|
|
23
23
|
|
|
@@ -26,7 +26,7 @@ class MatchedFunctionSuggestion(BaseModel):
|
|
|
26
26
|
MatchedFunctionSuggestion
|
|
27
27
|
""" # noqa: E501
|
|
28
28
|
function_id: StrictInt = Field(description="Unique identifier of the matched function")
|
|
29
|
-
function_vaddr:
|
|
29
|
+
function_vaddr: StrictInt = Field(description="Virtual address of the matched function")
|
|
30
30
|
suggested_name: StrictStr = Field(description="Name of the function group that contains the matched functions")
|
|
31
31
|
__properties: ClassVar[List[str]] = ["function_id", "function_vaddr", "suggested_name"]
|
|
32
32
|
|
|
@@ -69,11 +69,6 @@ class MatchedFunctionSuggestion(BaseModel):
|
|
|
69
69
|
exclude=excluded_fields,
|
|
70
70
|
exclude_none=True,
|
|
71
71
|
)
|
|
72
|
-
# set to None if function_vaddr (nullable) is None
|
|
73
|
-
# and model_fields_set contains the field
|
|
74
|
-
if self.function_vaddr is None and "function_vaddr" in self.model_fields_set:
|
|
75
|
-
_dict['function_vaddr'] = None
|
|
76
|
-
|
|
77
72
|
return _dict
|
|
78
73
|
|
|
79
74
|
@classmethod
|
|
@@ -16,8 +16,8 @@ import pprint
|
|
|
16
16
|
import re # noqa: F401
|
|
17
17
|
import json
|
|
18
18
|
|
|
19
|
-
from pydantic import BaseModel, ConfigDict, Field
|
|
20
|
-
from typing import Any, ClassVar, Dict, List
|
|
19
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
|
20
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
21
21
|
from revengai.models.ai_decompilation_rating import AiDecompilationRating
|
|
22
22
|
from typing import Optional, Set
|
|
23
23
|
from typing_extensions import Self
|
|
@@ -27,7 +27,8 @@ class UpsertAiDecomplationRatingRequest(BaseModel):
|
|
|
27
27
|
UpsertAiDecomplationRatingRequest
|
|
28
28
|
""" # noqa: E501
|
|
29
29
|
rating: AiDecompilationRating = Field(description="The rating for the AI decompilation response")
|
|
30
|
-
|
|
30
|
+
reason: Optional[StrictStr]
|
|
31
|
+
__properties: ClassVar[List[str]] = ["rating", "reason"]
|
|
31
32
|
|
|
32
33
|
model_config = ConfigDict(
|
|
33
34
|
populate_by_name=True,
|
|
@@ -68,6 +69,11 @@ class UpsertAiDecomplationRatingRequest(BaseModel):
|
|
|
68
69
|
exclude=excluded_fields,
|
|
69
70
|
exclude_none=True,
|
|
70
71
|
)
|
|
72
|
+
# set to None if reason (nullable) is None
|
|
73
|
+
# and model_fields_set contains the field
|
|
74
|
+
if self.reason is None and "reason" in self.model_fields_set:
|
|
75
|
+
_dict['reason'] = None
|
|
76
|
+
|
|
71
77
|
return _dict
|
|
72
78
|
|
|
73
79
|
@classmethod
|
|
@@ -80,7 +86,8 @@ class UpsertAiDecomplationRatingRequest(BaseModel):
|
|
|
80
86
|
return cls.model_validate(obj)
|
|
81
87
|
|
|
82
88
|
_obj = cls.model_validate({
|
|
83
|
-
"rating": obj.get("rating")
|
|
89
|
+
"rating": obj.get("rating"),
|
|
90
|
+
"reason": obj.get("reason")
|
|
84
91
|
})
|
|
85
92
|
return _obj
|
|
86
93
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: revengai
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.85.0
|
|
4
4
|
Summary: RevEng.AI API
|
|
5
5
|
Project-URL: Repository, https://github.com/RevEngAI/revengai-python
|
|
6
6
|
Keywords: RevEng.AI API
|
|
@@ -145,7 +145,6 @@ Class | Method | HTTP request | Description
|
|
|
145
145
|
*FunctionsCoreApi* | [**get_function_details**](docs/FunctionsCoreApi.md#get_function_details) | **GET** /v2/functions/{function_id} | Get function details
|
|
146
146
|
*FunctionsCoreApi* | [**get_function_strings**](docs/FunctionsCoreApi.md#get_function_strings) | **GET** /v2/functions/{function_id}/strings | Get string information found in the function
|
|
147
147
|
*FunctionsCoreApi* | [**get_similar_functions**](docs/FunctionsCoreApi.md#get_similar_functions) | **GET** /v2/functions/{function_id}/similar-functions | Get list of similar functions
|
|
148
|
-
*FunctionsCoreApi* | [**unstrip**](docs/FunctionsCoreApi.md#unstrip) | **POST** /v2/analyses/{analysis_id}/functions/unstrip | Performs matching and auto-unstrip for an analysis and its functions
|
|
149
148
|
*FunctionsDataTypesApi* | [**generate_function_data_types_for_analysis**](docs/FunctionsDataTypesApi.md#generate_function_data_types_for_analysis) | **POST** /v2/analyses/{analysis_id}/functions/data_types | Generate Function Data Types
|
|
150
149
|
*FunctionsDataTypesApi* | [**generate_function_data_types_for_functions**](docs/FunctionsDataTypesApi.md#generate_function_data_types_for_functions) | **POST** /v2/functions/data_types | Generate Function Data Types for an arbitrary list of functions
|
|
151
150
|
*FunctionsDataTypesApi* | [**get_function_data_types**](docs/FunctionsDataTypesApi.md#get_function_data_types) | **GET** /v2/analyses/{analysis_id}/functions/{function_id}/data_types | Get Function Data Types
|
|
@@ -170,11 +169,11 @@ Class | Method | HTTP request | Description
|
|
|
170
169
|
*SearchApi* | [**search_collections**](docs/SearchApi.md#search_collections) | **GET** /v2/search/collections | Collections search
|
|
171
170
|
*SearchApi* | [**search_functions**](docs/SearchApi.md#search_functions) | **GET** /v2/search/functions | Functions search
|
|
172
171
|
*SearchApi* | [**search_tags**](docs/SearchApi.md#search_tags) | **GET** /v2/search/tags | Tags search
|
|
172
|
+
*V1Api* | [**batch_symbol_ann**](docs/V1Api.md#batch_symbol_ann) | **POST** /v1/ann/symbol/batch | Batch Symbol ANN using function IDs
|
|
173
173
|
|
|
174
174
|
|
|
175
175
|
## Documentation For Models
|
|
176
176
|
|
|
177
|
-
- [ANNFunction](docs/ANNFunction.md)
|
|
178
177
|
- [Addr](docs/Addr.md)
|
|
179
178
|
- [AiDecompilationRating](docs/AiDecompilationRating.md)
|
|
180
179
|
- [AiUnstripRequest](docs/AiUnstripRequest.md)
|
|
@@ -193,16 +192,17 @@ Class | Method | HTTP request | Description
|
|
|
193
192
|
- [AnalysisUpdateRequest](docs/AnalysisUpdateRequest.md)
|
|
194
193
|
- [AnalysisUpdateTagsRequest](docs/AnalysisUpdateTagsRequest.md)
|
|
195
194
|
- [AnalysisUpdateTagsResponse](docs/AnalysisUpdateTagsResponse.md)
|
|
195
|
+
- [AppApiRestV1AnnSchemaANNFunction](docs/AppApiRestV1AnnSchemaANNFunction.md)
|
|
196
196
|
- [AppApiRestV2AnalysesEnumsDynamicExecutionStatus](docs/AppApiRestV2AnalysesEnumsDynamicExecutionStatus.md)
|
|
197
197
|
- [AppApiRestV2AnalysesEnumsOrderBy](docs/AppApiRestV2AnalysesEnumsOrderBy.md)
|
|
198
198
|
- [AppApiRestV2AnalysesResponsesTagItem](docs/AppApiRestV2AnalysesResponsesTagItem.md)
|
|
199
199
|
- [AppApiRestV2CollectionsEnumsOrderBy](docs/AppApiRestV2CollectionsEnumsOrderBy.md)
|
|
200
200
|
- [AppApiRestV2FunctionsResponsesFunction](docs/AppApiRestV2FunctionsResponsesFunction.md)
|
|
201
201
|
- [AppApiRestV2FunctionsTypesFunction](docs/AppApiRestV2FunctionsTypesFunction.md)
|
|
202
|
+
- [AppApiRestV2SimilaritySchemaANNFunction](docs/AppApiRestV2SimilaritySchemaANNFunction.md)
|
|
202
203
|
- [AppServicesBinaryAnnSchemaTagItem](docs/AppServicesBinaryAnnSchemaTagItem.md)
|
|
203
204
|
- [AppServicesDynamicExecutionSchemasDynamicExecutionStatus](docs/AppServicesDynamicExecutionSchemasDynamicExecutionStatus.md)
|
|
204
205
|
- [Argument](docs/Argument.md)
|
|
205
|
-
- [AutoUnstripByGroupResponse](docs/AutoUnstripByGroupResponse.md)
|
|
206
206
|
- [AutoUnstripRequest](docs/AutoUnstripRequest.md)
|
|
207
207
|
- [AutoUnstripResponse](docs/AutoUnstripResponse.md)
|
|
208
208
|
- [BaseResponse](docs/BaseResponse.md)
|
|
@@ -349,6 +349,7 @@ Class | Method | HTTP request | Description
|
|
|
349
349
|
- [FileMetadata](docs/FileMetadata.md)
|
|
350
350
|
- [Filters](docs/Filters.md)
|
|
351
351
|
- [FunctionAnalysisThreatScoreData](docs/FunctionAnalysisThreatScoreData.md)
|
|
352
|
+
- [FunctionBatchAnn](docs/FunctionBatchAnn.md)
|
|
352
353
|
- [FunctionBlockDestinationResponse](docs/FunctionBlockDestinationResponse.md)
|
|
353
354
|
- [FunctionBlockResponse](docs/FunctionBlockResponse.md)
|
|
354
355
|
- [FunctionBlocksResponse](docs/FunctionBlocksResponse.md)
|
|
@@ -402,7 +403,6 @@ Class | Method | HTTP request | Description
|
|
|
402
403
|
- [LoginRequest](docs/LoginRequest.md)
|
|
403
404
|
- [LoginResponse](docs/LoginResponse.md)
|
|
404
405
|
- [Logs](docs/Logs.md)
|
|
405
|
-
- [MatchedFunctionGroup](docs/MatchedFunctionGroup.md)
|
|
406
406
|
- [MatchedFunctionSuggestion](docs/MatchedFunctionSuggestion.md)
|
|
407
407
|
- [MetaModel](docs/MetaModel.md)
|
|
408
408
|
- [ModelName](docs/ModelName.md)
|
|
@@ -471,7 +471,6 @@ Class | Method | HTTP request | Description
|
|
|
471
471
|
- [ThreatScoreFunctionBody](docs/ThreatScoreFunctionBody.md)
|
|
472
472
|
- [TimestampModel](docs/TimestampModel.md)
|
|
473
473
|
- [TypeDefinition](docs/TypeDefinition.md)
|
|
474
|
-
- [UnstripRequest](docs/UnstripRequest.md)
|
|
475
474
|
- [UpdateFunctionDataTypes](docs/UpdateFunctionDataTypes.md)
|
|
476
475
|
- [UploadFileType](docs/UploadFileType.md)
|
|
477
476
|
- [UploadResponse](docs/UploadResponse.md)
|