def __init__(self, client_id, server, port): """ DOCSTRING: this function will initalize all the global varables for the class client_id: this is the user name of the server server : this is the IP address of the server to be connecter port : this is the PORT of the server to be connected """ self.buffer = 64 self.client_id = client_id self.server = server self.port = port self.addr = (self.server, self.port) # create the socket self.client = socket.socket(socket.AF_INET, socket.SOCK_STREAM) self.client.settimeout(5) # terminate varibale is the most important variable in the class # of the terminate varible set to True all loops will terminate imidiatly # all the threads will terminate # and the client will shutdown self.terminate = False self.c = COLORS()
from libs.colors import COLORS from subprocess import check_output, CalledProcessError, call from os import devnull from terminaltables import AsciiTable from re import findall from time import sleep devnull = open(devnull, 'w') colors = COLORS() global program_path global activated_option def print_wpa2_options(inputs_dict): descriptions = { 'IFACE': 'This is the wireless interface', 'BSSID': 'Mac address of the attacking router', 'CHANNEL': 'Attacking channel of the interface', 'WORDLIST': 'Full path to the wordlist', 'HANDSHAKE': 'Full path to the captured wordlist' } print(colors.RESET, end='') table_data = [[ f'{colors.BOLD}Option', f'{colors.BOLD}Current Setting', f'{colors.BOLD}Description{colors.RESET}' ]] for item in inputs_dict: try: single_data = [
# !/usr/bin/python # programmed by Yasiru Senerath # this is the script for the server from libs.colors import COLORS from time import sleep from datetime import datetime from datetime import date from os import system import threading import socket import platform #create and global instance for the coloring puspose c = COLORS() class Server(): def __init__(self, host, port, balcklist): self.host = host self.port = int(port) self.addr = (self.host, self.port) self.buffer = 64 self.client_details = {} self.balcklist = [] self.error_log = '' # to be initialized self.server_log = '' # to be initialized # in client details the details of client will be saved as follow # key- client_id