options.py 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-"
  3. """
  4. UFONet - Denial of Service Toolkit - 2013/2019 - 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 optparse, math
  10. class UFONetOptions(optparse.OptionParser):
  11. def __init__(self, *args):
  12. self.zombies_file = "botnet/zombies.txt" # set source path to retrieve 'zombies'
  13. self.aliens_file = "botnet/aliens.txt" # set source path to retrieve 'aliens'
  14. self.droids_file = "botnet/droids.txt" # set source path to retrieve 'droids'
  15. self.ucavs_file = "botnet/ucavs.txt" # set source path to retrieve 'ucavs'
  16. self.rpcs_file = "botnet/rpcs.txt" # set source path to retrieve 'rpcs'
  17. self.dorks_file = "botnet/dorks.txt" # set source path to retrieve 'dorks'
  18. self.sengines = self.extract_sengines()
  19. self.zombies = int(self.extract_zombies())
  20. self.aliens = int(self.extract_aliens())
  21. self.droids = int(self.extract_droids())
  22. self.ucavs = int(self.extract_ucavs())
  23. self.rpcs = int(self.extract_rpcs())
  24. self.dorks = int(self.extract_dorks())
  25. self.tools = self.extract_tools()
  26. self.etools = self.extra_tools()
  27. self.weapons = self.extract_weapons()
  28. self.ebotnet = self.electronic_botnet()
  29. self.eweapons = self.extra_weapons()
  30. self.total_botnet = str(self.zombies+self.aliens+self.droids+self.ucavs+self.rpcs)
  31. self.d_energy = self.extract_d_energy()
  32. self.y_energy = self.extract_y_energy()
  33. self.x_energy = self.extract_x_energy()
  34. self.formula = self.formula_x_energy()
  35. optparse.OptionParser.__init__(self,
  36. description='\n{(D)enial(OF)Fensive(S)ervice[ToolKit]}-{by_(io=psy+/03c8.net)}',
  37. prog='./ufonet',
  38. version='\nCode: v1.3 [SLY] SinguLaritY!\n')
  39. self.add_option("-v", "--verbose", action="store_true", dest="verbose", help="active verbose on requests")
  40. self.add_option("--examples", action="store_true", dest="examples", help="print some examples")
  41. self.add_option("--timeline", action="store_true", dest="timeline", help="show program's code timeline")
  42. self.add_option("--update", action="store_true", dest="update", help="check for latest stable version")
  43. self.add_option("--check-tor", action="store_true", dest="checktor", help="check to see if Tor is used properly")
  44. self.add_option("--force-ssl", action="store_true", dest="forcessl", help="force usage of SSL/HTTPS requests")
  45. self.add_option("--force-yes", action="store_true", dest="forceyes", help="set 'YES' to all questions")
  46. self.add_option("--gui", action="store_true", dest="web", help="start GUI (UFONet Web Interface)")
  47. group8 = optparse.OptionGroup(self, "*Tools*")
  48. group8.add_option("--crypter", action="store_true", dest="cryptomsg", help="Crypt/Decrypt messages using AES256+HMAC-SHA1")
  49. group8.add_option("--network", action="store_true", dest="shownet", help="Show info about your network (MAC, IPs)")
  50. group8.add_option("--xray", action="store", dest="xray", help="Fast port scanner (ex: --xray 'http(s)://target.com')")
  51. group8.add_option("--xray-ps", action="store", dest="xrayps", help="Set range of ports to scan (ex: --xray-ps '1-1024')")
  52. self.add_option_group(group8)
  53. group1 = optparse.OptionGroup(self, "*Configure Request(s)*")
  54. group1.add_option("--proxy", action="store", dest="proxy", help="Use proxy server (ex: --proxy 'http://127.0.0.1:8118')")
  55. group1.add_option("--user-agent", action="store", dest="agent", help="Use another HTTP User-Agent header (default: SPOOFED)")
  56. group1.add_option("--referer", action="store", dest="referer", help="Use another HTTP Referer header (default: SPOOFED)")
  57. group1.add_option("--host", action="store", dest="host", help="Use another HTTP Host header (default: NONE)")
  58. group1.add_option("--xforw", action="store_true", dest="xforw", help="Set your HTTP X-Forwarded-For with random IP values")
  59. group1.add_option("--xclient", action="store_true", dest="xclient", help="Set your HTTP X-Client-IP with random IP values")
  60. group1.add_option("--timeout", action="store", dest="timeout", type="int", help="Select your timeout (default: 1)")
  61. group1.add_option("--retries", action="store", dest="retries", type="int", help="Retries when the connection timeouts (default: 0)")
  62. group1.add_option("--threads", action="store", dest="threads", type="int", help="Max number of concurrent HTTP requests (default: 5)")
  63. group1.add_option("--delay", action="store", dest="delay", type="int", help="Delay between each HTTP request (default: 0)")
  64. self.add_option_group(group1)
  65. group2 = optparse.OptionGroup(self, "*Search for 'Zombies'*")
  66. group2.add_option("--auto-search", action="store_true", dest="autosearch", help="Search automatically for 'zombies' (may take time!)")
  67. group2.add_option("-s", action="store", dest="search", help="Search from a 'dork' (ex: -s 'proxy.php?url=')")
  68. group2.add_option("--sd", action="store", dest="dorks", help="Search from 'dorks' file (ex: --sd 'botnet/dorks.txt')")
  69. group2.add_option("--sn", action="store", dest="num_results", help="Set max number of results for engine (default: 10)")
  70. group2.add_option("--se", action="store", dest="engine", help="Search engine for 'dorking' (default: StartPage)")
  71. group2.add_option("--sa", action="store_true", dest="allengines", help="Search massively using all search engines")
  72. self.add_option_group(group2)
  73. group3 = optparse.OptionGroup(self, "*Test Botnet*")
  74. group3.add_option("--test-offline", action="store_true", dest="testoffline", help="Fast check to discard offline bots")
  75. group3.add_option("--test-all", action="store_true", dest="testall", help="Update ALL botnet status (may take time!)")
  76. group3.add_option("-t", action="store", dest="test", help="Update 'zombies' status (ex: -t 'botnet/zombies.txt')")
  77. group3.add_option("--test-rpc", action="store_true", dest="testrpc", help="Update 'reflectors' status (ex: --test-rpc)")
  78. group3.add_option("--attack-me", action="store_true", dest="attackme", help="Order 'zombies' to attack you (NAT required!)")
  79. self.add_option_group(group3)
  80. group4 = optparse.OptionGroup(self, "*Community*")
  81. group4.add_option("--blackhole", action="store_true", dest="blackhole", help="Create a 'blackhole' to share 'zombies'")
  82. group4.add_option("--up-to", action="store", dest="upip", help="Upload 'zombies' to IP (ex: --up-to '<IP>')")
  83. group4.add_option("--down-from", action="store", dest="dip", help="Download 'zombies' from IP (ex: --down-from '<IP>')")
  84. group4.add_option("--upload-zombies", action="store_true", dest="upload", help="Upload 'zombies' to Community server")
  85. group4.add_option("--download-zombies", action="store_true", dest="download", help="Download 'zombies' from Community server")
  86. self.add_option_group(group4)
  87. group5 = optparse.OptionGroup(self, "*Research Target*")
  88. group5.add_option("-i", action="store", dest="inspect", help="Search biggest file (ex: -i 'http(s)://target.com')")
  89. group5.add_option("-x", action="store", dest="abduction", help="Examine webserver configuration (+CVE, +WAF detection)")
  90. self.add_option_group(group5)
  91. group6 = optparse.OptionGroup(self, "*Configure Attack(s)*")
  92. group6.add_option("-a", action="store", dest="target", help="[DDoS] attack an URL (ex: -a 'http(s)://target.com')")
  93. group6.add_option("-f", action="store", dest="target_list", help="[DDoS] attack a list of targets (ex: -f 'targets.txt')")
  94. group6.add_option("-b", action="store", dest="place", help="Set place to attack (ex: -b '/path/big.jpg')")
  95. group6.add_option("-r", action="store", dest="rounds", help="Set number of rounds (ex: -r '1000') (default: 1)")
  96. self.add_option_group(group6)
  97. group7 = optparse.OptionGroup(self, "*Extra Configuration(s)*")
  98. group7.add_option("--no-aliens", action="store_true", dest="disablealiens", help="Disable 'aliens' web abuse")
  99. group7.add_option("--no-droids", action="store_true", dest="disabledroids", help="Disable 'droids' redirectors")
  100. group7.add_option("--no-rpcs", action="store_true", dest="disablerpcs", help="Disable 'xml-rpcs' reflectors")
  101. group7.add_option("--no-ucavs", action="store_true", dest="disableucavs", help="Disable 'ucavs' checkers")
  102. group7.add_option("--no-head", action="store_true", dest="disablehead", help="Disable 'Is target up?' starting check")
  103. group7.add_option("--no-scan", action="store_true", dest="disablescanner", help="Disable 'Scan shields' round check")
  104. group7.add_option("--no-purge", action="store_true", dest="disablepurge", help="Disable 'Zombies purge' round check")
  105. group7.add_option("--expire", action="store", dest="expire", help="Set expire time for 'Zombies purge' (default: 30)")
  106. self.add_option_group(group7)
  107. group8 = optparse.OptionGroup(self, "*Extra Attack(s)*")
  108. group8.add_option("--db", action="store", dest="dbstress", help="[DDoS] 'HTTP DB' attack (ex: --db 'search.php?q=')")
  109. group8.add_option("--spray", action="store", dest="spray", help="[DDoS] 'TCP-SYN reflection' attack (ex: --spray 100)")
  110. group8.add_option("--smurf", action="store", dest="smurf", help="[DDoS] 'ICMP broadcast' attack (ex: --smurf 101)")
  111. group8.add_option("--tachyon", action="store", dest="tachyon", help="[DDoS] 'DNS amplification' attack (ex: --tachyon 1000)")
  112. group8.add_option("--loic", action="store", dest="loic", help="[ DoS] 'HTTP fast' attack (ex: --loic 100)")
  113. group8.add_option("--loris", action="store", dest="loris", help="[ DoS] 'HTTP slow' attack (ex: --loris 101)")
  114. group8.add_option("--ufosyn", action="store", dest="ufosyn", help="[ DoS] 'TCP-SYN flood' attack (ex: --ufosyn 100)")
  115. group8.add_option("--xmas", action="store", dest="xmas", help="[ DoS] 'TCP-XMAS flood' attack (ex: --xmas 101)")
  116. group8.add_option("--nuke", action="store", dest="nuke", help="[ DoS] 'TCP-STARVATION' attack (ex: --nuke 10000)")
  117. self.add_option_group(group8)
  118. def extract_sengines(self):
  119. sengines = ["Yahoo", "Bing", "StartPage", "DuckDuckGo"]
  120. sengines = len(sengines)
  121. return sengines
  122. def extract_tools(self):
  123. tools = ["CYPTER", "NETWORK", "XRAY", "WARPER", "INSPECTOR", "ABDUCTOR", "AI.BOTNET", "AI.GUI", "AI.STATS", "BLACKHOLE"]
  124. tools = len(tools)
  125. return tools
  126. def extra_tools(self):
  127. etools = '\n _> ABDUCTOR * Defensive Shield Detector'
  128. etools += '\n _> AI.BOTNET * Intelligent Attack System'
  129. etools += '\n _> AI.GEO * Geomapping System'
  130. etools += '\n _> AI.STATS * Live Stats Reporter'
  131. etools += '\n _> AI.WEB * Visual Interface'
  132. etools += '\n _> BLACKHOLE * Warper (p2p.Botnet) Generator'
  133. etools += '\n _> CRYPTER * Telegram (crypto.Community) System'
  134. etools += '\n _> INSPECTOR * Objective Scanning Crawler'
  135. etools += '\n _> AI.NETWORK * Network (MACs, IPs) Reporter'
  136. etools += '\n _> XRAY * Ultra-Fast Ports Scanner'
  137. return etools
  138. def extract_weapons(self):
  139. weapons = ["DBSTRESSER", "SPRAY", "SMURF", "TACHYON", "LOIC", "LORIS", "UFOSYN", "XMAS", "NUKE"]
  140. weapons = len(weapons)
  141. return weapons
  142. def extra_weapons(self):
  143. eweapons = '\n _> DBSTRESS * [DDoS] HTTP DB Stresser'
  144. eweapons += '\n _> SPRAY * [DDoS] TCP SYN-Reflector'
  145. eweapons += '\n _> SMURF * [DDoS] ICMP Broadcaster'
  146. eweapons += '\n _> TACHYON * [DDoS] DNS Amplificator'
  147. eweapons += '\n _> LOIC * [ DoS] HTTP Fast-Requester'
  148. eweapons += '\n _> LORIS * [ DoS] HTTP Slow-Requester'
  149. eweapons += '\n _> UFOSYN * [ DoS] TCP SYN-Flag Flooder'
  150. eweapons += '\n _> XMAS * [ DoS] TCP XMAS-Flag Flooder'
  151. eweapons += '\n _> NUKE * [ DoS] TCP STARVATION Flooder'
  152. return eweapons
  153. def extract_zombies(self):
  154. try:
  155. f = open(self.zombies_file)
  156. zombies = len(f.readlines())
  157. f.close()
  158. except:
  159. zombies = "broken!"
  160. return zombies
  161. def electronic_botnet(self):
  162. ebotnet = '\n _> ALIENS [ '+ format(int(self.aliens), '06d')+ ' ] * HTTP POST'
  163. ebotnet += '\n _> DROIDS [ '+ format(int(self.droids), '06d')+ ' ] * HTTP GET (complex)'
  164. ebotnet += '\n _> UCAVs [ '+ format(int(self.ucavs), '06d')+ ' ] * WebAbuse'
  165. ebotnet += '\n _> X-RPCs [ '+ format(int(self.rpcs), '06d')+ ' ] * PingBack XML-RPC exploit'
  166. ebotnet += '\n _> ZOMBIES [ '+ format(int(self.zombies), '06d')+ ' ] * HTTP GET (simple)'
  167. return ebotnet
  168. def extract_aliens(self):
  169. try:
  170. f = open(self.aliens_file)
  171. aliens = len(f.readlines())
  172. f.close()
  173. except:
  174. aliens = "broken!"
  175. return aliens
  176. def extract_droids(self):
  177. try:
  178. f = open(self.droids_file)
  179. droids = len(f.readlines())
  180. f.close()
  181. except:
  182. droids = "broken!"
  183. return droids
  184. def extract_ucavs(self):
  185. try:
  186. f = open(self.ucavs_file)
  187. ucavs = len(f.readlines())
  188. f.close()
  189. except:
  190. ucavs = "broken!"
  191. return ucavs
  192. def extract_rpcs(self):
  193. try:
  194. f = open(self.rpcs_file)
  195. rpcs = len(f.readlines())
  196. f.close()
  197. except:
  198. rpcs = "broken!"
  199. return rpcs
  200. def extract_dorks(self):
  201. try:
  202. f = open(self.dorks_file)
  203. dorks = len(f.readlines())
  204. f.close()
  205. except:
  206. dorks = "broken!"
  207. return dorks
  208. def extract_d_energy(self): # Dark Energy Density = (Fluctuations)*(Baryon)*(Event horizont sphere)/(Age of the Universe)
  209. d_density = 0.8288*0.05
  210. d_sphere = d_density * 4 * math.pi * 16 **2
  211. d_energy = d_sphere/13.64**2
  212. return d_energy
  213. def extract_y_energy(self): # Y-Energy = (Momento Entropy)*(Energy of Invariability lost)
  214. y_entropy = int(self.total_botnet)+int(self.dorks)+int(self.sengines)+int(self.tools)+int(self.weapons)
  215. y_energy = y_entropy * 0.49
  216. return y_energy
  217. def extract_x_energy(self): # X-Energy = (Y-Energy)*(Dark Energy Density)
  218. x_energy = self.y_energy / self.d_energy
  219. return x_energy
  220. def formula_x_energy(self): # X-Energy Final Formula
  221. formula = 'X'+u"\u2091"+''+u"\N{SUBSCRIPT EIGHT}"' = '+u"\u03A8"+'/'+u"\u03A9"+''+u"\u028C"+' = ('+u"\u03A3"+''+u"\u2091"+')/('+u"\u03C3"+''+u"\N{SUBSCRIPT EIGHT}"+'*'+u"\u03A9"+'b*A'+u"\u2091"+''+u"\u2095"+'/t'+u"\N{SUPERSCRIPT TWO}"+')\n '+ str(self.y_energy) + '*0.49/0.8288*0.05*4'+u"\u03A0"+'16'+u"\N{SUPERSCRIPT TWO}"+'/13.64'+u"\N{SUPERSCRIPT TWO}"+''
  222. return formula
  223. def get_options(self, user_args=None):
  224. (options, args) = self.parse_args(user_args)
  225. if (not options.test and not options.testrpc and not options.target and not options.target_list and not options.checktor and not options.search and not options.dorks and not options.inspect and not options.abduction and not options.update and not options.download and not options.upload and not options.web and not options.attackme and not options.upip and not options.dip and not options.blackhole and not options.cryptomsg and not options.shownet and not options.xray and not options.timeline and not options.examples and not options.autosearch and not options.testoffline and not options.testall):
  226. print '='*75, "\n"
  227. print "888 888 8888888888 .d88888b. 888b 888 888 "
  228. print "888 888 888 d88P" "Y888b 8888b 888 888 "
  229. print "888 888 888 888 888 88888b 888 888 "
  230. print "888 888 8888888 888 888 888Y88b 888 .d88b. 888888 "
  231. print "888 888 888 888 888 888 Y88b888 d8P Y8b 888 "
  232. print "888 888 888 888 888 888 Y88888 88888888 888 "
  233. print "Y88b. .d88P 888 Y88b. .d88P 888 Y8888 Y8b. Y88b. "
  234. print " 'Y88888P' 888 'Y88888P' 888 Y888 'Y8888 'Y8888"
  235. print self.description, "\n"
  236. print '='*75
  237. self.version = self.version.replace("\n","")
  238. print '\n '+u"\u25BC "+self.version+u" \u25BC"+' {/Sing/luLz/raritY/}19++ '+u"\u25BC"+'\n'
  239. print "-"*75+"\n"
  240. print ' -> _BOTNET [DDoS]: [', format(int(self.total_botnet), '06d'),'] '+u"\u25BC"+' Bots (Available)'+ self.ebotnet
  241. print '\n -> _DORKS: [', format(int(self.dorks), '06d'), '] '+u"\u25BC"+' Open Redirect (CWE-601) patterns'
  242. print ' _> ENGINES [', format(int(self.sengines), '06d'), '] * Dorking providers (Working)'
  243. print '\n -> _TOOLS: [', format(int(self.tools), '06d'),'] '+u"\u25BC"+' Extra Tools (Misc)'+self.etools
  244. print '\n -> _WEAPONS: [', format(int(self.weapons), '06d'),'] '+u"\u25BC"+' Extra Attacks (Weapons)'+ self.eweapons
  245. print '\n -> _X-ENERGY [X'+u"\u2091"+''+u"\N{SUBSCRIPT EIGHT}"+']: [', format(int(self.x_energy), '06d'),'] '+u"\u25BC"+' '+self.formula+'\n'
  246. print "-"*75+"\n"
  247. print " -> _HELP: ./ufonet --help (or ./ufonet -h)"
  248. print ' -> _EXAMPLES: ./ufonet --examples'
  249. print "\n -> _WEB_INTERFACE: ./ufonet --gui\n"
  250. print '='*75, "\n"
  251. return False
  252. return options