Check out my new github repository.
https://github.com/18kills/Login
Give me one reason to care.
>>61276540
very cool project op
Interesting, good you don't need to be faster than chinese botnets because they usually don't change passwords. Bu please... use case instead of that if else spaghetti
>babby's first shell script
>>61276540
What if 22 and 23 are both open?
Quote your variables you heathen.
What the fuck is $per ? Use brace expansion.
echo "${1}.${2}.${3}.${4}"
>>61276540
>overcommented
>what are cases
>what is getopts
>PUT ERRYTHING INTO FUNCTIONS EVEN THOUGH IT'S ONLY CALLED ONCE AND IT NEVER LOOPS
re write this shit in python or something, looks like ass. and 'IOT device brute force login tool' is a bit grandiose considering this is a bash wrapper around hydra
>>61276540
>>61277289
Line 20, simplify:
[[ -f "hydra.restore" ]] && rm "hydra.restore"
Line 8, create an empty file:
touch login.log
In main(): use a case/esac test.
In general, apt install shellcheck and use an editor that supports it. Catches 99% of crap that way.
>>61277324
also
>not quoting your variables
>using arithmetic checks to test
>fucking with the IFS then never resetting
>using IFS hacks instead of checking CIDR
this is legit garbage
>>61276540
>>61277388
Instead of setting a variable bool thing and checking it in loginSSH and loginTelnet you can do something like this:
restore="true"
if "$restore"; then
#stuff
fi
>/g/ thread has actual shell scripting
I'm more impressed than I should be.