From 58f8c05300a18b25d139da3efaf7fe7327fac1d3 Mon Sep 17 00:00:00 2001 From: libcrack Date: Fri, 9 Feb 2024 22:48:33 +0100 Subject: [PATCH] Added makefile for easy install/uninstall on Linux&MacOS --- Makefile | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..9d0353c --- /dev/null +++ b/Makefile @@ -0,0 +1,32 @@ +# Sat Sep 16 22:26:18 CEST 2023 +# devnull@libcrack.so + +NMAP_FILES = ssh-hassh.nse hasshdb +ALL_FILES := $(foreach f,$(NMAP_FILES),$(addprefix $(NMAP_DIR)/,$(f))) + +ifeq ($(shell uname -s), Linux) +NMAP_DB_DIR=/usr/share/nmap/nselib/data +NMAP_SC_DIR = /usr/share/nmap/scripts +else +ifeq ($(shell uname -s), Darwin) +NMAP_DB_DIR=/usr/local/share/nmap/nselib/data +NMAP_SC_DIR = /usr/local/share/nmap/scripts +endif +endif + + +default: + echo "Usage: make " + +docker: + docker build -t hassh:latest . + +install: + install -m 0644 -t $(NMAP_DB_DIR) hasshdb + install -m 0644 -t $(NMAP_SC_DIR) ssh-hassh.nse + +uninstall: + rm $(NMAP_DB_DIR)/hasshdb + rm $(NMAP_SC_DIR)/ssh-hassh.nse + +.SILENT: default