nicocha30 / ligolo-ng

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

Add version flags to proxy and agent #78

Closed jdholtz closed 2 months ago

jdholtz commented 2 months ago

Fixes #59. To get the version, you can run either ./agent -version or ./proxy -version. Didn't use -v because that is already used for verbose mode.

I implemented this in a separate common package as that was what I thought would be the simplest and easiest to maintain (and allow for adding more common functions between the proxy and agent in the future).

The downside is that the version number will need to be changed whenever a new version is released. I'm not too familiar with the CI, but an improvement could be to automatically set the version to the tag name within the CI (or do it though go build somehow).

nicocha30 commented 2 months ago

Closing, because already implemented in Ligolo-ng v0.6

jdholtz commented 2 months ago

@nicocha30 was there a reason the -version flag was only added to proxy but not agent or was this a mistake? Currently on 0.6.1: proxy:

$ ./proxy -version
Ligolo-ng 0.6.1 / a503a37811ad7414cc5a8b2721c6624e5ca31a49 / 2024-06-23T17:28:14Z

agent:

$ ./agent -version
flag provided but not defined: -version
Ligolo-ng 0.6.1 / a503a37811ad7414cc5a8b2721c6624e5ca31a49 / 2024-06-23T17:28:14Z
Made in France with love by @Nicocha30!
https://github.com/nicocha30/ligolo-ng

Usage of ./agent:
...

If needed, I can make a PR to fix this.