forked from rebryk/profanity-brute-force
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Mode.hpp
64 lines (50 loc) · 1.28 KB
/
Mode.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#ifndef HPP_MODE
#define HPP_MODE
#include <string>
#if defined(__APPLE__) || defined(__MACOSX)
#include <OpenCL/cl.h>
#else
#include <CL/cl.h>
#endif
#include "types.hpp"
enum HashTarget {
ADDRESS,
CONTRACT,
HASH_TARGET_COUNT
};
class Mode {
private:
Mode();
public:
static Mode matching(const std::string strHex);
static Mode hashTable(const bool extended, const int skipY);
static Mode reverse(const std::string strPublicAddress, const int steps, const bool extended, const bool cache, const int skipX, const int skipY, const bool single);
static Mode range(const cl_uchar min, const cl_uchar max);
static Mode leading(const char charLeading);
static Mode leadingRange(const cl_uchar min, const cl_uchar max);
static Mode mirror();
static Mode benchmark();
static Mode zeros();
static Mode letters();
static Mode numbers();
static Mode doubles();
std::string name;
std::string kernel;
HashTarget target;
// kernel transform fn name
std::string transformKernel() const;
// Address, Contract, ...
std::string transformName() const;
cl_uchar data1[20];
cl_uchar data2[20];
cl_uchar score;
// Reverse mode
point targetAddress;
int steps;
int skipX;
int skipY;
bool extended;
bool cache;
bool single;
};
#endif /* HPP_MODE */