summaryrefslogtreecommitdiff
path: root/pcr/backdoor-factory/PKGBUILD
blob: 43b61266c66d326748467fd6ed1a175c14c84761 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# Maintainer: Márcio Silva <coadde@parabola.nu>

pkgname='backdoor-factory'
pkgver=3.4.2
pkgrel=1
pkgdesc='Patch win32/64 binaries with shellcode'
url="https://github.com/secretsquirrel/the-$pkgname"
arch=('any')
license=('BSD3')
depends=('python2' 'python2-pefile' 'python2-capstone')
source=("the-$pkgname-$pkgver.tar.gz"::"$url/archive/$pkgver.tar.gz")
sha1sums=('SKIP')

package() {
  cd "$srcdir/the-$pkgname-$pkgver"

  mkdir -p "$pkgdir/usr/share/$pkgname/"
  mkdir -p "$pkgdir/usr/bin/"

  install -Dm644 README.md "$pkgdir/usr/share/doc/$pkgname/README.md"

  rm README.md

  cp -a * "$pkgdir/usr/share/$pkgname"

  cat > "$pkgdir/usr/bin/$pkgname" << EOF
#!/bin/sh
exec python2 /usr/share/backdoor-factory/backdoor.py "\$@"
EOF

  chmod +x "$pkgdir/usr/bin/$pkgname"
}