| Dragonster82 (12) | |||
UPDATE: Final piece of work, how can I make the bruteforce faster? | |||
|
Last edited on
|
|||
| Dragonster82 (12) | |
| Can someone please teach me how to make the bruteforce faster? | |
|
|
|
| Catfish2 (666) | ||
|
You're kind of on the wrong track... with a weird form of loop unrolling. (Trading simplicity for the bloat of duplicate code.) http://en.wikipedia.org/wiki/Loop_unwinding
Bruteforce isn't fast. Bruteforcing means checking all the possible solutions until you find the valid one. Its "speed" is determined by the hardware, and is degraded by how many possible solutions it has to go through. 1) You can gain speed by devising an algorithm which isn't bruteforce, that is to say it doesn't check through all possibilities. An example is a dictionary attack, where you have a database of "most common" numbers. http://en.wikipedia.org/wiki/Dictionary_attack 2) You may gain some speed by using threads. Many modern computers have CPU's with multiple cores. For two cores, you assign one core to check the first half of possible values, and the other one to check the second half. http://en.wikipedia.org/wiki/Thread_%28computing%29 http://en.wikipedia.org/wiki/C%2B%2B11#Threading_facilities http://en.cppreference.com/w/cpp/thread/thread/thread | ||
|
|
||
| Catfish2 (666) | |||
Also this line doesn't look valid to me:if(password >> 9223372036854775807){Perhaps you want:
http://cplusplus.com/reference/std/limits/numeric_limits/ Also, void main() is not standard C++, please use int main() instead.http://www.stroustrup.com/bs_faq2.html#void-main | |||
|
|
|||