mirror of
https://github.com/hahwul/WebHackersWeapons.git
synced 2024-12-20 13:14:42 -05:00
(Fixed #5) bug fix
This commit is contained in:
parent
6530777f27
commit
475930cdf7
10
add-tool.go
10
add-tool.go
@ -99,7 +99,15 @@ func main() {
|
||||
defer resp.Body.Close()
|
||||
|
||||
if title, ok := GetHtmlTitle(resp.Body); ok {
|
||||
desc = strings.Split(string(title), ": ")[1]
|
||||
if strings.Contains(string(title), ": ") {
|
||||
desc = strings.Split(string(title), ": ")[1]
|
||||
} else {
|
||||
reader1 := bufio.NewReader(os.Stdin)
|
||||
fmt.Println("[+] Don't have descriptions / input description")
|
||||
a, _ := reader1.ReadString('\n')
|
||||
desc = strings.TrimRight(a, "\r\n")
|
||||
|
||||
}
|
||||
} else {
|
||||
println("Fail to get HTML title")
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user