diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ef2a294..8bac2a1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -31,6 +31,7 @@ jobs: pip3 install --upgrade pip wheel setuptools pip3 install -r requirements.txt pip3 install pyinstaller sysv-ipc geoip2 + ./build.sh && mkdir ./build-ubuntu && mv -f *.tar.gz *.sha512sum ./build-ubuntu - uses: actions/upload-artifact@v3 with: name: build-ubuntu-artifacts @@ -98,10 +99,7 @@ jobs: pip3 install --upgrade pip wheel setuptools pip3 install -r requirements.txt pip3 install pyinstaller sysv-ipc geoip2 - ./build.sh && mkdir ./build-centos && mv -f *.tar.gz *.sha512sum ./build-centos - # git config --global user.name "${{ env.GIT_USER_NAME }}" - # git config --global user.email "${{ env.GIT_USER_EMAIL }}" - # git pull && git add bin && git commit -m "update centos binary" && git push + ./build.sh && mkdir ./build-centos && mv -f *.tar.gz *.sha512sum ./build-centos - uses: actions/upload-artifact@v2 with: name: build-centos-artifacts @@ -120,6 +118,7 @@ jobs: path: build-artifacts - name: Create gh release using 'hub' run: | + echo "adding.. $(find -type f -printf '-a %p ')" hub release create $(find -type f -printf '-a %p ') slv-pyspy-v$(date +%Y%m%d) -F - <<'#####' pyspy diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 1a181f7..6d37770 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -25,7 +25,7 @@ jobs: with: registry: ghcr.io username: ${{ github.actor }} - password: ${{ secrets.GHCR_PAT }} + password: ${{ secrets.GITHUB_TOKEN }} - name: Push image run: | docker push ghcr.io/silv3rr/pyspy:latest diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..246037e --- /dev/null +++ b/Dockerfile @@ -0,0 +1,10 @@ +# syntax=docker/dockerfile:1 +FROM python:3.9.17-bookworm +WORKDIR /app +COPY requirements.txt requirements.txt +SHELL ["/bin/bash", "-o", "pipefail", "-c"] +# hadolint ignore=DL3013 +RUN pip3 install --no-cache-dir -r requirements.txt && \ + pip3 install --no-cache-dir geoip2 flask +COPY . . +ENTRYPOINT ["./spy.py"] diff --git a/README.md b/README.md index ed15e93..f6d0c41 100644 --- a/README.md +++ b/README.md @@ -7,9 +7,11 @@ Shows users logged into glftpd either in a terminal window or as web page. Like 'gl_spy' and also simular to 'webspy' from foo-tools. Used to be included with [pywho](https://github.com/silv3rr/pywho) but is now its own separate thing. _cli mode_ + ![screenshot_cli](docs/cli.png) _web mode_ + ![screenshot_web](docs/web.png) Here's some more [more screenshots](docs/Screenshots.md) and asciinema [demo](docs/Demo.md). @@ -43,7 +45,7 @@ All files on [Releases](../../releases) tab ## docker -... +pyspy will be added to [docker-glftpd](https://github.com/silv3rr/docker-glftpd) soon(tm) ## apt diff --git a/build.sh b/build.sh index f5eab0e..521a702 100755 --- a/build.sh +++ b/build.sh @@ -114,7 +114,7 @@ if [ "$PYINSTALLER" -eq 1 ]; then ls -la dist/spy if [ "$PACK" -eq 1 ]; then . /etc/os-release - PACKNAME="pyspy-${ID:-linux}${VERSION_ID}-python${PYVER:-3}-x86_x64" + PACKNAME="slv-pyspy-${ID:-linux}${VERSION_ID}-python${PYVER:-3}-x86_x64" printf "Creating %s.tar.gz...\n" "$PACKNAME" tar -C ./dist -cvf "${PACKNAME}.tar.gz" spy >/dev/null && sha512sum "${PACKNAME}.tar.gz" >"${PACKNAME}.sha512sum" && echo "shasum: OK" || echo "ERROR: shasum"