将tar文件隐藏在png中

编程入门 行业动态 更新时间:2024-10-24 14:15:15
本文介绍了将tar文件隐藏在png中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我可以简单地将tar文件嵌入png图像中吗?我尝试过 猫file.tar image.png> secret.png, 但这对我不起作用.有没有工作的榜样?最好是在ruby或python中

Can I simply embed tar file inside png image? I`m tried cat file.tar image.png > secret.png, but this not working for me. does have anybody working example? it would be preferable in ruby or python

推荐答案

为简单起见,您可以使用逐步库.

For simplicity's sake, you can use the stepic library.

它将立即执行您想要的操作:

It will do what you want out of the box:

stepic --encode --image-in=plain.png --data-in=data.tar --out=secret.png

解码:

stepic --decode --image-in=secret.png --out=data.tar

您可以从阶梯式网页

我怀疑您是否会将它用于对生命至关重要的数据,但以防万一:

I doubt you're going to be using this for life-critical data, but just in case:

首先加密数据!

使用图像处理技术从图像中恢复有序数据有点琐碎.图片中要编码的内容应具有以下属性,以确保您的安全并难以发现:

It's somewhat trivial to recover ordered data from an image using image processing techniques. What you're encoding in the image should have the following properties to keep you safe and to be difficult to discover:

  • 保持密码安全
  • 与随机噪声没有区别(请参阅1.)
  • 足够大,以使图像的所有像素都携带加密的数据
  • 我们做最后一个的原因是因为它很容易检测编码数据是否在图像的一半处停止.您将获得一张图像,其中一半具有高噪点,而另一半则没有.在某些情况下,这是肉眼可见的,更不用说知道自己在做什么的人了.

    The reason we do the last one is because it is very easy to detect if the encoded data stops half way down the image. You'll have an image where half has high noise, and half doesn't. In some cases, this is visible to the naked eye, let alone to someone who knows what they're doing.

    我不知道stepic是否能完成所有这一切.依靠它,后果自负.

    I don't know if stepic does all this. Rely on it at your own risk.

    更多推荐

    将tar文件隐藏在png中

    本文发布于:2023-11-16 19:53:27,感谢您对本站的认可!
    本文链接:https://www.elefans.com/category/jswz/34/1607232.html
    版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
    本文标签:文件   tar   png

    发布评论

    评论列表 (有 0 条评论)
    草根站长

    >www.elefans.com

    编程频道|电子爱好者 - 技术资讯及电子产品介绍!