Browse Source

Test

etomic
jl777 7 years ago
parent
commit
c3b6162c07
  1. 23
      iguana/exchanges/mm.c

23
iguana/exchanges/mm.c

@ -109,7 +109,7 @@ int main(int argc, const char * argv[])
printf("ERROR\n"); printf("ERROR\n");
exit(0); exit(0);
} }
if ( argv[1] != 0 && strcmp(argv[1],"hush") == 0 ) else if ( argv[1] != 0 && strcmp(argv[1],"hush") == 0 )
{ {
uint32_t timestamp; char str[65],wifstr[128]; bits256 privkey; int32_t i; uint32_t timestamp; char str[65],wifstr[128]; bits256 privkey; int32_t i;
timestamp = (uint32_t)time(NULL); timestamp = (uint32_t)time(NULL);
@ -118,7 +118,26 @@ int main(int argc, const char * argv[])
{ {
OS_randombytes(privkey.bytes,sizeof(privkey)); OS_randombytes(privkey.bytes,sizeof(privkey));
bitcoin_priv2wiflong(0xab,wifstr,privkey,0x36); bitcoin_priv2wiflong(0xab,wifstr,privkey,0x36);
if ( wifstr[2] == 'y' && wifstr[3] == 'h' && wifstr[4] == 'u' && wifstr[5] == 's' ) if ( wifstr[2] == 'y' && wifstr[3] == 'H' && wifstr[4] == 'u' && wifstr[5] == 's' )
{
printf("i.%d %s -> wif.%s\n",i,bits256_str(str,privkey),wifstr);
if ( wifstr[6] == 'h' )
break;
} //else printf("failed %s\n",wifstr);
}
printf("done hush vanitygen done %u elapsed %d\n",(uint32_t)time(NULL),(uint32_t)time(NULL) - timestamp);
exit(0);
}
else if ( argv[1] != 0 && strcmp(argv[1],"vanity") == 0 && argv[2] != 0 )
{
uint32_t timestamp; char str[65],wifstr[128]; bits256 privkey; int32_t i;
timestamp = (uint32_t)time(NULL);
printf("start vanitygen (%s) t.%u\n",argv[2],timestamp);
for (i=0; i<1000000000; i++)
{
OS_randombytes(privkey.bytes,sizeof(privkey));
bitcoin_priv2wiflong(0xab,wifstr,privkey,0x36);
if ( wifstr[2] == 'x' && wifstr[3] == 'H' && wifstr[4] == 'u' && wifstr[5] == 's' )
{ {
printf("i.%d %s -> wif.%s\n",i,bits256_str(str,privkey),wifstr); printf("i.%d %s -> wif.%s\n",i,bits256_str(str,privkey),wifstr);
if ( wifstr[6] == 'h' ) if ( wifstr[6] == 'h' )

Loading…
Cancel
Save