darksoul86 Posted March 29, 2013 Posted March 29, 2013 hi all i have a little problem with this home brew script of mine. i'm trying to build a script that pipes Crunch to Aircrack but the first loop doesn't exit am i doing something wrong? #!/bin/bash # capncrunch is a script to simplify using crunch and aircrack in one pipe minlength=0 maxlength=0 filelocation="/root" filename="test" #get minimum number of chars until [ "$minlengt" -ge 1 ] ; do echo -n "enter the minimum password length and press [ENTER]: "; read minlength #echo " the number entered is: " $minlength; if [ "$minlength" -lt 1 ] ; then echo " minimum lenght cannot be 0" fi done # get maximum number of chars until [ "$maxlength"-ge"$minlength" ]; do echo -n "enter the maximum password length and press [ENTER]: "; read maxlength if [ "$maxlength"-lt"$minlength" ] ; then echo "maximum length must be equal or larger than minimum length" fi done Quote
WatskeBart Posted March 29, 2013 Posted March 29, 2013 First variable is missing a "h" ;) until [ "$minlengt" -ge 1 ] ; do should be until [ "$minlength" -ge 1 ] ; do also in echo " minimum lenght cannot be 0" but that's just a echo command :p Quote
darksoul86 Posted March 29, 2013 Author Posted March 29, 2013 thats what you get when staring for hours at this problem, the simple things aren't noticed any more thank you Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.