As the title suggests, I'm going to make a custom pw list for Hydra (which I am just now learning..about time)
I have the following Python script below as a test for having 4 letter passwords (Just a quick proof of concept)
#Import libraries
import random
import string
#Initialize any settings
chars = string.digits
size = 4
password = #There is a list here. It might not show up on WHT.
pwlist = open("pwlist.txt", "rw+") #Open a file in write mode
#Loop
for index in range 7454720:
test = .join(random.choice(chars) for x in range(size))
if test not in password:
line = pwlist.write(test)
password.append(test)
Do you think this logic would work fine when it comes to cracking every possible combination of 4 letter password?
Ex:
hydra -l admin -P pwlist.txt -M serverlist.txt
I haven't even booted up Kali at all today, I'm just watching a lecture from Udemy. Any pointers would be nice.
4 Responses
You didn't close your file, this could lead to serious errors. Instead of writing every password to the file separately, you could append them all to a list and iterate over it once, writing each element to the file. This way you could open the file once under an alias.
-Defalt
Thanks Defalt. I'll be sure to make those changes.
I fixed some syntax errors (Forgot several parenthesis) and it is currently running. I'll post something later when it's done..maybe I shouldn't have set it to every possible combination..
good
Share Your Thoughts