()
Ensures required programs are installed.
Ensures required programs are installed.
Ensures required programs are installed .
def initial_check():
    """
        Ensures required programs are installed.
    """
    global RUN_CONFIG
    airs = ['aircrack-ng', 'airodump-ng', 'aireplay-ng', 'airmon-ng', 'packetforge-ng']
    for air in airs:
        if program_exists(air): continue
        print R+' [!]'+O+' required program not found: %s' % (R+air+W)
        print R+' [!]'+O+' this program is bundled with the aircrack-ng suite:'+W
        print R+' [!]'+O+'        '+C+'http://www.aircrack-ng.org/'+W
        print R+' [!]'+O+' or: '+W+'sudo apt-get install aircrack-ng\n'+W
        exit_gracefully(1)
    
    if not program_exists('iw'):
        print R+' [!]'+O+' airmon-ng requires the program %s\n' % (R+'iw'+W)
        exit_gracefully(1)
    
    printed = False
    # Check reaver
    if not program_exists('reaver'):
        printed = True
        print R+' [!]'+O+' the program '+R+'reaver'+O+' is required for WPS attacks'+W
        print R+'    '+O+'   available at '+C+'http://code.google.com/p/reaver-wps'+W
        RUN_CONFIG.WPS_DISABLE = True
    elif not program_exists('walsh') and not program_exists('wash'):
        printed = True
        print R+' [!]'+O+' reaver\'s scanning tool '+R+'walsh'+O+' (or '+R+'wash'+O+') was not found'+W
        print R+' [!]'+O+' please re-install reaver or install walsh/wash separately'+W

    # Check handshake-checking apps
    recs = ['tshark', 'pyrit', 'cowpatty']
    for rec in recs:
        if program_exists(rec): continue
        printed = True
        print R+' [!]'+O+' the program %s is not required, but is recommended%s' % (R+rec+O, W)
    if printed: print ''
def initial_check ( ) : global RUN_CONFIG airs = [ 'aircrack-ng' , 'airodump-ng' , 'aireplay-ng' , 'airmon-ng' , 'packetforge-ng' ] for air in airs : if program_exists ( air ) : continue print R + ' [!]' + O + ' required program not found: %s' % ( R + air + W ) print R + ' [!]' + O + ' this program is bundled with the aircrack-ng suite:' + W print R + ' [!]' + O + '        ' + C + 'http://www.aircrack-ng.org/' + W print R + ' [!]' + O + ' or: ' + W + 'sudo apt-get install aircrack-ng\n' + W exit_gracefully ( 1 ) if not program_exists ( 'iw' ) : print R + ' [!]' + O + ' airmon-ng requires the program %s\n' % ( R + 'iw' + W ) exit_gracefully ( 1 ) printed = False # Check reaver if not program_exists ( 'reaver' ) : printed = True print R + ' [!]' + O + ' the program ' + R + 'reaver' + O + ' is required for WPS attacks' + W print R + '    ' + O + '   available at ' + C + 'http://code.google.com/p/reaver-wps' + W RUN_CONFIG . WPS_DISABLE = True elif not program_exists ( 'walsh' ) and not program_exists ( 'wash' ) : printed = True print R + ' [!]' + O + ' reaver\'s scanning tool ' + R + 'walsh' + O + ' (or ' + R + 'wash' + O + ') was not found' + W print R + ' [!]' + O + ' please re-install reaver or install walsh/wash separately' + W # Check handshake-checking apps recs = [ 'tshark' , 'pyrit' , 'cowpatty' ] for rec in recs : if program_exists ( rec ) : continue printed = True print R + ' [!]' + O + ' the program %s is not required, but is recommended%s' % ( R + rec + O , W ) if printed : print ''