revengai 2.1.0__py3-none-any.whl → 2.8.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.

Files changed (31) 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_core_api.py +2 -369
  5. revengai/api_client.py +1 -1
  6. revengai/configuration.py +2 -2
  7. revengai/models/__init__.py +0 -17
  8. revengai/models/elf_relocation.py +1 -1
  9. revengai/models/functions_detail_response.py +4 -2
  10. {revengai-2.1.0.dist-info → revengai-2.8.0.dist-info}/METADATA +1 -24
  11. {revengai-2.1.0.dist-info → revengai-2.8.0.dist-info}/RECORD +13 -31
  12. revengai/api/confidence_api.py +0 -1152
  13. revengai/models/ann_function.py +0 -122
  14. revengai/models/base_response_box_plot_confidence.py +0 -125
  15. revengai/models/base_response_list_function_box_plot_confidence.py +0 -129
  16. revengai/models/base_response_list_similar_functions_response.py +0 -129
  17. revengai/models/base_response_list_tag_origin_box_plot_confidence.py +0 -129
  18. revengai/models/base_response_nearest_neighbor_analysis.py +0 -135
  19. revengai/models/box_plot_confidence.py +0 -98
  20. revengai/models/function_box_plot_confidence.py +0 -92
  21. revengai/models/function_name_confidence_body.py +0 -97
  22. revengai/models/function_name_input.py +0 -88
  23. revengai/models/nearest_neighbor.py +0 -105
  24. revengai/models/origin.py +0 -42
  25. revengai/models/similar_functions_response.py +0 -100
  26. revengai/models/tag_confidence_body.py +0 -95
  27. revengai/models/tag_origin_box_plot_confidence.py +0 -96
  28. revengai/models/tags.py +0 -89
  29. revengai/models/threat_score_function_body.py +0 -87
  30. {revengai-2.1.0.dist-info → revengai-2.8.0.dist-info}/WHEEL +0 -0
  31. {revengai-2.1.0.dist-info → revengai-2.8.0.dist-info}/licenses/LICENSE.md +0 -0
@@ -1,100 +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, StrictStr
20
- from typing import Any, ClassVar, Dict, List, Union
21
- from typing import Optional, Set
22
- from typing_extensions import Self
23
-
24
- class SimilarFunctionsResponse(BaseModel):
25
- """
26
- SimilarFunctionsResponse
27
- """ # noqa: E501
28
- function_id: StrictInt
29
- function_name: StrictStr
30
- binary_id: StrictInt
31
- binary_name: StrictStr
32
- distance: Union[StrictFloat, StrictInt]
33
- embedding_3d: List[Union[StrictFloat, StrictInt]]
34
- embedding_1d: List[Union[StrictFloat, StrictInt]]
35
- sha_256_hash: StrictStr
36
- __properties: ClassVar[List[str]] = ["function_id", "function_name", "binary_id", "binary_name", "distance", "embedding_3d", "embedding_1d", "sha_256_hash"]
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 SimilarFunctionsResponse 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
- return _dict
78
-
79
- @classmethod
80
- def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
81
- """Create an instance of SimilarFunctionsResponse from a dict"""
82
- if obj is None:
83
- return None
84
-
85
- if not isinstance(obj, dict):
86
- return cls.model_validate(obj)
87
-
88
- _obj = cls.model_validate({
89
- "function_id": obj.get("function_id"),
90
- "function_name": obj.get("function_name"),
91
- "binary_id": obj.get("binary_id"),
92
- "binary_name": obj.get("binary_name"),
93
- "distance": obj.get("distance"),
94
- "embedding_3d": obj.get("embedding_3d"),
95
- "embedding_1d": obj.get("embedding_1d"),
96
- "sha_256_hash": obj.get("sha_256_hash")
97
- })
98
- return _obj
99
-
100
-
@@ -1,95 +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
20
- from typing import Any, ClassVar, Dict, List
21
- from typing_extensions import Annotated
22
- from revengai.models.tags import Tags
23
- from typing import Optional, Set
24
- from typing_extensions import Self
25
-
26
- class TagConfidenceBody(BaseModel):
27
- """
28
- TagConfidenceBody
29
- """ # noqa: E501
30
- tags: Annotated[List[Tags], Field(min_length=1, max_length=10)]
31
- __properties: ClassVar[List[str]] = ["tags"]
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 TagConfidenceBody 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 each item in tags (list)
73
- _items = []
74
- if self.tags:
75
- for _item_tags in self.tags:
76
- if _item_tags:
77
- _items.append(_item_tags.to_dict())
78
- _dict['tags'] = _items
79
- return _dict
80
-
81
- @classmethod
82
- def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
83
- """Create an instance of TagConfidenceBody from a dict"""
84
- if obj is None:
85
- return None
86
-
87
- if not isinstance(obj, dict):
88
- return cls.model_validate(obj)
89
-
90
- _obj = cls.model_validate({
91
- "tags": [Tags.from_dict(_item) for _item in obj["tags"]] if obj.get("tags") is not None else None
92
- })
93
- return _obj
94
-
95
-
@@ -1,96 +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
20
- from typing import Any, ClassVar, Dict, List
21
- from revengai.models.box_plot_confidence import BoxPlotConfidence
22
- from revengai.models.tags import Tags
23
- from typing import Optional, Set
24
- from typing_extensions import Self
25
-
26
- class TagOriginBoxPlotConfidence(BaseModel):
27
- """
28
- TagOriginBoxPlotConfidence
29
- """ # noqa: E501
30
- tag: Tags
31
- box_plot: BoxPlotConfidence
32
- __properties: ClassVar[List[str]] = ["tag", "box_plot"]
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 TagOriginBoxPlotConfidence 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 tag
74
- if self.tag:
75
- _dict['tag'] = self.tag.to_dict()
76
- # override the default output from pydantic by calling `to_dict()` of box_plot
77
- if self.box_plot:
78
- _dict['box_plot'] = self.box_plot.to_dict()
79
- return _dict
80
-
81
- @classmethod
82
- def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
83
- """Create an instance of TagOriginBoxPlotConfidence from a dict"""
84
- if obj is None:
85
- return None
86
-
87
- if not isinstance(obj, dict):
88
- return cls.model_validate(obj)
89
-
90
- _obj = cls.model_validate({
91
- "tag": Tags.from_dict(obj["tag"]) if obj.get("tag") is not None else None,
92
- "box_plot": BoxPlotConfidence.from_dict(obj["box_plot"]) if obj.get("box_plot") is not None else None
93
- })
94
- return _obj
95
-
96
-
revengai/models/tags.py DELETED
@@ -1,89 +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, StrictStr
20
- from typing import Any, ClassVar, Dict, List
21
- from revengai.models.origin import Origin
22
- from typing import Optional, Set
23
- from typing_extensions import Self
24
-
25
- class Tags(BaseModel):
26
- """
27
- Tags
28
- """ # noqa: E501
29
- tag: StrictStr = Field(description="The tag name")
30
- origin: Origin = Field(description="The origin of the tag")
31
- __properties: ClassVar[List[str]] = ["tag", "origin"]
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 Tags 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 Tags 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
- "tag": obj.get("tag"),
85
- "origin": obj.get("origin")
86
- })
87
- return _obj
88
-
89
-
@@ -1,87 +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, StrictInt
20
- from typing import Any, ClassVar, Dict, List, Optional
21
- from typing_extensions import Annotated
22
- from typing import Optional, Set
23
- from typing_extensions import Self
24
-
25
- class ThreatScoreFunctionBody(BaseModel):
26
- """
27
- ThreatScoreFunctionBody
28
- """ # noqa: E501
29
- function_ids: Optional[Annotated[List[StrictInt], Field(min_length=1, max_length=100)]] = Field(default=None, description="List of function IDs to calculate threat score for")
30
- __properties: ClassVar[List[str]] = ["function_ids"]
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 ThreatScoreFunctionBody 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 ThreatScoreFunctionBody 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_ids": obj.get("function_ids")
84
- })
85
- return _obj
86
-
87
-