Skip to content

Commit

Permalink
package katana, sccmsecrets and smbclient-ng
Browse files Browse the repository at this point in the history
Closes #49, closes #50 and closes #54.
  • Loading branch information
dadevel committed Nov 27, 2024
1 parent b2775d5 commit e0c9f45
Show file tree
Hide file tree
Showing 5 changed files with 137 additions and 1 deletion.
51 changes: 51 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ jobs:
- package-iker
- package-impacket-stable
- package-impacket-unstable
- package-katana
- package-krbrelayx
- package-lapsdumper
- package-ldap-shell
Expand Down Expand Up @@ -83,11 +84,13 @@ jobs:
- package-roadtools
- package-roadtools-hybrid
- package-sccmhunter
- package-sccmsecrets
- package-scrying
- package-servicedetector
- package-shortscan
- package-shuffledns
- package-sliver
- package-smbclient-ng
- package-spk
- package-subfinder
- package-tlsx
Expand Down Expand Up @@ -661,6 +664,22 @@ jobs:
path: ./impacket-unstable/*.pkg.tar.zst
retention-days: 1
if-no-files-found: error
package-katana:
runs-on: ubuntu-24.04
needs:
- build-container
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build package
run: ./build-package.sh katana
- name: Upload package
uses: actions/upload-artifact@v4
with:
name: package-katana
path: ./katana/*.pkg.tar.zst
retention-days: 1
if-no-files-found: error
package-krbrelayx:
runs-on: ubuntu-24.04
needs:
Expand Down Expand Up @@ -1093,6 +1112,22 @@ jobs:
path: ./sccmhunter/*.pkg.tar.zst
retention-days: 1
if-no-files-found: error
package-sccmsecrets:
runs-on: ubuntu-24.04
needs:
- build-container
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build package
run: ./build-package.sh sccmsecrets
- name: Upload package
uses: actions/upload-artifact@v4
with:
name: package-sccmsecrets
path: ./sccmsecrets/*.pkg.tar.zst
retention-days: 1
if-no-files-found: error
package-scrying:
runs-on: ubuntu-24.04
needs:
Expand Down Expand Up @@ -1173,6 +1208,22 @@ jobs:
path: ./sliver/*.pkg.tar.zst
retention-days: 1
if-no-files-found: error
package-smbclient-ng:
runs-on: ubuntu-24.04
needs:
- build-container
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build package
run: ./build-package.sh smbclient-ng
- name: Upload package
uses: actions/upload-artifact@v4
with:
name: package-smbclient-ng
path: ./smbclient-ng/*.pkg.tar.zst
retention-days: 1
if-no-files-found: error
package-spk:
runs-on: ubuntu-24.04
needs:
Expand Down
26 changes: 26 additions & 0 deletions katana/PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
pkgname=katana
pkgver=latest
pkgrel=1
url="https://github.com/projectdiscovery/${pkgname}.git"
arch=(any)
license=(MIT)
makedepends=(git go)
source=("git+${url}")
sha256sums=(SKIP)

build() {
cd "${srcdir}/${pkgname}/cmd/katana"
go mod tidy
go build -trimpath -buildmode=pie -mod=readonly -modcacherw -ldflags '-s -w' -o "${pkgname}" .
}

package() {
cd "${srcdir}/${pkgname}"
mkdir -p "${pkgdir}/opt/archpkgs/bin"
install -Dm 755 "./cmd/katana/${pkgname}" "${pkgdir}/opt/archpkgs/bin/${pkgname}"
}

pkgver() {
cd "${srcdir}/${pkgname}"
echo "$(git rev-list --count HEAD).$(git rev-parse --short HEAD)"
}
2 changes: 1 addition & 1 deletion sccmhunter/PKGBUILD
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
pkgname=sccmhunter
pkgver=latest
pkgrel=1
url="https://github.com//garrettfoster13/${pkgname}.git"
url="https://github.com/garrettfoster13/${pkgname}.git"
arch=(any)
license=(MIT)
depends=(python)
Expand Down
30 changes: 30 additions & 0 deletions sccmsecrets/PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
pkgname=sccmsecrets
pkgver=latest
pkgrel=1
url="https://github.com/synacktiv/${pkgname}.git"
arch=(any)
license=(unknown)
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 ./utils/ "${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}/SCCMSecrets.py "\$@"
EOF
chmod +x "${pkgdir}/opt/archpkgs/bin/${pkgname}"
}

pkgver() {
cd "${srcdir}/${pkgname}"
echo "$(git rev-list --count HEAD).$(git rev-parse --short HEAD)"
}
29 changes: 29 additions & 0 deletions smbclient-ng/PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
pkgname=smbclient-ng
pkgver=latest
pkgrel=1
url="https://github.com/p0dalirius/${pkgname}.git"
arch=(any)
license=(GPL3)
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}"
declare -x VIRTUAL_ENV="${pkgdir}/opt/archpkgs/${pkgname}" PYTHONPATH="${pkgdir}/opt/archpkgs/${pkgname}" PATH="${pkgdir}/opt/archpkgs/${pkgname}/bin:$PATH"
pip install .
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}/bin/smbclientng "\$@"
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 e0c9f45

Please sign in to comment.