【问题标题】:Steganography Error-- 'hex' is not a text encoding; use codecs.encode() to handle arbitrary codecs隐写错误——“十六进制”不是文本编码;使用 codecs.encode() 处理任意编解码器
【发布时间】:2018-05-29 23:51:11
【问题描述】:

我是隐写术的新手。试图做一个测试,我得到这个错误:

 'hex' is not a text encoding; use codecs.encode() to handle arbitrary codecs

我已经阅读了有关 binascii 的信息,但是我该如何进行这项工作呢?

我的代码是这个:

from __future__ import absolute_import, unicode_literals
from steganography.steganography import Steganography

path = "/Users/cohen/Desktop/Screenshot_030.png"
output_path = "/Users/cohen/Desktop/output_steganography.png"

text = "/Users/cohen/Desktop/test.txt"

Steganography.encode(path, output_path, text) #---here is the line with error

谢谢!

【问题讨论】:

  • 你会要求项目维护者更新他们的代码以使用 Python 3,或者只使用 Python 2。
  • 该项目目前不兼容Python 3。
  • 谢谢!我教过他们的代码有些可疑。

标签: python steganography


【解决方案1】:

确实,我也刚刚检查过。该项目与 Python 3 不兼容。

您可以在 GitHub 上找到很多不错的简单隐写术模块,特别是如果您想测试 LSB(最低有效位)技术。例如,这个与 Python 3 兼容: https://github.com/cedricbonhomme/Stegano

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-08-28
    • 2012-06-26
    • 2013-06-10
    • 2020-06-15
    • 2019-03-20
    相关资源
    最近更新 更多