revengai 2.3.0__py3-none-any.whl → 2.9.1__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.

Files changed (37) hide show
  1. revengai/__init__.py +1 -37
  2. revengai/api/__init__.py +0 -1
  3. revengai/api/analyses_core_api.py +0 -294
  4. revengai/api/functions_ai_decompilation_api.py +30 -30
  5. revengai/api/functions_core_api.py +2 -369
  6. revengai/api_client.py +1 -1
  7. revengai/configuration.py +2 -2
  8. revengai/models/__init__.py +0 -17
  9. revengai/models/callee_function_info.py +1 -1
  10. revengai/models/caller_function_info.py +1 -1
  11. revengai/models/decompilation_response.py +2 -2
  12. revengai/models/elf_relocation.py +1 -1
  13. revengai/models/function_matching_result_with_best_match.py +2 -2
  14. revengai/models/functions_detail_response.py +5 -3
  15. revengai/models/matched_function.py +2 -2
  16. {revengai-2.3.0.dist-info → revengai-2.9.1.dist-info}/METADATA +1 -24
  17. {revengai-2.3.0.dist-info → revengai-2.9.1.dist-info}/RECORD +19 -37
  18. revengai/api/confidence_api.py +0 -1152
  19. revengai/models/ann_function.py +0 -122
  20. revengai/models/base_response_box_plot_confidence.py +0 -125
  21. revengai/models/base_response_list_function_box_plot_confidence.py +0 -129
  22. revengai/models/base_response_list_similar_functions_response.py +0 -129
  23. revengai/models/base_response_list_tag_origin_box_plot_confidence.py +0 -129
  24. revengai/models/base_response_nearest_neighbor_analysis.py +0 -135
  25. revengai/models/box_plot_confidence.py +0 -98
  26. revengai/models/function_box_plot_confidence.py +0 -92
  27. revengai/models/function_name_confidence_body.py +0 -97
  28. revengai/models/function_name_input.py +0 -88
  29. revengai/models/nearest_neighbor.py +0 -105
  30. revengai/models/origin.py +0 -42
  31. revengai/models/similar_functions_response.py +0 -100
  32. revengai/models/tag_confidence_body.py +0 -95
  33. revengai/models/tag_origin_box_plot_confidence.py +0 -96
  34. revengai/models/tags.py +0 -89
  35. revengai/models/threat_score_function_body.py +0 -87
  36. {revengai-2.3.0.dist-info → revengai-2.9.1.dist-info}/WHEEL +0 -0
  37. {revengai-2.3.0.dist-info → revengai-2.9.1.dist-info}/licenses/LICENSE.md +0 -0
@@ -1,135 +0,0 @@
1
- # coding: utf-8
2
-
3
- """
4
- RevEng.AI API
5
-
6
- RevEng.AI is Similarity Search Engine for executable binaries
7
-
8
- Generated by OpenAPI Generator (https://openapi-generator.tech)
9
-
10
- Do not edit the class manually.
11
- """ # noqa: E501
12
-
13
-
14
- from __future__ import annotations
15
- import pprint
16
- import re # noqa: F401
17
- import json
18
-
19
- from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
20
- from typing import Any, ClassVar, Dict, List, Optional
21
- from revengai.models.error_model import ErrorModel
22
- from revengai.models.meta_model import MetaModel
23
- from revengai.models.nearest_neighbor import NearestNeighbor
24
- from typing import Optional, Set
25
- from typing_extensions import Self
26
-
27
- class BaseResponseNearestNeighborAnalysis(BaseModel):
28
- """
29
- BaseResponseNearestNeighborAnalysis
30
- """ # noqa: E501
31
- status: Optional[StrictBool] = Field(default=True, description="Response status on whether the request succeeded")
32
- data: Optional[Dict[str, Dict[str, NearestNeighbor]]] = 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 BaseResponseNearestNeighborAnalysis 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 each value in data (dict)
78
- _field_dict = {}
79
- if self.data:
80
- for _key_data in self.data:
81
- if self.data[_key_data]:
82
- _field_dict[_key_data] = self.data[_key_data].to_dict()
83
- _dict['data'] = _field_dict
84
- # override the default output from pydantic by calling `to_dict()` of each item in errors (list)
85
- _items = []
86
- if self.errors:
87
- for _item_errors in self.errors:
88
- if _item_errors:
89
- _items.append(_item_errors.to_dict())
90
- _dict['errors'] = _items
91
- # override the default output from pydantic by calling `to_dict()` of meta
92
- if self.meta:
93
- _dict['meta'] = self.meta.to_dict()
94
- # set to None if message (nullable) is None
95
- # and model_fields_set contains the field
96
- if self.message is None and "message" in self.model_fields_set:
97
- _dict['message'] = None
98
-
99
- # set to None if errors (nullable) is None
100
- # and model_fields_set contains the field
101
- if self.errors is None and "errors" in self.model_fields_set:
102
- _dict['errors'] = None
103
-
104
- return _dict
105
-
106
- @classmethod
107
- def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
108
- """Create an instance of BaseResponseNearestNeighborAnalysis from a dict"""
109
- if obj is None:
110
- return None
111
-
112
- if not isinstance(obj, dict):
113
- return cls.model_validate(obj)
114
-
115
- _obj = cls.model_validate({
116
- "status": obj.get("status") if obj.get("status") is not None else True,
117
- "data": dict(
118
- (_k, dict(
119
- (_ik, NearestNeighbor.from_dict(_iv))
120
- for _ik, _iv in _v.items()
121
- )
122
- if _v is not None
123
- else None
124
- )
125
- for _k, _v in obj.get("data").items()
126
- )
127
- if obj.get("data") is not None
128
- else None,
129
- "message": obj.get("message"),
130
- "errors": [ErrorModel.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None,
131
- "meta": MetaModel.from_dict(obj["meta"]) if obj.get("meta") is not None else None
132
- })
133
- return _obj
134
-
135
-
@@ -1,98 +0,0 @@
1
- # coding: utf-8
2
-
3
- """
4
- RevEng.AI API
5
-
6
- RevEng.AI is Similarity Search Engine for executable binaries
7
-
8
- Generated by OpenAPI Generator (https://openapi-generator.tech)
9
-
10
- Do not edit the class manually.
11
- """ # noqa: E501
12
-
13
-
14
- from __future__ import annotations
15
- import pprint
16
- import re # noqa: F401
17
- import json
18
-
19
- from pydantic import BaseModel, ConfigDict, StrictFloat, StrictInt
20
- from typing import Any, ClassVar, Dict, List, Union
21
- from typing import Optional, Set
22
- from typing_extensions import Self
23
-
24
- class BoxPlotConfidence(BaseModel):
25
- """
26
- Format for confidence - returned in the box plot format
27
- """ # noqa: E501
28
- min: Union[StrictFloat, StrictInt]
29
- max: Union[StrictFloat, StrictInt]
30
- average: Union[StrictFloat, StrictInt]
31
- upper_quartile: Union[StrictFloat, StrictInt]
32
- lower_quartile: Union[StrictFloat, StrictInt]
33
- positive_count: StrictInt
34
- negative_count: StrictInt
35
- __properties: ClassVar[List[str]] = ["min", "max", "average", "upper_quartile", "lower_quartile", "positive_count", "negative_count"]
36
-
37
- model_config = ConfigDict(
38
- populate_by_name=True,
39
- validate_assignment=True,
40
- protected_namespaces=(),
41
- )
42
-
43
-
44
- def to_str(self) -> str:
45
- """Returns the string representation of the model using alias"""
46
- return pprint.pformat(self.model_dump(by_alias=True))
47
-
48
- def to_json(self) -> str:
49
- """Returns the JSON representation of the model using alias"""
50
- # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
51
- return json.dumps(self.to_dict())
52
-
53
- @classmethod
54
- def from_json(cls, json_str: str) -> Optional[Self]:
55
- """Create an instance of BoxPlotConfidence from a JSON string"""
56
- return cls.from_dict(json.loads(json_str))
57
-
58
- def to_dict(self) -> Dict[str, Any]:
59
- """Return the dictionary representation of the model using alias.
60
-
61
- This has the following differences from calling pydantic's
62
- `self.model_dump(by_alias=True)`:
63
-
64
- * `None` is only added to the output dict for nullable fields that
65
- were set at model initialization. Other fields with value `None`
66
- are ignored.
67
- """
68
- excluded_fields: Set[str] = set([
69
- ])
70
-
71
- _dict = self.model_dump(
72
- by_alias=True,
73
- exclude=excluded_fields,
74
- exclude_none=True,
75
- )
76
- return _dict
77
-
78
- @classmethod
79
- def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
80
- """Create an instance of BoxPlotConfidence from a dict"""
81
- if obj is None:
82
- return None
83
-
84
- if not isinstance(obj, dict):
85
- return cls.model_validate(obj)
86
-
87
- _obj = cls.model_validate({
88
- "min": obj.get("min"),
89
- "max": obj.get("max"),
90
- "average": obj.get("average"),
91
- "upper_quartile": obj.get("upper_quartile"),
92
- "lower_quartile": obj.get("lower_quartile"),
93
- "positive_count": obj.get("positive_count"),
94
- "negative_count": obj.get("negative_count")
95
- })
96
- return _obj
97
-
98
-
@@ -1,92 +0,0 @@
1
- # coding: utf-8
2
-
3
- """
4
- RevEng.AI API
5
-
6
- RevEng.AI is Similarity Search Engine for executable binaries
7
-
8
- Generated by OpenAPI Generator (https://openapi-generator.tech)
9
-
10
- Do not edit the class manually.
11
- """ # noqa: E501
12
-
13
-
14
- from __future__ import annotations
15
- import pprint
16
- import re # noqa: F401
17
- import json
18
-
19
- from pydantic import BaseModel, ConfigDict, StrictInt
20
- from typing import Any, ClassVar, Dict, List
21
- from revengai.models.box_plot_confidence import BoxPlotConfidence
22
- from typing import Optional, Set
23
- from typing_extensions import Self
24
-
25
- class FunctionBoxPlotConfidence(BaseModel):
26
- """
27
- FunctionBoxPlotConfidence
28
- """ # noqa: E501
29
- function_id: StrictInt
30
- box_plot: BoxPlotConfidence
31
- __properties: ClassVar[List[str]] = ["function_id", "box_plot"]
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 FunctionBoxPlotConfidence 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
- # override the default output from pydantic by calling `to_dict()` of box_plot
73
- if self.box_plot:
74
- _dict['box_plot'] = self.box_plot.to_dict()
75
- return _dict
76
-
77
- @classmethod
78
- def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
79
- """Create an instance of FunctionBoxPlotConfidence from a dict"""
80
- if obj is None:
81
- return None
82
-
83
- if not isinstance(obj, dict):
84
- return cls.model_validate(obj)
85
-
86
- _obj = cls.model_validate({
87
- "function_id": obj.get("function_id"),
88
- "box_plot": BoxPlotConfidence.from_dict(obj["box_plot"]) if obj.get("box_plot") is not None else None
89
- })
90
- return _obj
91
-
92
-
@@ -1,97 +0,0 @@
1
- # coding: utf-8
2
-
3
- """
4
- RevEng.AI API
5
-
6
- RevEng.AI is Similarity Search Engine for executable binaries
7
-
8
- Generated by OpenAPI Generator (https://openapi-generator.tech)
9
-
10
- Do not edit the class manually.
11
- """ # noqa: E501
12
-
13
-
14
- from __future__ import annotations
15
- import pprint
16
- import re # noqa: F401
17
- import json
18
-
19
- from pydantic import BaseModel, ConfigDict, Field, StrictBool
20
- from typing import Any, ClassVar, Dict, List, Optional
21
- from typing_extensions import Annotated
22
- from revengai.models.function_name_input import FunctionNameInput
23
- from typing import Optional, Set
24
- from typing_extensions import Self
25
-
26
- class FunctionNameConfidenceBody(BaseModel):
27
- """
28
- FunctionNameConfidenceBody
29
- """ # noqa: E501
30
- functions: Optional[Annotated[List[FunctionNameInput], Field(min_length=1, max_length=100)]] = Field(default=None, description="List of function ids and the function names they want to check confidence for")
31
- is_debug: Optional[StrictBool] = Field(default=False, description="Flag to match only to a debug function")
32
- __properties: ClassVar[List[str]] = ["functions", "is_debug"]
33
-
34
- model_config = ConfigDict(
35
- populate_by_name=True,
36
- validate_assignment=True,
37
- protected_namespaces=(),
38
- )
39
-
40
-
41
- def to_str(self) -> str:
42
- """Returns the string representation of the model using alias"""
43
- return pprint.pformat(self.model_dump(by_alias=True))
44
-
45
- def to_json(self) -> str:
46
- """Returns the JSON representation of the model using alias"""
47
- # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
48
- return json.dumps(self.to_dict())
49
-
50
- @classmethod
51
- def from_json(cls, json_str: str) -> Optional[Self]:
52
- """Create an instance of FunctionNameConfidenceBody from a JSON string"""
53
- return cls.from_dict(json.loads(json_str))
54
-
55
- def to_dict(self) -> Dict[str, Any]:
56
- """Return the dictionary representation of the model using alias.
57
-
58
- This has the following differences from calling pydantic's
59
- `self.model_dump(by_alias=True)`:
60
-
61
- * `None` is only added to the output dict for nullable fields that
62
- were set at model initialization. Other fields with value `None`
63
- are ignored.
64
- """
65
- excluded_fields: Set[str] = set([
66
- ])
67
-
68
- _dict = self.model_dump(
69
- by_alias=True,
70
- exclude=excluded_fields,
71
- exclude_none=True,
72
- )
73
- # override the default output from pydantic by calling `to_dict()` of each item in functions (list)
74
- _items = []
75
- if self.functions:
76
- for _item_functions in self.functions:
77
- if _item_functions:
78
- _items.append(_item_functions.to_dict())
79
- _dict['functions'] = _items
80
- return _dict
81
-
82
- @classmethod
83
- def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
84
- """Create an instance of FunctionNameConfidenceBody from a dict"""
85
- if obj is None:
86
- return None
87
-
88
- if not isinstance(obj, dict):
89
- return cls.model_validate(obj)
90
-
91
- _obj = cls.model_validate({
92
- "functions": [FunctionNameInput.from_dict(_item) for _item in obj["functions"]] if obj.get("functions") is not None else None,
93
- "is_debug": obj.get("is_debug") if obj.get("is_debug") is not None else False
94
- })
95
- return _obj
96
-
97
-
@@ -1,88 +0,0 @@
1
- # coding: utf-8
2
-
3
- """
4
- RevEng.AI API
5
-
6
- RevEng.AI is Similarity Search Engine for executable binaries
7
-
8
- Generated by OpenAPI Generator (https://openapi-generator.tech)
9
-
10
- Do not edit the class manually.
11
- """ # noqa: E501
12
-
13
-
14
- from __future__ import annotations
15
- import pprint
16
- import re # noqa: F401
17
- import json
18
-
19
- from pydantic import BaseModel, ConfigDict, 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 FunctionNameInput(BaseModel):
25
- """
26
- FunctionNameInput
27
- """ # noqa: E501
28
- function_id: StrictInt
29
- function_name: StrictStr
30
- __properties: ClassVar[List[str]] = ["function_id", "function_name"]
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 FunctionNameInput 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
- return _dict
72
-
73
- @classmethod
74
- def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
75
- """Create an instance of FunctionNameInput from a dict"""
76
- if obj is None:
77
- return None
78
-
79
- if not isinstance(obj, dict):
80
- return cls.model_validate(obj)
81
-
82
- _obj = cls.model_validate({
83
- "function_id": obj.get("function_id"),
84
- "function_name": obj.get("function_name")
85
- })
86
- return _obj
87
-
88
-
@@ -1,105 +0,0 @@
1
- # coding: utf-8
2
-
3
- """
4
- RevEng.AI API
5
-
6
- RevEng.AI is Similarity Search Engine for executable binaries
7
-
8
- Generated by OpenAPI Generator (https://openapi-generator.tech)
9
-
10
- Do not edit the class manually.
11
- """ # noqa: E501
12
-
13
-
14
- from __future__ import annotations
15
- import pprint
16
- import re # noqa: F401
17
- import json
18
-
19
- from pydantic import BaseModel, ConfigDict, StrictBool, StrictFloat, StrictInt, StrictStr
20
- from typing import Any, ClassVar, Dict, List, Optional, Union
21
- from typing import Optional, Set
22
- from typing_extensions import Self
23
-
24
- class NearestNeighbor(BaseModel):
25
- """
26
- NearestNeighbor
27
- """ # noqa: E501
28
- distance: Union[StrictFloat, StrictInt]
29
- nearest_neighbor_analysis_id: StrictInt
30
- nearest_neighbor_analysis_name: StrictStr
31
- nearest_neighbor_function_name: StrictStr
32
- nearest_neighbor_function_name_mangled: Optional[StrictStr]
33
- nearest_neighbor_binary_id: StrictInt
34
- nearest_neighbor_sha_256_hash: StrictStr
35
- nearest_neighbor_debug: StrictBool
36
- __properties: ClassVar[List[str]] = ["distance", "nearest_neighbor_analysis_id", "nearest_neighbor_analysis_name", "nearest_neighbor_function_name", "nearest_neighbor_function_name_mangled", "nearest_neighbor_binary_id", "nearest_neighbor_sha_256_hash", "nearest_neighbor_debug"]
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 NearestNeighbor 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
- # set to None if nearest_neighbor_function_name_mangled (nullable) is None
78
- # and model_fields_set contains the field
79
- if self.nearest_neighbor_function_name_mangled is None and "nearest_neighbor_function_name_mangled" in self.model_fields_set:
80
- _dict['nearest_neighbor_function_name_mangled'] = None
81
-
82
- return _dict
83
-
84
- @classmethod
85
- def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
86
- """Create an instance of NearestNeighbor from a dict"""
87
- if obj is None:
88
- return None
89
-
90
- if not isinstance(obj, dict):
91
- return cls.model_validate(obj)
92
-
93
- _obj = cls.model_validate({
94
- "distance": obj.get("distance"),
95
- "nearest_neighbor_analysis_id": obj.get("nearest_neighbor_analysis_id"),
96
- "nearest_neighbor_analysis_name": obj.get("nearest_neighbor_analysis_name"),
97
- "nearest_neighbor_function_name": obj.get("nearest_neighbor_function_name"),
98
- "nearest_neighbor_function_name_mangled": obj.get("nearest_neighbor_function_name_mangled"),
99
- "nearest_neighbor_binary_id": obj.get("nearest_neighbor_binary_id"),
100
- "nearest_neighbor_sha_256_hash": obj.get("nearest_neighbor_sha_256_hash"),
101
- "nearest_neighbor_debug": obj.get("nearest_neighbor_debug")
102
- })
103
- return _obj
104
-
105
-
revengai/models/origin.py DELETED
@@ -1,42 +0,0 @@
1
- # coding: utf-8
2
-
3
- """
4
- RevEng.AI API
5
-
6
- RevEng.AI is Similarity Search Engine for executable binaries
7
-
8
- Generated by OpenAPI Generator (https://openapi-generator.tech)
9
-
10
- Do not edit the class manually.
11
- """ # noqa: E501
12
-
13
-
14
- from __future__ import annotations
15
- import json
16
- from enum import Enum
17
- from typing_extensions import Self
18
-
19
-
20
- class Origin(str, Enum):
21
- """
22
- Origin
23
- """
24
-
25
- """
26
- allowed enum values
27
- """
28
- REV_ENG_MINUS_MALWARE = 'RevEng-Malware'
29
- REV_ENG_MINUS_LIBRARY = 'RevEng-Library'
30
- REV_ENG_MINUS_BENIGN = 'RevEng-Benign'
31
- REVENG = 'RevEng'
32
- REV_ENG_MINUS_HEURISTIC = 'RevEng-Heuristic'
33
- REV_ENG_MINUS_UNKNOWN = 'RevEng-Unknown'
34
- VIRUSTOTAL = 'VirusTotal'
35
- MALWAREBAZAAR = 'MalwareBazaar'
36
-
37
- @classmethod
38
- def from_json(cls, json_str: str) -> Self:
39
- """Create an instance of Origin from a JSON string"""
40
- return cls(json.loads(json_str))
41
-
42
-