(self, query)
Retrieve information about a md5 or sh256 payload
Retrieve information about a md5 or sh256 payload
Retrieve information about a md5 or sh256 payload
def get_payload(self, query):
        """
        Retrieve information about a md5 or sh256 payload
        """
        url = "{}payload/".format(self.base_url)
        # check if the hash is md5 or sha256
        if re.match("[A-Fa-f0-9]{64}", query.strip()):
            return self.launch_post_query(url, "sha256_hash", query.strip())
        elif re.match("[a-fA-F\d]{32}", query.strip()):
            return self.launch_post_query(url, "md5_hash", query.strip())
        else:
            raise UrlHausError()
def get_payload ( self , query ) : url = "{}payload/" . format ( self . base_url ) # check if the hash is md5 or sha256 if re . match ( "[A-Fa-f0-9]{64}" , query . strip ( ) ) : return self . launch_post_query ( url , "sha256_hash" , query . strip ( ) ) elif re . match ( "[a-fA-F\d]{32}" , query . strip ( ) ) : return self . launch_post_query ( url , "md5_hash" , query . strip ( ) ) else : raise UrlHausError ( )