-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpcs.py
More file actions
executable file
·72 lines (52 loc) · 2.08 KB
/
Copy pathpcs.py
File metadata and controls
executable file
·72 lines (52 loc) · 2.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
#! /bin/python3
import subprocess,argparse, os, multiprocessing, time
import dearpygui.dearpygui as dpg
class PCS:
def startTor(self):
os.system('sudo service tor start')
def text(self):
self.startTor()
username = os.popen('id -u -n').readline().strip()
Exit = False
while not Exit:
c = input(f'\033[1;32;40m {username}>')
if c.lower() in ['exit', 'quit']:
Exit = True
os.system(f"proxychains {c}")
def GUI_imgui(self):
dpg.create_context()
def Run():
output = subprocess.check_output(['proxychains'] + dpg.get_value('command').split()).decode()
print(output)
dpg.add_text(output, parent='output')
with dpg.window(label="ProxyChainsShell", width=600, height=300):
dpg.add_input_text(label='Command', tag='command')
dpg.add_button(label='Run', callback=Run)
with dpg.window(label="output", width=200, height=300, tag='output', pos=(100, 100)):
dpg.add_text('output:')
dpg.create_viewport(title='ProxyChainsShell', width=200, height=200)
dpg.setup_dearpygui()
dpg.show_viewport()
dpg.start_dearpygui()
dpg.destroy_context()
def GUI(self):
def run_server():
os.system('python3 core/gui/manage.py runserver')
def run_qt():
time.sleep(8)
os.system('python3 core/qt')
server = multiprocessing.Process(target=run_server)
qt = multiprocessing.Process(target=run_qt)
server.start()
qt.start()
if __name__ == '__main__':
parser = argparse.ArgumentParser(description='GUI or Text')
parser.add_argument('-m', dest='m', metavar='-m',help='pcs.py -m gui or text')
args = parser.parse_args()
os.system('clear')
if args.m.lower() == 'text':
PCS().text()
elif args.m.lower() == 'gui':
PCS().GUI()
else:
print('pcs.py -m gui or text')