diff options
author | lberrymage | 2019-11-04 22:23:16 -0900 |
---|---|---|
committer | lberrymage | 2019-11-05 09:14:13 -0900 |
commit | 899379e988ccc44f3ffe7aefcaaf3bcf8d3add5d (patch) | |
tree | 638734f92b5a8948d1413f0ff04583d38cbb8c4b | |
parent | 95093299cf0398b25c0d3a5c05bf57a350a7bea1 (diff) | |
download | aur-899379e988ccc44f3ffe7aefcaaf3bcf8d3add5d.tar.gz |
Responder now requests root privileges on startup
Before this change, Responder.py would simply quit if not given root privileges
and state that it needed to be run as root. Now it requests root privileges,
and if they are not given, it quits as before. Note that this does not apply
when running responder with "--version" or "--help" ("-h" included), as those
options do not require root.
-rw-r--r-- | .SRCINFO | 4 | ||||
-rw-r--r-- | PKGBUILD | 4 | ||||
-rw-r--r-- | responder.sh | 7 |
3 files changed, 11 insertions, 4 deletions
@@ -1,7 +1,7 @@ pkgbase = responder pkgdesc = A LLMNR, NBT-NS and MDNS poisoner, with built-in HTTP/SMB/MSSQL/FTP/LDAP rogue authentication server supporting NTLMv1/NTLMv2/LMv2, Extended Security NTLMSSP and Basic HTTP authentication pkgver = 2.3.4.0 - pkgrel = 1 + pkgrel = 2 url = https://github.com/lgandx/responder/ arch = any license = GPL3 @@ -11,7 +11,7 @@ pkgbase = responder source = responder.sh source = responder.patch sha256sums = 0956736d36b2e04f356be6332d4cf52602ff661a95a0f0bbde681ffe3d54d134 - sha256sums = 658d17f895ad48a47babf885176a8a4e891219c7fd7d53141a1dbdbbaa0b9374 + sha256sums = 251dfa0eeaffd146b09ae1ffd2f56a6d7c67c6f8845bbb746c9d223daba39d19 sha256sums = d200ddf84e1a0ad691ecc708f4c3e495793dd1c246ded3cd777daf4fe1d75753 pkgname = responder @@ -4,7 +4,7 @@ _pkgname=Responder pkgname=responder pkgver=2.3.4.0 -pkgrel=1 +pkgrel=2 pkgdesc='A LLMNR, NBT-NS and MDNS poisoner, with built-in HTTP/SMB/MSSQL/FTP/LDAP rogue authentication server supporting NTLMv1/NTLMv2/LMv2, Extended Security NTLMSSP and Basic HTTP authentication' arch=('any') depends=('python2') @@ -15,7 +15,7 @@ source=("https://github.com/lgandx/${pkgname}/archive/v${pkgver}.tar.gz" 'responder.sh' 'responder.patch') sha256sums=('0956736d36b2e04f356be6332d4cf52602ff661a95a0f0bbde681ffe3d54d134' - '658d17f895ad48a47babf885176a8a4e891219c7fd7d53141a1dbdbbaa0b9374' + '251dfa0eeaffd146b09ae1ffd2f56a6d7c67c6f8845bbb746c9d223daba39d19' 'd200ddf84e1a0ad691ecc708f4c3e495793dd1c246ded3cd777daf4fe1d75753') prepare() { diff --git a/responder.sh b/responder.sh index 7f28311ef213..2b4b0daac2da 100644 --- a/responder.sh +++ b/responder.sh @@ -1,3 +1,10 @@ #!/bin/sh + +# If not run with "-h", "--help", or "--version", request root privileges +if [[ $EUID != 0 && !("$@" =~ (-h|--version)) ]]; then + sudo "$0" "$@" + exit $? +fi + cd /usr/share/responder exec python2 Responder.py "$@" |