Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ssh audit revamp #2803

Merged
merged 3 commits into from
Jul 12, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions lists/to-release
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
libvmi
python-libvmi
pyvmidbg
ssh-audit
39 changes: 19 additions & 20 deletions packages/ssh-audit/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -2,43 +2,42 @@
# See COPYING for license details.

pkgname=ssh-audit
pkgver=165.22b671e
pkgver=v2.2.0.r0.ge447c42
pkgrel=1
epoch=1
groups=('blackarch' 'blackarch-scanner')
pkgdesc='SSH server auditing (banner, key exchange, encryption, mac, compression, compatbility, etc).'
arch=('any')
url='https://github.com/arthepsy/ssh-audit'
url='https://github.com/jtesta/ssh-audit'
license=('MIT')
depends=('python2')
makedepends=('git')
source=("git+https://github.com/arthepsy/$pkgname.git")
depends=('python')
makedepends=('git' 'python-setuptools')
source=("git+https://github.com/jtesta/$pkgname.git")
sha512sums=('SKIP')

pkgver() {
cd $pkgname

echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}

package() {
prepare() {
cd $pkgname

install -dm 755 "$pkgdir/usr/bin"
install -dm 755 "$pkgdir/usr/share/$pkgname"

install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname/" README.md
install -Dm 644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
# Symbolic link workaround, https://github.com/jtesta/ssh-audit/issues/46
cp ssh-audit.py pypi/sshaudit/sshaudit.py
cp README.md pypi/sshaudit/README.md
}

rm README.md LICENSE
build() {
cd "$pkgname/pypi"

cp -a * "$pkgdir/usr/share/$pkgname/"
python setup.py build
}

cat > "$pkgdir/usr/bin/$pkgname" << EOF
#!/bin/sh
cd /usr/share/$pkgname
exec python2 $pkgname.py "\$@"
EOF
package() {
cd "$pkgname/pypi"

chmod +x "$pkgdir/usr/bin/$pkgname"
python setup.py install --root="$pkgdir" --prefix=/usr -O1 --skip-build
}