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 @@
v1.81.0
v1.81.2
2 changes: 2 additions & 0 deletions docs/AutoUnstripRequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**min_similarity** | **float** | Minimum similarity expected for a match, default is 0.9 | [optional] [default to 0.9]
**apply** | **bool** | Whether to apply the matched function names to the target binary, default is False | [optional] [default to False]
**confidence_threshold** | **float** | Confidence threshold for applying function names, default is 0.9 | [optional] [default to 0.9]
**min_group_size** | **int** | Minimum number of matching functions required to consider for a match, default is 10 | [optional] [default to 10]

## Example

Expand Down
1 change: 1 addition & 0 deletions docs/AutoUnstripResponse.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Name | Type | Description | Notes
**total_time** | **int** | | [optional]
**matches** | [**List[MatchedFunctionSuggestion]**](MatchedFunctionSuggestion.md) | | [optional]
**applied** | **bool** | | [optional]
**error_message** | **str** | | [optional]

## 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__ = "v1.81.0"
__version__ = "v1.81.2"

# 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/v1.81.0/python'
self.user_agent = 'OpenAPI-Generator/v1.81.2/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: v1.81.0\n"\
"SDK Package Version: v1.81.0".\
"Version of the API: v1.81.2\n"\
"SDK Package Version: v1.81.2".\
format(env=sys.platform, pyversion=sys.version)

def get_host_settings(self) -> List[HostSetting]:
Expand Down
8 changes: 6 additions & 2 deletions revengai/models/auto_unstrip_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ class AutoUnstripRequest(BaseModel):
""" # noqa: E501
min_similarity: Optional[Union[Annotated[float, Field(le=1.0, strict=True, ge=0.0)], Annotated[int, Field(le=1, strict=True, ge=0)]]] = Field(default=0.9, description="Minimum similarity expected for a match, default is 0.9")
apply: Optional[StrictBool] = Field(default=False, description="Whether to apply the matched function names to the target binary, default is False")
__properties: ClassVar[List[str]] = ["min_similarity", "apply"]
confidence_threshold: Optional[Union[Annotated[float, Field(le=1.0, strict=True, ge=0.0)], Annotated[int, Field(le=1, strict=True, ge=0)]]] = Field(default=0.9, description="Confidence threshold for applying function names, default is 0.9")
min_group_size: Optional[Annotated[int, Field(le=20, strict=True, ge=1)]] = Field(default=10, description="Minimum number of matching functions required to consider for a match, default is 10")
__properties: ClassVar[List[str]] = ["min_similarity", "apply", "confidence_threshold", "min_group_size"]

model_config = ConfigDict(
populate_by_name=True,
Expand Down Expand Up @@ -82,7 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:

_obj = cls.model_validate({
"min_similarity": obj.get("min_similarity") if obj.get("min_similarity") is not None else 0.9,
"apply": obj.get("apply") if obj.get("apply") is not None else False
"apply": obj.get("apply") if obj.get("apply") is not None else False,
"confidence_threshold": obj.get("confidence_threshold") if obj.get("confidence_threshold") is not None else 0.9,
"min_group_size": obj.get("min_group_size") if obj.get("min_group_size") is not None else 10
})
return _obj

Expand Down
11 changes: 9 additions & 2 deletions revengai/models/auto_unstrip_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ class AutoUnstripResponse(BaseModel):
total_time: Optional[StrictInt] = None
matches: Optional[List[MatchedFunctionSuggestion]] = None
applied: Optional[StrictBool] = None
__properties: ClassVar[List[str]] = ["progress", "status", "total_time", "matches", "applied"]
error_message: Optional[StrictStr] = None
__properties: ClassVar[List[str]] = ["progress", "status", "total_time", "matches", "applied", "error_message"]

model_config = ConfigDict(
populate_by_name=True,
Expand Down Expand Up @@ -99,6 +100,11 @@ def to_dict(self) -> Dict[str, Any]:
if self.applied is None and "applied" in self.model_fields_set:
_dict['applied'] = None

# set to None if error_message (nullable) is None
# and model_fields_set contains the field
if self.error_message is None and "error_message" in self.model_fields_set:
_dict['error_message'] = None

return _dict

@classmethod
Expand All @@ -115,7 +121,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"status": obj.get("status"),
"total_time": obj.get("total_time"),
"matches": [MatchedFunctionSuggestion.from_dict(_item) for _item in obj["matches"]] if obj.get("matches") is not None else None,
"applied": obj.get("applied")
"applied": obj.get("applied"),
"error_message": obj.get("error_message")
})
return _obj

Expand Down
4 changes: 3 additions & 1 deletion test/test_auto_unstrip_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ def make_instance(self, include_optional) -> AutoUnstripRequest:
if include_optional:
return AutoUnstripRequest(
min_similarity = 0.0,
apply = True
apply = True,
confidence_threshold = 0.0,
min_group_size = 1.0
)
else:
return AutoUnstripRequest(
Expand Down
3 changes: 2 additions & 1 deletion test/test_auto_unstrip_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ def make_instance(self, include_optional) -> AutoUnstripResponse:
function_vaddr = 56,
suggested_name = '', )
],
applied = True
applied = True,
error_message = ''
)
else:
return AutoUnstripResponse(
Expand Down