Last active
December 11, 2015 11:28
-
-
Save eticzon/4593544 to your computer and use it in GitHub Desktop.
Revisions
-
worncitizen revised this gist
Jan 22, 2013 . 1 changed file with 10 additions and 12 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -7,7 +7,7 @@ case $2 in *zalora*) zalora_uri=$2 ;; *) exit 2; ;; @@ -17,23 +17,21 @@ lookup_log=$logs_dir/lookup.log wget_log=$logs_dir/wget.log traceroute_log=$logs_dir/traceroute.log # Using host instead of nslookup (dig anyone?) ( echo ">>>>> $(date) <<<<<" host $zalora_uri ) >> $lookup_log 2>&1 # Just retrieving a "small file" ( echo ">>>>> $(date) <<<<<" wget -nv $zalora_uri/rev.txt -O $logs_dir/rev.txt ) >> $wget_log 2>&1 # Using TCP SYN instead of ICMP ECHO here ( echo ">>>>> $(date) <<<<<" traceroute -nT $zalora_uri echo ">>>>>>>>>>>>>>>" ) >> $traceroute_log 2>&1 -
worncitizen created this gist
Jan 22, 2013 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,39 @@ #!/bin/bash # Some crude checks here ... [[ $1 != "" && -d $1 ]] && logs_dir=$1 || exit 1 # And another ... case $2 in *zalora*) zalora_uri=$2 ;; *) exit 2; ;; esac lookup_log=$logs_dir/lookup.log wget_log=$logs_dir/wget.log traceroute_log=$logs_dir/traceroute.log ( echo ">>>>>>>>>>>>>>>" date host $zalora_uri echo ">>>>>>>>>>>>>>>" ) >> $lookup_log ( echo ">>>>>>>>>>>>>>>" date wget -nv $zalora_uri/rev.txt -O $logs_dir/rev.txt echo ">>>>>>>>>>>>>>>" ) >> $wget_log ( echo ">>>>>>>>>>>>>>>" date traceroute -nT $zalora_uri echo ">>>>>>>>>>>>>>>" ) >> $traceroute_log