derv82 / wifite

3.24k stars 749 forks source link

#Debian wifite not find aircrack-ng already installed #179

Open ilixindri opened 1 year ago

ilixindri commented 1 year ago

sudo apt install -y aircrack-ng

(venv) root@debian/media/user/HD-STI/RepoS/wifite which aircrack-ng
/usr/bin/aircrack-ng
(venv) root@debian/media/user/HD-STI/RepoS/wifite 
def program_exists(program):
    """
        Uses 'which' (linux command) to check if a program is installed.
    """

    proc = Popen(['which', program], stdout=PIPE, stderr=PIPE)
    txt = proc.communicate()
    if txt[0].strip() == '' and txt[1].strip() == '':
        return False
    if txt[0].strip() != '' and txt[1].strip() == '':
        return True

    return not (txt[1].strip() == '' or txt[1].find('no %s in' % program) != -1)