Commit Diff


commit - 16fb04df83f1a5a74af32fd28e1a4a2b34021f4a
commit + cb1c4e156140f7e459004a9d18977efb9b53de5f
blob - 0ab061ec72beefa9eeca557766d81355e8fd06a1
blob + ae5af9015a50b25de84660c9a0069c0ae1ee8a44
--- from_nuclei.sh
+++ from_nuclei.sh
@@ -1,22 +1,28 @@
 #!/bin/sh
 
-# This is still a work-in-progress
+# use someting like the following to pretty print
+# (note: the optarg for '-s' is a tab):
+# $ column -s "	" -t
 
 awk '
+BEGIN {OFS="\t"}
 {
 	# Remove the surrounding [] brackets of the first three fields
 	for (i = 1; i <= 3; i++)
 		$i = substr($i, 2, length($i) - 2)
 
-	printf "%-70s\t%-10s\t%-10s\t%s", $1, $2, $3, $4
+	printf "%s\t%s\t%s\t%s\t", $1, $2, $3, $4
 
-	# If there is additional information at the end, print it
-	# separated with one space
+	# If there is additional information at the end,
+	# print it separated with one space.
+	# Otherwise simply mark ist as empty with '-'
 	if (NF > 4) {
-		printf "\t%s", $5
+		printf "%s", $5
 		for (i = 6; i <= NF; i++) {
 			printf " %s", $i
 		}
+	} else {
+		printf "-"
 	}
 	printf "\n"
 }