aboutsummaryrefslogtreecommitdiffstats
path: root/commands
diff options
context:
space:
mode:
authorEUcancER <root@euer.krebsco.de>2012-05-02 14:06:26 +0200
committerEUcancER <root@euer.krebsco.de>2012-05-02 14:06:26 +0200
commitd91d10d3426d877bd901549b93ac0dd0e6cf7264 (patch)
tree4cecf791fb51bc48023767b4327a82e4c5349b0d /commands
parent85f0c12a9eebecff1ca6a387d62eac5931977f40 (diff)
fix whatweb wrapper
Diffstat (limited to 'commands')
-rwxr-xr-xcommands/whatweb6
1 files changed, 4 insertions, 2 deletions
diff --git a/commands/whatweb b/commands/whatweb
index 1c1d779..c9aab29 100755
--- a/commands/whatweb
+++ b/commands/whatweb
@@ -1,5 +1,7 @@
#!/bin/sh
#wrapper for WhatWeb
-whatweb_bin='../repos/whatweb/whatweb'
-[ -e "$whatweb_bin" ] || ( echo "Whatweb app does not exist" && exit 1 )
+here=$(dirname `readlink -f $0`)
+whatweb_bin="$here/../repos/whatweb/whatweb"
+[ -e "$whatweb_bin" ] || ( echo "!! Whatweb app does not exist" && exit 1 )
+[ "balls$1" = "balls" ] && ( echo "!! no host given" && exit 1)
$whatweb_bin "$1"