程序员 - 最好的方法是什么? [英] Programmers - what's the best way to do this?

查看:66
本文介绍了程序员 - 最好的方法是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

任务是复制一个文件但是使用不同的MD5sums

添加4个字节的随机文本(可能使用/ dev / urandom)和

进一步1-100KBytes的空文本(ASCII码00)。


所有我能想到的是:

head -n 4 / dev / urandom
为4个字节,但我不知道如何正确地将其附加到二进制

文件并添加更多空文本。


任何帮助都非常感激。

解决方案

2005年11月25日15:27:38 -0800 ss **** @ gmail.com 写道:

任务是复制一个文件,但MD5sums不同于
添加4个字节的随机文本(可能使用/ dev / urandom)和
进一步1-100KB的空文本(ASCII码00)。




为什么?


-

删除MYSHOES发送电子邮件


ss **** @ gmail.com 写道:

任务是复制一个文件但是MD5sums不同于
添加4个字节的随机文本(可能使用/ dev / urandom)和
进一步1-100KBytes的空文本(ASCII码00)。

我只能想到是:
头部-n 4 / dev / urandom
4个字节,但我不知道如何正确地将其附加到二进制
文件并添加更多空文本。

任何帮助都非常感激。




如果非常好,我认为''mst''的问题......为什么?

是家庭工作任务吗?


Dave


mst写道:

11月25日2005 15:27:38 -0800 ss****@gmail.com 写道:

< blockquote class =post_quotes>任务是通过添加4个字节的随机文本(可能使用/ de)来复制文件,但使用不同的MD5sums v / urandom)和
进一步1-100KBytes的空文本(ASCII码00)。



为什么?



我我不知道这是从哪里来的。请从

中删除comp.lang.c以进一步跟进此线程。我们不感兴趣。


-

Joe Wright

所有东西都应尽可能简单,但不能更简单。

---阿尔伯特爱因斯坦---


The task is to make duplicates of a file but with different MD5sums by
adding 4 bytes of random text (possibly using /dev/urandom) and a
further 1-100KBytes of empty text (ASCII code 00).

All I can think off is:
head -n 4 /dev/urandom
for 4 bytes but I don''t know how to correctly append that to the binary
file and add further empty text.

Any help much appreciated.

解决方案

On 25 Nov 2005 15:27:38 -0800 ss****@gmail.com wrote:

The task is to make duplicates of a file but with different MD5sums by
adding 4 bytes of random text (possibly using /dev/urandom) and a
further 1-100KBytes of empty text (ASCII code 00).



Why?

--
remove MYSHOES to email


ss****@gmail.com wrote:

The task is to make duplicates of a file but with different MD5sums by
adding 4 bytes of random text (possibly using /dev/urandom) and a
further 1-100KBytes of empty text (ASCII code 00).

All I can think off is:
head -n 4 /dev/urandom
for 4 bytes but I don''t know how to correctly append that to the binary
file and add further empty text.

Any help much appreciated.



I think ''mst'' question if very good.... Why?
Is the a home work assignment?

Dave


mst wrote:

On 25 Nov 2005 15:27:38 -0800 ss****@gmail.com wrote:

The task is to make duplicates of a file but with different MD5sums by
adding 4 bytes of random text (possibly using /dev/urandom) and a
further 1-100KBytes of empty text (ASCII code 00).


Why?


I can''t tell where this came from. Please remove comp.lang.c from
further followups to this thread. We are not interested.

--
Joe Wright
"Everything should be made as simple as possible, but not simpler."
--- Albert Einstein ---


这篇关于程序员 - 最好的方法是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆