当前时区为 UTC + 8 小时



发表新帖 回复这个主题  [ 22 篇帖子 ]  前往页数 1, 2  下一页
作者 内容
1 楼 
 文章标题 : [悬赏],这个程序谁能运行出结果?
帖子发表于 : 2012-06-05 19:24 
头像

注册: 2010-10-07 14:23
帖子: 33999
地址: 某系某星某洲某国某省某市
系统: Archdows10
送出感谢: 29
接收感谢: 151
[python]
import hashlib
x='string'
y=hashlib.md5(x.encode(encoding='gb2312'))
while y.hexdigest()!=x:
x=y.hexdigest()
y=hashlib.md5(x.encode(encoding='gb2312'))
print(y.hexdigest())[/python]


_________________
心似浮云常自在,意如流水任东西。
此事背后一定有个天大的咪咪
广告:
1、走过路过,不要错过,dropbox网盘2.25G大放送
py大法好,退C保平安
java多妖孽,VB本异端
日诵一千遍,快活似神仙


页首
 用户资料  
 
2 楼 
 文章标题 : Re: 求助,这个程序谁能运行出结果?
帖子发表于 : 2012-06-05 19:29 
头像

注册: 2007-12-14 13:40
帖子: 49887
地址: 志虚国乌由市
系统: Winbuntu
送出感谢: 29
接收感谢: 414
我不


_________________
冷轩信

渠月 · QY

本人只会灌水,不负责回答问题

无聊可以点一下→ http://u.nu/ubuntu

安装flash 还是要用
代码:
sudo apt install adobe-flashplugin


页首
 用户资料  
 
3 楼 
 文章标题 : Re: 求助,这个程序谁能运行出结果?
帖子发表于 : 2012-06-05 19:32 
头像

注册: 2010-06-16 1:05
帖子: 14668
地址: Tencent
系统: Mac OS X
送出感谢: 1
接收感谢: 153
你拿超级计算机算吧,我的i3抗不住


_________________
twitter求fo:http://twitter.com/maplebeats
博客求踩:http://maplebeats.com


页首
 用户资料  
 
4 楼 
 文章标题 : Re: 求助,这个程序谁能运行出结果?
帖子发表于 : 2012-06-05 19:32 
头像

注册: 2008-08-13 8:48
帖子: 26391
地址: 东海硇州,一双管钥。
系统: Fundu i64
送出感谢: 50
接收感谢: 344
主啊,貌似要算很久的样子。


_________________
◎当我站在道德的高度上俯视别人的时候,发现自己是多么渺小。
♥执着但不偏激,反对而不排斥,坚决捍卫矛盾体的存在方式。
★★★天气预报★★★
fcitx-yatable一个可以使用的码表输入法
[教程]几个实例攻克软件编译难关
Gentoo Development Guide
字体相关


页首
 用户资料  
 
5 楼 
 文章标题 : Re: [悬赏],这个程序谁能运行出结果?
帖子发表于 : 2012-06-05 19:58 
头像

注册: 2010-04-23 20:40
帖子: 1950
地址: 浙江·杭州
系统: Arch Linux
送出感谢: 2
接收感谢: 31
用汇编写一个可能会快点……
不过这种神奇的事情会发生吗? :em06


_________________
我是 Giumo Clanjor(哆啦比猫/兰威举)
Where there is a hacker, there is art. | Develop for Developers. (C & perl5)
博客 | Clanjor Prods.
类 C 语言到 brainfuck 编译器


页首
 用户资料  
 
6 楼 
 文章标题 : Re: [悬赏],这个程序谁能运行出结果?
帖子发表于 : 2012-06-05 20:07 
头像

注册: 2010-10-07 14:23
帖子: 33999
地址: 某系某星某洲某国某省某市
系统: Archdows10
送出感谢: 29
接收感谢: 151
数据量储存到1个G了,还没结果呢。。。 :em06


_________________
心似浮云常自在,意如流水任东西。
此事背后一定有个天大的咪咪
广告:
1、走过路过,不要错过,dropbox网盘2.25G大放送
py大法好,退C保平安
java多妖孽,VB本异端
日诵一千遍,快活似神仙


页首
 用户资料  
 
7 楼 
 文章标题 : Re: [悬赏],这个程序谁能运行出结果?
帖子发表于 : 2012-06-05 20:16 
头像

注册: 2008-07-24 11:33
帖子: 4793
地址: 郑州
送出感谢: 4
接收感谢: 92
随机找多好……


_________________
求人不如求它仨: 天蓝的Wiki 屎黄的Wiki 绿
Site: CUIHAO.TK    Twitter: @cuihaoleo
Machine: Athlon64 X2 5200+ / 2x2GB DDR2-800 / GeForce GTS 450
AD: ~まだ見ぬ誰かの笑顔のために~


页首
 用户资料  
 
8 楼 
 文章标题 : Re: [悬赏],这个程序谁能运行出结果?
帖子发表于 : 2012-06-05 21:02 

注册: 2011-03-10 7:43
帖子: 291
送出感谢: 0 次
接收感谢: 2
这是python3么...


页首
 用户资料  
 
9 楼 
 文章标题 : Re: [悬赏],这个程序谁能运行出结果?
帖子发表于 : 2012-06-05 21:22 
头像

注册: 2008-10-22 14:29
帖子: 724
送出感谢: 2
接收感谢: 1
:em06


_________________
代码:
www.bashell.org

亲,走过路过,不要错过


页首
 用户资料  
 
10 楼 
 文章标题 : Re: [悬赏],这个程序谁能运行出结果?
帖子发表于 : 2012-06-05 21:23 
头像

注册: 2010-10-07 14:23
帖子: 33999
地址: 某系某星某洲某国某省某市
系统: Archdows10
送出感谢: 29
接收感谢: 151
运行半个小时,保存每个计算出来的md5值,11个G的数据,木有一个合适的解。。。


_________________
心似浮云常自在,意如流水任东西。
此事背后一定有个天大的咪咪
广告:
1、走过路过,不要错过,dropbox网盘2.25G大放送
py大法好,退C保平安
java多妖孽,VB本异端
日诵一千遍,快活似神仙


页首
 用户资料  
 
11 楼 
 文章标题 : Re: [悬赏],这个程序谁能运行出结果?
帖子发表于 : 2012-06-05 21:40 
头像

注册: 2010-04-23 20:40
帖子: 1950
地址: 浙江·杭州
系统: Arch Linux
送出感谢: 2
接收感谢: 31
试试这个吧,也许会快点
[c]/*

Stolen shamelessly from c-Chaz-Schlarp.c

My big optimization is to start with a random string, find its md5,
and then use that computed md5 as the next source string, with one
hex digit changed. My theory is that since each md5 is effectively
random, and there's no correlation between adjacent md5s, that
changing one digit is just as good as creating a new string of 16
new digits. This lets me do only two expensive rand() calls per
try.

*/

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>

#define NHEXDIGITS 32
#define PROGRESS_MOD (1024*1024)

const unsigned int T[64] = {
0xd76aa478, 0xe8c7b756, 0x242070db, 0xc1bdceee, 0xf57c0faf, 0x4787c62a, 0xa8304613, 0xfd469501,
0x698098d8, 0x8b44f7af, 0xffff5bb1, 0x895cd7be, 0x6b901122, 0xfd987193, 0xa679438e, 0x49b40821,
0xf61e2562, 0xc040b340, 0x265e5a51, 0xe9b6c7aa, 0xd62f105d, 0x02441453, 0xd8a1e681, 0xe7d3fbc8,
0x21e1cde6, 0xc33707d6, 0xf4d50d87, 0x455a14ed, 0xa9e3e905, 0xfcefa3f8, 0x676f02d9, 0x8d2a4c8a,
0xfffa3942, 0x8771f681, 0x6d9d6122, 0xfde5380c, 0xa4beea44, 0x4bdecfa9, 0xf6bb4b60, 0xbebfbc70,
0x289b7ec6, 0xeaa127fa, 0xd4ef3085, 0x04881d05, 0xd9d4d039, 0xe6db99e5, 0x1fa27cf8, 0xc4ac5665,
0xf4292244, 0x432aff97, 0xab9423a7, 0xfc93a039, 0x655b59c3, 0x8f0ccc92, 0xffeff47d, 0x85845dd1,
0x6fa87e4f, 0xfe2ce6e0, 0xa3014314, 0x4e0811a1, 0xf7537e82, 0xbd3af235, 0x2ad7d2bb, 0xeb86d391
};

const unsigned int passdata[128] = {
0, 7, 1, 12, 2, 17, 3, 22, 4, 7, 5, 12, 6, 17, 7, 22, 8, 7, 9, 12, 10, 17, 11, 22, 12, 7, 13, 12, 14, 17, 15, 22,
1, 5, 6, 9, 11, 14, 0, 20, 5, 5, 10, 9, 15, 14, 4, 20, 9, 5, 14, 9, 3, 14, 8, 20, 13, 5, 2, 9, 7, 14, 12, 20,
5, 4, 8, 11, 11, 16, 14, 23, 1, 4, 4, 11, 7, 16, 10, 23, 13, 4, 0, 11, 3, 16, 6, 23, 9, 4, 12, 11, 15, 16, 2, 23,
0, 6, 7, 10, 14, 15, 5, 21, 12, 6, 3, 10, 10, 15, 1, 21, 8, 6, 15, 10, 6, 15, 13, 21, 4, 6, 11, 10, 2, 15, 9, 21
};

typedef struct md5_state_s {
unsigned int count[2];
unsigned int abcd[4];
unsigned char buf[64];
} md5_state_t;

static void md5_process(md5_state_t *pms, const unsigned char *data)
{
unsigned int a = pms->abcd[0];
unsigned int b = pms->abcd[1];
unsigned int c = pms->abcd[2];
unsigned int d = pms->abcd[3];
unsigned int t;
unsigned int xbuf[16];
const unsigned int *X;
int pass = 0;

if(!((data - (const unsigned char *)0) & 3)) {
X = (const unsigned int *)data;
}
else {
memcpy(xbuf, data, 64);
X = xbuf;
}
for(pass = 0; pass < 16; pass++) {
#define SET(a, b, c, d, k, s, Ti) t = a + (pass < 4 ? (((b) & (c)) | (~(b) & (d))) : (pass < 8 ? (((b) & (d)) | ((c) & ~(d))) : (pass < 12 ? ((b) ^ (c) ^ (d)) : ((c) ^ ((b) | ~(d)))))) + X[k] + Ti; a = (((t) << (s)) | ((t) >> (32 - (s)))) + b
SET(a, b, c, d, passdata[pass*8+0], passdata[pass*8+1], T[pass*4+0]);
SET(d, a, b, c, passdata[pass*8+2], passdata[pass*8+3], T[pass*4+1]);
SET(c, d, a, b, passdata[pass*8+4], passdata[pass*8+5], T[pass*4+2]);
SET(b, c, d, a, passdata[pass*8+6], passdata[pass*8+7], T[pass*4+3]);
#undef SET
}
pms->abcd[0] += a;
pms->abcd[1] += b;
pms->abcd[2] += c;
pms->abcd[3] += d;
}

void md5_init(md5_state_t *pms)
{
pms->count[0] = 0;
pms->count[1] = 0;
pms->abcd[0] = 0x67452301;
pms->abcd[1] = 0xefcdab89;
pms->abcd[2] = 0x98badcfe;
pms->abcd[3] = 0x10325476;
}

void md5_append(md5_state_t *pms, const unsigned char *data, int nbytes)
{
const unsigned char *p = data;
const int offset = (pms->count[0] >> 3) & 63;
unsigned int nbits = (unsigned int)(nbytes << 3);
int left = nbytes;

if (nbytes <= 0) {
return;
}
pms->count[1] += nbytes >> 29;
pms->count[0] += nbits;
if (pms->count[0] < nbits) {
pms->count[1]++;
}
if (offset) {
const int copy = (offset + nbytes > 64 ? 64 - offset : nbytes);
memcpy(pms->buf + offset, p, copy);
if (offset + copy < 64) {
return;
}
p += copy;
left -= copy;
md5_process(pms, pms->buf);
}
for(; left >= 64; p += 64, left -= 64) {
md5_process(pms, p);
}

if (left) {
memcpy(pms->buf, p, left);
}
}

void md5_finish(md5_state_t *pms, unsigned char digest[16])
{
static const unsigned char pad[64] = {
128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
};
unsigned char data[8];
int i;

for (i = 0; i < 8; ++i) {
data[i] = (unsigned char)(pms->count[i >> 2] >> ((i & 3) << 3));
}

md5_append(pms, pad, ((55 - (pms->count[0] >> 3)) & 63) + 1);
md5_append(pms, data, 8);
for(i = 0; i < 16; ++i) {
digest[i] = (unsigned char)(pms->abcd[i >> 2] >> ((i & 3) << 3));
}
}

const char * md5(const char *input, int inputlength)
{
md5_state_t state;
static unsigned char digest[16];
static char hex_output[16*2 + 1];
int di;

md5_init(&state);
md5_append(&state, (const unsigned char *)input, inputlength);
md5_finish(&state, digest);
for (di = 0; di < 16; ++di) {
sprintf(hex_output + di * 2, "%02x", digest[di]);
}
return hex_output;
}

int main( void )
{
static const char digits[] = "0123456789abcdef";
unsigned long ntries = 0;
char source[33];
int i;

const time_t start = time(NULL);

srand(start);
memset( source, 0, sizeof( source ) );
for ( i = 0; i < NHEXDIGITS; i++ ) {
source[ i ] = digits[ rand() % 16 ];
}

while (1) {
if ( ntries % PROGRESS_MOD == 0 ) {
const time_t now = time(NULL);
const time_t elapsed = now - start;
const float rate = elapsed ? ((float)ntries/(float)elapsed) : 0;

printf( "# %lu, %6lu, %12lu, %9.1f, %-24.24s, %s\n",
now, elapsed, ntries, rate, ctime(&now), source );
fflush(stdout);
}
++ntries;

const char * const calculated_md5 = md5( source, NHEXDIGITS );
if ( memcmp( calculated_md5, source, NHEXDIGITS ) == 0 ) {
printf("We found it: %s matches %s\n", source, calculated_md5 );
exit(0);
}
/* Rather than come up with all random digits, we just randomize one digit */
memcpy( source, calculated_md5, NHEXDIGITS );
source[ rand() % NHEXDIGITS ] = digits[ rand() % 16 ];
}
return 0;
}
[/c]
这个 git 页上有用各种语言写的解决此问题的方法:https://github.com/elliottkember/The-Kember-Identity


_________________
我是 Giumo Clanjor(哆啦比猫/兰威举)
Where there is a hacker, there is art. | Develop for Developers. (C & perl5)
博客 | Clanjor Prods.
类 C 语言到 brainfuck 编译器


页首
 用户资料  
 
12 楼 
 文章标题 : Re: [悬赏],这个程序谁能运行出结果?
帖子发表于 : 2012-06-05 22:58 

注册: 2010-07-19 21:41
帖子: 22323
系统: OS X
送出感谢: 8
接收感谢: 42
赏南瓜?


_________________
NO DO NO DIE
http://a/%%30%30


页首
 用户资料  
 
13 楼 
 文章标题 : Re: [悬赏],这个程序谁能运行出结果?
帖子发表于 : 2012-06-05 23:07 
头像

注册: 2008-07-24 11:33
帖子: 4793
地址: 郑州
送出感谢: 4
接收感谢: 92
http://www.olegkikin.com/md5game/
我突然想到数学老师讲的一个东西,叫“不动点”。


_________________
求人不如求它仨: 天蓝的Wiki 屎黄的Wiki 绿
Site: CUIHAO.TK    Twitter: @cuihaoleo
Machine: Athlon64 X2 5200+ / 2x2GB DDR2-800 / GeForce GTS 450
AD: ~まだ見ぬ誰かの笑顔のために~


页首
 用户资料  
 
14 楼 
 文章标题 : Re: [悬赏],这个程序谁能运行出结果?
帖子发表于 : 2012-06-06 1:10 
头像

注册: 2010-04-02 16:44
帖子: 529
系统: openSUSE 13.2 x64
送出感谢: 2
接收感谢: 11
好吧…谁能用正常点的c语言翻译一下这玩意儿是用来干嘛的?


_________________
正在建设中的个人博客


页首
 用户资料  
 
15 楼 
 文章标题 : Re: [悬赏],这个程序谁能运行出结果?
帖子发表于 : 2012-06-06 2:36 
头像

注册: 2012-04-14 11:00
帖子: 456
系统: ArchLinux
送出感谢: 3
接收感谢: 10
qgymib 写道:
好吧…谁能用正常点的c语言翻译一下这玩意儿是用来干嘛的?


算字库gb2312的hash值.....

一听就知道我还跑lubuntu的机器带不起来的说...


_________________
My personal blog

毛概老师:大家知道一个有名的空想社会主义吗?同学:乌邦图

用Linux有感:
得,用了1年多linux,感觉自己还是个菜鸟。。。
用了2年了,感觉自己还是一般菜。。。
第3年...头半年感觉和去年没啥变化。。。后半年算是能发挥点主观能动性了吧。。
第4年。。感觉自己算个伪Geek了
第5年,虽然有同学管我叫大神,但我还是觉得自己菜的一笔。。


页首
 用户资料  
 
显示帖子 :  排序  
发表新帖 回复这个主题  [ 22 篇帖子 ]  前往页数 1, 2  下一页

当前时区为 UTC + 8 小时


在线用户

正在浏览此版面的用户:没有注册用户 和 1 位游客


不能 在这个版面发表主题
不能 在这个版面回复主题
不能 在这个版面编辑帖子
不能 在这个版面删除帖子
不能 在这个版面提交附件

前往 :  
本站点为公益性站点,用于推广开源自由软件,由 DiaHosting VPSBudgetVM VPS 提供服务。
我们认为:软件应可免费取得,软件工具在各种语言环境下皆可使用,且不会有任何功能上的差异;
人们应有定制和修改软件的自由,且方式不受限制,只要他们自认为合适。

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
简体中文语系由 王笑宇 翻译