From 1f9d3faa8b05700268ed48b6c7eea959a5affd31 Mon Sep 17 00:00:00 2001 From: Justin Reichardt Date: Thu, 9 Dec 2021 16:37:55 -0600 Subject: [PATCH] Add a header and trailing new line to downloads Header allows the reader to know where the additions came from and the new line makes sure that 2 entries down get jumbled together --- src/rhosts.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/rhosts.go b/src/rhosts.go index bce3690..fbd6c2f 100644 --- a/src/rhosts.go +++ b/src/rhosts.go @@ -180,6 +180,10 @@ func downloadcontent(downloads []string, tmpdir string) { for _, d := range downloads { log.Print("Downloading: ",d) + file.WriteString("# rhosts download - " + d + "\n") + if (err != nil) { + continue + } response, err := http.Get(d) if (err !=nil) { log.Print(err) @@ -190,5 +194,9 @@ func downloadcontent(downloads []string, tmpdir string) { } } defer response.Body.Close() + file.WriteString("\n") + if (err != nil) { + continue + } } }