Created
April 3, 2015 10:25
-
-
Save Cewlt/42a7a719fe8d2894b925 to your computer and use it in GitHub Desktop.
check the possible combinations of passwords
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import itertools | |
import paramiko | |
def main(): | |
regex = raw_input("Please enter what combination of characters to use: \nexample: abcdefghijklmnopqrstuvwxyz123 \n ") | |
length = raw_input("Okay now enter the length to check for: \n example: abcdefghijklmnopqrstuvwxyz with a length of 4 has 358,800 possible combinations \n so you would type '4' in this case \n") | |
go(str(regex), int(length)) | |
def go(regex, length): | |
am = 0 | |
res = itertools.permutations(regex,length) | |
for i in res: | |
print ''.join(i) | |
am+=1 | |
print "amount: " + str(am) | |
if __name__ == "__main__": | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment