| 70 | } |
| 71 | |
| 72 | func FinalMessage(options *opt.Options) { |
| 73 | dat, _ := os.ReadFile(options.OutputFile) |
| 74 | uniqData := strings.Join(Unique(strings.Split(string(dat), "\n")), "\n") |
| 75 | _ = os.WriteFile(options.OutputFile, []byte(uniqData), 0644) |
| 76 | |
| 77 | if !options.SilentMode { |
| 78 | if len(string(dat)) != 0 { |
| 79 | gologger.Info().Msg(fmt.Sprintf("Parameter wordlist %ssuccessfully%s generated and saved to %s%s%s [%d unique parameters]", |
| 80 | colorGreen, colorReset, colorBlue, options.OutputFile, colorReset, len(strings.Split(uniqData, "\n")))) |
| 81 | } else { |
| 82 | gologger.Error().Msg("I'm sorry, but I couldn't find any parameters :(") |
| 83 | } |
| 84 | } |
| 85 | if len(string(dat)) == 0 { |
| 86 | _ = os.Remove(options.OutputFile) |
| 87 | } |
| 88 | } |
| 89 | |
| 90 | func CheckError(e error) { |
| 91 | if e != nil { |