Skip to content
Permalink
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
#!/usr/bin/env python3
""" Installation file - Dependencies for plugins """
import socket
import os, platform
print("[*] Checking Internet Connection...")
print("\n")
# Checks if host is has internet connection
def check_connection():
""" Determines interface that esatblishes the connection
checks if connection is made to endpoint and returns true
else catches exception and returns false """
try:
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
s.connect(("8.8.8.8", 80))
return True
except socket.error as msg:
print("[-] Caught exception socket.error: %s" % msg)
return False
status = check_connection()
# Checks that module installs completely
def confirm_package_installed(package):
os.system(package)
# Verifies connection and then downloads necessary dependencies
def process_command():
if not status:
print("[-] Connection could not be established.")
else:
print("[+] Connection established.")
print("\n")
print("[*] Trying to install Requirements ...")
print("\n")
print("[**] Check that Requirements were fufilled ...")
plat = platform.system()
if plat == "Linux":
confirm_package_installed('apt install python3-pip')
# Pynput: For Controlling and Monitoring Keystrokes.
# Documentation1: https://pynput.readthedocs.io/en/latest/keyboard.html#monitoring-the-keyboard
# Documentation2: https://pypi.org/project/pynput/
confirm_package_installed("pip3 install pynput")
# Pyfiglet: For displaying ASCII text in ASCII art fonts.
# Documentation1: https://pypi.org/project/pyfiglet/
# Documentation2: https://pypi.org/project/pyfiglet2/
confirm_package_installed('pip3 install pyfiglet')
# Ifaddr: For finding IP addresses and related nics.
# Documentation: https://pypi.org/project/ifaddr/
confirm_package_installed('pip3 install ifaddr')
# Texttable: used for displaying data in a nice Format.
# Documentation: https://pypi.org/project/texttable/
confirm_package_installed('pip3 install texttable')
# Scapy: used for creating custom packets and sending and receiving and much more
# Documentation: https://scapy.readthedocs.io/en/latest/installation.html
confirm_package_installed('pip3 install scapy')
process_command()