Jump to content

little Bash problem


Recommended Posts

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?

# capncrunch is a script to simplify using crunch and aircrack in one pipe


#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"

# 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"

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...