commit 512f35fce8d11c5afdc7ad38a6884e8d51d5839a
parent 8f18ee9b7ceabddfdab737ebe305b996b9a301f7
Author: Michael Constantine Dimopoulos <mk@mcdim.xyz>
Date: Fri, 24 Jun 2022 14:54:03 +0000
Added wordlists
Diffstat:
4 files changed, 75 insertions(+), 2 deletions(-)
diff --git a/src/masks.go b/src/masks.go
@@ -51,11 +51,36 @@ func mask_test(pass string) { // according to pipal
found = true
}
+ if (must_match("^[A-Za-z]{1,}\\.[0-9]{1,}$", pass)) {
+ fmt.Printf(BLUE + "[~]" + str + "^letter{1,}\\.num{1,}$\n" + RESET)
+ found = true
+ }
+
+ if (must_match("^[0-9]{1,}\\.[A-Za-z]{1,}$", pass)) {
+ fmt.Printf(BLUE + "[~]" + str + "^num{1,}\\.char{1,}$\n" + RESET)
+ found = true
+ }
+
+ if (must_match("^[0-9]{1,}\\.[^A-Za-z0-9]{1,}$", pass)) {
+ fmt.Printf(BLUE + "[~]" + str + "^num{1,}\\.symbol{1,}$\n" + RESET)
+ found = true
+ }
+
+ if (must_match("^[^A-Za-z0-9]{1,}\\.[0-9]{1,}$", pass)) {
+ fmt.Printf(BLUE + "[~]" + str + "^num{1,}\\.symbol{1,}$\n" + RESET)
+ found = true
+ }
+
if (must_match("^[A-Za-z]{1,}123$", pass)) {
fmt.Printf(YEL + "[-]" + str + "^alpha{1,}123$\n" + RESET)
found = true
}
+ if (must_match("[A-Za-z]{1,}1$", pass)) {
+ fmt.Printf(BLUE + "[~]" + str + "*1$\n" + RESET)
+ found = true
+ }
+
if (must_match("123$", pass)) {
fmt.Printf(BLUE + "[~]" + str + "*123$\n" + RESET)
found = true
diff --git a/src/passcheck.go b/src/passcheck.go
@@ -83,9 +83,12 @@ func main() {
if (words != "") {
fmt.Printf("\nWords:\n")
- words_test(pass, words) // 0 = words file, 1 = password dictionary
+ words_test(pass, words)
}
+ fmt.Printf("\nCracking wordlists:\n")
+ wordlist_test(pass, "commonpass.txt")
+
fmt.Printf("\nRecent years:\n")
years_test(pass)
diff --git a/src/wordlists.go b/src/wordlists.go
@@ -0,0 +1,45 @@
+package main
+
+import (
+ "fmt"
+ "strings"
+ "bufio"
+ "os"
+)
+
+
+func wordlist_test(pass string, file string) {
+
+ pass1 := deleet(pass)
+
+ f, err := os.Open(file)
+
+ if err != nil {
+ fmt.Fprintln(os.Stderr, err)
+ os.Exit(1)
+ }
+
+ fScanner := bufio.NewScanner(f)
+
+ fScanner.Split(bufio.ScanLines)
+
+ var found bool
+ var i int
+ for fScanner.Scan() {
+ line := fScanner.Text()
+ if (len(line) >= 3 && strings.Contains(pass1, line)) {
+
+ fmt.Printf(RED + "\n[!!!] Password is cracking dictionary - ")
+
+ fmt.Printf(RESET + "%s:%d : %s\n\n", file,i, line)
+ found = true
+ i++
+ }
+ }
+
+ if (!found) {
+ fmt.Printf(GREEN + "[+] Password is not in dictionary " + RESET +"%s\n", file)
+ }
+
+ f.Close()
+}
diff --git a/src/words.go b/src/words.go
@@ -48,7 +48,7 @@ func words_test(pass string, file string) {
if (len(line) >= 3 && strings.Contains(pass1, line)) {
perc := get_per(len(line), len(pass1))
if (perc == 100.0) {
- fmt.Printf(RED + "[!] Password is dictionary word - %.1f%% - ", perc)
+ fmt.Printf(RED + "[!] Password is dictionary word - %.1f%% - ", perc)
} else if (perc >= 70.0) {
fmt.Printf(RED + "[!] Password contains dictionary words - %.1f%% - ", perc)
} else if (perc >= 35.0) {