コード例 #1
0
ファイル: rulegen.go プロジェクト: coolbry95/magicmachine
// analyzePassword analyzing a single password
func analyzePassword(password string, m spell.Speller, out chan []Word) {

	var words []Word

	// if we are debugging then don't generateWords
	if len(*wordDebug) > 0 && len(m.Suggest(password)) > 0 {
		var temp Word
		temp.password = password
		temp.suggestion = *wordDebug
		temp.hashcatRules = make([][]string, 1)
		temp.bestRuleLength = 999

		temp.hashcatRules = generateHashcatRules(temp.suggestion, temp.password)
	} else {

		// generate words based on the password
		words = generateWords(password, m)

		for i, word := range words {
			// generate a list of hashcat rules for each suggestion
			words[i].hashcatRules = generateHashcatRules(word.suggestion, word.password)
		}
	}

	out <- words
}
コード例 #2
0
ファイル: rulegen.go プロジェクト: coolbry95/magicmachine
func generateSimpleWords(password string, m spell.Speller) []string {
	return m.Suggest(password)
}