Advertisement
Reptor7

v7miner-test

Mar 26th, 2017
230
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.60 KB | None | 0 0
  1. /********************
  2.  * v7miner-test.cpp *
  3.  ********************/
  4. #include <conio>
  5. #include <random>
  6. #include <iomanip>
  7. #include <iostream>
  8. // Get miner seeds as header from pastebin.com/ih1TdNtX
  9. #include "v7miner(0x000f).h"
  10. using namespace std;
  11.  
  12. // common 52-char ascii table (upper+lowercase letters)
  13. const char TABLE[52]="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
  14.  
  15. //*******************************
  16. // mt19937 Mersenne Twister PRNG
  17. // random generator engine C++11
  18. //*******************************
  19. mt19937 generator(seed); // 32-bit, use mt19937_64 type for 64-bit seeds
  20. uniform_int_distribution<int> distribution(1,52); // num range 1..52
  21.  
  22. #define seedhex(x) setfill('0')<<setw(8)<<uppercase<<hex<<(unsigned long)(x)
  23.  
  24. // mined blocksize is 4096 bytes per seed, test shows the first 64 chars only.
  25. #define BLOCKSIZE 64
  26.  
  27. void V7_Generator(unsigned long randseed)
  28. {
  29.   int ti = 1; /* table id (default = 1) */
  30.  
  31.   cout << "[" << seedhex(randseed) << "] ";
  32.   for (int n=0; n<BLOCKSIZE; n++) {
  33.     ti = distribution(generator(randseed));
  34.     cout << TABLE[ti];
  35.   }
  36.   cout << endl;
  37.   getch();
  38. }
  39.  
  40. int main()
  41. {
  42.   int i;
  43.  
  44.   cout << "v7miner-test v0.3.20171002 [DA2K] Reptor" <<endl;
  45.   cout << "Seeds: "<< seeds << "  GS: " << gs << "  VS: " << vs <<endl<<endl;
  46.  
  47.   cout << "*ACCEPTED*" <<endl;
  48.   for (i=0; i<seeds; i++) { V7_Generator(V7_Mine[i]); }  
  49.  
  50.   cout << "*GOLDMINE*" <<endl;
  51.   for (i=0; i<gs; i++) { V7_Generator(V7_Goldmine[i]); }  
  52.  
  53.   cout << "**VAULTS**" <<endl;
  54.   for (i=0; i<vs; i++) { V7_Generator(V7_Vault[i]); }  
  55.  
  56.   cout << "[END]";
  57.   getch();
  58.  
  59.   return 0;
  60. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement