Skip to content

Commit

Permalink
add sccmhunter
Browse files Browse the repository at this point in the history
  • Loading branch information
dadevel committed Feb 21, 2024
1 parent 8efd079 commit aca8736
Show file tree
Hide file tree
Showing 2 changed files with 105 additions and 18 deletions.
93 changes: 75 additions & 18 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,15 @@ jobs:
- package-certipy
- package-certipy-bloodhound
- package-coercer
- package-cvemap
- package-dnsx
- package-donpapi
- package-evil-winrm
- package-ffuf
- package-gmsadumper
- package-gobuster
- package-gowitness
- package-havoc
- package-httpx
- package-impacket
- package-kerbrute
Expand All @@ -67,6 +69,7 @@ jobs:
- package-responder
- package-roadtools
- package-roadtools-hybrid
- package-sccmhunter
- package-servicedetector
- package-shuffledns
- package-subfinder
Expand Down Expand Up @@ -272,6 +275,24 @@ jobs:
path: ./coercer/*.pkg.tar.zst
retention-days: 1
if-no-files-found: error
package-cvemap:
runs-on: ubuntu-20.04
needs:
- build-container
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Build package
run: ./build-package.sh cvemap
- name: Upload package
uses: actions/upload-artifact@v3
with:
name: package-cvemap
path: ./cvemap/*.pkg.tar.zst
retention-days: 1
if-no-files-found: error
package-dnsx:
runs-on: ubuntu-20.04
needs:
Expand Down Expand Up @@ -398,6 +419,24 @@ jobs:
path: ./gowitness/*.pkg.tar.zst
retention-days: 1
if-no-files-found: error
package-havoc:
runs-on: ubuntu-20.04
needs:
- build-container
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Build package
run: ./build-package.sh havoc
- name: Upload package
uses: actions/upload-artifact@v3
with:
name: package-havoc
path: ./havoc/*.pkg.tar.zst
retention-days: 1
if-no-files-found: error
package-httpx:
runs-on: ubuntu-20.04
needs:
Expand Down Expand Up @@ -506,24 +545,24 @@ jobs:
path: ./ldapnomnom/*.pkg.tar.zst
retention-days: 1
if-no-files-found: error
#package-legba:
# runs-on: ubuntu-20.04
# needs:
# - build-container
# steps:
# - name: Checkout
# uses: actions/checkout@v3
# with:
# fetch-depth: 0
# - name: Build package
# run: ./build-package.sh legba
# - name: Upload package
# uses: actions/upload-artifact@v3
# with:
# name: package-legba
# path: ./legba/*.pkg.tar.zst
# retention-days: 1
# if-no-files-found: error
package-legba:
runs-on: ubuntu-20.04
needs:
- build-container
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Build package
run: ./build-package.sh legba
- name: Upload package
uses: actions/upload-artifact@v3
with:
name: package-legba
path: ./legba/*.pkg.tar.zst
retention-days: 1
if-no-files-found: error
package-manspider:
runs-on: ubuntu-20.04
needs:
Expand Down Expand Up @@ -866,6 +905,24 @@ jobs:
path: ./roadtools-hybrid/*.pkg.tar.zst
retention-days: 1
if-no-files-found: error
package-sccmhunter:
runs-on: ubuntu-20.04
needs:
- build-container
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Build package
run: ./build-package.sh sccmhunter
- name: Upload package
uses: actions/upload-artifact@v3
with:
name: package-sccmhunter
path: ./sccmhunter/*.pkg.tar.zst
retention-days: 1
if-no-files-found: error
package-servicedetector:
runs-on: ubuntu-20.04
needs:
Expand Down
30 changes: 30 additions & 0 deletions sccmhunter/PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
pkgname=sccmhunter
pkgver=latest
pkgrel=1
url="https://github.com//garrettfoster13/${pkgname}.git"
arch=(any)
license=(MIT)
depends=(python)
source=("git+${url}")
sha256sums=(SKIP)

package() {
cd "${srcdir}/${pkgname}"
mkdir -p "${pkgdir}"/opt/archpkgs/bin "${pkgdir}/opt/archpkgs/${pkgname}"
python -m venv "${pkgdir}/opt/archpkgs/${pkgname}"
cp -r ./*.py ./lib/ "${pkgdir}/opt/archpkgs/${pkgname}/"
declare -x VIRTUAL_ENV="${pkgdir}/opt/archpkgs/${pkgname}" PYTHONPATH="${pkgdir}/opt/archpkgs/${pkgname}" PATH="${pkgdir}/opt/archpkgs/${pkgname}/bin:$PATH"
pip install -r ./requirements.txt
cat << EOF > "${pkgdir}/opt/archpkgs/bin/${pkgname}"
#!/bin/sh
set -eu
export VIRTUAL_ENV=/opt/archpkgs/${pkgname} PYTHONPATH=/opt/archpkgs/${pkgname} PATH="/opt/archpkgs/${pkgname}/bin:\$PATH"
exec python /opt/archpkgs/${pkgname}/${pkgname}.py "\$@"
EOF
chmod +x "${pkgdir}/opt/archpkgs/bin/${pkgname}"
}

pkgver() {
cd "${srcdir}/${pkgname}"
echo "$(git rev-list --count HEAD).$(git rev-parse --short HEAD)"
}

0 comments on commit aca8736

Please sign in to comment.