added --rand-nonce option to try random instead of sequentially increasing nonces

This commit is contained in:
Fusl 2017-07-25 04:58:20 +02:00
parent b6bf6d9bc9
commit 6516517235
7 changed files with 31 additions and 8 deletions

View file

@ -37,7 +37,7 @@ public:
Url();
Url(const char *url);
Url(const char *host, uint16_t port, const char *user = nullptr, const char *password = nullptr, bool keepAlive = false, bool nicehash = false );
Url(const char *host, uint16_t port, const char *user = nullptr, const char *password = nullptr, bool keepAlive = false, bool nicehash = false, bool randnonce = false );
~Url();
inline bool isKeepAlive() const { return m_keepAlive; }
@ -48,8 +48,10 @@ public:
inline uint16_t port() const { return m_port; }
inline void setKeepAlive(bool keepAlive) { m_keepAlive = keepAlive; }
inline void setNicehash(bool nicehash) { m_nicehash = nicehash; }
inline void setRandNonce(bool randnonce) { m_randnonce = randnonce; }
bool isNicehash() const;
bool isRandNonce() const;
bool parse(const char *url);
bool setUserpass(const char *userpass);
void setPassword(const char *password);
@ -60,6 +62,7 @@ public:
private:
bool m_keepAlive;
bool m_nicehash;
bool m_randnonce;
char *m_host;
char *m_password;
char *m_user;