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.13.0
v2.14.1
1 change: 1 addition & 0 deletions docs/AnalysisFunctionMatchingRequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Name | Type | Description | Notes
**results_per_function** | **int** | Maximum number of matches to return per function, default is 1, max is 10 | [optional] [default to 1]
**page** | **int** | Page number for paginated results, default is 1 (first page) | [optional] [default to 1]
**page_size** | **int** | Number of functions to return per page, default is 0 (all functions), max is 1000 | [optional] [default to 0]
**status_only** | **bool** | If set to true, only returns the status of the matching operation without the actual results | [optional] [default to False]
**no_cache** | **bool** | If set to true, forces the system to bypass any cached results and perform a fresh computation | [optional] [default to False]

## Example
Expand Down
1 change: 1 addition & 0 deletions docs/AutoUnstripRequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Name | Type | Description | Notes
**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 as a percentage, default is 90 | [optional] [default to 90.0]
**min_group_size** | **int** | Minimum number of matching functions required to consider for a match, default is 10 | [optional] [default to 10]
**status_only** | **bool** | If set to true, only returns the status of the auto-unstrip operation without the actual results | [optional] [default to False]
**no_cache** | **bool** | If set to true, forces the system to bypass any cached results and perform a fresh computation | [optional] [default to False]

## Example
Expand Down
2 changes: 1 addition & 1 deletion docs/FunctionMatchingBatchResponse.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Name | Type | Description | Notes
**error_message** | **str** | | [optional]
**current_page** | **int** | | [optional]
**total_pages** | **int** | | [optional]
**matches** | [**List[FunctionMatchingResultWithBestMatch]**](FunctionMatchingResultWithBestMatch.md) | |
**matches** | [**List[FunctionMatchingResultWithBestMatch]**](FunctionMatchingResultWithBestMatch.md) | | [optional]

## Example

Expand Down
1 change: 1 addition & 0 deletions docs/FunctionMatchingRequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Name | Type | Description | Notes
**results_per_function** | **int** | Maximum number of matches to return per function, default is 1, max is 50 | [optional] [default to 1]
**page** | **int** | Page number for paginated results, default is 1 (first page) | [optional] [default to 1]
**page_size** | **int** | Number of functions to return per page, default is 0 (all functions), max is 1000 | [optional] [default to 0]
**status_only** | **bool** | If set to true, only returns the status of the matching operation without the actual results | [optional] [default to False]
**no_cache** | **bool** | If set to true, forces the system to bypass any cached results and perform a fresh computation | [optional] [default to False]

## 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.13.0"
__version__ = "v2.14.1"

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

def get_host_settings(self) -> List[HostSetting]:
Expand Down
4 changes: 3 additions & 1 deletion revengai/models/analysis_function_matching_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,9 @@ class AnalysisFunctionMatchingRequest(BaseModel):
results_per_function: Optional[Annotated[int, Field(le=10, strict=True, ge=1)]] = Field(default=1, description="Maximum number of matches to return per function, default is 1, max is 10")
page: Optional[Annotated[int, Field(strict=True, ge=1)]] = Field(default=1, description="Page number for paginated results, default is 1 (first page)")
page_size: Optional[Annotated[int, Field(le=1000, strict=True, ge=0)]] = Field(default=0, description="Number of functions to return per page, default is 0 (all functions), max is 1000")
status_only: Optional[StrictBool] = Field(default=False, description="If set to true, only returns the status of the matching operation without the actual results")
no_cache: Optional[StrictBool] = Field(default=False, description="If set to true, forces the system to bypass any cached results and perform a fresh computation")
__properties: ClassVar[List[str]] = ["min_similarity", "filters", "results_per_function", "page", "page_size", "no_cache"]
__properties: ClassVar[List[str]] = ["min_similarity", "filters", "results_per_function", "page", "page_size", "status_only", "no_cache"]

model_config = ConfigDict(
populate_by_name=True,
Expand Down Expand Up @@ -99,6 +100,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"results_per_function": obj.get("results_per_function") if obj.get("results_per_function") is not None else 1,
"page": obj.get("page") if obj.get("page") is not None else 1,
"page_size": obj.get("page_size") if obj.get("page_size") is not None else 0,
"status_only": obj.get("status_only") if obj.get("status_only") is not None else False,
"no_cache": obj.get("no_cache") if obj.get("no_cache") is not None else False
})
return _obj
Expand Down
4 changes: 3 additions & 1 deletion revengai/models/auto_unstrip_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,9 @@ class AutoUnstripRequest(BaseModel):
apply: Optional[StrictBool] = Field(default=False, description="Whether to apply the matched function names to the target binary, default is False")
confidence_threshold: Optional[Union[Annotated[float, Field(le=100.0, strict=True, ge=0.0)], Annotated[int, Field(le=100, strict=True, ge=0)]]] = Field(default=90.0, description="Confidence threshold for applying function names as a percentage, default is 90")
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")
status_only: Optional[StrictBool] = Field(default=False, description="If set to true, only returns the status of the auto-unstrip operation without the actual results")
no_cache: Optional[StrictBool] = Field(default=False, description="If set to true, forces the system to bypass any cached results and perform a fresh computation")
__properties: ClassVar[List[str]] = ["min_similarity", "apply", "confidence_threshold", "min_group_size", "no_cache"]
__properties: ClassVar[List[str]] = ["min_similarity", "apply", "confidence_threshold", "min_group_size", "status_only", "no_cache"]

model_config = ConfigDict(
populate_by_name=True,
Expand Down Expand Up @@ -88,6 +89,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"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 90.0,
"min_group_size": obj.get("min_group_size") if obj.get("min_group_size") is not None else 10,
"status_only": obj.get("status_only") if obj.get("status_only") is not None else False,
"no_cache": obj.get("no_cache") if obj.get("no_cache") is not None else False
})
return _obj
Expand Down
7 changes: 6 additions & 1 deletion revengai/models/function_matching_batch_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class FunctionMatchingBatchResponse(BaseModel):
error_message: Optional[StrictStr] = None
current_page: Optional[StrictInt] = None
total_pages: Optional[StrictInt] = None
matches: List[FunctionMatchingResultWithBestMatch]
matches: Optional[List[FunctionMatchingResultWithBestMatch]] = None
__properties: ClassVar[List[str]] = ["progress", "status", "total_time", "error_message", "current_page", "total_pages", "matches"]

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

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

return _dict

@classmethod
Expand Down
4 changes: 3 additions & 1 deletion revengai/models/function_matching_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,9 @@ class FunctionMatchingRequest(BaseModel):
results_per_function: Optional[Annotated[int, Field(le=50, strict=True, ge=1)]] = Field(default=1, description="Maximum number of matches to return per function, default is 1, max is 50")
page: Optional[Annotated[int, Field(strict=True, ge=1)]] = Field(default=1, description="Page number for paginated results, default is 1 (first page)")
page_size: Optional[Annotated[int, Field(le=1000, strict=True, ge=0)]] = Field(default=0, description="Number of functions to return per page, default is 0 (all functions), max is 1000")
status_only: Optional[StrictBool] = Field(default=False, description="If set to true, only returns the status of the matching operation without the actual results")
no_cache: Optional[StrictBool] = Field(default=False, description="If set to true, forces the system to bypass any cached results and perform a fresh computation")
__properties: ClassVar[List[str]] = ["model_id", "function_ids", "min_similarity", "filters", "results_per_function", "page", "page_size", "no_cache"]
__properties: ClassVar[List[str]] = ["model_id", "function_ids", "min_similarity", "filters", "results_per_function", "page", "page_size", "status_only", "no_cache"]

model_config = ConfigDict(
populate_by_name=True,
Expand Down Expand Up @@ -103,6 +104,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"results_per_function": obj.get("results_per_function") if obj.get("results_per_function") is not None else 1,
"page": obj.get("page") if obj.get("page") is not None else 1,
"page_size": obj.get("page_size") if obj.get("page_size") is not None else 0,
"status_only": obj.get("status_only") if obj.get("status_only") is not None else False,
"no_cache": obj.get("no_cache") if obj.get("no_cache") is not None else False
})
return _obj
Expand Down
1 change: 1 addition & 0 deletions test/test_analysis_function_matching_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ def make_instance(self, include_optional) -> AnalysisFunctionMatchingRequest:
results_per_function = 1.0,
page = 1.0,
page_size = 0.0,
status_only = True,
no_cache = True
)
else:
Expand Down
1 change: 1 addition & 0 deletions test/test_auto_unstrip_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ def make_instance(self, include_optional) -> AutoUnstripRequest:
apply = True,
confidence_threshold = 0.0,
min_group_size = 1.0,
status_only = True,
no_cache = True
)
else:
Expand Down
23 changes: 0 additions & 23 deletions test/test_function_matching_batch_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,29 +66,6 @@ def make_instance(self, include_optional) -> FunctionMatchingBatchResponse:
)
else:
return FunctionMatchingBatchResponse(
matches = [
revengai.models.function_matching_result_with_best_match.FunctionMatchingResultWithBestMatch(
function_id = 56,
matched_functions = [
revengai.models.matched_function.MatchedFunction(
function_id = 56,
binary_id = 56,
function_name = '',
function_vaddr = 56,
mangled_name = '',
debug = True,
binary_name = '',
sha_256_hash = '',
analysis_id = 56,
similarity = 1.337,
confidence = 1.337, )
],
confidences = [
revengai.models.name_confidence.NameConfidence(
name = '',
confidence = 0.0, )
], )
],
)
"""

Expand Down
1 change: 1 addition & 0 deletions test/test_function_matching_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ def make_instance(self, include_optional) -> FunctionMatchingRequest:
results_per_function = 1.0,
page = 1.0,
page_size = 0.0,
status_only = True,
no_cache = True
)
else:
Expand Down