Skip to content

Commit

Permalink
fix duplicate output + empty cleartext
Browse files Browse the repository at this point in the history
  • Loading branch information
C-Sto committed May 6, 2020
1 parent e04d3c2 commit 82a9d24
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
19 changes: 11 additions & 8 deletions cmd/dumpSecrets.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,16 @@ func consoleWriter(val <-chan ditreader.DumpedHash, s Settings, wg *sync.WaitGro
hs.WriteString(append.String())
hs.WriteString("\n")
if dh.Supp.Username != "" {
hs.WriteString(dh.Supp.ClearString())
hs.WriteString(append.String())
if len(dh.Supp.KerbKeys) > 0 {
if dh.Supp.ClearPassword != "" {
hs.WriteString(dh.Supp.ClearString())
hs.WriteString(append.String())
hs.WriteString("\n")
}
if len(dh.Supp.KerbKeys) > 0 {
hs.WriteString(dh.Supp.KerbString())
hs.WriteString(append.String())
hs.WriteString("\n")
}
hs.WriteString("\n")
if s.History {
hs.WriteString(dh.HistoryString())
}
Expand Down Expand Up @@ -113,12 +115,13 @@ func fileWriter(val <-chan ditreader.DumpedHash, s Settings, wg *sync.WaitGroup)
hs.WriteString(dh.HashString())
hs.WriteString(append.String())
hs.WriteString("\n")
hashes.WriteString(hs.String())
var pts strings.Builder
if dh.Supp.Username != "" {
pts.WriteString(dh.Supp.ClearString())
pts.WriteString(append.String())
pts.WriteString("\n")
if dh.Supp.ClearPassword != "" {
pts.WriteString(dh.Supp.ClearString())
pts.WriteString(append.String())
pts.WriteString("\n")
}
if len(dh.Supp.KerbKeys) > 0 {
kerbs.WriteString(dh.Supp.KerbString())
kerbs.WriteString(append.String())
Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"github.com/C-Sto/gosecretsdump/cmd"
)

const version = "0.2.0"
const version = "0.2.2"

func main() {

Expand Down

0 comments on commit 82a9d24

Please sign in to comment.