LandGrey / pydictor

A powerful and useful hacker dictionary builder for a brute-force attack
https://github.com/LandGrey/pydictor
GNU General Public License v3.0
3.22k stars 630 forks source link

I may have found an combination error about your program #18

Closed T0rkman closed 4 years ago

T0rkman commented 4 years ago

My create wordlist start (head) oba. characters is totally 16 (letters, numbers and special symbols) Program needs to choose 5 out of 16 characters for combination. According to my calculation, this combination may be correctly listed in 4,368 different ways. Your program has more than 1 million results for this character length. Also, even though I make the character min length 5 max 5 the result is wrong. This error isn't just in these characters. What I want to say is that there is a combination error in the program. I would be glad if you fix it. Calculator= https://hizliresim.com/aYUJmU Program Combination= https://hizliresim.com/h8VjlO

LandGrey commented 4 years ago

pydictor's combination function -char is exponentiation.

so it's result is 16^5=1048576, not 16 choose 5=4368.

I'm afraid pydictor doesn't work as well as you think, you need disorder wordlist.

that's example code:

#!/usr/bin/env python
# coding: utf-8

import itertools

def nCk(n, k):
    return list(itertools.combinations(n, k))

print(nCk("apgny035oz2_.iml", 5))