nicocha30 / ligolo-ng

An advanced, yet simple, tunneling/pivoting tool that uses a TUN interface.
GNU General Public License v3.0
2.87k stars 292 forks source link

fix nil deref on latest agent #100

Closed jvinnedge closed 3 months ago

jvinnedge commented 3 months ago

Got the following when attempting to run the latest agent release:

$ ./agent -ignore-cert -retry -connect 127.0.0.1:11601
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x6d77a3]

goroutine 1 [running]:
main.main()
    /home/runner/work/ligolo-ng/ligolo-ng/cmd/agent/main.go:102 +0x363
$

Looks like this was caused by the recent websocket merge. The nil deref occurs when a websocket connection is not specified, and a direct TCP connection is attempted.

nicocha30 commented 3 months ago

lgtm