This commit is contained in:
Pin
2024-03-17 00:06:46 -04:00
parent 46e2d35fbe
commit 3a17032433

View File

@@ -82,10 +82,14 @@ func openCapture(tInfo *targetInfo) *pcap.Handle {
}
func main() {
log.Panicf("Starting program\n");
tInfo := sInit(runtime.GOOS)
log.Printf("sInit run\n")
// Read package and analze them
log.Printf("Starting capture")
handle := openCapture(tInfo)
log.Printf("Started capture")
handle.SetBPFFilter(tInfo.filter)
packets := gopacket.NewPacketSource(handle, handle.LinkType()).Packets()