b64_data = str[len("magnet:?xt=urn:bhih:"): tail] b64_decode = base64.b64decode(b64_data) key = ord(b64_decode[2]) data = b64_decode[4:] output_file = open("C2_info", "wb")     for single_byte in data: output_file.write(chr(ord(single_byte) ^ key)) output_file.close()