-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.go
54 lines (46 loc) · 1.24 KB
/
main.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
package main
import (
"fmt"
"github.com/jambola2/bip38"
"bufio"
"os"
"strings"
"log"
"runtime"
)
func main() {
//Modify as needed
fileName := "completeFilev3-2-78600.txt"
passPhrase := "6PfTUmvB7PWj5KwUjoJeU3S51Fu1AU86URJfSetnotzZ8BBrCbghG7i84C"
//How frequently you want to be updated on tries completed
triesPrintFreq := 100
//Maximize processor usage
runtime.GOMAXPROCS(runtime.NumCPU())
tries := 0
pwd, _ := os.Getwd()
f, _ := os.Open(pwd + "/" + fileName)
bf := bufio.NewReader(f)
fullLine := ""
for {
line, isPrefix, err := bf.ReadLine()
fullLine += string(line[:])
if !isPrefix || err != nil{
break
}
}
//Split the line on commas.
parts := strings.Split(fullLine, ",")
//Loop over the parts from the string.
for i := range parts {
privKey := bip38.DecryptWithPassphrase(passPhrase,parts[i])
//fmt.Println(parts[i])
tries = tries + 1
if tries%triesPrintFreq == 0{
fmt.Println(tries + "tries completed")
}
if privKey != "" {
fmt.Println(parts[i])
log.Fatal(privKey)
}
}
}