Skip to content

Commit

Permalink
Merge pull request #20 from hackerschoice/packaging
Browse files Browse the repository at this point in the history
Packaging
  • Loading branch information
rootTHC authored Feb 18, 2021
2 parents e6f2e1e + bf6af9a commit aa4ecf1
Show file tree
Hide file tree
Showing 9 changed files with 76 additions and 1 deletion.
1 change: 1 addition & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ AC_SUBST(LDADD_STATIC, "${LDADD_STATIC}")
AC_SUBST(CFLAGS_STATIC, "${CFLAGS_STATIC}")
AC_OUTPUT([Makefile lib/Makefile tools/Makefile man/Makefile])


echo "

\"If netcat is a swiss army knife then
Expand Down
2 changes: 1 addition & 1 deletion packaging/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

VERSION=1.4.15
VERSION=1.4.23
BIN_NAME=gsocket
PKG_NAME=${BIN_NAME}-${VERSION}

Expand Down
1 change: 1 addition & 0 deletions packaging/debian/control
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
...
10 changes: 10 additions & 0 deletions packaging/docker/gsocket-tor/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
FROM hackerschoice/gsocket

WORKDIR /root/
RUN apt-get update -y \
&& apt-get install -y --no-install-recommends \
tor \
&& touch /root/.gs_with_tor \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/

4 changes: 4 additions & 0 deletions packaging/docker/gsocket-tor/make.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#! /bin/bash

docker build -t hackerschoice/gsocket-tor .

17 changes: 17 additions & 0 deletions packaging/docker/gsocket/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
FROM debian

# Must be debian compiled binaries:
COPY gs-netcat gs-sftp gs-mount blitz gs_funcs gs_uchroot_so /usr/local/bin/
COPY gs-motd /etc/
COPY bashrc /root/.bashrc

WORKDIR /root/
RUN apt-get update -y \
&& apt-get install -y --no-install-recommends \
binutils \
openssl \
rsync \
openssh-server \
sshfs \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/
16 changes: 16 additions & 0 deletions packaging/docker/gsocket/bashrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@

[[ -f /etc/gs-motd ]] && printf "$(cat /etc/gs-motd)"

export SHELL=/bin/bash
export TERM=xterm-256color

if [[ -f ~/.gs_with_tor ]]; then
PS1='${debian_chroot:+($debian_chroot)}\u@\h-\e[0;32mTOR\e[0m:\e[0;33m\w\e[0m\$ '
export GSOCKET_SOCKS_IP=127.0.0.1
export GSOCKET_SOCKS_PORT=9050
pidof tor >/dev/null || { tor --quiet & }
echo -e "TOR : \033[1;32menabled\033[0m - to disable execute 'unset GSOCKET_SOCKS_IP'"
else
echo -e "TOR : \033[1;31mDISABLED\033[0m - use hackerschoice/gsocket-tor for TOR support."
fi

22 changes: 22 additions & 0 deletions packaging/docker/gsocket/gs-motd
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Use this command (on your host OS) to share your hosts's ~/hax directory
# with this image (optional)
[\033[0:33mhost\033[0m ] $ \033[1:34mdocker run --rm -it --name gs -v ~/hax:/hax hackerschoice/gsocket\033[0m
# And this command to have a second shell:
[\033[0:33mhost\033[0m ] $ \033[1:34mdocker exec -it gs bash\033[0m

Test your setup:
[\033[0:33mdocker\033[0m] $ \033[1:34mgs-sftp -s thctestserver\033[0m

Transfer files to a friend who has 'blitz -s foobar -l' running:
[\033[0:33mdocker\033[0m] $ \033[1:34mblitz -s foobar /hax/./mp3/*\033[0m

FTP to a friend (securely) who has 'gs-sftp -s foobar -l' running:
[\033[0:33mdocker\033[0m] $ \033[1:34mgs-sftp -s foobar\033[0m

Login to a friend's computer who has 'gs-netcat -s foobar -il' running:
[\033[0:33mdocker\033[0m] $ \033[1:34mgs-netcat -s foobar -i\033[0m

Help : gs-netcat -m | more
Commands: gs-netcat, gs-sftp, gs-mount, blitz
Latest : \033[1;35mhttps://github.com/hackerschoice/gsocket\033[0m
Shoutz : Yogee for ideas & testing\n
4 changes: 4 additions & 0 deletions packaging/docker/gsocket/make.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#! /bin/bash

docker build -t hackerschoice/gsocket .

0 comments on commit aa4ecf1

Please sign in to comment.