Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .sdk-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v2.9.1
v2.11.0
1 change: 1 addition & 0 deletions docs/Basic.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Name | Type | Description | Notes
**creation** | **datetime** | When the binary was uploaded |
**sha_256_hash** | **str** | The hash of the binary uploaded |
**model_name** | **str** | The model name used for analysis |
**model_id** | **int** | The model ID used for analysis |
**owner_username** | **str** | The name of the owner of the binary |
**analysis_scope** | **str** | The scope of the analysis |
**is_owner** | **bool** | Whether the current user is the owner |
Expand Down
4 changes: 2 additions & 2 deletions docs/FunctionRename.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**new_name** | **str** | The new name for the function | [optional] [default to '']
**new_mangled_name** | **str** | | [optional]
**new_name** | **str** | The new name for the function |
**new_mangled_name** | **str** | The new mangled name for the function |

## Example

Expand Down
4 changes: 2 additions & 2 deletions docs/FunctionRenameMap.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**function_id** | **int** | The ID of the function to rename |
**new_name** | **str** | The new name for the function | [optional] [default to '']
**new_mangled_name** | **str** | | [optional]
**new_name** | **str** | The new name for the function |
**new_mangled_name** | **str** | The new mangled name for the function |

## Example

Expand Down
2 changes: 1 addition & 1 deletion revengai/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
""" # noqa: E501


__version__ = "v2.9.1"
__version__ = "v2.11.0"

# Define package exports
__all__ = [
Expand Down
2 changes: 1 addition & 1 deletion revengai/api_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def __init__(
self.default_headers[header_name] = header_value
self.cookie = cookie
# Set default User-Agent.
self.user_agent = 'OpenAPI-Generator/v2.9.1/python'
self.user_agent = 'OpenAPI-Generator/v2.11.0/python'
self.client_side_validation = configuration.client_side_validation

def __enter__(self):
Expand Down
4 changes: 2 additions & 2 deletions revengai/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -529,8 +529,8 @@ def to_debug_report(self) -> str:
return "Python SDK Debug Report:\n"\
"OS: {env}\n"\
"Python Version: {pyversion}\n"\
"Version of the API: v2.9.1\n"\
"SDK Package Version: v2.9.1".\
"Version of the API: v2.11.0\n"\
"SDK Package Version: v2.11.0".\
format(env=sys.platform, pyversion=sys.version)

def get_host_settings(self) -> List[HostSetting]:
Expand Down
4 changes: 3 additions & 1 deletion revengai/models/basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,15 @@ class Basic(BaseModel):
creation: datetime = Field(description="When the binary was uploaded")
sha_256_hash: StrictStr = Field(description="The hash of the binary uploaded")
model_name: StrictStr = Field(description="The model name used for analysis")
model_id: StrictInt = Field(description="The model ID used for analysis")
owner_username: StrictStr = Field(description="The name of the owner of the binary")
analysis_scope: StrictStr = Field(description="The scope of the analysis")
is_owner: StrictBool = Field(description="Whether the current user is the owner")
debug: StrictBool = Field(description="Whether the current analysis was analysed with debug symbols")
function_count: StrictInt = Field(description="The number of functions in the binary")
is_advanced: StrictBool = Field(description="Whether the analysis was advanced")
base_address: Optional[StrictInt]
__properties: ClassVar[List[str]] = ["binary_name", "binary_size", "creation", "sha_256_hash", "model_name", "owner_username", "analysis_scope", "is_owner", "debug", "function_count", "is_advanced", "base_address"]
__properties: ClassVar[List[str]] = ["binary_name", "binary_size", "creation", "sha_256_hash", "model_name", "model_id", "owner_username", "analysis_scope", "is_owner", "debug", "function_count", "is_advanced", "base_address"]

model_config = ConfigDict(
populate_by_name=True,
Expand Down Expand Up @@ -101,6 +102,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"creation": obj.get("creation"),
"sha_256_hash": obj.get("sha_256_hash"),
"model_name": obj.get("model_name"),
"model_id": obj.get("model_id"),
"owner_username": obj.get("owner_username"),
"analysis_scope": obj.get("analysis_scope"),
"is_owner": obj.get("is_owner"),
Expand Down
13 changes: 4 additions & 9 deletions revengai/models/function_rename.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,16 @@
import json

from pydantic import BaseModel, ConfigDict, Field, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from typing import Any, ClassVar, Dict, List
from typing import Optional, Set
from typing_extensions import Self

class FunctionRename(BaseModel):
"""
FunctionRename
""" # noqa: E501
new_name: Optional[StrictStr] = Field(default='', description="The new name for the function")
new_mangled_name: Optional[StrictStr] = None
new_name: StrictStr = Field(description="The new name for the function")
new_mangled_name: StrictStr = Field(description="The new mangled name for the function")
__properties: ClassVar[List[str]] = ["new_name", "new_mangled_name"]

model_config = ConfigDict(
Expand Down Expand Up @@ -68,11 +68,6 @@ def to_dict(self) -> Dict[str, Any]:
exclude=excluded_fields,
exclude_none=True,
)
# set to None if new_mangled_name (nullable) is None
# and model_fields_set contains the field
if self.new_mangled_name is None and "new_mangled_name" in self.model_fields_set:
_dict['new_mangled_name'] = None

return _dict

@classmethod
Expand All @@ -85,7 +80,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
return cls.model_validate(obj)

_obj = cls.model_validate({
"new_name": obj.get("new_name") if obj.get("new_name") is not None else '',
"new_name": obj.get("new_name"),
"new_mangled_name": obj.get("new_mangled_name")
})
return _obj
Expand Down
13 changes: 4 additions & 9 deletions revengai/models/function_rename_map.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import json

from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from typing import Any, ClassVar, Dict, List
from typing import Optional, Set
from typing_extensions import Self

Expand All @@ -26,8 +26,8 @@ class FunctionRenameMap(BaseModel):
FunctionRenameMap
""" # noqa: E501
function_id: StrictInt = Field(description="The ID of the function to rename")
new_name: Optional[StrictStr] = Field(default='', description="The new name for the function")
new_mangled_name: Optional[StrictStr] = None
new_name: StrictStr = Field(description="The new name for the function")
new_mangled_name: StrictStr = Field(description="The new mangled name for the function")
__properties: ClassVar[List[str]] = ["function_id", "new_name", "new_mangled_name"]

model_config = ConfigDict(
Expand Down Expand Up @@ -69,11 +69,6 @@ def to_dict(self) -> Dict[str, Any]:
exclude=excluded_fields,
exclude_none=True,
)
# set to None if new_mangled_name (nullable) is None
# and model_fields_set contains the field
if self.new_mangled_name is None and "new_mangled_name" in self.model_fields_set:
_dict['new_mangled_name'] = None

return _dict

@classmethod
Expand All @@ -87,7 +82,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:

_obj = cls.model_validate({
"function_id": obj.get("function_id"),
"new_name": obj.get("new_name") if obj.get("new_name") is not None else '',
"new_name": obj.get("new_name"),
"new_mangled_name": obj.get("new_mangled_name")
})
return _obj
Expand Down
1 change: 1 addition & 0 deletions test/test_base_response_basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ def make_instance(self, include_optional) -> BaseResponseBasic:
creation = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'),
sha_256_hash = '',
model_name = '',
model_id = 56,
owner_username = '',
analysis_scope = '',
is_owner = True,
Expand Down
2 changes: 2 additions & 0 deletions test/test_basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ def make_instance(self, include_optional) -> Basic:
creation = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'),
sha_256_hash = '',
model_name = '',
model_id = 56,
owner_username = '',
analysis_scope = '',
is_owner = True,
Expand All @@ -54,6 +55,7 @@ def make_instance(self, include_optional) -> Basic:
creation = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'),
sha_256_hash = '',
model_name = '',
model_id = 56,
owner_username = '',
analysis_scope = '',
is_owner = True,
Expand Down
2 changes: 2 additions & 0 deletions test/test_function_rename.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ def make_instance(self, include_optional) -> FunctionRename:
)
else:
return FunctionRename(
new_name = '',
new_mangled_name = '',
)
"""

Expand Down
2 changes: 2 additions & 0 deletions test/test_function_rename_map.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ def make_instance(self, include_optional) -> FunctionRenameMap:
else:
return FunctionRenameMap(
function_id = 56,
new_name = '',
new_mangled_name = '',
)
"""

Expand Down