Advertisement
Guest User

Untitled

a guest
Feb 18th, 2018
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.27 KB | None | 0 0
  1. #!/bin/bash
  2. import curses
  3. import curses.panel
  4. import windows
  5. import threading
  6. import time
  7. import signal
  8. ######
  9. # Loading will consist of:
  10. # Check for all required dependency files and modules (25%)
  11. # Check for wireless card, and test functionality (25%)
  12. # Check for database, if exists, import all clients (50%)
  13. # On server start, check if any clients have been registered, if none, enable
  14. # registration mode. Start a wireless network with a random name, and random
  15. # password. Wait for connection from possible client. Once connected, create
  16. # and exchange encryption keys.
  17. # Create a procedure for making procedurally random SSIDs and passwords.
  18. # Exchange procedure with client, and all future clients.
  19. ######
  20. # On server restart, enable wireless network. Wait for client join. On client
  21. # join, ping encrypted Ready signal. Recieve encrypted table which contains
  22. # data, such as nearby wireless networks, total collected data,
  23. # and running jobs (if applicable).
  24. # When operator requests a job, server sends signal to all connected clients.
  25. # The clients respond with OK signal, and then disconnect to complete job.
  26. # Once job is complete, reconnect to network and send encrypted Done signal.
  27. # If job is timeout(24 hours, unless specified otherwise) reconnect and send
  28. # encrypted Fail signal. Jobs will be simple enough.
  29.  
  30. default_port = 43275
  31. procedure_port = 00000
  32. default_ssid = "n8am1n3al0"
  33. procedure_ssid = "000000000000"
  34. default_pass = "N8amln3al0"
  35. procedure_pass = "000000000000"
  36.  
  37. frames = windows.windowFrames
  38.  
  39. # Code
  40.  
  41.  
  42. class mainThread(threading.Thread):
  43.  
  44. def __init__(self):
  45. time.sleep(0.1)
  46.  
  47. def run(self):
  48. frames.mainFrame(stdscr)
  49. stdscr.getch()
  50. frames.workFrame(stdscr)
  51. stdscr.getch()
  52.  
  53.  
  54. class ex(threading.Thread, stdscr):
  55.  
  56. def __init__(self):
  57. time.sleep(0.1)
  58.  
  59. def run(self, stdscr):
  60. if True:
  61. y, x = stdscr.getmaxyx()
  62. stdscr.clear()
  63. curses.resizeterm(y, x)
  64. stdscr.refresh()
  65.  
  66. def watchResize(self, stdscr):
  67. signal.signal(signal.SIGWINCH, ex.fixResize(stdscr))
  68.  
  69.  
  70. if __name__ == "__main__":
  71. stdscr = curses.initscr()
  72. t1 = mainThread(stdscr)
  73. t2 = ex(stdscr)
  74.  
  75. t1.start()
  76. t2.start()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement