From e2cc46b37e33643cf3dd017adb8a009bf143e246 Mon Sep 17 00:00:00 2001 From: Azat Bahawi Date: Sat, 25 Nov 2023 18:09:05 +0300 Subject: 2023-11-25 --- modules/common/nmap.nix | 46 +++++++++++++++++++++------------------------- 1 file changed, 21 insertions(+), 25 deletions(-) (limited to 'modules/common/nmap.nix') diff --git a/modules/common/nmap.nix b/modules/common/nmap.nix index 6c6192c..85beb21 100644 --- a/modules/common/nmap.nix +++ b/modules/common/nmap.nix @@ -33,31 +33,27 @@ in { systemd.user = { services.update-nmap-vulscan-lists = { Service = { - ExecStart = let - pkg = with pkgs; - writeShellApplication { - name = "update-nmap-vulscan-lists"; - runtimeInputs = [curl]; - text = '' - declare -a vulscandbs=( - "cve" - "exploitdb" - "openvas" - "osvdb" - "scipvuldb" - "securityfocus" - "securitytracker" - "xforce" - ) - for i in "''${vulscandbs[@]}"; do - ${getExe curl} \ - -o "${config.my.home}/.nmap/scripts/vulscan/$i.csv" \ - "https://www.computec.ch/projekte/vulscan/download/$i.csv" - done - ''; - }; - in - getExe pkg; + ExecStart = getExe (pkgs.writeShellApplication { + name = "update-nmap-vulscan-lists"; + runtimeInputs = [pkgs.curl]; + text = '' + declare -a vulscandbs=( + "cve" + "exploitdb" + "openvas" + "osvdb" + "scipvuldb" + "securityfocus" + "securitytracker" + "xforce" + ) + for i in "''${vulscandbs[@]}"; do + curl \ + -o "${config.my.home}/.nmap/scripts/vulscan/$i.csv" \ + "https://www.computec.ch/projekte/vulscan/download/$i.csv" + done + ''; + }); }; }; -- cgit 1.4.1