Skip to content

Commit

Permalink
feat(company): Add --all flag
Browse files Browse the repository at this point in the history
  • Loading branch information
qu35t-code committed Jun 18, 2024
1 parent 27b2f2f commit a800d33
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions cmd/company.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ var (
includeMask string
includeNumbers int
includePostal int
includeAll bool
)

var companyCmd = &cobra.Command{
Expand All @@ -54,6 +55,7 @@ func init() {
companyCmd.Flags().StringVarP(&includeMask, "mask", "m", "", "Apply a custom mask to the passwords")
companyCmd.Flags().IntVar(&includeNumbers, "numbers", 0, "Include numbers to the passwords")
companyCmd.Flags().IntVarP(&includePostal, "postal", "p", 0, "Include postal code to the passwords")
companyCmd.Flags().BoolVarP(&includeAll, "all", "a", false, "Include all variations")
}

// runCompanyCmd executes the main logic for generating the password list
Expand Down Expand Up @@ -131,6 +133,18 @@ func generateCompanyPasslist(name string) []string {
baseWordlist := []string{strings.ToLower(name)}
wordlist := baseWordlist

if includeAll {
includeYearSeparators = true
includeYear = 0
includeStartCaps = true
includeShortYear = 0
includeEndSpecial = true
includeMixedCase = true
includeLeetCode = true
includeUppercase = true
includeNumbers = 20
}

if includeYear != -1 || includeShortYear != -1 {
var separators string
if includeYearSeparators {
Expand Down

0 comments on commit a800d33

Please sign in to comment.