<commit_before># Script Name	: password_cracker.py
# Author		: <NAME>
# Created		: 20 May 2013
# Last Modified	:
# Version		: 1.0

# Modifications	:

# Description	: Old school password cracker using python

import crypt  # Import the module


def testPass(cryptPass):  # Start the function
    # (me): splice password from zero index to index position two
    salt = cryptPass[0:2]
    # Open the dictionary file, (me): check the dictionary file for key value
    # pair
    dictFile = open('dictionary.txt', 'r')
    for word in dictFile.readlines():  # Scan through the file
        # (me): remove line breaks from content of file
        word = word.strip('\n')
        cryptWord = crypt.crypt(word, salt)  # Check for password in the file
        # (me): compares the newly ecrypted passwrd and the stored encrypted password
        if (cryptWord == cryptPass):
            print "[+] Found Password: " + word + "\n"
            return
    print "[-] Password Not Found.\n"
    return


def main():  # (me):this reads a file line by line and splits each line at the ":" character point
    passFile = open('passwords.txt')		# Open the password file
    for line in passFile.readlines():  # Read through the file
        if ":" in line:
            user = line.split(':')[0]  # assign any word found in user variable
            # Prepare the user name etc, (me): assign the second value after
            # the split point ":"  to cryptPass
            cryptPass = line.split(':')[1].strip(' ')<commit_msg>completed the commenting of the password_cracker file<commit_after># Script Name	: password_cracker.py
# Author		: <NAME>
# Created		: 20 May 2013
# Last Modified	:
# Version		: 1.0

# Modifications	:

# Description	: Old school password cracker using python

import crypt  # Import the module


def testPass(cryptPass):  # Start the function
    # (me): splice password from zero index to index position two
    salt = cryptPass[0:2]
    # Open the dictionary file, (me): check the dictionary file for key value
    # pair
    dictFile = open('dictionary.txt', 'r')
    for word in dictFile.readlines():  # Scan through the file
        # (me): remove line breaks from content of file
        word = word.strip('\n')
        cryptWord = crypt.crypt(word, salt)  # Check for password in the file
        # (me): compares the newly ecrypted passwrd and the stored encrypted password
        if (cryptWord == cryptPass):
            print "[+] Found Password: " + word + "\n"
            return
    print "[-] Password Not Found.\n"
    return


def main():  # (me):this reads a file line by line and splits each line at the ":" character point
    passFile = open('passwords.txt')		# Open the password file
    for line in passFile.readlines():  # Read through the file
        if ":" in line:
            user = line.split(':')[0]  # assign any word found to user variable
            # Prepare the user name etc, (me): assign the second value after
            # the split point ":"  to cryptPass
            cryptPass = line.split(':')[1].strip(' ')
{'fraction_non_alphanumeric': 0.10254735467015023, 'fraction_numerical': 0.007838014369693011, 'mean_word_length': 2.6859205776173285, 'pattern_counts': {'":': 6, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7567152', 'n_tokens_mistral': 896, 'n_tokens_neox': 853, 'n_words': 352}