有没有办法让这段代码“正常”

我正在解码/解密这段代码,python 看起来像这样


200d\\U0001f466)))|(?:(?:(?:\\U0001f468\\u200d\\U0001f468)|(?:\\U0001f469\\u200d\\U0001f469))\\u200d\\U0001f466)|[\\u2194-\\u2199]|[\\u

有没有办法把它变成普通的 python 代码?以下是加密/解码文件和解密/解码文件。

编码文件 (Filebin)

解码文件 (Filebin)


莫回无
浏览 104回答 2
2回答

慕田峪4524236

该代码只是使用 b64 编码。要对其进行解码,您只需打印传递给 eval 的结果data = ((base64.b64decode(eval('\x74\x72\x75\x73\x74')),'<string>','exec'))print(data[0].decode("utf-8"))如果你想避免评估,你可以使用joy = 'rot13'trust = magic + codecs.decode(love, joy) + god + codecs.decode(destiny, joy)code = (base64.b64decode(trust),'<string>','exec')print(code[0].decode("utf-8"))

婷婷同学_

这不是一个完整的答案,但是您的大部分文件在未转义并打印出来时看起来都是正确的。例如,简单地从您的文件复制粘贴decoded.txt到 python REPL 中并将其打印出来会产生:>>> print(... """\r\n@Exeter.command(aliases=["stopcopycatuser", "stopcopyuser", "stopc... opy"])\r\nasync def stopcopycat(ctx):\r\n&nbsp; &nbsp; await ctx.message.delete()\r... \n&nbsp; &nbsp; if Exeter.user is None:\r\n&nbsp; &nbsp; &nbsp; &nbsp; await ctx.send("You weren\'t cop... ying anyone to begin with")\r\n&nbsp; &nbsp; &nbsp; &nbsp; return\r\n&nbsp; &nbsp; await ctx.send("Stop... ped copying " + str(Exeter.copycat))\r\n&nbsp; &nbsp; Exeter.copycat = None\r\n"""... )@Exeter.command(aliases=["stopcopycatuser", "stopcopyuser", "stopcopy"])async def stopcopycat(ctx):&nbsp; &nbsp; await ctx.message.delete()&nbsp; &nbsp; if Exeter.user is None:&nbsp; &nbsp; &nbsp; &nbsp; await ctx.send("You weren't copying anyone to begin with")&nbsp; &nbsp; &nbsp; &nbsp; return&nbsp; &nbsp; await ctx.send("Stopped copying " + str(Exeter.copycat))&nbsp; &nbsp; Exeter.copycat = None使用您以编程方式完成此操作的一种方法decoded.txt是:with read("decoded.txt") as f:&nbsp; &nbsp; data = f.read()unescaped = data.encode("utf8").decode("unicode_escape")print(unescaped)
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

Python