Skip to content

Commit

Permalink
www pish
Browse files Browse the repository at this point in the history
  • Loading branch information
SkyperTHC committed Jan 9, 2024
1 parent e7b91c8 commit 45f504b
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 93 deletions.
121 changes: 30 additions & 91 deletions .github/workflows/stealth-push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,50 +43,6 @@ jobs:
# tag: v${{ env.VER }}


# FreeBSD:
# env:
# OS: "freebsd"
# runs-on: macos-12
# steps:
# - uses: actions/checkout@v3
# - name: Starting the VM
# uses: vmactions/freebsd-vm@v0
# with:
# usesh: true
# prepare: |
# pkg install -y curl automake autoconf gcc

# run: |
# curl -SsfL https://www.openssl.org/source/openssl-${OPENSSL_VER:-1.1.1w}.tar.gz | tar -xzf - -C /tmp/
# ( cd /tmp/openssl-${OPENSSL_VER:-1.1.1w} && \
# ./Configure --prefix=/opt no-tests no-dso no-threads no-shared BSD-generic64 && \
# make install_sw )
# rm -rf rm -rf /tmp/openssl-${OPENSSL_VER:-1.1.1w} /opt/bin/openssl /opt/bin/c_rehash
# ./bootstrap
# ./configure --enable-static --prefix=/opt
# make all
# strip tools/gs-netcat
# (cd tools; tar cfz ../gsocket_${{ env.OS }}-x86_x64.tar.gz gs-netcat gsocket blitz gs-mount gs-sftp gs_funcs gsocket_dso.so.0 gsocket_uchroot_dso.so.0)
# mv tools/gs-netcat gs-netcat_${{ env.OS }}-x86_64

# - name: Upload gs-netcat to release
# uses: svenstaro/upload-release-action@v2
# with:
# repo_token: ${{ secrets.GITHUB_TOKEN }}
# file: gs-netcat_*
# overwrite: true
# file_glob: true
# tag: v${{ env.VER }}

# - name: Upload gsocket to release
# uses: svenstaro/upload-release-action@v2
# with:
# repo_token: ${{ secrets.GITHUB_TOKEN }}
# file: gsocket_*
# overwrite: true
# file_glob: true
# tag: v${{ env.VER }}

# # https://github.com/vmactions/openbsd-vm
# OpenBSD:
# env:
Expand Down Expand Up @@ -123,53 +79,36 @@ jobs:
# (cd tools; tar cfz ../gsocket_${{ env.OS }}-x86_x64.tar.gz gs-netcat gsocket blitz gs-mount gs-sftp gs_funcs gsocket_dso.so.0 gsocket_uchroot_dso.so.0)
# mv tools/gs-netcat gs-netcat_${{ env.OS }}-x86_64

# runs-on: macos-12
# steps:
# - uses: actions/checkout@v3
# - name: Compile
# uses: vmactions/openbsd-vm@v0
# with:
# usesh: true
# prepare: |
# pkg_add curl
# pkg_add autoconf-2.71
# pkg_add automake-1.16.5
# pkg_add openssl-3.0.8
# pkg_info -Q tar
# pkg_add gcc-11.2.0p3
# pkg_add gmake
# pkg_add tar

# run: |
# export AUTOCONF_VERSION=2.71
# export AUTOMAKE_VERSION=1.16
# ./bootstrap
# export CPPFLAGS="-I/usr/local/include/eopenssl30/"
# export LDFLAGS="-L/usr/local/lib/eopenssl30/"
# ./configure --enable-static
# make all
# strip tools/gs-netcat
# (cd tools; tar cfz ../gsocket_openbsd-x86_x64.tar.gz gs-netcat gsocket blitz gs-mount gs-sftp gs_funcs gsocket_dso.so.0 gsocket_uchroot_dso.so.0)
# mv tools/gs-netcat gs-netcat_openbsd-x86_64

# - name: Upload gs-netcat to release
# uses: svenstaro/upload-release-action@v2
# with:
# repo_token: ${{ secrets.GITHUB_TOKEN }}
# file: gs-netcat_*
# overwrite: true
# file_glob: true
# tag: v${{ env.VER }}

# - name: Upload gsocket to release
# uses: svenstaro/upload-release-action@v2
# with:
# repo_token: ${{ secrets.GITHUB_TOKEN }}
# file: gsocket_*
# overwrite: true
# file_glob: true
# tag: v${{ env.VER }}
FreeBSD:
env:
OS: "freebsd"
runs-on: macos-12
steps:
- uses: actions/checkout@v3
- name: Starting the VM
uses: vmactions/freebsd-vm@v0
with:
usesh: true
prepare: |
pkg install -y curl automake autoconf gcc
run: |
curl -SsfL https://www.openssl.org/source/openssl-${OPENSSL_VER:-1.1.1w}.tar.gz | tar -xzf - -C /tmp/
( cd /tmp/openssl-${OPENSSL_VER:-1.1.1w} && \
./Configure --prefix=/opt no-tests no-dso no-threads no-shared BSD-generic64 && \
make install_sw )
rm -rf rm -rf /tmp/openssl-${OPENSSL_VER:-1.1.1w} /opt/bin/openssl /opt/bin/c_rehash
./bootstrap
./configure --enable-static --prefix=/opt --enable-stealth
make all
strip tools/gs-netcat
mv tools/gs-netcat tools/gs-netcat_mini-freebsd-x86_64
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: gsnc
path: tools/gs-netcat_mini-freebsd-x86_64

Linux-Cross-Compile:
strategy:
Expand Down Expand Up @@ -258,7 +197,7 @@ jobs:
path: tools/gs-netcat_mini-linux-${{ matrix.arch }}

deploy:
needs: Linux-Cross-Compile
needs: [Linux-Cross-Compile, FreeBSD]
name: Deploy to gsocket.io
runs-on: ubuntu-latest
steps:
Expand Down
20 changes: 18 additions & 2 deletions deploy/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -604,18 +604,34 @@ init_vars()
if [[ $OSTYPE == *linux* ]]; then
if [[ "$arch" == "i686" ]] || [[ "$arch" == "i386" ]]; then
OSARCH="i386-alpine"
SRC_PKG="gs-netcat_mini-linux-i686"
elif [[ "$arch" == *"armv6"* ]]; then
OSARCH="arm-linux"
SRC_PKG="gs-netcat_mini-linux-armv6"
elif [[ "$arch" == *"armv7l" ]]; then
OSARCH="arm-linux"
SRC_PKG="gs-netcat_mini-linux-armv7l"
elif [[ "$arch" == *"armv"* ]]; then
OSARCH="arm-linux" # RPI-Zero / RPI 4b+
SRC_PKG="gs-netcat_mini-linux-arm"
elif [[ "$arch" == "aarch64" ]]; then
OSARCH="aarch64-linux"
SRC_PKG="gs-netcat_mini-linux-aarch64"
elif [[ "$arch" == "mips64" ]]; then
OSARCH="mips64-alpine"
SRC_PKG="gs-netcat_mini-linux-mips64"
# Go 32-bit if Little Endian even if 64bit arch
is_le && OSARCH="mipsel32-alpine"
is_le && {
OSARCH="mipsel32-alpine"
SRC_PKG="gs-netcat_mini-linux-mipsel"
}
elif [[ "$arch" == *mips* ]]; then
OSARCH="mips32-alpine"
is_le && OSARCH="mipsel32-alpine"
SRC_PKG="gs-netcat_mini-linux-mips32"
is_le && {
OSARCH="mipsel32-alpine"
SRC_PKG="gs-netcat_mini-linux-mipsel"
}
fi
elif [[ $OSTYPE == *darwin* ]]; then
if [[ "$arch" == "arm64" ]]; then
Expand Down

0 comments on commit 45f504b

Please sign in to comment.