diff --git a/bind-output b/bind-output index 2107717..ff9ea6b 100755 --- a/bind-output +++ b/bind-output @@ -10,8 +10,8 @@ ROOT=$(dirname `realpath $0`); test $# -lt 2 && echo -e "error: too fewarguments\n\n\e[1mUSAGE\e[0m\n\tbind-output \n\n\e[1mARGUMENTS\e[0m\n\t\tThe identifier of the output (buffer name)\n\t\tThe ip or host of the target\n\t\tThe port to connect to\n" && exit 1; # (3) Check @PORT range # -MIN_PORT=49152; -MAX_PORT=65535; +MIN_PORT=1024; +MAX_PORT=49151; test "$3" -gt "$MAX_PORT" -o "$3" -lt "$MIN_PORT" && echo "error: must be between $MIN_PORT and $MAX_PORT" && exit 1; # (4) Set argument explicit names # @@ -41,9 +41,7 @@ touch $BUFFER; outfail=0; # (1) kill script after 10 failures - while [ $outfail -lt 10 ]; do - - echo "failures: $outfail"; +. while [ $outfail -lt 10 ]; do # (2) bind socket to buffer echo "(.) binding $BUFFER to $OUT_IP:$OUT_PT";