New Upstream Release - gsocket

Ready changes

Summary

Merged new upstream version: 1.4.40 (was: 1.4.39).

Diff

diff --git a/README.md b/README.md
index a9c78b5..52c3339 100755
--- a/README.md
+++ b/README.md
@@ -51,8 +51,8 @@ The Global Socket Toolkit comes with a set of tools:
 
 <A></A>|<A></A>
 ----------|-------------
-Download|[gsocket-1.4.38.tar.gz](https://github.com/hackerschoice/gsocket/releases/download/v1.4.38/gsocket-1.4.38.tar.gz) (Linux, MacOS, FreeBSD, Solaris)
-Debian/Ubuntu| [gsocket_1.4.38_all.deb](https://github.com/hackerschoice/binary/raw/main/gsocket/latest/gsocket_1.4.38_all.deb)
+Download|[gsocket-1.4.39.tar.gz](https://github.com/hackerschoice/gsocket/releases/download/v1.4.39/gsocket-1.4.39.tar.gz) (Linux, MacOS, FreeBSD, Solaris)
+Debian/Ubuntu| [gsocket_1.4.39_all.deb](https://github.com/hackerschoice/binary/raw/main/gsocket/latest/gsocket_1.4.39_all.deb)
 Windows| use docker or cygwin
 Man Page| [gsocket(1)](https://hackerschoice.github.io/gsocket.1.html), [gs-netcat(1)](https://hackerschoice.github.io/gs-netcat.1.html), [gs-mount(1)](https://hackerschoice.github.io/gs-mount.1.html), [gs-sftp(1)](https://hackerschoice.github.io/gs-sftp.1.html), [blitz(1)](https://hackerschoice.github.io/blitz.1.html)
 Docker|  docker run --rm -it hackerschoice/gsocket
diff --git a/configure.ac b/configure.ac
index df63259..ca9197d 100755
--- a/configure.ac
+++ b/configure.ac
@@ -1,6 +1,6 @@
 dnl Process this File with autoconf to produce a configure script.
 AC_PREREQ([2.69])
-AC_INIT([gsocket],[1.4.39])
+AC_INIT([gsocket],[1.4.40])
 AC_CONFIG_AUX_DIR(config)
 AC_CANONICAL_TARGET
 
diff --git a/debian/changelog b/debian/changelog
index ee1a34d..515f0ec 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+gsocket (1.4.40-1) UNRELEASED; urgency=low
+
+  * New upstream release.
+
+ -- Debian Janitor <janitor@jelmer.uk>  Sat, 17 Jun 2023 10:07:54 -0000
+
 gsocket (1.4.39-1) unstable; urgency=medium
 
   * New upstream release.
diff --git a/deploy/README.md b/deploy/README.md
index 1a11c76..4d9b455 100644
--- a/deploy/README.md
+++ b/deploy/README.md
@@ -3,12 +3,23 @@
 GSOCKET works on Linux, FreeBSD, macOS, Cygwin and many others. If the particular OS is not listed here then try the *Install Script* or *compile from source*.
 
 ---
-**Generic - Install Script**
+***Static Binary***
+
+The [deploy instructions](https://www.gsocket.io/deploy/) are the fastest way to install gsocket. Some people say it's the **_World's smallest backdoor_**.
+
+A stripped down version of just gs-netcat (without blitz, gs-mount, gs-ftp, ...) and no help (`--help`) is available as [pre-compiled static binary](https://github.com/hackerschoice/binary/tree/main/gsocket/bin).
+
+---
+
+**Lastest Source: https://github.com/hackerschoice/gsocket/releases/latest**  
+
+---
+**Generic - Compile from Source (automatically)**
 ```
-/bin/bash -c "$(curl -fsSL https://tiny.cc/gsinst)"
+/bin/bash -c "$(curl -fsSL gsocket.io/x)"
 ```
 ---
-**Generic - Compile from Source**
+**Generic - Compile from Source (manually)**
 
 Download the [latest source](https://github.com/hackerschoice/gsocket/releases/tag/v1.4.33).
 ```
@@ -17,13 +28,13 @@ cd gsocket-*
 ./configure && make install
 ```
 ---
-**Debian sid**
+**Debian/Ubuntu/Kali**
 ```
 apt update
 apt install gsocket
 ```
 ---
-**Ubuntu/Kali/Debian**
+**Other Linux**
 ```
 curl -fsSL https://github.com/hackerschoice/binary/raw/main/gsocket/latest/gsocket_1.4.32_all.deb --output gsocket_latest.deb
 dpkg -i gsocket_latest.deb
diff --git a/lib/gsocket-engine.c b/lib/gsocket-engine.c
index 28c6e6e..f6ceb15 100644
--- a/lib/gsocket-engine.c
+++ b/lib/gsocket-engine.c
@@ -1960,7 +1960,7 @@ GS_read(GS *gsocket, void *buf, size_t count)
 		{
 			err = SSL_get_error(gsocket->ssl, len);
 			DEBUGF_Y("fd=%d, SSL Error: ret = %zd, err = %d (%s) %s\n", gsocket->fd, len, err, GS_SSL_strerror(err), strerror(errno));
-			ERR_print_errors_fp(stderr);
+			gs_set_errorf(gsocket, "SSL: %s", ERR_error_string(err, NULL));
 		}
 #endif
 	} else {
diff --git a/packaging/debian/control b/packaging/debian/control
new file mode 100644
index 0000000..eb1ae45
--- /dev/null
+++ b/packaging/debian/control
@@ -0,0 +1 @@
+...
diff --git a/tests/run_ping_gsrn.sh b/tests/run_ping_gsrn.sh
index eed62a6..aa6804f 100755
--- a/tests/run_ping_gsrn.sh
+++ b/tests/run_ping_gsrn.sh
@@ -1,6 +1,9 @@
 #! /bin/bash
 
 
+echo "use gsocket-relay/monitor/ping_gsrn.sh instead"
+exit 255
+
 date_bin="date"
 command -v gdate >/dev/null && date_bin="gdate"
 unset GSOCKET_IP
diff --git a/tools/man_gs-netcat.h b/tools/man_gs-netcat.h
index fd880f0..47ba5a5 100644
--- a/tools/man_gs-netcat.h
+++ b/tools/man_gs-netcat.h
@@ -286,5 +286,5 @@ BUGS\n\
      whatever circumstances, please notify me (skyper@thc.org) and tell me how\n\
      you think it should behave.\n\
 \n\
-macOS 13.0			October 8, 2020 		    macOS 13.0\n\
+macOS 13.2			October 8, 2020 		    macOS 13.2\n\
 ";
diff --git a/tools/utils.c b/tools/utils.c
index b104fc3..aab47cf 100644
--- a/tools/utils.c
+++ b/tools/utils.c
@@ -641,15 +641,20 @@ mk_shellname(const char *shell, char *shell_name, ssize_t len, const char **prgn
 		ptr = strrchr(shell, '/');
 	}
 	ptr += 1;
+	*prgname = NULL;
 #ifdef STEALTH
-	*prgname = gopt.prg_name;
-	if (gopt.prg_name != NULL)
-		*prgname = gopt.prg_name;
-#else
-	*prgname = shell_name;
-	snprintf(shell_name, len, "-%s", ptr);
+	struct stat st;
+	// Set PRGNAME unless it's a link (BusyBox etc)
+	if (lstat(shell, &st) == 0)
+	{
+		if (!S_ISLNK(st.st_mode))
+			*prgname = gopt.prg_name; // HIDE as prg_name
+	}
 #endif
-
+	
+	snprintf(shell_name, len, "-%s", ptr);
+	if (*prgname == NULL)
+		*prgname = shell_name;
 	return shell;
 }
 

More details

Full run details

Historical runs