1 # Contributor: fnord0 < fnord0 AT riseup DOT net >
7 pkgdesc=("a Man in the Middle tool to demonstrate protocol middling attacks")
9 url=("http://code.google.com/p/middler/")
11 depends=('python' 'dsniff' 'python-netfilter')
12 #optdepends=('scapy: alternate method to generate ARP spoofing packets via scapy'
13 # 'pypcap: required for scapy ARP spoofing method'
14 # 'readline: required for scapy ARP spoofing method'
15 # 'python-beautifulsoup: required for scapy ARP spoofing method'
16 # 'libdnet: required for scapy ARP spoofing method'
17 # 'metasploit: to use TheMiddler metasploit framework plugin'
18 # 'beef: to use TheMiddler BeEF plugin')
20 _svntrunk="http://middler.googlecode.com/svn/trunk/"
24 if [ -d ${srcdir}/.svn ]; then
29 svn co ${_svntrunk} ${srcdir}
31 mkdir -p ${pkgdir}/usr/{bin,src} || return 1
33 svn export ${srcdir} ${_pkgname} || return 1
35 cd ${pkgdir}/usr/src/${_pkgname}
37 grep -rl python * | xargs sed -i 's|python|python2|g' || return 1
39 python2 setup.py install --root=${pkgdir}/ --optimize=1 || return 1
42 echo "#!/bin/sh" > ${pkgdir}/usr/bin/${_pkgname}
43 echo "cd /usr/src/middler" >> ${pkgdir}/usr/bin/${_pkgname}
44 echo "python2 ./middler.py \"\$@\"" >> ${pkgdir}/usr/bin/${_pkgname}
45 echo "cd -" >> ${pkgdir}/usr/bin/${_pkgname}
46 chmod +x ${pkgdir}/usr/bin/${_pkgname}