Documentation
¶
Index ¶
- func CalcOmenKeyspace(ot *OmenTrainer) map[int]int64
- func FindOmenLevel(ot *OmenTrainer, password string) int
- func IsHexEncoded(line []byte) bool
- func LoadPasswordsToSlice(filename string, prefixCount bool) ([]string, int, int, bool, error)
- func RunPass2Parallel(passwords []string, alphabet []rune, ngram, maxLen int, ...) (*OmenTrainer, *PCFGParser, error)
- func RunPass3Parallel(passwords []string, omenTrainer *OmenTrainer, numWorkers int) map[int]int
- func SaveConfigFile(baseDir string, info *ProgramInfo, fileInput *FileInput, ...) error
- func SaveOmenRules(baseDir string, ot *OmenTrainer, omenKeyspace map[int]int64, ...) error
- func SavePCFGData(baseDir string, pcfgParser *PCFGParser, encoding string, saveSensitive bool) error
- type AlphabetGenerator
- type CountEntry
- type Counter
- type FileInput
- type LenIndexedCounters
- type OmenTrainer
- type PCFGParser
- type Pass2Result
- type ProgramInfo
- type Result
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CalcOmenKeyspace ¶
func CalcOmenKeyspace(ot *OmenTrainer) map[int]int64
func FindOmenLevel ¶
func FindOmenLevel(ot *OmenTrainer, password string) int
func IsHexEncoded ¶
func LoadPasswordsToSlice ¶
func RunPass2Parallel ¶
func RunPass2Parallel(passwords []string, alphabet []rune, ngram, maxLen int, mwd *parser.TrieMultiWordDetector, numWorkers int) (*OmenTrainer, *PCFGParser, error)
func RunPass3Parallel ¶
func RunPass3Parallel(passwords []string, omenTrainer *OmenTrainer, numWorkers int) map[int]int
func SaveConfigFile ¶
func SaveConfigFile(baseDir string, info *ProgramInfo, fileInput *FileInput, pcfgParser *PCFGParser) error
func SaveOmenRules ¶
func SaveOmenRules(baseDir string, ot *OmenTrainer, omenKeyspace map[int]int64, omenLevels map[int]int, numValid int, info *ProgramInfo) error
func SavePCFGData ¶
func SavePCFGData(baseDir string, pcfgParser *PCFGParser, encoding string, saveSensitive bool) error
SavePCFGData saves all PCFG training data to disk.
Types ¶
type AlphabetGenerator ¶
func NewAlphabetGenerator ¶
func NewAlphabetGenerator(maxSize, ngram int) *AlphabetGenerator
func (*AlphabetGenerator) GetAlphabet ¶
func (ag *AlphabetGenerator) GetAlphabet() []rune
func (*AlphabetGenerator) ProcessPassword ¶
func (ag *AlphabetGenerator) ProcessPassword(password string)
type CountEntry ¶
type Counter ¶
func NewCounter ¶
func NewCounter() *Counter
func (*Counter) TopN ¶
func (c *Counter) TopN(n int) []CountEntry
type FileInput ¶
type FileInput struct {
Filename string
Encoding string
PrefixCount bool
NumPasswords int
NumEncodingErr int
DuplicatesFound bool
NumToCheckForDuplicates int
}
func (*FileInput) ReadPasswords ¶
type LenIndexedCounters ¶
func NewLenIndexedCounters ¶
func NewLenIndexedCounters() *LenIndexedCounters
func (*LenIndexedCounters) Get ¶
func (l *LenIndexedCounters) Get(length int) *Counter
func (*LenIndexedCounters) Inc ¶
func (l *LenIndexedCounters) Inc(length int, value string)
func (*LenIndexedCounters) Keys ¶
func (l *LenIndexedCounters) Keys() []int
func (*LenIndexedCounters) MergeFrom ¶
func (l *LenIndexedCounters) MergeFrom(other *LenIndexedCounters)
type OmenTrainer ¶
type OmenTrainer struct {
Alphabet []rune
NGram int
MaxLen int
MinLen int
Grammar map[string]*omenContext
LNLookup []int
LNCounter int
IPCounter int
EPCounter int
SmoothedLN []smoothedLNEntry
// contains filtered or unexported fields
}
func NewOmenTrainer ¶
func NewOmenTrainer(alphabet []rune, ngram, maxLen int) *OmenTrainer
func (*OmenTrainer) ApplySmoothing ¶
func (ot *OmenTrainer) ApplySmoothing()
func (*OmenTrainer) MergeFrom ¶
func (ot *OmenTrainer) MergeFrom(other *OmenTrainer)
func (*OmenTrainer) Parse ¶
func (ot *OmenTrainer) Parse(password string)
type PCFGParser ¶
type PCFGParser struct {
MultiwordDetector *parser.TrieMultiWordDetector
CountKeyboard *LenIndexedCounters
CountEmails *Counter
CountEmailProv *Counter
CountWebsiteURLs *Counter
CountWebsiteHosts *Counter
CountWebsitePfx *Counter
CountYears *Counter
CountContext *Counter
CountAlpha *LenIndexedCounters
CountAlphaMasks *LenIndexedCounters
CountDigits *LenIndexedCounters
CountOther *LenIndexedCounters
CountBaseStructs *Counter
CountRawBaseStructs *Counter
CountPrince *Counter
}
func NewPCFGParser ¶
func NewPCFGParser(mwd *parser.TrieMultiWordDetector) *PCFGParser
func (*PCFGParser) MergeFrom ¶
func (p *PCFGParser) MergeFrom(other *PCFGParser)
func (*PCFGParser) Parse ¶
func (p *PCFGParser) Parse(password string)
type Pass2Result ¶
type Pass2Result struct {
Omen *OmenTrainer
PCFG *PCFGParser
}
type ProgramInfo ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.