Good Morning to y'all from a python beginner,
I was just trying to turn a text file full of words into md5 to then test said md5'd file against my hashcat rule ideas.
This is python script i came up with to turn my entire plaintext file into a md5 text file.
What could i improve visually if at all. Functionally it works as intended.
Cheers
I was just trying to turn a text file full of words into md5 to then test said md5'd file against my hashcat rule ideas.
This is python script i came up with to turn my entire plaintext file into a md5 text file.
Code
import hashlib
inFileName = input('Please type input filename:')
outFileName = input('Please type output filename:')
outFile = open(outFileName, 'w')
with open(inFileName) as f:
lines= [line.rstrip() for line in f]
for line in lines:
md5 = hashlib.md5(line.encode())
md5hash = md5.hexdigest()
print(line + " : "+md5hash)
outFile.write(md5hash+'\n')
outFile.close()What could i improve visually if at all. Functionally it works as intended.
Cheers


![[Image: fbm0u8g.gif]](https://i.imgur.com/fbm0u8g.gif)

