aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMaxim Karasev <begs@disroot.org>2022-06-11 13:06:44 +0300
committerLeo <thinkabit.ukim@gmail.com>2022-06-17 02:23:26 +0000
commitf570e056b0c9f32dea7f5f7d40d0883e1555bae6 (patch)
treeccba70e9bd0da8760fc493d39f0b002f0b41df8b
parentaa9083b19e930ebffbfbd64cde9cde9b86ac3bfd (diff)
downloadaports-f570e056b0c9f32dea7f5f7d40d0883e1555bae6.tar.gz
aports-f570e056b0c9f32dea7f5f7d40d0883e1555bae6.tar.bz2
aports-f570e056b0c9f32dea7f5f7d40d0883e1555bae6.tar.xz
testing/responder: new aport
-rw-r--r--testing/responder/APKBUILD32
-rw-r--r--testing/responder/fhs.patch69
2 files changed, 101 insertions, 0 deletions
diff --git a/testing/responder/APKBUILD b/testing/responder/APKBUILD
new file mode 100644
index 0000000000..176c943467
--- /dev/null
+++ b/testing/responder/APKBUILD
@@ -0,0 +1,32 @@
+# Contributor: Maxim Karasev <begs@disroot.org>
+# Maintainer: Maxim Karasev <begs@disroot.org>
+pkgname=responder
+pkgver=3.1.2.0
+pkgrel=0
+pkgdesc="IPv6/IPv4 LLMNR/NBT-NS/mDNS Poisoner and NTLMv1/2 relay"
+url="https://github.com/lgandx/Responder"
+arch="noarch"
+license="GPL-3.0-or-later"
+depends="python3 py3-netifaces"
+source="https://github.com/lgandx/Responder/archive/refs/tags/v$pkgver/Responder-$pkgver.tar.gz
+ fhs.patch"
+builddir="$srcdir/Responder-$pkgver"
+options="!check" # no tests
+
+package() {
+ mkdir -p "$pkgdir"/usr/share/responder \
+ "$pkgdir"/var/log/responder \
+ "$pkgdir"/var/lib/responder \
+ "$pkgdir"/etc/responder \
+ "$pkgdir"/usr/bin
+
+ find -type d -mindepth 1 | xargs cp -rt "$pkgdir"/usr/share/responder
+ cp *.py "$pkgdir"/usr/share/responder
+ install -Dm644 Responder.conf "$pkgdir"/etc/responder/responder.conf
+ ln -s /usr/share/responder/Responder.py "$pkgdir"/usr/bin/responder
+}
+
+sha512sums="
+6434f2b323ce5ce597ea04da30476215577fb9e9ad705506ee96db11e75d0a545be9f034520b0bfaa347d0a57597b8ffd75e18d46d288c1db4cd6a09d1960b4e Responder-3.1.2.0.tar.gz
+540c4873a72dd554dae2b75949c86e6c354a6ace69b84e725c60ddddf6ad4448d380f8e3fbf64945e306fb49dad80d6772b5f40a0db48323ae4fc654056a9b58 fhs.patch
+"
diff --git a/testing/responder/fhs.patch b/testing/responder/fhs.patch
new file mode 100644
index 0000000000..d976b50906
--- /dev/null
+++ b/testing/responder/fhs.patch
@@ -0,0 +1,69 @@
+From 95651f8bdabe6dd3df5c06b65a4b3efa4166f670 Mon Sep 17 00:00:00 2001
+From: Maxim Karasev <begs@disroot.org>
+Date: Fri, 17 Jun 2022 00:37:48 +0300
+Subject: [PATCH] Use FHS directories
+
+Responder doesn't fit in Unix environment nicely by default.
+---
+ Responder.conf | 10 +++++-----
+ settings.py | 6 +++---
+ 2 files changed, 8 insertions(+), 8 deletions(-)
+
+diff --git a/Responder.conf b/Responder.conf
+index 5c1b94e..5d6dbcb 100755
+--- a/Responder.conf
++++ b/Responder.conf
+@@ -22,19 +22,19 @@ Challenge = Random
+
+ ; SQLite Database file
+ ; Delete this file to re-capture previously captured hashes
+-Database = Responder.db
++Database = responder.db
+
+ ; Default log file
+-SessionLog = Responder-Session.log
++SessionLog = responder-session.log
+
+ ; Poisoners log
+-PoisonersLog = Poisoners-Session.log
++PoisonersLog = poisoners-session.log
+
+ ; Analyze mode log
+-AnalyzeLog = Analyzer-Session.log
++AnalyzeLog = analyzer-session.log
+
+ ; Dump Responder Config log:
+-ResponderConfigDump = Config-Responder.log
++ResponderConfigDump = config-responder.log
+
+ ; Specific IP Addresses to respond to (default = All)
+ ; Example: RespondTo = 10.20.1.100-150, 10.20.3.10
+diff --git a/settings.py b/settings.py
+index 095f5b5..fe17b00 100755
+--- a/settings.py
++++ b/settings.py
+@@ -82,7 +82,7 @@ class Settings:
+ self.PY2OR3 = "PY2"
+ # Config parsing
+ config = ConfigParser.ConfigParser()
+- config.read(os.path.join(self.ResponderPATH, 'Responder.conf'))
++ config.read(os.path.join('/etc/responder', 'responder.conf'))
+
+ # Servers
+ self.HTTP_On_Off = self.toBool(config.get('Responder Core', 'HTTP'))
+@@ -101,10 +101,10 @@ class Settings:
+ self.Krb_On_Off = self.toBool(config.get('Responder Core', 'Kerberos'))
+
+ # Db File
+- self.DatabaseFile = os.path.join(self.ResponderPATH, config.get('Responder Core', 'Database'))
++ self.DatabaseFile = os.path.join('/var/lib/responder', config.get('Responder Core', 'Database'))
+
+ # Log Files
+- self.LogDir = os.path.join(self.ResponderPATH, 'logs')
++ self.LogDir = '/var/log/responder'
+
+ if not os.path.exists(self.LogDir):
+ os.mkdir(self.LogDir)
+--
+2.36.1
+