aboutsummaryrefslogtreecommitdiffstats
path: root/autoscan/tests/test_autoscan.sh
diff options
context:
space:
mode:
authorLaurent Ghigonis <laurent@p1sec.com>2013-07-22 17:29:11 +0200
committerLaurent Ghigonis <laurent@p1sec.com>2013-07-22 17:29:11 +0200
commitca737ae83ee6f3af257eb003ffcf09b837a172ff (patch)
tree3a78239add7372b87201cc98d9c1df5b22e4f7e1 /autoscan/tests/test_autoscan.sh
parentautoscan: some code and add tests (diff)
downloadlaurent-tools-ca737ae83ee6f3af257eb003ffcf09b837a172ff.tar.xz
laurent-tools-ca737ae83ee6f3af257eb003ffcf09b837a172ff.zip
autoscan: almost done
Diffstat (limited to 'autoscan/tests/test_autoscan.sh')
-rwxr-xr-xautoscan/tests/test_autoscan.sh13
1 files changed, 9 insertions, 4 deletions
diff --git a/autoscan/tests/test_autoscan.sh b/autoscan/tests/test_autoscan.sh
index bea2c34..816646f 100755
--- a/autoscan/tests/test_autoscan.sh
+++ b/autoscan/tests/test_autoscan.sh
@@ -5,15 +5,20 @@ err() {
exit 1
}
-export PATH="./spoofbin/:$PATH"
-
-../autoscan.py -f -o test_output/ -r eth0 ||err "autoscan execution failed"
+sudo PATH="./spoofbin/:$PATH" ../autoscan.py -v -f -p 127.0.0.1 -o test_output/ -r eth0 ||err "autoscan execution failed"
# XXX test output dirs
dir="test_output/$(ls -1 test_output |tail -n1)"
-[[ $(cat $dir/route/gw) = "10.137.2.1" ]] ||err "route/gw"
+[[ -e $dir/pcap/tcpdump.pcap ]] ||err "pcap/tcpdump.pcap"
[[ $(cat $dir/ifconfig/ip4) = "10.137.2.9" ]] ||err "ifconfig/ip4"
[[ $(cat $dir/ifconfig/ip6) = "fe80::216:3eff:fe5e:6c07" ]] ||err "ifconfig/ip6"
+[[ $(cat $dir/route/gw) = "10.137.2.1" ]] ||err "route/gw"
[[ $(cat $dir/pubip_ping/code) = "0" ]] ||err "pubip_ping/code"
+[[ -e $dir/resolv/resolv.conf ]] ||err "resolv/resolv.conf"
+[[ $(cat $dir/pubip_get/ip) = "1.2.3.4" ]] ||err "pubip_get/ip"
+[[ -e $dir/pubip_traceroute/out ]] ||err "pubip_traceroute/out"
+[[ -e $dir/resolv_traceroute/out ]] ||err "resolv_traceroute/out"
+[[ -e "$dir/explor_traceroute/out_192.168.0.1" ]] ||err "explor_traceroute/out_192.168.0.1"
+[[ -e $dir/explor_scan/localnet.nmap ]] ||err "explor_scan/localnet.nmap"
echo "TEST OK"