Using Bash To generate keys in a specific format
Page 1 of 1
Using Bash To generate keys in a specific format
Generate keys
prepare the format then run keys.sh to create a key list for pen testing!
Instead of trying to generate 12 digit wifi keys in 1 go (would be way too long and inective for example it would have AAA type output)!
We going to break the wifi key into 4 parts of 3 chars each recognising the wifi format of the code!
Create a folder
gen1.sh (example)
gen2.sh (example)
gen3.sh (example)
gen4.sh (example)
Now putting it to gether to make a valid 12 digit vm wifi key!
prepare the format then run keys.sh to create a key list for pen testing!
Instead of trying to generate 12 digit wifi keys in 1 go (would be way too long and inective for example it would have AAA type output)!
We going to break the wifi key into 4 parts of 3 chars each recognising the wifi format of the code!
Create a folder
- Code:
mkdir wordlists
gen1.sh (example)
- Code:
crunch 3 3 abcdefghijklmnopqrstuvwxyz -d 1 -t @@% | perl -ne 'print unless /([A-Z]).*\1/' > wordlists/1.txt
gen2.sh (example)
- Code:
crunch 3 3 abcdefghijklmnopqrstuvwxyz -d 1 -t ,@@ | perl -ne 'print unless /([A-Z]).*\1/' > wordlists/2.txt
gen3.sh (example)
- Code:
crunch 3 3 abcdefghijklmnopqrstuvwxyz -d 1 -t @@@ | perl -ne 'print unless /([A-Z]).*\1/' > wordlists/3.txt
gen4.sh (example)
- Code:
crunch 3 3 abcdefghijklmnopqrstuvwxyz -d 1 -t %@@ | perl -ne 'print unless /([A-Z]).*\1/' > wordlists/4.txt
Now putting it to gether to make a valid 12 digit vm wifi key!
- Code:
#!/bin/bash
# (c)J~Net 2022
# jnet.club
# https://jnet.forumotion.com/t1887-using-bash-to-generate-keys-in-a-specific-format#2932
#
#
# ./key.sh 1000
#
#
echo "Hi $USER, Welcome To Key Gen V5 By J~Net 2022"
echo "Setting Up Pre Reqs!"
# Lets check if you have required apps installed to do this job...
input=`which perl`
if [ $input = "/usr/bin/perl" ]
then
echo "You Have Perl Installed Already"
else
echo "Installing Perl"
sudo apt install -y perl
fi
#
input=`which crunch`
if [ $input = "/usr/bin/crunch" ]
then
echo "You Have Crunch Installed Already"
else
echo "Installing Crunch"
sudo apt install -y crunch
fi
#
if [ -z "$1" ]
then
echo "How Many keys You Want?"
read num
else
num=$1
fi
#
file="wordlists/1.txt"
if [[ -f $file ]]
then
echo ""
else
sudo mkdir wordlists
touch $file
crunch 3 3 abcdefghijklmnopqrstuvwxyz -d 1 -t @@% | perl -ne 'print unless /([A-Z]).*\1/' > $file
fi
#
file="wordlists/2.txt"
if [[ -f $file ]]
then
echo ""
else
sudo mkdir wordlists
touch $file
crunch 3 3 abcdefghijklmnopqrstuvwxyz -d 1 -t ,@@ | perl -ne 'print unless /([A-Z]).*\1/' > $file
fi
#
#
file="wordlists/3.txt"
if [[ -f $file ]]
then
echo ""
else
sudo mkdir wordlists
touch $file
crunch 3 3 abcdefghijklmnopqrstuvwxyz -d 1 -t @@@ | perl -ne 'print unless /([A-Z]).*\1/' > $file
fi
#
file="wordlists/4.txt"
if [[ -f $file ]]
then
echo ""
else
sudo mkdir wordlists
touch $file
crunch 3 3 abcdefghijklmnopqrstuvwxyz -d 1 -t %@@ | perl -ne 'print unless /([A-Z]).*\1/' > $file
fi
#
i=0
echo "Getting $num Random Wifi keys"
while [ $i -lt $num ]
do
echo ""
i1=`shuf -n 1 wordlists/1.txt`
i2=`shuf -n 1 wordlists/2.txt`
i3=`shuf -n 1 wordlists/3.txt`
i4=`shuf -n 1 wordlists/4.txt`
echo "$i1$i2$i3$i4" >> keys.txt
echo "Generating New Wifi Key $i of $num Is: $i1$i2$i3$i4"
((i++))
done
- Code:
sudo chmod +x *.sh
- Code:
./keys.sh
Re: Using Bash To generate keys in a specific format
Generate Online Example
jnet.sytes.net/apps/Crypto/Wifi-Keys/VM
jnet.sytes.net/apps/Crypto/Wifi-Keys/VM
Similar topics
» Using Sed bash Script On Linux To Generate Morse Code Without Sound
» Switching Shells from zsh crap to standard good old bash (/bin/bash)
» Bash Psychic Game For Linux Bash
» Linux BASH Script Running Commands and Functions From Bash Script and saving to varables
» Generate a vanity hostname for v3 onion link for tor on linux
» Switching Shells from zsh crap to standard good old bash (/bin/bash)
» Bash Psychic Game For Linux Bash
» Linux BASH Script Running Commands and Functions From Bash Script and saving to varables
» Generate a vanity hostname for v3 onion link for tor on linux
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum