From 9cdfec40ca546082f4d99d6c45722e7b79faf8e2 Mon Sep 17 00:00:00 2001 From: Martin Vrachev Date: Wed, 13 Feb 2019 10:52:12 +0200 Subject: [PATCH] Change test I thought that an example where the user inputs a URL is more realistic. Because if your operating system is already hacked then you are already screwed. Signed-off-by: Martin Vrachev --- testutils/source.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/testutils/source.go b/testutils/source.go index fbfbefa..e151755 100644 --- a/testutils/source.go +++ b/testutils/source.go @@ -323,9 +323,14 @@ import ( "io/ioutil" "fmt" "os" + "bufio" ) func main() { - url := os.Getenv("tainted_url") + in := bufio.NewReader(os.Stdin) + url, err := in.ReadString('\n') + if err != nil { + panic(err) + } resp, err := http.Get(url) if err != nil { panic(err)