嘿,我正在尝试自动化一个工具来执行我的侦察我正在使用 url 来存储 urlhttps://但是有一个工具whois and sublist3r需要地址而不是https://所以我将字符串切片但是当我运行该工具时它崩溃并使我的终端空白我可以输入但看不到输出。
import (
"fmt"
"log"
"os/exec"
"sync"
)
var url string
var wg sync.WaitGroup
var ip string
var nsurl string
func nikto(outChan chan<- []byte) {
cmd := exec.Command("nikto", "-h", url)
bs, err := cmd.Output()
if err != nil {
log.Fatal(err)
}
outChan <- bs
wg.Done()
}
func whois(outChan chan<- []byte) {
cmd := exec.Command("whois",nsurl)
bs, err := cmd.Output()
if err != nil {
log.Fatal(err)
}
outChan <- bs
wg.Done()
}
func nmap (outChan chan<-[]byte) {
cmd := exec.Command("nmap","-sC","-sV","-oA","nmap",ip)
// cmd := exec.Command("nmap","-h")
bs,err := cmd.Output()
if err != nil {
log.Fatal(err)
}
outChan <- bs
wg.Done()
}
func sniper(outChan chan<-[]byte){
cmd:=exec.Command("sniper","-t",url)
bs,err := cmd.Output()
if err!=nil{
log.Fatal(err)
}
outChan <- bs
wg.Done()
}
func sublist3r(outChan chan<-[]byte) {
cmd := exec.Command("sublist3r","-d",nsurl)
bs,err := cmd.Output()
if err!=nil {
log.Fatal(err)
}
outChan <- bs
wg.Done()
}
func inspy (outChan chan<-[]byte){
cmd := exec.Command("inspy","--empspy","/opt/wordlists/wordlists/title-list-large.txt",url)
bs,err := cmd.Output()
if err!=nil {
log.Fatal(err)
}
outChan <- bs
wg.Done()
}
func wig (outChan chan<-[]byte){
//nsurl = url[8:]
cmd := exec.Command("wig",url)
bs,err := cmd.Output()
if err!=nil{
log.Fatal(err)
}
outChan <- bs
wg.Done()
}
qq_遁去的一_1
相关分类