revengai 1.85.0__py3-none-any.whl → 1.88.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.

@@ -19,6 +19,7 @@ from pydantic import Field, StrictBool, StrictInt, StrictStr, field_validator
19
19
  from typing import List, Optional, Union
20
20
  from typing_extensions import Annotated
21
21
  from revengai.models.ai_unstrip_request import AiUnstripRequest
22
+ from revengai.models.analysis_function_matching_request import AnalysisFunctionMatchingRequest
22
23
  from revengai.models.auto_unstrip_request import AutoUnstripRequest
23
24
  from revengai.models.auto_unstrip_response import AutoUnstripResponse
24
25
  from revengai.models.base_response_analysis_strings_response import BaseResponseAnalysisStringsResponse
@@ -28,6 +29,8 @@ from revengai.models.base_response_function_capability_response import BaseRespo
28
29
  from revengai.models.base_response_function_strings_response import BaseResponseFunctionStringsResponse
29
30
  from revengai.models.base_response_functions_detail_response import BaseResponseFunctionsDetailResponse
30
31
  from revengai.models.base_response_list_similar_functions_response import BaseResponseListSimilarFunctionsResponse
32
+ from revengai.models.function_matching_batch_request import FunctionMatchingBatchRequest
33
+ from revengai.models.function_matching_batch_response import FunctionMatchingBatchResponse
31
34
 
32
35
  from revengai.api_client import ApiClient, RequestSerialized
33
36
  from revengai.api_response import ApiResponse
@@ -354,6 +357,313 @@ class FunctionsCoreApi:
354
357
 
355
358
 
356
359
 
360
+ @validate_call
361
+ def analysis_function_matching(
362
+ self,
363
+ analysis_id: StrictInt,
364
+ analysis_function_matching_request: AnalysisFunctionMatchingRequest,
365
+ authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = None,
366
+ _request_timeout: Union[
367
+ None,
368
+ Annotated[StrictFloat, Field(gt=0)],
369
+ Tuple[
370
+ Annotated[StrictFloat, Field(gt=0)],
371
+ Annotated[StrictFloat, Field(gt=0)]
372
+ ]
373
+ ] = None,
374
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
375
+ _content_type: Optional[StrictStr] = None,
376
+ _headers: Optional[Dict[StrictStr, Any]] = None,
377
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
378
+ ) -> FunctionMatchingBatchResponse:
379
+ """Perform matching for the functions of an analysis
380
+
381
+ Takes in an analysis id and settings and finds the nearest functions for each function that's within the system
382
+
383
+ :param analysis_id: (required)
384
+ :type analysis_id: int
385
+ :param analysis_function_matching_request: (required)
386
+ :type analysis_function_matching_request: AnalysisFunctionMatchingRequest
387
+ :param authorization: API Key bearer token
388
+ :type authorization: str
389
+ :param _request_timeout: timeout setting for this request. If one
390
+ number provided, it will be total request
391
+ timeout. It can also be a pair (tuple) of
392
+ (connection, read) timeouts.
393
+ :type _request_timeout: int, tuple(int, int), optional
394
+ :param _request_auth: set to override the auth_settings for an a single
395
+ request; this effectively ignores the
396
+ authentication in the spec for a single request.
397
+ :type _request_auth: dict, optional
398
+ :param _content_type: force content-type for the request.
399
+ :type _content_type: str, Optional
400
+ :param _headers: set to override the headers for a single
401
+ request; this effectively ignores the headers
402
+ in the spec for a single request.
403
+ :type _headers: dict, optional
404
+ :param _host_index: set to override the host_index for a single
405
+ request; this effectively ignores the host_index
406
+ in the spec for a single request.
407
+ :type _host_index: int, optional
408
+ :return: Returns the result object.
409
+ """ # noqa: E501
410
+
411
+ _param = self._analysis_function_matching_serialize(
412
+ analysis_id=analysis_id,
413
+ analysis_function_matching_request=analysis_function_matching_request,
414
+ authorization=authorization,
415
+ _request_auth=_request_auth,
416
+ _content_type=_content_type,
417
+ _headers=_headers,
418
+ _host_index=_host_index
419
+ )
420
+
421
+ _response_types_map: Dict[str, Optional[str]] = {
422
+ '200': "FunctionMatchingBatchResponse",
423
+ '422': "BaseResponse",
424
+ }
425
+ response_data = self.api_client.call_api(
426
+ *_param,
427
+ _request_timeout=_request_timeout
428
+ )
429
+ response_data.read()
430
+ return self.api_client.response_deserialize(
431
+ response_data=response_data,
432
+ response_types_map=_response_types_map,
433
+ ).data
434
+
435
+
436
+ @validate_call
437
+ def analysis_function_matching_with_http_info(
438
+ self,
439
+ analysis_id: StrictInt,
440
+ analysis_function_matching_request: AnalysisFunctionMatchingRequest,
441
+ authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = None,
442
+ _request_timeout: Union[
443
+ None,
444
+ Annotated[StrictFloat, Field(gt=0)],
445
+ Tuple[
446
+ Annotated[StrictFloat, Field(gt=0)],
447
+ Annotated[StrictFloat, Field(gt=0)]
448
+ ]
449
+ ] = None,
450
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
451
+ _content_type: Optional[StrictStr] = None,
452
+ _headers: Optional[Dict[StrictStr, Any]] = None,
453
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
454
+ ) -> ApiResponse[FunctionMatchingBatchResponse]:
455
+ """Perform matching for the functions of an analysis
456
+
457
+ Takes in an analysis id and settings and finds the nearest functions for each function that's within the system
458
+
459
+ :param analysis_id: (required)
460
+ :type analysis_id: int
461
+ :param analysis_function_matching_request: (required)
462
+ :type analysis_function_matching_request: AnalysisFunctionMatchingRequest
463
+ :param authorization: API Key bearer token
464
+ :type authorization: str
465
+ :param _request_timeout: timeout setting for this request. If one
466
+ number provided, it will be total request
467
+ timeout. It can also be a pair (tuple) of
468
+ (connection, read) timeouts.
469
+ :type _request_timeout: int, tuple(int, int), optional
470
+ :param _request_auth: set to override the auth_settings for an a single
471
+ request; this effectively ignores the
472
+ authentication in the spec for a single request.
473
+ :type _request_auth: dict, optional
474
+ :param _content_type: force content-type for the request.
475
+ :type _content_type: str, Optional
476
+ :param _headers: set to override the headers for a single
477
+ request; this effectively ignores the headers
478
+ in the spec for a single request.
479
+ :type _headers: dict, optional
480
+ :param _host_index: set to override the host_index for a single
481
+ request; this effectively ignores the host_index
482
+ in the spec for a single request.
483
+ :type _host_index: int, optional
484
+ :return: Returns the result object.
485
+ """ # noqa: E501
486
+
487
+ _param = self._analysis_function_matching_serialize(
488
+ analysis_id=analysis_id,
489
+ analysis_function_matching_request=analysis_function_matching_request,
490
+ authorization=authorization,
491
+ _request_auth=_request_auth,
492
+ _content_type=_content_type,
493
+ _headers=_headers,
494
+ _host_index=_host_index
495
+ )
496
+
497
+ _response_types_map: Dict[str, Optional[str]] = {
498
+ '200': "FunctionMatchingBatchResponse",
499
+ '422': "BaseResponse",
500
+ }
501
+ response_data = self.api_client.call_api(
502
+ *_param,
503
+ _request_timeout=_request_timeout
504
+ )
505
+ response_data.read()
506
+ return self.api_client.response_deserialize(
507
+ response_data=response_data,
508
+ response_types_map=_response_types_map,
509
+ )
510
+
511
+
512
+ @validate_call
513
+ def analysis_function_matching_without_preload_content(
514
+ self,
515
+ analysis_id: StrictInt,
516
+ analysis_function_matching_request: AnalysisFunctionMatchingRequest,
517
+ authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = None,
518
+ _request_timeout: Union[
519
+ None,
520
+ Annotated[StrictFloat, Field(gt=0)],
521
+ Tuple[
522
+ Annotated[StrictFloat, Field(gt=0)],
523
+ Annotated[StrictFloat, Field(gt=0)]
524
+ ]
525
+ ] = None,
526
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
527
+ _content_type: Optional[StrictStr] = None,
528
+ _headers: Optional[Dict[StrictStr, Any]] = None,
529
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
530
+ ) -> RESTResponseType:
531
+ """Perform matching for the functions of an analysis
532
+
533
+ Takes in an analysis id and settings and finds the nearest functions for each function that's within the system
534
+
535
+ :param analysis_id: (required)
536
+ :type analysis_id: int
537
+ :param analysis_function_matching_request: (required)
538
+ :type analysis_function_matching_request: AnalysisFunctionMatchingRequest
539
+ :param authorization: API Key bearer token
540
+ :type authorization: str
541
+ :param _request_timeout: timeout setting for this request. If one
542
+ number provided, it will be total request
543
+ timeout. It can also be a pair (tuple) of
544
+ (connection, read) timeouts.
545
+ :type _request_timeout: int, tuple(int, int), optional
546
+ :param _request_auth: set to override the auth_settings for an a single
547
+ request; this effectively ignores the
548
+ authentication in the spec for a single request.
549
+ :type _request_auth: dict, optional
550
+ :param _content_type: force content-type for the request.
551
+ :type _content_type: str, Optional
552
+ :param _headers: set to override the headers for a single
553
+ request; this effectively ignores the headers
554
+ in the spec for a single request.
555
+ :type _headers: dict, optional
556
+ :param _host_index: set to override the host_index for a single
557
+ request; this effectively ignores the host_index
558
+ in the spec for a single request.
559
+ :type _host_index: int, optional
560
+ :return: Returns the result object.
561
+ """ # noqa: E501
562
+
563
+ _param = self._analysis_function_matching_serialize(
564
+ analysis_id=analysis_id,
565
+ analysis_function_matching_request=analysis_function_matching_request,
566
+ authorization=authorization,
567
+ _request_auth=_request_auth,
568
+ _content_type=_content_type,
569
+ _headers=_headers,
570
+ _host_index=_host_index
571
+ )
572
+
573
+ _response_types_map: Dict[str, Optional[str]] = {
574
+ '200': "FunctionMatchingBatchResponse",
575
+ '422': "BaseResponse",
576
+ }
577
+ response_data = self.api_client.call_api(
578
+ *_param,
579
+ _request_timeout=_request_timeout
580
+ )
581
+ return response_data.response
582
+
583
+
584
+ def _analysis_function_matching_serialize(
585
+ self,
586
+ analysis_id,
587
+ analysis_function_matching_request,
588
+ authorization,
589
+ _request_auth,
590
+ _content_type,
591
+ _headers,
592
+ _host_index,
593
+ ) -> RequestSerialized:
594
+
595
+ _host = None
596
+
597
+ _collection_formats: Dict[str, str] = {
598
+ }
599
+
600
+ _path_params: Dict[str, str] = {}
601
+ _query_params: List[Tuple[str, str]] = []
602
+ _header_params: Dict[str, Optional[str]] = _headers or {}
603
+ _form_params: List[Tuple[str, str]] = []
604
+ _files: Dict[
605
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
606
+ ] = {}
607
+ _body_params: Optional[bytes] = None
608
+
609
+ # process the path parameters
610
+ if analysis_id is not None:
611
+ _path_params['analysis_id'] = analysis_id
612
+ # process the query parameters
613
+ # process the header parameters
614
+ if authorization is not None:
615
+ _header_params['authorization'] = authorization
616
+ # process the form parameters
617
+ # process the body parameter
618
+ if analysis_function_matching_request is not None:
619
+ _body_params = analysis_function_matching_request
620
+
621
+
622
+ # set the HTTP header `Accept`
623
+ if 'Accept' not in _header_params:
624
+ _header_params['Accept'] = self.api_client.select_header_accept(
625
+ [
626
+ 'application/json'
627
+ ]
628
+ )
629
+
630
+ # set the HTTP header `Content-Type`
631
+ if _content_type:
632
+ _header_params['Content-Type'] = _content_type
633
+ else:
634
+ _default_content_type = (
635
+ self.api_client.select_header_content_type(
636
+ [
637
+ 'application/json'
638
+ ]
639
+ )
640
+ )
641
+ if _default_content_type is not None:
642
+ _header_params['Content-Type'] = _default_content_type
643
+
644
+ # authentication setting
645
+ _auth_settings: List[str] = [
646
+ 'APIKey'
647
+ ]
648
+
649
+ return self.api_client.param_serialize(
650
+ method='POST',
651
+ resource_path='/v2/analyses/{analysis_id}/functions/matches',
652
+ path_params=_path_params,
653
+ query_params=_query_params,
654
+ header_params=_header_params,
655
+ body=_body_params,
656
+ post_params=_form_params,
657
+ files=_files,
658
+ auth_settings=_auth_settings,
659
+ collection_formats=_collection_formats,
660
+ _host=_host,
661
+ _request_auth=_request_auth
662
+ )
663
+
664
+
665
+
666
+
357
667
  @validate_call
358
668
  def auto_unstrip(
359
669
  self,
@@ -372,7 +682,83 @@ class FunctionsCoreApi:
372
682
  _content_type: Optional[StrictStr] = None,
373
683
  _headers: Optional[Dict[StrictStr, Any]] = None,
374
684
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
375
- ) -> AutoUnstripResponse:
685
+ ) -> AutoUnstripResponse:
686
+ """Performs matching and auto-unstrip for an analysis and its functions
687
+
688
+ Takes in the analysis ID, uses the functions ID's from it and settings to find the nearest function for each function that's within the system
689
+
690
+ :param analysis_id: (required)
691
+ :type analysis_id: int
692
+ :param auto_unstrip_request: (required)
693
+ :type auto_unstrip_request: AutoUnstripRequest
694
+ :param authorization: API Key bearer token
695
+ :type authorization: str
696
+ :param _request_timeout: timeout setting for this request. If one
697
+ number provided, it will be total request
698
+ timeout. It can also be a pair (tuple) of
699
+ (connection, read) timeouts.
700
+ :type _request_timeout: int, tuple(int, int), optional
701
+ :param _request_auth: set to override the auth_settings for an a single
702
+ request; this effectively ignores the
703
+ authentication in the spec for a single request.
704
+ :type _request_auth: dict, optional
705
+ :param _content_type: force content-type for the request.
706
+ :type _content_type: str, Optional
707
+ :param _headers: set to override the headers for a single
708
+ request; this effectively ignores the headers
709
+ in the spec for a single request.
710
+ :type _headers: dict, optional
711
+ :param _host_index: set to override the host_index for a single
712
+ request; this effectively ignores the host_index
713
+ in the spec for a single request.
714
+ :type _host_index: int, optional
715
+ :return: Returns the result object.
716
+ """ # noqa: E501
717
+
718
+ _param = self._auto_unstrip_serialize(
719
+ analysis_id=analysis_id,
720
+ auto_unstrip_request=auto_unstrip_request,
721
+ authorization=authorization,
722
+ _request_auth=_request_auth,
723
+ _content_type=_content_type,
724
+ _headers=_headers,
725
+ _host_index=_host_index
726
+ )
727
+
728
+ _response_types_map: Dict[str, Optional[str]] = {
729
+ '200': "AutoUnstripResponse",
730
+ '422': "BaseResponse",
731
+ }
732
+ response_data = self.api_client.call_api(
733
+ *_param,
734
+ _request_timeout=_request_timeout
735
+ )
736
+ response_data.read()
737
+ return self.api_client.response_deserialize(
738
+ response_data=response_data,
739
+ response_types_map=_response_types_map,
740
+ ).data
741
+
742
+
743
+ @validate_call
744
+ def auto_unstrip_with_http_info(
745
+ self,
746
+ analysis_id: StrictInt,
747
+ auto_unstrip_request: AutoUnstripRequest,
748
+ authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = None,
749
+ _request_timeout: Union[
750
+ None,
751
+ Annotated[StrictFloat, Field(gt=0)],
752
+ Tuple[
753
+ Annotated[StrictFloat, Field(gt=0)],
754
+ Annotated[StrictFloat, Field(gt=0)]
755
+ ]
756
+ ] = None,
757
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
758
+ _content_type: Optional[StrictStr] = None,
759
+ _headers: Optional[Dict[StrictStr, Any]] = None,
760
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
761
+ ) -> ApiResponse[AutoUnstripResponse]:
376
762
  """Performs matching and auto-unstrip for an analysis and its functions
377
763
 
378
764
  Takes in the analysis ID, uses the functions ID's from it and settings to find the nearest function for each function that's within the system
@@ -427,11 +813,11 @@ class FunctionsCoreApi:
427
813
  return self.api_client.response_deserialize(
428
814
  response_data=response_data,
429
815
  response_types_map=_response_types_map,
430
- ).data
816
+ )
431
817
 
432
818
 
433
819
  @validate_call
434
- def auto_unstrip_with_http_info(
820
+ def auto_unstrip_without_preload_content(
435
821
  self,
436
822
  analysis_id: StrictInt,
437
823
  auto_unstrip_request: AutoUnstripRequest,
@@ -448,7 +834,7 @@ class FunctionsCoreApi:
448
834
  _content_type: Optional[StrictStr] = None,
449
835
  _headers: Optional[Dict[StrictStr, Any]] = None,
450
836
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
451
- ) -> ApiResponse[AutoUnstripResponse]:
837
+ ) -> RESTResponseType:
452
838
  """Performs matching and auto-unstrip for an analysis and its functions
453
839
 
454
840
  Takes in the analysis ID, uses the functions ID's from it and settings to find the nearest function for each function that's within the system
@@ -499,6 +885,229 @@ class FunctionsCoreApi:
499
885
  *_param,
500
886
  _request_timeout=_request_timeout
501
887
  )
888
+ return response_data.response
889
+
890
+
891
+ def _auto_unstrip_serialize(
892
+ self,
893
+ analysis_id,
894
+ auto_unstrip_request,
895
+ authorization,
896
+ _request_auth,
897
+ _content_type,
898
+ _headers,
899
+ _host_index,
900
+ ) -> RequestSerialized:
901
+
902
+ _host = None
903
+
904
+ _collection_formats: Dict[str, str] = {
905
+ }
906
+
907
+ _path_params: Dict[str, str] = {}
908
+ _query_params: List[Tuple[str, str]] = []
909
+ _header_params: Dict[str, Optional[str]] = _headers or {}
910
+ _form_params: List[Tuple[str, str]] = []
911
+ _files: Dict[
912
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
913
+ ] = {}
914
+ _body_params: Optional[bytes] = None
915
+
916
+ # process the path parameters
917
+ if analysis_id is not None:
918
+ _path_params['analysis_id'] = analysis_id
919
+ # process the query parameters
920
+ # process the header parameters
921
+ if authorization is not None:
922
+ _header_params['authorization'] = authorization
923
+ # process the form parameters
924
+ # process the body parameter
925
+ if auto_unstrip_request is not None:
926
+ _body_params = auto_unstrip_request
927
+
928
+
929
+ # set the HTTP header `Accept`
930
+ if 'Accept' not in _header_params:
931
+ _header_params['Accept'] = self.api_client.select_header_accept(
932
+ [
933
+ 'application/json'
934
+ ]
935
+ )
936
+
937
+ # set the HTTP header `Content-Type`
938
+ if _content_type:
939
+ _header_params['Content-Type'] = _content_type
940
+ else:
941
+ _default_content_type = (
942
+ self.api_client.select_header_content_type(
943
+ [
944
+ 'application/json'
945
+ ]
946
+ )
947
+ )
948
+ if _default_content_type is not None:
949
+ _header_params['Content-Type'] = _default_content_type
950
+
951
+ # authentication setting
952
+ _auth_settings: List[str] = [
953
+ 'APIKey'
954
+ ]
955
+
956
+ return self.api_client.param_serialize(
957
+ method='POST',
958
+ resource_path='/v2/analyses/{analysis_id}/functions/auto-unstrip',
959
+ path_params=_path_params,
960
+ query_params=_query_params,
961
+ header_params=_header_params,
962
+ body=_body_params,
963
+ post_params=_form_params,
964
+ files=_files,
965
+ auth_settings=_auth_settings,
966
+ collection_formats=_collection_formats,
967
+ _host=_host,
968
+ _request_auth=_request_auth
969
+ )
970
+
971
+
972
+
973
+
974
+ @validate_call
975
+ def batch_function_matching(
976
+ self,
977
+ function_matching_batch_request: FunctionMatchingBatchRequest,
978
+ authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = None,
979
+ _request_timeout: Union[
980
+ None,
981
+ Annotated[StrictFloat, Field(gt=0)],
982
+ Tuple[
983
+ Annotated[StrictFloat, Field(gt=0)],
984
+ Annotated[StrictFloat, Field(gt=0)]
985
+ ]
986
+ ] = None,
987
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
988
+ _content_type: Optional[StrictStr] = None,
989
+ _headers: Optional[Dict[StrictStr, Any]] = None,
990
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
991
+ ) -> FunctionMatchingBatchResponse:
992
+ """Perform function matching for an arbitrary batch of functions, binaries or collections
993
+
994
+ Takes in an input of functions ID's and settings and finds the nearest functions for each function that's within the system
995
+
996
+ :param function_matching_batch_request: (required)
997
+ :type function_matching_batch_request: FunctionMatchingBatchRequest
998
+ :param authorization: API Key bearer token
999
+ :type authorization: str
1000
+ :param _request_timeout: timeout setting for this request. If one
1001
+ number provided, it will be total request
1002
+ timeout. It can also be a pair (tuple) of
1003
+ (connection, read) timeouts.
1004
+ :type _request_timeout: int, tuple(int, int), optional
1005
+ :param _request_auth: set to override the auth_settings for an a single
1006
+ request; this effectively ignores the
1007
+ authentication in the spec for a single request.
1008
+ :type _request_auth: dict, optional
1009
+ :param _content_type: force content-type for the request.
1010
+ :type _content_type: str, Optional
1011
+ :param _headers: set to override the headers for a single
1012
+ request; this effectively ignores the headers
1013
+ in the spec for a single request.
1014
+ :type _headers: dict, optional
1015
+ :param _host_index: set to override the host_index for a single
1016
+ request; this effectively ignores the host_index
1017
+ in the spec for a single request.
1018
+ :type _host_index: int, optional
1019
+ :return: Returns the result object.
1020
+ """ # noqa: E501
1021
+
1022
+ _param = self._batch_function_matching_serialize(
1023
+ function_matching_batch_request=function_matching_batch_request,
1024
+ authorization=authorization,
1025
+ _request_auth=_request_auth,
1026
+ _content_type=_content_type,
1027
+ _headers=_headers,
1028
+ _host_index=_host_index
1029
+ )
1030
+
1031
+ _response_types_map: Dict[str, Optional[str]] = {
1032
+ '200': "FunctionMatchingBatchResponse",
1033
+ '422': "BaseResponse",
1034
+ }
1035
+ response_data = self.api_client.call_api(
1036
+ *_param,
1037
+ _request_timeout=_request_timeout
1038
+ )
1039
+ response_data.read()
1040
+ return self.api_client.response_deserialize(
1041
+ response_data=response_data,
1042
+ response_types_map=_response_types_map,
1043
+ ).data
1044
+
1045
+
1046
+ @validate_call
1047
+ def batch_function_matching_with_http_info(
1048
+ self,
1049
+ function_matching_batch_request: FunctionMatchingBatchRequest,
1050
+ authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = None,
1051
+ _request_timeout: Union[
1052
+ None,
1053
+ Annotated[StrictFloat, Field(gt=0)],
1054
+ Tuple[
1055
+ Annotated[StrictFloat, Field(gt=0)],
1056
+ Annotated[StrictFloat, Field(gt=0)]
1057
+ ]
1058
+ ] = None,
1059
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1060
+ _content_type: Optional[StrictStr] = None,
1061
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1062
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1063
+ ) -> ApiResponse[FunctionMatchingBatchResponse]:
1064
+ """Perform function matching for an arbitrary batch of functions, binaries or collections
1065
+
1066
+ Takes in an input of functions ID's and settings and finds the nearest functions for each function that's within the system
1067
+
1068
+ :param function_matching_batch_request: (required)
1069
+ :type function_matching_batch_request: FunctionMatchingBatchRequest
1070
+ :param authorization: API Key bearer token
1071
+ :type authorization: str
1072
+ :param _request_timeout: timeout setting for this request. If one
1073
+ number provided, it will be total request
1074
+ timeout. It can also be a pair (tuple) of
1075
+ (connection, read) timeouts.
1076
+ :type _request_timeout: int, tuple(int, int), optional
1077
+ :param _request_auth: set to override the auth_settings for an a single
1078
+ request; this effectively ignores the
1079
+ authentication in the spec for a single request.
1080
+ :type _request_auth: dict, optional
1081
+ :param _content_type: force content-type for the request.
1082
+ :type _content_type: str, Optional
1083
+ :param _headers: set to override the headers for a single
1084
+ request; this effectively ignores the headers
1085
+ in the spec for a single request.
1086
+ :type _headers: dict, optional
1087
+ :param _host_index: set to override the host_index for a single
1088
+ request; this effectively ignores the host_index
1089
+ in the spec for a single request.
1090
+ :type _host_index: int, optional
1091
+ :return: Returns the result object.
1092
+ """ # noqa: E501
1093
+
1094
+ _param = self._batch_function_matching_serialize(
1095
+ function_matching_batch_request=function_matching_batch_request,
1096
+ authorization=authorization,
1097
+ _request_auth=_request_auth,
1098
+ _content_type=_content_type,
1099
+ _headers=_headers,
1100
+ _host_index=_host_index
1101
+ )
1102
+
1103
+ _response_types_map: Dict[str, Optional[str]] = {
1104
+ '200': "FunctionMatchingBatchResponse",
1105
+ '422': "BaseResponse",
1106
+ }
1107
+ response_data = self.api_client.call_api(
1108
+ *_param,
1109
+ _request_timeout=_request_timeout
1110
+ )
502
1111
  response_data.read()
503
1112
  return self.api_client.response_deserialize(
504
1113
  response_data=response_data,
@@ -507,10 +1116,9 @@ class FunctionsCoreApi:
507
1116
 
508
1117
 
509
1118
  @validate_call
510
- def auto_unstrip_without_preload_content(
1119
+ def batch_function_matching_without_preload_content(
511
1120
  self,
512
- analysis_id: StrictInt,
513
- auto_unstrip_request: AutoUnstripRequest,
1121
+ function_matching_batch_request: FunctionMatchingBatchRequest,
514
1122
  authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = None,
515
1123
  _request_timeout: Union[
516
1124
  None,
@@ -525,14 +1133,12 @@ class FunctionsCoreApi:
525
1133
  _headers: Optional[Dict[StrictStr, Any]] = None,
526
1134
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
527
1135
  ) -> RESTResponseType:
528
- """Performs matching and auto-unstrip for an analysis and its functions
1136
+ """Perform function matching for an arbitrary batch of functions, binaries or collections
529
1137
 
530
- Takes in the analysis ID, uses the functions ID's from it and settings to find the nearest function for each function that's within the system
1138
+ Takes in an input of functions ID's and settings and finds the nearest functions for each function that's within the system
531
1139
 
532
- :param analysis_id: (required)
533
- :type analysis_id: int
534
- :param auto_unstrip_request: (required)
535
- :type auto_unstrip_request: AutoUnstripRequest
1140
+ :param function_matching_batch_request: (required)
1141
+ :type function_matching_batch_request: FunctionMatchingBatchRequest
536
1142
  :param authorization: API Key bearer token
537
1143
  :type authorization: str
538
1144
  :param _request_timeout: timeout setting for this request. If one
@@ -557,9 +1163,8 @@ class FunctionsCoreApi:
557
1163
  :return: Returns the result object.
558
1164
  """ # noqa: E501
559
1165
 
560
- _param = self._auto_unstrip_serialize(
561
- analysis_id=analysis_id,
562
- auto_unstrip_request=auto_unstrip_request,
1166
+ _param = self._batch_function_matching_serialize(
1167
+ function_matching_batch_request=function_matching_batch_request,
563
1168
  authorization=authorization,
564
1169
  _request_auth=_request_auth,
565
1170
  _content_type=_content_type,
@@ -568,7 +1173,7 @@ class FunctionsCoreApi:
568
1173
  )
569
1174
 
570
1175
  _response_types_map: Dict[str, Optional[str]] = {
571
- '200': "AutoUnstripResponse",
1176
+ '200': "FunctionMatchingBatchResponse",
572
1177
  '422': "BaseResponse",
573
1178
  }
574
1179
  response_data = self.api_client.call_api(
@@ -578,10 +1183,9 @@ class FunctionsCoreApi:
578
1183
  return response_data.response
579
1184
 
580
1185
 
581
- def _auto_unstrip_serialize(
1186
+ def _batch_function_matching_serialize(
582
1187
  self,
583
- analysis_id,
584
- auto_unstrip_request,
1188
+ function_matching_batch_request,
585
1189
  authorization,
586
1190
  _request_auth,
587
1191
  _content_type,
@@ -604,16 +1208,14 @@ class FunctionsCoreApi:
604
1208
  _body_params: Optional[bytes] = None
605
1209
 
606
1210
  # process the path parameters
607
- if analysis_id is not None:
608
- _path_params['analysis_id'] = analysis_id
609
1211
  # process the query parameters
610
1212
  # process the header parameters
611
1213
  if authorization is not None:
612
1214
  _header_params['authorization'] = authorization
613
1215
  # process the form parameters
614
1216
  # process the body parameter
615
- if auto_unstrip_request is not None:
616
- _body_params = auto_unstrip_request
1217
+ if function_matching_batch_request is not None:
1218
+ _body_params = function_matching_batch_request
617
1219
 
618
1220
 
619
1221
  # set the HTTP header `Accept`
@@ -645,7 +1247,7 @@ class FunctionsCoreApi:
645
1247
 
646
1248
  return self.api_client.param_serialize(
647
1249
  method='POST',
648
- resource_path='/v2/analyses/{analysis_id}/functions/auto-unstrip',
1250
+ resource_path='/v2/functions/matches',
649
1251
  path_params=_path_params,
650
1252
  query_params=_query_params,
651
1253
  header_params=_header_params,