#include <stdio.h>
#include <string.h>
unsigned long hashcode = 0x21DD09EC; unsigned long check_password(const char* p){
int* ip = (int*)p; int i;
int res=0;
for(i=0; i<5; i++){
res += ip[i];
}
return res;
}
int main(int argc, char* argv[]){
if(argc<2){
printf("usage : %s [passcode]\n", argv
[0]); return 0;
}
printf("passcode length should be 20 bytes\n"); return 0;
}
if(hashcode == check_password( argv[1] )){
return 0;
}
else
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CiNpbmNsdWRlIDxzdHJpbmcuaD4KdW5zaWduZWQgbG9uZyBoYXNoY29kZSA9IDB4MjFERDA5RUM7ICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGxvbmcgY2hlY2tfcGFzc3dvcmQoY29uc3QgY2hhciogcCl7CiAgICAgICAgaW50KiBpcCA9IChpbnQqKXA7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGludCBpOwogICAgICAgIGludCByZXM9MDsKICAgICAgICBmb3IoaT0wOyBpPDU7IGkrKyl7CiAgICAgICAgICAgICAgICByZXMgKz0gaXBbaV07CiAgICAgICAgfQogICAgICAgIHJldHVybiByZXM7Cn0KCmludCBtYWluKGludCBhcmdjLCBjaGFyKiBhcmd2W10pewogICAgICAgIGlmKGFyZ2M8Mil7CiAgICAgICAgICAgICAgICBwcmludGYoInVzYWdlIDogJXMgW3Bhc3Njb2RlXVxuIiwgYXJndlswXSk7CiAgICAgICAgICAgICAgICByZXR1cm4gMDsKICAgICAgICB9CiAgICAgICAgaWYoc3RybGVuKGFyZ3ZbMV0pICE9IDIwKXsKICAgICAgICAgICAgICAgIHByaW50ZigicGFzc2NvZGUgbGVuZ3RoIHNob3VsZCBiZSAyMCBieXRlc1xuIik7CiAgICAgICAgICAgICAgICByZXR1cm4gMDsKICAgICAgICB9CgogICAgICAgIGlmKGhhc2hjb2RlID09IGNoZWNrX3Bhc3N3b3JkKCBhcmd2WzFdICkpewogICAgICAgICAgICAgICAgc3lzdGVtKCIvYmluL2NhdCBmbGFnIik7CiAgICAgICAgICAgICAgICByZXR1cm4gMDsKICAgICAgICB9CiAgICAgICAgZWxzZQogICAgICAgICAgICAgICAgcHJpbnRmKCJ3cm9uZyBwYXNzY29kZS5cbiIpOwogICAgICAgIHJldHVybiAwOwp9