-
Notifications
You must be signed in to change notification settings - Fork 313
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #149 from s0lst1c3/parot-os-support
Adding support for Parot OS (Security)
- Loading branch information
Showing
5 changed files
with
135 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -159,3 +159,6 @@ Hostapd ctrl_interface name randomly generated to support multiple concurrent ea | |
|
||
1.12.2 - Gabriel Ryan <[email protected]> | ||
Fixed kali-setup file, updated kali-dependencies.txt file | ||
|
||
1.12.3 - Gabriel Ryan <[email protected]> | ||
Added official support for Parot OS (Security) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
__version__ = '1.12.2' | ||
__version__ = '1.12.3' | ||
__codename__ = 'Power Overwhelming' | ||
__author__ = '@s0lst1c3' | ||
__contact__ = '[email protected]' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
apache2 | ||
dnsmasq | ||
libssl-dev | ||
libnfnetlink-dev | ||
libnl-3-dev | ||
libnl-genl-3-dev | ||
libcurl4-openssl-dev | ||
zlib1g-dev | ||
libpcap-dev | ||
python3-pip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
#!/usr/bin/env python3 | ||
import os | ||
import sys | ||
|
||
from settings import settings | ||
|
||
def exit_if_not_root(): | ||
|
||
if os.getuid() != 0: | ||
sys.exit("[!} Error: this script must be run as root.") | ||
|
||
def read_deps_file(deps_file): | ||
with open(deps_file) as fd: | ||
return ' '.join([ line.strip() for line in fd ]) | ||
|
||
if __name__ == '__main__': | ||
|
||
exit_if_not_root() | ||
|
||
|
||
default_wordlist = os.path.join(settings.dict['paths']['directories']['wordlists'], settings.dict['core']['eaphammer']['general']['default_wordlist']) | ||
|
||
wordlist_source = settings.dict['core']['eaphammer']['general']['wordlist_source'] | ||
|
||
root_dir = settings.dict['paths']['directories']['root'] | ||
local_dir = settings.dict['paths']['directories']['local'] | ||
|
||
openssl_source = settings.dict['core']['eaphammer']['general']['openssl_source'] | ||
openssl_version = settings.dict['core']['eaphammer']['general']['openssl_version'] | ||
openssl_build_options = settings.dict['core']['eaphammer']['general']['openssl_build_options'] | ||
openssl_build_prefix = os.path.join(local_dir, 'openssl/local') | ||
|
||
openssl_bin = settings.dict['paths']['openssl']['bin'] | ||
dh_file = settings.dict['paths']['certs']['dh'] | ||
|
||
if input('Important: it is highly recommended that you run "apt -y update" and "apt -y upgrade" prior to running this setup script. Do you wish to proceed? Enter [y/N]: ').lower() != 'y': | ||
sys.exit('Aborting.') | ||
print() | ||
|
||
|
||
print('\n[*] Removing stub files...\n') | ||
os.system('find {} -type f -name \'stub\' -exec rm -f {{}} +'.format(root_dir)) | ||
print('\ncomplete!\n') | ||
|
||
|
||
print('\n[*] Installing Parot dependencies...\n') | ||
os.system('apt -y install %s' % read_deps_file('parot-dependencies.txt')) | ||
print('\n[*] complete!\n') | ||
|
||
print('\n[*] Installing Python dependencies...\n') | ||
os.system('python3 -m pip install -r pip.req') | ||
print('\n[*] complete!\n') | ||
|
||
|
||
print('\n[*] Downloading OpenSSL_{}...\n'.format(openssl_version.replace('.', '_'))) | ||
os.system('wget {} -O {}/openssl.tar.gz'.format(openssl_source, local_dir)) | ||
print('\n[*] complete!\n') | ||
|
||
print('\n[*] Extracting OpenSSL_{}...\n'.format(openssl_version.replace('.', '_'))) | ||
os.system('cd {} && tar xzf openssl.tar.gz'.format(local_dir)) | ||
os.system('mv {}/openssl-OpenSSL_{} {}/openssl'.format(local_dir, openssl_version.replace('.', '_'), local_dir)) | ||
os.system('cd {} && rm -f openssl.tar.gz'.format(local_dir)) | ||
print('\n[*] complete!\n') | ||
|
||
print('\n[*] Compiling OpenSSL locally to avoid interfering with system install...\n') | ||
os.system('cd {}/openssl && ./config --prefix={} enable-ssl2 enable-ssl3 enable-ssl3-method enable-des enable-rc4 enable-weak-ssl-ciphers no-shared'.format(local_dir, openssl_build_prefix)) | ||
os.system('cd {}/openssl && make'.format(local_dir)) | ||
os.system('cd {}/openssl && make install_sw'.format(local_dir)) | ||
print('\n[*] complete!\n') | ||
|
||
print('\n[*] Create DH parameters file with default length of 2048...\n') | ||
os.system('{} dhparam -out {} 2048'.format(openssl_bin, dh_file)) | ||
print('\ncomplete!\n') | ||
|
||
print('\n[*] Compiling hostapd...\n') | ||
os.system("cd %s && cp defconfig .config" % settings.dict['paths']['directories']['hostapd']) | ||
os.system("cd %s && make hostapd-eaphammer_lib" % settings.dict['paths']['directories']['hostapd']) | ||
print('\n[*] complete!\n') | ||
|
||
print('\n[*] Compiling hcxtools...\n') | ||
os.system("cd %s && make" % settings.dict['paths']['directories']['hcxtools']) | ||
print('\n[*] complete!\n') | ||
|
||
print('\n[*] Compiling hcxdumptool...\n') | ||
os.system("cd %s && make" % settings.dict['paths']['directories']['hcxdumptool']) | ||
print('\n[*] complete!\n') | ||
|
||
print('\n[*] Downloading default wordlist...\n') | ||
os.system("wget %s -O %s.tar.gz" % (wordlist_source, default_wordlist)) | ||
print('\n[*] complete!\n') | ||
|
||
print('\n[*] Extracting default wordlist...\n') | ||
os.system("cd %s && tar xzf %s.tar.gz" % (settings.dict['paths']['directories']['wordlists'], default_wordlist)) | ||
print('\n[*] complete!\n') | ||
|
||
print('\n[*] Retrieving Responder from teh interwebz...\n') | ||
os.system("cd %s && git clone https://github.com/lgandx/Responder.git" % (settings.dict['paths']['directories']['local'])) | ||
print('\n[*] complete!\n') | ||
|