Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- import curses
- import curses.panel
- import windows
- import threading
- import time
- import signal
- ######
- # Loading will consist of:
- # Check for all required dependency files and modules (25%)
- # Check for wireless card, and test functionality (25%)
- # Check for database, if exists, import all clients (50%)
- # On server start, check if any clients have been registered, if none, enable
- # registration mode. Start a wireless network with a random name, and random
- # password. Wait for connection from possible client. Once connected, create
- # and exchange encryption keys.
- # Create a procedure for making procedurally random SSIDs and passwords.
- # Exchange procedure with client, and all future clients.
- ######
- # On server restart, enable wireless network. Wait for client join. On client
- # join, ping encrypted Ready signal. Recieve encrypted table which contains
- # data, such as nearby wireless networks, total collected data,
- # and running jobs (if applicable).
- # When operator requests a job, server sends signal to all connected clients.
- # The clients respond with OK signal, and then disconnect to complete job.
- # Once job is complete, reconnect to network and send encrypted Done signal.
- # If job is timeout(24 hours, unless specified otherwise) reconnect and send
- # encrypted Fail signal. Jobs will be simple enough.
- default_port = 43275
- procedure_port = 00000
- default_ssid = "n8am1n3al0"
- procedure_ssid = "000000000000"
- default_pass = "N8amln3al0"
- procedure_pass = "000000000000"
- frames = windows.windowFrames
- # Code
- class mainThread(threading.Thread):
- def __init__(self):
- time.sleep(0.1)
- def run(self):
- frames.mainFrame(stdscr)
- stdscr.getch()
- frames.workFrame(stdscr)
- stdscr.getch()
- class ex(threading.Thread, stdscr):
- def __init__(self):
- time.sleep(0.1)
- def run(self, stdscr):
- if True:
- y, x = stdscr.getmaxyx()
- stdscr.clear()
- curses.resizeterm(y, x)
- stdscr.refresh()
- def watchResize(self, stdscr):
- signal.signal(signal.SIGWINCH, ex.fixResize(stdscr))
- if __name__ == "__main__":
- stdscr = curses.initscr()
- t1 = mainThread(stdscr)
- t2 = ex(stdscr)
- t1.start()
- t2.start()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement