Skip to content

Instantly share code, notes, and snippets.

@AnoRebel
Created October 5, 2018 16:30
Show Gist options
  • Save AnoRebel/098c006586b44218e5733a30affe4c02 to your computer and use it in GitHub Desktop.
Save AnoRebel/098c006586b44218e5733a30affe4c02 to your computer and use it in GitHub Desktop.
A simple python 3 script i made for ubuntu variant users(Mint/Elementary) to install the latest Aircrack-ng to the system
#!/usr/bin/python3
# Needed imports
import sys, time
from requests import get
from wget import download
from os import system, chdir, getcwd
# Opening and Closing configs
wid = 20
sys.stdout.write("%s" % (" " * wid))
sys.stdout.flush()
sys.stdout.write("\b" * (wid + 1))
# Opening
for i in range(wid):
time.sleep(0.01)
sys.stdout.write("#-#")
sys.stdout.flush()
sys.stdout.write("\n")
print(" -- [Aircrack-ng Installer] -- ")
for i in range(wid):
time.sleep(0.04)
sys.stdout.write("#-#")
sys.stdout.flush()
sys.stdout.write("\n")
# Checking current version
print('Checking current version..\n')
html = requests.get('https://download.aircrack-ng.org')
version = html.text[17:20]
# Variable constants
print()
url = 'https://download.aircrack-ng.org/aircrack-ng-{0}.tar.gz'.format(version)
tarball = 'aircrack-ng-{0}.tar.gz'.format(version)
fname = 'aircrack-ng-{0}'.format(version)
curdir = getcwd()
# Download the aircrack-ng tarball
print('Downloading the aircrack-ng tarball..\n')
download(url)
print()
# Extract the tarball
print('Extracting the tarball..\n')
system('tar -zxvf ' + tarball)
print()
# Entering the extracted directory
print('Entering the extracted directory..\n')
try:
chdir(fname)
print()
finally:
chdir(curdir)
print()
sys.exit("Something went wrong with changing directories")
print('Running autoreconf -i ..\n')
system('autoreconf -i')
print()
# Configuring our installation
print('Configuring the installation using experimental features and experimental scripts\n')
system('./configure --with-experimental --with-ext-scripts')
print()
# Making
print('Running make..\n')
system('sudo make')
print()
# Installing to the system
print('Running make install to install into system..\n')
system('sudo make install')
print()
# Removing the tarball
print('Removing the tarball for space..\n')
system('rm ' + tarball)
print()
# Testing if it works
print('Testing if it works..\n')
system('aircrack-ng --help')
print()
# Closing
for i in range():
time.sleep(0.04)
sys.stdout.write("=-=")
sys.stdout.flush()
sys.stdout.write("\n")
print(' -- [Succeddfully installed Aircrack-ng] -- ')
print(' --[Scripted by @AnoRebel] -- ')
for i in range(wid):
time.sleep(0.04)
sys.stdout.write("=-=")
sys.stdout.flush()
sys.stdout.write("\n")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment