Skip to content

Commit 1ce803f

Browse files
committed
refactor: enhance WriteLine function and update main to allow dynamic URL input
1 parent 556102a commit 1ce803f

File tree

2 files changed

+18
-6
lines changed

2 files changed

+18
-6
lines changed

helper/interface.go

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,13 @@ func WriteLine(option, value string, newLine, padding bool) {
5353
fmt.Print(optionColor)
5454
fmt.Print(gray("] "))
5555

56-
if newLine {
57-
fmt.Println(white(value))
58-
} else {
56+
if option == ">" {
5957
fmt.Print(white(value))
58+
} else {
59+
if newLine {
60+
fmt.Println(white(value))
61+
} else {
62+
fmt.Print(white(value))
63+
}
6064
}
6165
}

main.go

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,17 @@ import (
1111
)
1212

1313
func main() {
14-
urls := []string{
15-
"http://localhost:5000/product?id=1",
16-
}
14+
15+
urls := []string{} // ToDo: Add File Upload
16+
17+
helper.ClearScreen()
18+
helper.WriteLine("!", "GoInjection", true, false)
19+
helper.WriteLine("!", "Developed By Fourier for Axion Security", true, false)
20+
helper.WriteLine("!", "https://github.com/Axion-Security/GoInjection", true, false)
21+
helper.WriteLine(">", "URL: ", true, false)
22+
var input string
23+
fmt.Scanln(&input)
24+
urls = append(urls, input)
1725

1826
for _, u := range urls {
1927
cleanedURLs, err := helper.GetUrls(u)

0 commit comments

Comments
 (0)