-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathwbu.py
More file actions
60 lines (56 loc) · 1.69 KB
/
Copy pathwbu.py
File metadata and controls
60 lines (56 loc) · 1.69 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
###############################
# #
# Author: Miguel Bustamante #
# Server WBU v 0.1 #
# #
###############################
import Funtions
import socket
import os
import sys
def main():
file=None
serversocket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
port=9999
host = socket.gethostname()
try:
#Detecta Sistema Operativo
opertiveSystem = sys.platform
# Bindea el puerto
serversocket.bind((host, port))
# Cola de hasta 1 peticiones
serversocket.listen(1)
# Espera por el cliente
print("[+] Waiting connection with BadUsb...")
clientsocket, addr = serversocket.accept()
print("[+]Connection has been established with BadUsb")
flag=True
while flag:
Funtions.showBanner()
Funtions.showMenu()
option=input("[?]Please enter an option: ")
if option=="1":
Funtions.moidifyScript(opertiveSystem)
elif option=="2":
Funtions.readScript(file)
elif option=="3":
Funtions.sendScript(clientsocket,file)
elif option=="4":
print("Developing..")
elif option=="5":
flag=False
else:
print("[!]Incorrect selection!")
clientsocket.close()
print("[-]Bye!")
sys.exit()
except KeyboardInterrupt:
try:
clientsocket.close()
file.close()
print("[-]Bye!")
except:
print("[-]Bye!")
sys.exit()
if (__name__ == "__main__"):
main()