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
stable
Justin Reichardt 2021-12-09 16:37:55 -06:00
parent 6529fe49fd
commit 1f9d3faa8b
1 changed files with 8 additions and 0 deletions

View File

@ -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
}
}
}