MCPcopy Create free account
hub / github.com/ImAyrix/fallparams / FinalMessage

Function FinalMessage

funcs/utils/utils.go:72–88  ·  view source on GitHub ↗
(options *opt.Options)

Source from the content-addressed store, hash-verified

70}
71
72func 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
90func CheckError(e error) {
91 if e != nil {

Callers 1

mainFunction · 0.92

Calls 1

UniqueFunction · 0.85

Tested by

no test coverage detected