@@ -764,7 +764,8 @@ def get_similar_hashes(self, hash_input, extended_results=True, classification=N
764764 password = self ._password ,
765765 verify = self ._verify ,
766766 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" )
768769 )
769770
770771 endpoint_base = self .__SINGLE_QUERY_ENDPOINT .format (
@@ -896,7 +897,8 @@ def get_rha1_analytics(self, hash_input, extended_results=True):
896897 password = self ._password ,
897898 verify = self ._verify ,
898899 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" )
900902 )
901903
902904 endpoint = self .__SINGLE_QUERY_ENDPOINT .format (
@@ -921,7 +923,8 @@ def get_rha1_analytics(self, hash_input, extended_results=True):
921923 password = self ._password ,
922924 verify = self ._verify ,
923925 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" )
925928 )
926929
927930 url = "{host}{endpoint}" .format (
@@ -6263,7 +6266,7 @@ def calculate_hash(data_input, hashing_algorithm):
62636266 return hash_hex
62646267
62656268
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 ):
62676270 """Returns an RHA1 file type string.
62686271 :param host: host string
62696272 :type host: str
@@ -6277,14 +6280,17 @@ def get_rha1_type(host, username, password, verify, hash_input, allow_none_retur
62776280 :type hash_input: str
62786281 :param allow_none_return: allow None as return value
62796282 :type allow_none_return: bool
6283+ :param user_agent: default user agent string
6284+ :type user_agent: str
62806285 :returns: RHA1 file type
62816286 :rtype: str
62826287 """
62836288 rldata = FileAnalysis (
62846289 host = host ,
62856290 username = username ,
62866291 password = password ,
6287- verify = verify
6292+ verify = verify ,
6293+ user_agent = user_agent
62886294 )
62896295
62906296 try :
0 commit comments