尝试将zlib压缩和base64编码的数据解码为Python中可读的格式

问题描述 投票:0回答:2
import zlib, base64
exec(zlib.decompress(base64.b64decode('eJxsvUuu7UizpNfXKG5PJUANP==))) 
###The code is short for example only

我该如何解码? 这是代码的图片 https://prnt.sc/26xf8ju

python-2.7 base64 compression decode zlib
2个回答
2
投票

我不太明白您可能遇到什么问题,它应该可以正常运行。使用

exec()
进行此类操作时请务必小心,因为威胁行为者经常使用它来运行二进制文件。

import zlib, base64
a = zlib.decompress(base64.b64decode('eF7zSM3JyVcIzy/KSVFU8FTPVcjPUwguSUzO9i9LLUrLyS9XBADJNQvD'))
print(a)

输出: b“Hello World!我在 StackOverflow!”


0
投票

如何查看输出?

导入zlib、base64 exec(zlib.解压缩(base64.b64解码(b'eJztW1tT4zgWfs+vOJt5iLMbXHFCwkAVD91AT/fMdjcF7PYDRbkUW0lEbNlly1yG4r/vkXx3HAiQ3tBV9kNiR9Kn43P9rMjM9b1AQEC47bktFl8J 5tLsfB5QYjM+S3+4DJ3emgaeC7d0MoTk1x94nv+qu8y2HXpLApp2mFExN32PmHlT3F/+TizL i7hI+36IL1v5UJ+EYXoZ3oet1m/wKeKzkAH2ixbgUndCLAILj0/ZLAoIttgkYDBlDoU/z79/ a9l0Co5HbNNSfTTZwolLuwctwOOWiTl4PuVZQw86QacLJFQgcS95xOPhUGlCl5BqSFd1CKiIAp70kWL+G9uXxYrbdaXLDK8oXafQo9NtCcIWnhkFDnaLWy472W+dq5a6Oz/wBLUEtc1pxC3BPK4lN +chJAut/WER0hCOmaABc4kO54z4uQIjhzC93W21pLJvvcDGuRLV68m31v5KwmixIBxOk04HIIcwnD0d9Y9DaP9gPOTMb5emT4dASBwy7wFR4thMeA5ZtGP9oXF1eseEZkhBmLbqdjYs +5OYx3gABoQS5iTgNkzqt0Sx6Ei7AGPXFPc4cnsljKTcT8SPXAZN23qkHs8JXfxacEf7IDcSoMIhUhsO6BhiFrp9O+M4+ngmA72jU/7/f0J+TDqHxm7o/HR73tHe8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