Skip to content

Static Stealth Build & www push #58

Static Stealth Build & www push

Static Stealth Build & www push #58

Workflow file for this run

name: Static Stealth Build & www push
on: [workflow_dispatch]
permissions:
contents: write
env:
OPENSSL_VER: 1.1.1w
BINDIR: ${{ github.ref == 'refs/heads/master' && 'bin' || 'beta/bin' }}
# OPENSSL_OPTS: no-tests no-dso no-threads no-shared
OPENSSL_OPTS: no-tests no-dso no-threads no-shared no-zlib no-bf no-cast no-dh no-md2 no-mdc2 no-rc2 no-rc4 no-rc5 no-idea no-md4 no-rmd160 no-dsa no-ssl no-ssl2 -no-tls1_3 no-camellia no-seed no-afalgeng no-autoerrinit no-autoload-config no-capieng no-cms no-comp no-ct no-dgram no-engine no-err no-filenames no-gost no-ocsp no-hw-padlock no-pic no-srtp no-ssl-trace no-ui-console no-ssl3-method no-tls1-method no-tls1_1-method no-dtls1-method no-dtls1_2-method no-deprecated
jobs:
MacOS:
runs-on: macos-13
steps:
- uses: actions/checkout@v3
- name: Compile
run: |
brew install automake
./bootstrap
./configure --prefix=/opt --enable-static --enable-stealth
make all
strip tools/gs-netcat
mv tools/gs-netcat tools/gs-netcat_mini-macOS-x86_64
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: gsnc
path: tools/gs-netcat_mini-macOS-x86_64
MacOS-arm64:
runs-on: macos-14
steps:
- uses: actions/checkout@v3
- name: Compile
run: |
brew install automake
./bootstrap
./configure --prefix=/opt --enable-static --enable-stealth
make all
strip tools/gs-netcat
mv tools/gs-netcat tools/gs-netcat_mini-macOS-arm64
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: gsnc
path: tools/gs-netcat_mini-macOS-arm64
# https://github.com/vmactions/openbsd-vm
OpenBSD:
env:
OS: "openbsd"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Starting the VM
uses: vmactions/openbsd-vm@v1
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: |
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 ${OPENSSL_OPTS} BSD-generic64 && \
make install_sw )
rm -rf rm -rf /tmp/openssl-${OPENSSL_VER:-1.1.1w} /opt/bin/openssl /opt/bin/c_rehash
export AUTOCONF_VERSION=2.71
export AUTOMAKE_VERSION=1.16
./bootstrap
./configure --enable-static --prefix=/opt --enable-stealth
make all
strip tools/gs-netcat
mv tools/gs-netcat tools/gs-netcat_mini-${{ env.OS }}-x86_64
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: gsnc
path: tools/gs-netcat_mini-${{ env.OS }}-x86_64
FreeBSD:
env:
OS: "freebsd"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Starting the VM
uses: vmactions/freebsd-vm@v1
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 ${OPENSSL_OPTS} 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-${{ env.OS }}-x86_64
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: gsnc
path: tools/gs-netcat_mini-${{ env.OS }}-x86_64
Linux-Cross-Compile:
strategy:
matrix:
# arch: [x86_64, aarch64, mips64, mips32, mipsel, i686, arm, armv6, armv7l, powerpc, powerpc64, powerpcle, powerpc64le]
include:
- arch: x86_64
cc: x86_64-linux-musl
ssl: linux-generic64
# some linux kernels kill UPX packed binaries..(grsec?)
upx: 1
- arch: aarch64
cc: aarch64-linux-musl
ssl: linux-generic64
upx: 1
- arch: mips64
cc: mips64-linux-musl
ssl: linux64-mips64
- arch: mips32
cc: mips-linux-muslsf
ssl: linux-mips32
- arch: mipsel
cc: mipsel-linux-muslsf
ssl: linux-mips32
- arch: i686
cc: i686-linux-musl
ssl: linux-generic32
- arch: arm
cc: arm-linux-musleabi
ssl: linux-generic32
- arch: armv6
cc: armv6-linux-musleabi
ssl: linux-generic32
- arch: armv7l
cc: armv7l-linux-musleabihf
ssl: linux-generic32
- arch: powerpc
cc: powerpc-linux-muslsf # Big Endian, 32bit
ssl: linux-generic32
- arch: powerpc64
cc: powerpc64-linux-musl # Big Endian, 64bit
ssl: linux-generic64
- arch: powerpcle
cc: powerpcle-linux-muslsf # Little Endian, 32bit
ssl: linux-generic32
- arch: powerpc64le
cc: powerpc64le-linux-musl # Little Endian, 64bit
ssl: linux-generic64
runs-on: ubuntu-latest
container:
image: muslcc/x86_64:${{ matrix.cc }}
options: --user root
steps:
- uses: actions/checkout@v3
- name: Add build dependencies
run: |
apk add --update --no-cache --no-progress bash perl make curl upx tar dpkg autoconf automake
- name: Cache SSL
id: cachessl
uses: actions/cache@v3
with:
path: /opt
key: ${{ matrix.arch }}-ssl
- name: Generate OpenSSL
if: steps.cachessl.outputs.cache-hit != 'true'
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 ${OPENSSL_OPTS} ${{ matrix.ssl }} && \
make install_sw )
rm -rf rm -rf /tmp/openssl-${OPENSSL_VER:-1.1.1w} /opt/bin/openssl /opt/bin/c_rehash
- name: SaveCache
if: steps.cachessl.outputs.cache-hit != 'true'
uses: actions/cache/save@v3
with:
path: /opt
key: ${{ matrix.arch }}-ssl
- name: Compile-${{ matrix.arch }}
run: |
[ ! -d /opt/dist ] && mkdir -p /opt/dist
./bootstrap
./configure --prefix=/opt --enable-realprefix=/usr --enable-static --host=${{ matrix.arch }} --enable-stealth
make all
echo "UPX='${{ matrix.upx }}'"
strip tools/gs-netcat
if [ "${{ matrix.upx }}" != '' ]; then
upx tools/gs-netcat
fi
mv tools/gs-netcat tools/gs-netcat_mini-linux-${{ matrix.arch }}
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: gsnc
path: tools/gs-netcat_mini-linux-${{ matrix.arch }}
deploy:
# needs: [Linux-Cross-Compile, MacOS, OpenBSD, FreeBSD]
needs: [Linux-Cross-Compile, MacOS, FreeBSD]
name: Deploy to gsocket.io
runs-on: ubuntu-latest
steps:
- name: Add build dependencies
uses: actions/checkout@v3
- name: Download artifacts
uses: actions/download-artifact@v3
with:
path: /tmp
- name: Deploy to gsocket.io/bin
env:
SSH_DEPLOY_KEY: ${{ secrets.SSH_DEPLOY_KEY }}
run: |
mkdir ~/.ssh && echo "$SSH_DEPLOY_KEY" >~/.ssh/id_ed25519 && chmod 600 ~/.ssh/id_ed25519
cd /tmp
git clone -b gh-pages --single-branch [email protected]:hackerschoice/gsocket.io.git
cd gsocket.io/${BINDIR:-/dev/null}
mv /tmp/gsnc/gs-netcat_* .
pwd
ls -alR
git config --local user.name "GitHub Action"
git config --local user.email "[email protected]"
git add gs-netcat_* && git commit -m "stealth binary" && git push