Skip to content

Commit

Permalink
add mssqlrelay + fix impacket-ba
Browse files Browse the repository at this point in the history
  • Loading branch information
noraj committed Nov 30, 2024
1 parent e77f106 commit 07af64d
Show file tree
Hide file tree
Showing 3 changed files with 82 additions and 7 deletions.
25 changes: 20 additions & 5 deletions packages/impacket-ba/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,37 @@
pkgname=impacket-ba
_pkgname=impacket
pkgver=0.12.0
pkgrel=1
pkgrel=2
pkgdesc='Collection of classes for working with network protocols.'
url='https://github.com/fortra/impacket'
arch=('any')
groups=('blackarch' 'blackarch-exploitation' 'blackarch-networking')
license=('Apache')
depends=('python' 'python-pyasn1' 'python-pycryptodomex' 'python-pyopenssl'
'python-six' 'python-ldap3' 'ldapdomaindump' 'python-flask'
'python-future' 'python-charset-normalizer' 'python-dsinternals'
'python-setuptools') # Will be fixed in 0.12.0 https://github.com/fortra/impacket/issues/885#issuecomment-1197218746
depends=('python'
'python-pyasn1'
'python-pyasn1-modules'
'python-pycryptodomex'
'python-pyopenssl'
'python-six'
'python-ldap3'
'ldapdomaindump'
'python-flask'
'python-setuptools'
'python-charset-normalizer'
)
options=(!emptydirs)
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
sha512sums=('48db5e2973cebc87a84118f2d83202f9583f45b4294e7b17c49da32bd6aedcf4e704447dd9d87e03f754c3947a9759a39624e44c5849718daae9e96b04f9aeb0')
provides=('impacket')
conflicts=('impacket')

prepare() {
cd "$_pkgname-$pkgver"

# This requirement is too hardcore and never aligned with AL version
sed -i 's/pyOpenSSL==24.0.0/pyOpenSSL>=24.0.0/' setup.py
}

build() {
cd "$_pkgname-$pkgver"

Expand Down
60 changes: 60 additions & 0 deletions packages/mssqlrelay/PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=mssqlrelay
pkgver=10.97efa52
pkgrel=1
pkgdesc="Microsoft SQL Relay is an offensive tool for auditing and abusing Microsoft SQL (MSSQL) services."
arch=('any')
groups=('blackarch' 'blackarch-windows')
url='https://github.com/CompassSecurity/mssqlrelay'
license=('MIT')
depends=('python'
'impacket-ba'
'python-asn1crypto'
'python-cryptography'
'python-ldap3'
'python-pyasn1'
'python-dnspython'
'python-dsinternals'
'python-pyopenssl'
'python-requests'
'python-requests-ntlm'
)
makedepends=('git' 'python-setuptools')
source=("git+$url.git")
sha512sums=('SKIP')

pkgver() {
cd $pkgname

( set -o pipefail
git describe --long --tags --abbrev=7 2>/dev/null |
sed 's/\([^-]*-g\)/r\1/;s/-/./g' ||
printf "%s.%s" "$(git rev-list --count HEAD)" \
"$(git rev-parse --short=7 HEAD)"
)
}

prepare() {
cd $pkgname

sed -i 's/pyasn1==0.4.8/pyasn1/' setup.py
}

build() {
cd $pkgname

python setup.py build
}

package() {
cd $pkgname

install -Dm644 -t "$pkgdir/usr/share/licenses/$pkgname" LICENSE

python setup.py install --root="$pkgdir" --prefix=/usr -O1 --skip-build

find "$pkgdir" -type f -iname '*.pyc' -exec rm {} \;
}

4 changes: 2 additions & 2 deletions packages/python-dsinternals/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ pkgname=python-dsinternals
_pkgname=dsinternals
pkgver=1.2.4
_pyver=3.12
pkgrel=5
pkgdesc='A Python native library containing necessary classes, functions and structures to interact with Windows Active Directory..'
pkgrel=6
pkgdesc='A Python native library containing necessary classes, functions and structures to interact with Windows Active Directory.'
arch=('any')
url='https://pypi.org/project/dsinternals/#files'
license=('GPL2')
Expand Down

0 comments on commit 07af64d

Please sign in to comment.