2024-10-01 07:23:00 发布
网友
我有这个错误的代码,找不到修复程序。在
49 os.system('powershell -enc '+base64.b64encode(addpermissions.encode('utf_16_le'))) . . . 137 HexRegHash, HexRegSysk, jd, skew1, gbg, data = getRegistryValues(HexRID)
我有个错误:
base64.b64encode生成字节流,而不是字符串。因此,为了使连接生效,必须先用str(base64.b64encode(addpermissions.encode('utf_16_le')))将其转换为字符串
base64.b64encode
str(base64.b64encode(addpermissions.encode('utf_16_le')))
b64cmd = base64.b64encode(cmd.encode('utf_16_le')).decode('utf-8') os.system('powershell -enc ' + b64cmd)
编辑:普通字符串转换不适用于操作系统,改为使用decode('utf-8')
decode('utf-8')
base64.b64encode
生成字节流,而不是字符串。因此,为了使连接生效,必须先用str(base64.b64encode(addpermissions.encode('utf_16_le')))
将其转换为字符串编辑:普通字符串转换不适用于操作系统,改为使用
decode('utf-8')
相关问题 更多 >
编程相关推荐