@@ -764,7 +764,8 @@ def get_similar_hashes(self, hash_input, extended_results=True, classification=N
764
764
password = self ._password ,
765
765
verify = self ._verify ,
766
766
hash_input = hash_input ,
767
- allow_none_return = self ._allow_none_return
767
+ allow_none_return = self ._allow_none_return ,
768
+ user_agent = self ._headers .get ("User-Agent" )
768
769
)
769
770
770
771
endpoint_base = self .__SINGLE_QUERY_ENDPOINT .format (
@@ -896,7 +897,8 @@ def get_rha1_analytics(self, hash_input, extended_results=True):
896
897
password = self ._password ,
897
898
verify = self ._verify ,
898
899
hash_input = hash_input ,
899
- allow_none_return = self ._allow_none_return
900
+ allow_none_return = self ._allow_none_return ,
901
+ user_agent = self ._headers .get ("User-Agent" )
900
902
)
901
903
902
904
endpoint = self .__SINGLE_QUERY_ENDPOINT .format (
@@ -921,7 +923,8 @@ def get_rha1_analytics(self, hash_input, extended_results=True):
921
923
password = self ._password ,
922
924
verify = self ._verify ,
923
925
hash_input = hash_input [0 ],
924
- allow_none_return = self ._allow_none_return
926
+ allow_none_return = self ._allow_none_return ,
927
+ user_agent = self ._headers .get ("User-Agent" )
925
928
)
926
929
927
930
url = "{host}{endpoint}" .format (
@@ -6263,7 +6266,7 @@ def calculate_hash(data_input, hashing_algorithm):
6263
6266
return hash_hex
6264
6267
6265
6268
6266
- def get_rha1_type (host , username , password , verify , hash_input , allow_none_return ):
6269
+ def get_rha1_type (host , username , password , verify , hash_input , allow_none_return , user_agent ):
6267
6270
"""Returns an RHA1 file type string.
6268
6271
:param host: host string
6269
6272
:type host: str
@@ -6277,14 +6280,17 @@ def get_rha1_type(host, username, password, verify, hash_input, allow_none_retur
6277
6280
:type hash_input: str
6278
6281
:param allow_none_return: allow None as return value
6279
6282
:type allow_none_return: bool
6283
+ :param user_agent: default user agent string
6284
+ :type user_agent: str
6280
6285
:returns: RHA1 file type
6281
6286
:rtype: str
6282
6287
"""
6283
6288
rldata = FileAnalysis (
6284
6289
host = host ,
6285
6290
username = username ,
6286
6291
password = password ,
6287
- verify = verify
6292
+ verify = verify ,
6293
+ user_agent = user_agent
6288
6294
)
6289
6295
6290
6296
try :
0 commit comments