Permalink
Branch: master
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
45 lines (36 sloc) 1.19 KB
# Maintainer: ArchStrike <team@archstrike.org>
buildarch=1
_pkgname=commix
pkgname=${_pkgname}-git
pkgver=20190215.r1261
pkgrel=1
groups=('archstrike' 'archstrike-webapps')
pkgdesc='Find and exploit a command injection vulnerability in a certain vulnerable parameter or string'
url='https://github.com/commixproject/commix'
depends=('python2-urllib3' 'python2-httplib2')
makedepends=('git')
license=('GPL3')
arch=('any')
source=("${pkgname}::git+${url}.git")
sha512sums=('SKIP')
pkgver() {
cd ${pkgname}
printf "%s.r%s" "$(git show -s --format=%ci master | sed 's/\ .*//g;s/-//g')" "$(git rev-list --count HEAD)"
}
prepare(){
grep -iRl 'python' ${pkgname} | xargs sed -i 's|python$|python2|g'
}
package() {
cd ${pkgname}
install -dm755 "${pkgdir}/usr/bin"
install -dm755 "${pkgdir}/usr/share/${pkgname}"
cp -a --no-preserve=ownership * "${pkgdir}/usr/share/${pkgname}/"
#fix error in namcap
sed -i 's|#!/usr/bin/env python|#!/usr/bin/env python2|' "${pkgdir}/usr/share/${pkgname}/src/core/modules/shellshock/shellshock.py"
cat > "${pkgdir}/usr/bin/${_pkgname}" <<EOF
#!/usr/bin/env bash
cd /usr/share/${pkgname}
python2 ${_pkgname}.py "\$@"
EOF
chmod 755 "${pkgdir}/usr/bin/${_pkgname}"
}