Add hex2pcap

This commit is contained in:
2026-10-05 20:07:31 +02:00
parent 477e6c0ee7
commit 5b5cf211d0
19 changed files with 1694 additions and 0 deletions
+28
View File
@@ -0,0 +1,28 @@
// Command pcap-web-tools serves a web UI with tools for pcap packet captures.
package main
import (
"flag"
"log"
"net/http"
"time"
"pcap-web-tools/internal/web"
)
func main() {
addr := flag.String("addr", "localhost:8080", "listen address")
flag.Parse()
srv, err := web.New()
if err != nil {
log.Fatal(err)
}
httpSrv := &http.Server{
Addr: *addr,
Handler: srv,
ReadHeaderTimeout: 10 * time.Second,
}
log.Printf("listening on http://%s", *addr)
log.Fatal(httpSrv.ListenAndServe())
}