/* * gcc $(pkg-config --cflags --libs openssl) -o proof proof.c */ #include #include #include #include int main(int argc, char **argv) { const char *target = "\x86\xf7\xa2\x8c"; long data = 0; unsigned char hash[20]; do { ++data; SHA1((char *) &data, sizeof(data), hash); } while (memcmp(target, hash, 4) != 0); BIO *bio, *b64; b64 = BIO_new(BIO_f_base64()); bio = BIO_new_fp(stdout, BIO_NOCLOSE); bio = BIO_push(b64, bio); BIO_write(bio, (char *) &data, sizeof(data)); BIO_flush(bio); BIO_free_all(bio); return 0; }