revengai 1.89.2__py3-none-any.whl → 1.91.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.
- revengai/__init__.py +3 -15
- revengai/api/__init__.py +0 -1
- revengai/api/analyses_results_metadata_api.py +0 -277
- revengai/api_client.py +1 -1
- revengai/configuration.py +2 -2
- revengai/models/__init__.py +1 -6
- revengai/models/analysis_function_matching_request.py +10 -4
- revengai/models/auto_unstrip_request.py +4 -4
- revengai/models/function_matching_batch_response.py +15 -1
- revengai/models/function_matching_request.py +10 -4
- revengai/models/function_matching_result_with_best_match.py +25 -20
- revengai/models/matched_function.py +9 -2
- revengai/models/{function_threat_score.py → name_confidence.py} +12 -22
- {revengai-1.89.2.dist-info → revengai-1.91.1.dist-info}/METADATA +2 -10
- {revengai-1.89.2.dist-info → revengai-1.91.1.dist-info}/RECORD +16 -22
- revengai/api/functions_threat_score_api.py +0 -609
- revengai/models/analysis_threat_score_data.py +0 -98
- revengai/models/base_response_analysis_threat_score_data.py +0 -125
- revengai/models/base_response_function_analysis_threat_score_data.py +0 -125
- revengai/models/base_response_function_threat_score.py +0 -125
- revengai/models/function_analysis_threat_score_data.py +0 -98
- {revengai-1.89.2.dist-info → revengai-1.91.1.dist-info}/WHEEL +0 -0
revengai/__init__.py
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
""" # noqa: E501
|
|
14
14
|
|
|
15
15
|
|
|
16
|
-
__version__ = "v1.
|
|
16
|
+
__version__ = "v1.91.1"
|
|
17
17
|
|
|
18
18
|
# Define package exports
|
|
19
19
|
__all__ = [
|
|
@@ -34,7 +34,6 @@ __all__ = [
|
|
|
34
34
|
"FunctionsDataTypesApi",
|
|
35
35
|
"FunctionsDecompilationApi",
|
|
36
36
|
"FunctionsRenamingHistoryApi",
|
|
37
|
-
"FunctionsThreatScoreApi",
|
|
38
37
|
"ModelsApi",
|
|
39
38
|
"SearchApi",
|
|
40
39
|
"ApiResponse",
|
|
@@ -61,7 +60,6 @@ __all__ = [
|
|
|
61
60
|
"AnalysisScope",
|
|
62
61
|
"AnalysisStringsResponse",
|
|
63
62
|
"AnalysisTags",
|
|
64
|
-
"AnalysisThreatScoreData",
|
|
65
63
|
"AnalysisUpdateRequest",
|
|
66
64
|
"AnalysisUpdateTagsRequest",
|
|
67
65
|
"AnalysisUpdateTagsResponse",
|
|
@@ -85,7 +83,6 @@ __all__ = [
|
|
|
85
83
|
"BaseResponseAnalysisFunctions",
|
|
86
84
|
"BaseResponseAnalysisStringsResponse",
|
|
87
85
|
"BaseResponseAnalysisTags",
|
|
88
|
-
"BaseResponseAnalysisThreatScoreData",
|
|
89
86
|
"BaseResponseAnalysisUpdateTagsResponse",
|
|
90
87
|
"BaseResponseBasic",
|
|
91
88
|
"BaseResponseBinaryAdditionalResponse",
|
|
@@ -112,7 +109,6 @@ __all__ = [
|
|
|
112
109
|
"BaseResponseDict",
|
|
113
110
|
"BaseResponseDynamicExecutionStatus",
|
|
114
111
|
"BaseResponseExternalResponse",
|
|
115
|
-
"BaseResponseFunctionAnalysisThreatScoreData",
|
|
116
112
|
"BaseResponseFunctionBlocksResponse",
|
|
117
113
|
"BaseResponseFunctionCapabilityResponse",
|
|
118
114
|
"BaseResponseFunctionDataTypes",
|
|
@@ -120,7 +116,6 @@ __all__ = [
|
|
|
120
116
|
"BaseResponseFunctionSearchResponse",
|
|
121
117
|
"BaseResponseFunctionStringsResponse",
|
|
122
118
|
"BaseResponseFunctionTaskResponse",
|
|
123
|
-
"BaseResponseFunctionThreatScore",
|
|
124
119
|
"BaseResponseFunctionsDetailResponse",
|
|
125
120
|
"BaseResponseGenerateFunctionDataTypes",
|
|
126
121
|
"BaseResponseGenerationStatusList",
|
|
@@ -221,7 +216,6 @@ __all__ = [
|
|
|
221
216
|
"FileHashes",
|
|
222
217
|
"FileMetadata",
|
|
223
218
|
"Filters",
|
|
224
|
-
"FunctionAnalysisThreatScoreData",
|
|
225
219
|
"FunctionBatchAnn",
|
|
226
220
|
"FunctionBlockDestinationResponse",
|
|
227
221
|
"FunctionBlockResponse",
|
|
@@ -258,7 +252,6 @@ __all__ = [
|
|
|
258
252
|
"FunctionStringsResponse",
|
|
259
253
|
"FunctionTaskResponse",
|
|
260
254
|
"FunctionTaskStatus",
|
|
261
|
-
"FunctionThreatScore",
|
|
262
255
|
"FunctionTypeInput",
|
|
263
256
|
"FunctionTypeOutput",
|
|
264
257
|
"FunctionsDetailResponse",
|
|
@@ -285,6 +278,7 @@ __all__ = [
|
|
|
285
278
|
"MetaModel",
|
|
286
279
|
"ModelName",
|
|
287
280
|
"ModelsResponse",
|
|
281
|
+
"NameConfidence",
|
|
288
282
|
"NearestNeighbor",
|
|
289
283
|
"NetworkOverviewDns",
|
|
290
284
|
"NetworkOverviewDnsAnswer",
|
|
@@ -378,7 +372,6 @@ from revengai.api.functions_core_api import FunctionsCoreApi as FunctionsCoreApi
|
|
|
378
372
|
from revengai.api.functions_data_types_api import FunctionsDataTypesApi as FunctionsDataTypesApi
|
|
379
373
|
from revengai.api.functions_decompilation_api import FunctionsDecompilationApi as FunctionsDecompilationApi
|
|
380
374
|
from revengai.api.functions_renaming_history_api import FunctionsRenamingHistoryApi as FunctionsRenamingHistoryApi
|
|
381
|
-
from revengai.api.functions_threat_score_api import FunctionsThreatScoreApi as FunctionsThreatScoreApi
|
|
382
375
|
from revengai.api.models_api import ModelsApi as ModelsApi
|
|
383
376
|
from revengai.api.search_api import SearchApi as SearchApi
|
|
384
377
|
|
|
@@ -409,7 +402,6 @@ from revengai.models.analysis_record import AnalysisRecord as AnalysisRecord
|
|
|
409
402
|
from revengai.models.analysis_scope import AnalysisScope as AnalysisScope
|
|
410
403
|
from revengai.models.analysis_strings_response import AnalysisStringsResponse as AnalysisStringsResponse
|
|
411
404
|
from revengai.models.analysis_tags import AnalysisTags as AnalysisTags
|
|
412
|
-
from revengai.models.analysis_threat_score_data import AnalysisThreatScoreData as AnalysisThreatScoreData
|
|
413
405
|
from revengai.models.analysis_update_request import AnalysisUpdateRequest as AnalysisUpdateRequest
|
|
414
406
|
from revengai.models.analysis_update_tags_request import AnalysisUpdateTagsRequest as AnalysisUpdateTagsRequest
|
|
415
407
|
from revengai.models.analysis_update_tags_response import AnalysisUpdateTagsResponse as AnalysisUpdateTagsResponse
|
|
@@ -433,7 +425,6 @@ from revengai.models.base_response_analysis_function_mapping import BaseResponse
|
|
|
433
425
|
from revengai.models.base_response_analysis_functions import BaseResponseAnalysisFunctions as BaseResponseAnalysisFunctions
|
|
434
426
|
from revengai.models.base_response_analysis_strings_response import BaseResponseAnalysisStringsResponse as BaseResponseAnalysisStringsResponse
|
|
435
427
|
from revengai.models.base_response_analysis_tags import BaseResponseAnalysisTags as BaseResponseAnalysisTags
|
|
436
|
-
from revengai.models.base_response_analysis_threat_score_data import BaseResponseAnalysisThreatScoreData as BaseResponseAnalysisThreatScoreData
|
|
437
428
|
from revengai.models.base_response_analysis_update_tags_response import BaseResponseAnalysisUpdateTagsResponse as BaseResponseAnalysisUpdateTagsResponse
|
|
438
429
|
from revengai.models.base_response_basic import BaseResponseBasic as BaseResponseBasic
|
|
439
430
|
from revengai.models.base_response_binary_additional_response import BaseResponseBinaryAdditionalResponse as BaseResponseBinaryAdditionalResponse
|
|
@@ -460,7 +451,6 @@ from revengai.models.base_response_decompilation_response import BaseResponseDec
|
|
|
460
451
|
from revengai.models.base_response_dict import BaseResponseDict as BaseResponseDict
|
|
461
452
|
from revengai.models.base_response_dynamic_execution_status import BaseResponseDynamicExecutionStatus as BaseResponseDynamicExecutionStatus
|
|
462
453
|
from revengai.models.base_response_external_response import BaseResponseExternalResponse as BaseResponseExternalResponse
|
|
463
|
-
from revengai.models.base_response_function_analysis_threat_score_data import BaseResponseFunctionAnalysisThreatScoreData as BaseResponseFunctionAnalysisThreatScoreData
|
|
464
454
|
from revengai.models.base_response_function_blocks_response import BaseResponseFunctionBlocksResponse as BaseResponseFunctionBlocksResponse
|
|
465
455
|
from revengai.models.base_response_function_capability_response import BaseResponseFunctionCapabilityResponse as BaseResponseFunctionCapabilityResponse
|
|
466
456
|
from revengai.models.base_response_function_data_types import BaseResponseFunctionDataTypes as BaseResponseFunctionDataTypes
|
|
@@ -468,7 +458,6 @@ from revengai.models.base_response_function_data_types_list import BaseResponseF
|
|
|
468
458
|
from revengai.models.base_response_function_search_response import BaseResponseFunctionSearchResponse as BaseResponseFunctionSearchResponse
|
|
469
459
|
from revengai.models.base_response_function_strings_response import BaseResponseFunctionStringsResponse as BaseResponseFunctionStringsResponse
|
|
470
460
|
from revengai.models.base_response_function_task_response import BaseResponseFunctionTaskResponse as BaseResponseFunctionTaskResponse
|
|
471
|
-
from revengai.models.base_response_function_threat_score import BaseResponseFunctionThreatScore as BaseResponseFunctionThreatScore
|
|
472
461
|
from revengai.models.base_response_functions_detail_response import BaseResponseFunctionsDetailResponse as BaseResponseFunctionsDetailResponse
|
|
473
462
|
from revengai.models.base_response_generate_function_data_types import BaseResponseGenerateFunctionDataTypes as BaseResponseGenerateFunctionDataTypes
|
|
474
463
|
from revengai.models.base_response_generation_status_list import BaseResponseGenerationStatusList as BaseResponseGenerationStatusList
|
|
@@ -569,7 +558,6 @@ from revengai.models.file_format import FileFormat as FileFormat
|
|
|
569
558
|
from revengai.models.file_hashes import FileHashes as FileHashes
|
|
570
559
|
from revengai.models.file_metadata import FileMetadata as FileMetadata
|
|
571
560
|
from revengai.models.filters import Filters as Filters
|
|
572
|
-
from revengai.models.function_analysis_threat_score_data import FunctionAnalysisThreatScoreData as FunctionAnalysisThreatScoreData
|
|
573
561
|
from revengai.models.function_batch_ann import FunctionBatchAnn as FunctionBatchAnn
|
|
574
562
|
from revengai.models.function_block_destination_response import FunctionBlockDestinationResponse as FunctionBlockDestinationResponse
|
|
575
563
|
from revengai.models.function_block_response import FunctionBlockResponse as FunctionBlockResponse
|
|
@@ -606,7 +594,6 @@ from revengai.models.function_string import FunctionString as FunctionString
|
|
|
606
594
|
from revengai.models.function_strings_response import FunctionStringsResponse as FunctionStringsResponse
|
|
607
595
|
from revengai.models.function_task_response import FunctionTaskResponse as FunctionTaskResponse
|
|
608
596
|
from revengai.models.function_task_status import FunctionTaskStatus as FunctionTaskStatus
|
|
609
|
-
from revengai.models.function_threat_score import FunctionThreatScore as FunctionThreatScore
|
|
610
597
|
from revengai.models.function_type_input import FunctionTypeInput as FunctionTypeInput
|
|
611
598
|
from revengai.models.function_type_output import FunctionTypeOutput as FunctionTypeOutput
|
|
612
599
|
from revengai.models.functions_detail_response import FunctionsDetailResponse as FunctionsDetailResponse
|
|
@@ -633,6 +620,7 @@ from revengai.models.matched_function_suggestion import MatchedFunctionSuggestio
|
|
|
633
620
|
from revengai.models.meta_model import MetaModel as MetaModel
|
|
634
621
|
from revengai.models.model_name import ModelName as ModelName
|
|
635
622
|
from revengai.models.models_response import ModelsResponse as ModelsResponse
|
|
623
|
+
from revengai.models.name_confidence import NameConfidence as NameConfidence
|
|
636
624
|
from revengai.models.nearest_neighbor import NearestNeighbor as NearestNeighbor
|
|
637
625
|
from revengai.models.network_overview_dns import NetworkOverviewDns as NetworkOverviewDns
|
|
638
626
|
from revengai.models.network_overview_dns_answer import NetworkOverviewDnsAnswer as NetworkOverviewDnsAnswer
|
revengai/api/__init__.py
CHANGED
|
@@ -18,7 +18,6 @@ from revengai.api.functions_core_api import FunctionsCoreApi
|
|
|
18
18
|
from revengai.api.functions_data_types_api import FunctionsDataTypesApi
|
|
19
19
|
from revengai.api.functions_decompilation_api import FunctionsDecompilationApi
|
|
20
20
|
from revengai.api.functions_renaming_history_api import FunctionsRenamingHistoryApi
|
|
21
|
-
from revengai.api.functions_threat_score_api import FunctionsThreatScoreApi
|
|
22
21
|
from revengai.api.models_api import ModelsApi
|
|
23
22
|
from revengai.api.search_api import SearchApi
|
|
24
23
|
|
|
@@ -20,7 +20,6 @@ from typing import Any, Optional
|
|
|
20
20
|
from typing_extensions import Annotated
|
|
21
21
|
from revengai.models.base_response_analysis_functions import BaseResponseAnalysisFunctions
|
|
22
22
|
from revengai.models.base_response_analysis_tags import BaseResponseAnalysisTags
|
|
23
|
-
from revengai.models.base_response_analysis_threat_score_data import BaseResponseAnalysisThreatScoreData
|
|
24
23
|
from revengai.models.base_response_capabilities import BaseResponseCapabilities
|
|
25
24
|
from revengai.models.base_response_communities import BaseResponseCommunities
|
|
26
25
|
from revengai.models.base_response_list_sbom import BaseResponseListSBOM
|
|
@@ -1771,282 +1770,6 @@ class AnalysesResultsMetadataApi:
|
|
|
1771
1770
|
|
|
1772
1771
|
|
|
1773
1772
|
|
|
1774
|
-
@validate_call
|
|
1775
|
-
def get_threat_score(
|
|
1776
|
-
self,
|
|
1777
|
-
analysis_id: StrictInt,
|
|
1778
|
-
authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = None,
|
|
1779
|
-
_request_timeout: Union[
|
|
1780
|
-
None,
|
|
1781
|
-
Annotated[StrictFloat, Field(gt=0)],
|
|
1782
|
-
Tuple[
|
|
1783
|
-
Annotated[StrictFloat, Field(gt=0)],
|
|
1784
|
-
Annotated[StrictFloat, Field(gt=0)]
|
|
1785
|
-
]
|
|
1786
|
-
] = None,
|
|
1787
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1788
|
-
_content_type: Optional[StrictStr] = None,
|
|
1789
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1790
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1791
|
-
) -> BaseResponseAnalysisThreatScoreData:
|
|
1792
|
-
"""Gets the threat score found in the analysis
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
:param analysis_id: (required)
|
|
1796
|
-
:type analysis_id: int
|
|
1797
|
-
:param authorization: API Key bearer token
|
|
1798
|
-
:type authorization: str
|
|
1799
|
-
:param _request_timeout: timeout setting for this request. If one
|
|
1800
|
-
number provided, it will be total request
|
|
1801
|
-
timeout. It can also be a pair (tuple) of
|
|
1802
|
-
(connection, read) timeouts.
|
|
1803
|
-
:type _request_timeout: int, tuple(int, int), optional
|
|
1804
|
-
:param _request_auth: set to override the auth_settings for an a single
|
|
1805
|
-
request; this effectively ignores the
|
|
1806
|
-
authentication in the spec for a single request.
|
|
1807
|
-
:type _request_auth: dict, optional
|
|
1808
|
-
:param _content_type: force content-type for the request.
|
|
1809
|
-
:type _content_type: str, Optional
|
|
1810
|
-
:param _headers: set to override the headers for a single
|
|
1811
|
-
request; this effectively ignores the headers
|
|
1812
|
-
in the spec for a single request.
|
|
1813
|
-
:type _headers: dict, optional
|
|
1814
|
-
:param _host_index: set to override the host_index for a single
|
|
1815
|
-
request; this effectively ignores the host_index
|
|
1816
|
-
in the spec for a single request.
|
|
1817
|
-
:type _host_index: int, optional
|
|
1818
|
-
:return: Returns the result object.
|
|
1819
|
-
""" # noqa: E501
|
|
1820
|
-
|
|
1821
|
-
_param = self._get_threat_score_serialize(
|
|
1822
|
-
analysis_id=analysis_id,
|
|
1823
|
-
authorization=authorization,
|
|
1824
|
-
_request_auth=_request_auth,
|
|
1825
|
-
_content_type=_content_type,
|
|
1826
|
-
_headers=_headers,
|
|
1827
|
-
_host_index=_host_index
|
|
1828
|
-
)
|
|
1829
|
-
|
|
1830
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
|
1831
|
-
'200': "BaseResponseAnalysisThreatScoreData",
|
|
1832
|
-
'422': "BaseResponse",
|
|
1833
|
-
}
|
|
1834
|
-
response_data = self.api_client.call_api(
|
|
1835
|
-
*_param,
|
|
1836
|
-
_request_timeout=_request_timeout
|
|
1837
|
-
)
|
|
1838
|
-
response_data.read()
|
|
1839
|
-
return self.api_client.response_deserialize(
|
|
1840
|
-
response_data=response_data,
|
|
1841
|
-
response_types_map=_response_types_map,
|
|
1842
|
-
).data
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
@validate_call
|
|
1846
|
-
def get_threat_score_with_http_info(
|
|
1847
|
-
self,
|
|
1848
|
-
analysis_id: StrictInt,
|
|
1849
|
-
authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = None,
|
|
1850
|
-
_request_timeout: Union[
|
|
1851
|
-
None,
|
|
1852
|
-
Annotated[StrictFloat, Field(gt=0)],
|
|
1853
|
-
Tuple[
|
|
1854
|
-
Annotated[StrictFloat, Field(gt=0)],
|
|
1855
|
-
Annotated[StrictFloat, Field(gt=0)]
|
|
1856
|
-
]
|
|
1857
|
-
] = None,
|
|
1858
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1859
|
-
_content_type: Optional[StrictStr] = None,
|
|
1860
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1861
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1862
|
-
) -> ApiResponse[BaseResponseAnalysisThreatScoreData]:
|
|
1863
|
-
"""Gets the threat score found in the analysis
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
:param analysis_id: (required)
|
|
1867
|
-
:type analysis_id: int
|
|
1868
|
-
:param authorization: API Key bearer token
|
|
1869
|
-
:type authorization: str
|
|
1870
|
-
:param _request_timeout: timeout setting for this request. If one
|
|
1871
|
-
number provided, it will be total request
|
|
1872
|
-
timeout. It can also be a pair (tuple) of
|
|
1873
|
-
(connection, read) timeouts.
|
|
1874
|
-
:type _request_timeout: int, tuple(int, int), optional
|
|
1875
|
-
:param _request_auth: set to override the auth_settings for an a single
|
|
1876
|
-
request; this effectively ignores the
|
|
1877
|
-
authentication in the spec for a single request.
|
|
1878
|
-
:type _request_auth: dict, optional
|
|
1879
|
-
:param _content_type: force content-type for the request.
|
|
1880
|
-
:type _content_type: str, Optional
|
|
1881
|
-
:param _headers: set to override the headers for a single
|
|
1882
|
-
request; this effectively ignores the headers
|
|
1883
|
-
in the spec for a single request.
|
|
1884
|
-
:type _headers: dict, optional
|
|
1885
|
-
:param _host_index: set to override the host_index for a single
|
|
1886
|
-
request; this effectively ignores the host_index
|
|
1887
|
-
in the spec for a single request.
|
|
1888
|
-
:type _host_index: int, optional
|
|
1889
|
-
:return: Returns the result object.
|
|
1890
|
-
""" # noqa: E501
|
|
1891
|
-
|
|
1892
|
-
_param = self._get_threat_score_serialize(
|
|
1893
|
-
analysis_id=analysis_id,
|
|
1894
|
-
authorization=authorization,
|
|
1895
|
-
_request_auth=_request_auth,
|
|
1896
|
-
_content_type=_content_type,
|
|
1897
|
-
_headers=_headers,
|
|
1898
|
-
_host_index=_host_index
|
|
1899
|
-
)
|
|
1900
|
-
|
|
1901
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
|
1902
|
-
'200': "BaseResponseAnalysisThreatScoreData",
|
|
1903
|
-
'422': "BaseResponse",
|
|
1904
|
-
}
|
|
1905
|
-
response_data = self.api_client.call_api(
|
|
1906
|
-
*_param,
|
|
1907
|
-
_request_timeout=_request_timeout
|
|
1908
|
-
)
|
|
1909
|
-
response_data.read()
|
|
1910
|
-
return self.api_client.response_deserialize(
|
|
1911
|
-
response_data=response_data,
|
|
1912
|
-
response_types_map=_response_types_map,
|
|
1913
|
-
)
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
@validate_call
|
|
1917
|
-
def get_threat_score_without_preload_content(
|
|
1918
|
-
self,
|
|
1919
|
-
analysis_id: StrictInt,
|
|
1920
|
-
authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = None,
|
|
1921
|
-
_request_timeout: Union[
|
|
1922
|
-
None,
|
|
1923
|
-
Annotated[StrictFloat, Field(gt=0)],
|
|
1924
|
-
Tuple[
|
|
1925
|
-
Annotated[StrictFloat, Field(gt=0)],
|
|
1926
|
-
Annotated[StrictFloat, Field(gt=0)]
|
|
1927
|
-
]
|
|
1928
|
-
] = None,
|
|
1929
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1930
|
-
_content_type: Optional[StrictStr] = None,
|
|
1931
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1932
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1933
|
-
) -> RESTResponseType:
|
|
1934
|
-
"""Gets the threat score found in the analysis
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
:param analysis_id: (required)
|
|
1938
|
-
:type analysis_id: int
|
|
1939
|
-
:param authorization: API Key bearer token
|
|
1940
|
-
:type authorization: str
|
|
1941
|
-
:param _request_timeout: timeout setting for this request. If one
|
|
1942
|
-
number provided, it will be total request
|
|
1943
|
-
timeout. It can also be a pair (tuple) of
|
|
1944
|
-
(connection, read) timeouts.
|
|
1945
|
-
:type _request_timeout: int, tuple(int, int), optional
|
|
1946
|
-
:param _request_auth: set to override the auth_settings for an a single
|
|
1947
|
-
request; this effectively ignores the
|
|
1948
|
-
authentication in the spec for a single request.
|
|
1949
|
-
:type _request_auth: dict, optional
|
|
1950
|
-
:param _content_type: force content-type for the request.
|
|
1951
|
-
:type _content_type: str, Optional
|
|
1952
|
-
:param _headers: set to override the headers for a single
|
|
1953
|
-
request; this effectively ignores the headers
|
|
1954
|
-
in the spec for a single request.
|
|
1955
|
-
:type _headers: dict, optional
|
|
1956
|
-
:param _host_index: set to override the host_index for a single
|
|
1957
|
-
request; this effectively ignores the host_index
|
|
1958
|
-
in the spec for a single request.
|
|
1959
|
-
:type _host_index: int, optional
|
|
1960
|
-
:return: Returns the result object.
|
|
1961
|
-
""" # noqa: E501
|
|
1962
|
-
|
|
1963
|
-
_param = self._get_threat_score_serialize(
|
|
1964
|
-
analysis_id=analysis_id,
|
|
1965
|
-
authorization=authorization,
|
|
1966
|
-
_request_auth=_request_auth,
|
|
1967
|
-
_content_type=_content_type,
|
|
1968
|
-
_headers=_headers,
|
|
1969
|
-
_host_index=_host_index
|
|
1970
|
-
)
|
|
1971
|
-
|
|
1972
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
|
1973
|
-
'200': "BaseResponseAnalysisThreatScoreData",
|
|
1974
|
-
'422': "BaseResponse",
|
|
1975
|
-
}
|
|
1976
|
-
response_data = self.api_client.call_api(
|
|
1977
|
-
*_param,
|
|
1978
|
-
_request_timeout=_request_timeout
|
|
1979
|
-
)
|
|
1980
|
-
return response_data.response
|
|
1981
|
-
|
|
1982
|
-
|
|
1983
|
-
def _get_threat_score_serialize(
|
|
1984
|
-
self,
|
|
1985
|
-
analysis_id,
|
|
1986
|
-
authorization,
|
|
1987
|
-
_request_auth,
|
|
1988
|
-
_content_type,
|
|
1989
|
-
_headers,
|
|
1990
|
-
_host_index,
|
|
1991
|
-
) -> RequestSerialized:
|
|
1992
|
-
|
|
1993
|
-
_host = None
|
|
1994
|
-
|
|
1995
|
-
_collection_formats: Dict[str, str] = {
|
|
1996
|
-
}
|
|
1997
|
-
|
|
1998
|
-
_path_params: Dict[str, str] = {}
|
|
1999
|
-
_query_params: List[Tuple[str, str]] = []
|
|
2000
|
-
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
2001
|
-
_form_params: List[Tuple[str, str]] = []
|
|
2002
|
-
_files: Dict[
|
|
2003
|
-
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
2004
|
-
] = {}
|
|
2005
|
-
_body_params: Optional[bytes] = None
|
|
2006
|
-
|
|
2007
|
-
# process the path parameters
|
|
2008
|
-
if analysis_id is not None:
|
|
2009
|
-
_path_params['analysis_id'] = analysis_id
|
|
2010
|
-
# process the query parameters
|
|
2011
|
-
# process the header parameters
|
|
2012
|
-
if authorization is not None:
|
|
2013
|
-
_header_params['authorization'] = authorization
|
|
2014
|
-
# process the form parameters
|
|
2015
|
-
# process the body parameter
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
# set the HTTP header `Accept`
|
|
2019
|
-
if 'Accept' not in _header_params:
|
|
2020
|
-
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
2021
|
-
[
|
|
2022
|
-
'application/json'
|
|
2023
|
-
]
|
|
2024
|
-
)
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
# authentication setting
|
|
2028
|
-
_auth_settings: List[str] = [
|
|
2029
|
-
'APIKey'
|
|
2030
|
-
]
|
|
2031
|
-
|
|
2032
|
-
return self.api_client.param_serialize(
|
|
2033
|
-
method='GET',
|
|
2034
|
-
resource_path='/v2/analyses/{analysis_id}/threat_score',
|
|
2035
|
-
path_params=_path_params,
|
|
2036
|
-
query_params=_query_params,
|
|
2037
|
-
header_params=_header_params,
|
|
2038
|
-
body=_body_params,
|
|
2039
|
-
post_params=_form_params,
|
|
2040
|
-
files=_files,
|
|
2041
|
-
auth_settings=_auth_settings,
|
|
2042
|
-
collection_formats=_collection_formats,
|
|
2043
|
-
_host=_host,
|
|
2044
|
-
_request_auth=_request_auth
|
|
2045
|
-
)
|
|
2046
|
-
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
1773
|
@validate_call
|
|
2051
1774
|
def get_vulnerabilities(
|
|
2052
1775
|
self,
|
revengai/api_client.py
CHANGED
|
@@ -90,7 +90,7 @@ class ApiClient:
|
|
|
90
90
|
self.default_headers[header_name] = header_value
|
|
91
91
|
self.cookie = cookie
|
|
92
92
|
# Set default User-Agent.
|
|
93
|
-
self.user_agent = 'OpenAPI-Generator/v1.
|
|
93
|
+
self.user_agent = 'OpenAPI-Generator/v1.91.1/python'
|
|
94
94
|
self.client_side_validation = configuration.client_side_validation
|
|
95
95
|
|
|
96
96
|
def __enter__(self):
|
revengai/configuration.py
CHANGED
|
@@ -529,8 +529,8 @@ conf = revengai.Configuration(
|
|
|
529
529
|
return "Python SDK Debug Report:\n"\
|
|
530
530
|
"OS: {env}\n"\
|
|
531
531
|
"Python Version: {pyversion}\n"\
|
|
532
|
-
"Version of the API: v1.
|
|
533
|
-
"SDK Package Version: v1.
|
|
532
|
+
"Version of the API: v1.91.1\n"\
|
|
533
|
+
"SDK Package Version: v1.91.1".\
|
|
534
534
|
format(env=sys.platform, pyversion=sys.version)
|
|
535
535
|
|
|
536
536
|
def get_host_settings(self) -> List[HostSetting]:
|
revengai/models/__init__.py
CHANGED
|
@@ -27,7 +27,6 @@ from revengai.models.analysis_record import AnalysisRecord
|
|
|
27
27
|
from revengai.models.analysis_scope import AnalysisScope
|
|
28
28
|
from revengai.models.analysis_strings_response import AnalysisStringsResponse
|
|
29
29
|
from revengai.models.analysis_tags import AnalysisTags
|
|
30
|
-
from revengai.models.analysis_threat_score_data import AnalysisThreatScoreData
|
|
31
30
|
from revengai.models.analysis_update_request import AnalysisUpdateRequest
|
|
32
31
|
from revengai.models.analysis_update_tags_request import AnalysisUpdateTagsRequest
|
|
33
32
|
from revengai.models.analysis_update_tags_response import AnalysisUpdateTagsResponse
|
|
@@ -51,7 +50,6 @@ from revengai.models.base_response_analysis_function_mapping import BaseResponse
|
|
|
51
50
|
from revengai.models.base_response_analysis_functions import BaseResponseAnalysisFunctions
|
|
52
51
|
from revengai.models.base_response_analysis_strings_response import BaseResponseAnalysisStringsResponse
|
|
53
52
|
from revengai.models.base_response_analysis_tags import BaseResponseAnalysisTags
|
|
54
|
-
from revengai.models.base_response_analysis_threat_score_data import BaseResponseAnalysisThreatScoreData
|
|
55
53
|
from revengai.models.base_response_analysis_update_tags_response import BaseResponseAnalysisUpdateTagsResponse
|
|
56
54
|
from revengai.models.base_response_basic import BaseResponseBasic
|
|
57
55
|
from revengai.models.base_response_binary_additional_response import BaseResponseBinaryAdditionalResponse
|
|
@@ -78,7 +76,6 @@ from revengai.models.base_response_decompilation_response import BaseResponseDec
|
|
|
78
76
|
from revengai.models.base_response_dict import BaseResponseDict
|
|
79
77
|
from revengai.models.base_response_dynamic_execution_status import BaseResponseDynamicExecutionStatus
|
|
80
78
|
from revengai.models.base_response_external_response import BaseResponseExternalResponse
|
|
81
|
-
from revengai.models.base_response_function_analysis_threat_score_data import BaseResponseFunctionAnalysisThreatScoreData
|
|
82
79
|
from revengai.models.base_response_function_blocks_response import BaseResponseFunctionBlocksResponse
|
|
83
80
|
from revengai.models.base_response_function_capability_response import BaseResponseFunctionCapabilityResponse
|
|
84
81
|
from revengai.models.base_response_function_data_types import BaseResponseFunctionDataTypes
|
|
@@ -86,7 +83,6 @@ from revengai.models.base_response_function_data_types_list import BaseResponseF
|
|
|
86
83
|
from revengai.models.base_response_function_search_response import BaseResponseFunctionSearchResponse
|
|
87
84
|
from revengai.models.base_response_function_strings_response import BaseResponseFunctionStringsResponse
|
|
88
85
|
from revengai.models.base_response_function_task_response import BaseResponseFunctionTaskResponse
|
|
89
|
-
from revengai.models.base_response_function_threat_score import BaseResponseFunctionThreatScore
|
|
90
86
|
from revengai.models.base_response_functions_detail_response import BaseResponseFunctionsDetailResponse
|
|
91
87
|
from revengai.models.base_response_generate_function_data_types import BaseResponseGenerateFunctionDataTypes
|
|
92
88
|
from revengai.models.base_response_generation_status_list import BaseResponseGenerationStatusList
|
|
@@ -187,7 +183,6 @@ from revengai.models.file_format import FileFormat
|
|
|
187
183
|
from revengai.models.file_hashes import FileHashes
|
|
188
184
|
from revengai.models.file_metadata import FileMetadata
|
|
189
185
|
from revengai.models.filters import Filters
|
|
190
|
-
from revengai.models.function_analysis_threat_score_data import FunctionAnalysisThreatScoreData
|
|
191
186
|
from revengai.models.function_batch_ann import FunctionBatchAnn
|
|
192
187
|
from revengai.models.function_block_destination_response import FunctionBlockDestinationResponse
|
|
193
188
|
from revengai.models.function_block_response import FunctionBlockResponse
|
|
@@ -224,7 +219,6 @@ from revengai.models.function_string import FunctionString
|
|
|
224
219
|
from revengai.models.function_strings_response import FunctionStringsResponse
|
|
225
220
|
from revengai.models.function_task_response import FunctionTaskResponse
|
|
226
221
|
from revengai.models.function_task_status import FunctionTaskStatus
|
|
227
|
-
from revengai.models.function_threat_score import FunctionThreatScore
|
|
228
222
|
from revengai.models.function_type_input import FunctionTypeInput
|
|
229
223
|
from revengai.models.function_type_output import FunctionTypeOutput
|
|
230
224
|
from revengai.models.functions_detail_response import FunctionsDetailResponse
|
|
@@ -251,6 +245,7 @@ from revengai.models.matched_function_suggestion import MatchedFunctionSuggestio
|
|
|
251
245
|
from revengai.models.meta_model import MetaModel
|
|
252
246
|
from revengai.models.model_name import ModelName
|
|
253
247
|
from revengai.models.models_response import ModelsResponse
|
|
248
|
+
from revengai.models.name_confidence import NameConfidence
|
|
254
249
|
from revengai.models.nearest_neighbor import NearestNeighbor
|
|
255
250
|
from revengai.models.network_overview_dns import NetworkOverviewDns
|
|
256
251
|
from revengai.models.network_overview_dns_answer import NetworkOverviewDnsAnswer
|
|
@@ -27,9 +27,12 @@ class AnalysisFunctionMatchingRequest(BaseModel):
|
|
|
27
27
|
"""
|
|
28
28
|
AnalysisFunctionMatchingRequest
|
|
29
29
|
""" # noqa: E501
|
|
30
|
-
min_similarity: Optional[Union[Annotated[float, Field(le=
|
|
30
|
+
min_similarity: 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="Minimum similarity expected for a match as a percentage, default is 90")
|
|
31
31
|
filters: Optional[FunctionMatchingFilters] = None
|
|
32
|
-
|
|
32
|
+
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")
|
|
33
|
+
page: Optional[Annotated[int, Field(strict=True, ge=1)]] = Field(default=1, description="Page number for paginated results, default is 1 (first page)")
|
|
34
|
+
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")
|
|
35
|
+
__properties: ClassVar[List[str]] = ["min_similarity", "filters", "results_per_function", "page", "page_size"]
|
|
33
36
|
|
|
34
37
|
model_config = ConfigDict(
|
|
35
38
|
populate_by_name=True,
|
|
@@ -90,8 +93,11 @@ class AnalysisFunctionMatchingRequest(BaseModel):
|
|
|
90
93
|
return cls.model_validate(obj)
|
|
91
94
|
|
|
92
95
|
_obj = cls.model_validate({
|
|
93
|
-
"min_similarity": obj.get("min_similarity") if obj.get("min_similarity") is not None else 0
|
|
94
|
-
"filters": FunctionMatchingFilters.from_dict(obj["filters"]) if obj.get("filters") is not None else None
|
|
96
|
+
"min_similarity": obj.get("min_similarity") if obj.get("min_similarity") is not None else 90.0,
|
|
97
|
+
"filters": FunctionMatchingFilters.from_dict(obj["filters"]) if obj.get("filters") is not None else None,
|
|
98
|
+
"results_per_function": obj.get("results_per_function") if obj.get("results_per_function") is not None else 1,
|
|
99
|
+
"page": obj.get("page") if obj.get("page") is not None else 1,
|
|
100
|
+
"page_size": obj.get("page_size") if obj.get("page_size") is not None else 0
|
|
95
101
|
})
|
|
96
102
|
return _obj
|
|
97
103
|
|
|
@@ -26,9 +26,9 @@ class AutoUnstripRequest(BaseModel):
|
|
|
26
26
|
"""
|
|
27
27
|
AutoUnstripRequest
|
|
28
28
|
""" # noqa: E501
|
|
29
|
-
min_similarity: Optional[Union[Annotated[float, Field(le=
|
|
29
|
+
min_similarity: 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="Minimum similarity expected for a match as a percentage, default is 90")
|
|
30
30
|
apply: Optional[StrictBool] = Field(default=False, description="Whether to apply the matched function names to the target binary, default is False")
|
|
31
|
-
confidence_threshold: Optional[Union[Annotated[float, Field(le=
|
|
31
|
+
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")
|
|
32
32
|
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")
|
|
33
33
|
__properties: ClassVar[List[str]] = ["min_similarity", "apply", "confidence_threshold", "min_group_size"]
|
|
34
34
|
|
|
@@ -83,9 +83,9 @@ class AutoUnstripRequest(BaseModel):
|
|
|
83
83
|
return cls.model_validate(obj)
|
|
84
84
|
|
|
85
85
|
_obj = cls.model_validate({
|
|
86
|
-
"min_similarity": obj.get("min_similarity") if obj.get("min_similarity") is not None else 0
|
|
86
|
+
"min_similarity": obj.get("min_similarity") if obj.get("min_similarity") is not None else 90.0,
|
|
87
87
|
"apply": obj.get("apply") if obj.get("apply") is not None else False,
|
|
88
|
-
"confidence_threshold": obj.get("confidence_threshold") if obj.get("confidence_threshold") is not None else 0
|
|
88
|
+
"confidence_threshold": obj.get("confidence_threshold") if obj.get("confidence_threshold") is not None else 90.0,
|
|
89
89
|
"min_group_size": obj.get("min_group_size") if obj.get("min_group_size") is not None else 10
|
|
90
90
|
})
|
|
91
91
|
return _obj
|
|
@@ -30,8 +30,10 @@ class FunctionMatchingBatchResponse(BaseModel):
|
|
|
30
30
|
status: Optional[StrictStr] = None
|
|
31
31
|
total_time: Optional[StrictInt] = None
|
|
32
32
|
error_message: Optional[StrictStr] = None
|
|
33
|
+
current_page: Optional[StrictInt] = None
|
|
34
|
+
total_pages: Optional[StrictInt] = None
|
|
33
35
|
matches: List[FunctionMatchingResultWithBestMatch]
|
|
34
|
-
__properties: ClassVar[List[str]] = ["progress", "status", "total_time", "error_message", "matches"]
|
|
36
|
+
__properties: ClassVar[List[str]] = ["progress", "status", "total_time", "error_message", "current_page", "total_pages", "matches"]
|
|
35
37
|
|
|
36
38
|
model_config = ConfigDict(
|
|
37
39
|
populate_by_name=True,
|
|
@@ -94,6 +96,16 @@ class FunctionMatchingBatchResponse(BaseModel):
|
|
|
94
96
|
if self.error_message is None and "error_message" in self.model_fields_set:
|
|
95
97
|
_dict['error_message'] = None
|
|
96
98
|
|
|
99
|
+
# set to None if current_page (nullable) is None
|
|
100
|
+
# and model_fields_set contains the field
|
|
101
|
+
if self.current_page is None and "current_page" in self.model_fields_set:
|
|
102
|
+
_dict['current_page'] = None
|
|
103
|
+
|
|
104
|
+
# set to None if total_pages (nullable) is None
|
|
105
|
+
# and model_fields_set contains the field
|
|
106
|
+
if self.total_pages is None and "total_pages" in self.model_fields_set:
|
|
107
|
+
_dict['total_pages'] = None
|
|
108
|
+
|
|
97
109
|
return _dict
|
|
98
110
|
|
|
99
111
|
@classmethod
|
|
@@ -110,6 +122,8 @@ class FunctionMatchingBatchResponse(BaseModel):
|
|
|
110
122
|
"status": obj.get("status"),
|
|
111
123
|
"total_time": obj.get("total_time"),
|
|
112
124
|
"error_message": obj.get("error_message"),
|
|
125
|
+
"current_page": obj.get("current_page"),
|
|
126
|
+
"total_pages": obj.get("total_pages"),
|
|
113
127
|
"matches": [FunctionMatchingResultWithBestMatch.from_dict(_item) for _item in obj["matches"]] if obj.get("matches") is not None else None
|
|
114
128
|
})
|
|
115
129
|
return _obj
|
|
@@ -29,9 +29,12 @@ class FunctionMatchingRequest(BaseModel):
|
|
|
29
29
|
""" # noqa: E501
|
|
30
30
|
model_id: StrictInt = Field(description="ID of the model used for function matching, used to determine the embedding model")
|
|
31
31
|
function_ids: List[StrictInt] = Field(description="ID's of functions to find matches for, must be at least one function ID")
|
|
32
|
-
min_similarity: Optional[Union[Annotated[float, Field(le=
|
|
32
|
+
min_similarity: 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="Minimum similarity expected for a match as a percentage, default is 90")
|
|
33
33
|
filters: Optional[FunctionMatchingFilters] = None
|
|
34
|
-
|
|
34
|
+
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")
|
|
35
|
+
page: Optional[Annotated[int, Field(strict=True, ge=1)]] = Field(default=1, description="Page number for paginated results, default is 1 (first page)")
|
|
36
|
+
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")
|
|
37
|
+
__properties: ClassVar[List[str]] = ["model_id", "function_ids", "min_similarity", "filters", "results_per_function", "page", "page_size"]
|
|
35
38
|
|
|
36
39
|
model_config = ConfigDict(
|
|
37
40
|
populate_by_name=True,
|
|
@@ -94,8 +97,11 @@ class FunctionMatchingRequest(BaseModel):
|
|
|
94
97
|
_obj = cls.model_validate({
|
|
95
98
|
"model_id": obj.get("model_id"),
|
|
96
99
|
"function_ids": obj.get("function_ids"),
|
|
97
|
-
"min_similarity": obj.get("min_similarity") if obj.get("min_similarity") is not None else 0
|
|
98
|
-
"filters": FunctionMatchingFilters.from_dict(obj["filters"]) if obj.get("filters") is not None else None
|
|
100
|
+
"min_similarity": obj.get("min_similarity") if obj.get("min_similarity") is not None else 90.0,
|
|
101
|
+
"filters": FunctionMatchingFilters.from_dict(obj["filters"]) if obj.get("filters") is not None else None,
|
|
102
|
+
"results_per_function": obj.get("results_per_function") if obj.get("results_per_function") is not None else 1,
|
|
103
|
+
"page": obj.get("page") if obj.get("page") is not None else 1,
|
|
104
|
+
"page_size": obj.get("page_size") if obj.get("page_size") is not None else 0
|
|
99
105
|
})
|
|
100
106
|
return _obj
|
|
101
107
|
|