options.py 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-"
  3. """
  4. UFONet - (DDoS botnet + DoS tool) via Web Abuse - 2013/2014/2015/2016/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 optparse
  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.zombies = int(self.extract_zombies())
  19. self.aliens = int(self.extract_aliens())
  20. self.droids = int(self.extract_droids())
  21. self.ucavs = int(self.extract_ucavs())
  22. self.rpcs = int(self.extract_rpcs())
  23. self.dorks = int(self.extract_dorks())
  24. self.total_botnet = str(self.zombies+self.aliens+self.droids+self.ucavs+self.rpcs)
  25. optparse.OptionParser.__init__(self,
  26. description='\nUFONet - (DDoS botnet + DoS tool) via Web Abuse - by psy',
  27. prog='./ufonet',
  28. version='\nCode: v1.0 - TachY0n!\n')
  29. self.add_option("-v", "--verbose", action="store_true", dest="verbose", help="active verbose on requests")
  30. self.add_option("--update", action="store_true", dest="update", help="check for latest stable version")
  31. self.add_option("--check-tor", action="store_true", dest="checktor", help="check to see if Tor is used properly")
  32. #self.add_option("--force-ssl", action="store_true", dest="forcessl", help="force usage of SSL/HTTPS requests")
  33. self.add_option("--force-yes", action="store_true", dest="forceyes", help="set 'YES' to all questions")
  34. self.add_option("--gui", action="store_true", dest="web", help="run GUI (UFONet Web Interface)")
  35. group8 = optparse.OptionGroup(self, "*Tools*")
  36. group8.add_option("--crypter", action="store_true", dest="cryptomsg", help="Encrypt/Decrypt messages using AES256+HMAC-SHA1")
  37. self.add_option_group(group8)
  38. group1 = optparse.OptionGroup(self, "*Configure Request(s)*")
  39. group1.add_option("--proxy", action="store", dest="proxy", help="Use proxy server (tor: 'http://127.0.0.1:8118')")
  40. group1.add_option("--user-agent", action="store", dest="agent", help="Use another HTTP User-Agent header (default SPOOFED)")
  41. group1.add_option("--referer", action="store", dest="referer", help="Use another HTTP Referer header (default SPOOFED)")
  42. group1.add_option("--host", action="store", dest="host", help="Use another HTTP Host header (default NONE)")
  43. group1.add_option("--xforw", action="store_true", dest="xforw", help="Set your HTTP X-Forwarded-For with random IP values")
  44. group1.add_option("--xclient", action="store_true", dest="xclient", help="Set your HTTP X-Client-IP with random IP values")
  45. group1.add_option("--timeout", action="store", dest="timeout", type="int", help="Select your timeout (default 10)")
  46. group1.add_option("--retries", action="store", dest="retries", type="int", help="Retries when the connection timeouts (default 1)")
  47. group1.add_option("--threads", action="store", dest="threads", type="int", help="Maximum number of concurrent HTTP requests (default 5)")
  48. group1.add_option("--delay", action="store", dest="delay", type="int", help="Delay in seconds between each HTTP request (default 0)")
  49. self.add_option_group(group1)
  50. group2 = optparse.OptionGroup(self, "*Search for 'Zombies'*")
  51. group2.add_option("-s", action="store", dest="search", help="Search from a 'dork' (ex: -s 'proxy.php?url=')")
  52. group2.add_option("--sd", action="store", dest="dorks", help="Search from 'dorks' file (ex: --sd 'botnet/dorks.txt')")
  53. group2.add_option("--sn", action="store", dest="num_results", help="Set max number of results for engine (default 10)")
  54. group2.add_option("--se", action="store", dest="engine", help="Search engine to use for 'dorking' (default Yahoo)")
  55. group2.add_option("--sa", action="store_true", dest="allengines", help="Search massively using all search engines")
  56. group2.add_option("--auto-search", action="store_true", dest="autosearch", help="Search automatically for 'zombies' (may take time!)")
  57. self.add_option_group(group2)
  58. group3 = optparse.OptionGroup(self, "*Test Botnet*")
  59. group3.add_option("--test-offline", action="store_true", dest="testoffline", help="Fast check to discard offline bots")
  60. group3.add_option("--test-all", action="store_true", dest="testall", help="Update ALL botnet status (may take time!)")
  61. group3.add_option("-t", action="store", dest="test", help="Update 'zombies' status (ex: -t 'botnet/zombies.txt')")
  62. group3.add_option("--test-rpc", action="store_true", dest="testrpc", help="Update 'xml-rpc' reflectors status")
  63. group3.add_option("--attack-me", action="store_true", dest="attackme", help="Order 'zombies' to attack you (NAT required!)")
  64. self.add_option_group(group3)
  65. group4 = optparse.OptionGroup(self, "*Community*")
  66. group4.add_option("--download-zombies", action="store_true", dest="download", help="Download 'zombies' from Community server")
  67. group4.add_option("--upload-zombies", action="store_true", dest="upload", help="Upload your 'zombies' to Community server")
  68. group4.add_option("--blackhole", action="store_true", dest="blackhole", help="Create a 'blackhole' to share your 'zombies'")
  69. group4.add_option("--up-to", action="store", dest="upip", help="Upload your 'zombies' to a 'blackhole'")
  70. group4.add_option("--down-from", action="store", dest="dip", help="Download your 'zombies' from a 'blackhole'")
  71. self.add_option_group(group4)
  72. group5 = optparse.OptionGroup(self, "*Research Target*")
  73. group5.add_option("-i", action="store", dest="inspect", help="Search biggest file (ex: -i 'http(s)://target.com')")
  74. group5.add_option("-x", action="store", dest="abduction", help="Examine webserver configuration (+CVE, +WAF detection)")
  75. self.add_option_group(group5)
  76. group7 = optparse.OptionGroup(self, "*Extra Attack(s)*")
  77. group7.add_option("--db", action="store", dest="dbstress", help="Set db stress input point (ex: --db 'search.php?q=')")
  78. group7.add_option("--loic", action="store", dest="loic", help="Start 'DoS' Web LOIC attack (ex: --loic 100)")
  79. group7.add_option("--slow", action="store", dest="slow", help="Start 'DoS' Slow HTTP requests attack (ex: --slow 100)")
  80. self.add_option_group(group7)
  81. group6 = optparse.OptionGroup(self, "*Configure Attack(s)*")
  82. group6.add_option("--no-head", action="store_true", dest="disablehead", help="Disable status check: 'Is target up?'")
  83. group6.add_option("--no-aliens", action="store_true", dest="disablealiens", help="Disable 'aliens' web abuse")
  84. group6.add_option("--no-droids", action="store_true", dest="disabledroids", help="Disable 'droids' redirectors")
  85. group6.add_option("--no-ucavs", action="store_true", dest="disableisup", help="Disable 'ucavs' checkers")
  86. group6.add_option("--no-rpcs", action="store_true", dest="disablerpcs", help="Disable 'xml-rpcs' reflectors")
  87. group6.add_option("-r", action="store", dest="rounds", help="Set number of rounds (default 1)")
  88. group6.add_option("-b", action="store", dest="place", help="Set place to attack (ex: -b '/path/big.jpg')")
  89. group6.add_option("-a", action="store", dest="target", help="Start 'DDoS' attack (ex: -a 'http(s)://target.com')")
  90. self.add_option_group(group6)
  91. def extract_zombies(self):
  92. try:
  93. f = open(self.zombies_file)
  94. zombies = len(f.readlines())
  95. f.close()
  96. except:
  97. zombies = "broken!"
  98. return zombies
  99. def extract_aliens(self):
  100. try:
  101. f = open(self.aliens_file)
  102. aliens = len(f.readlines())
  103. f.close()
  104. except:
  105. aliens = "broken!"
  106. return aliens
  107. def extract_droids(self):
  108. try:
  109. f = open(self.droids_file)
  110. droids = len(f.readlines())
  111. f.close()
  112. except:
  113. droids = "broken!"
  114. return droids
  115. def extract_ucavs(self):
  116. try:
  117. f = open(self.ucavs_file)
  118. ucavs = len(f.readlines())
  119. f.close()
  120. except:
  121. ucavs = "broken!"
  122. return ucavs
  123. def extract_rpcs(self):
  124. try:
  125. f = open(self.rpcs_file)
  126. rpcs = len(f.readlines())
  127. f.close()
  128. except:
  129. rpcs = "broken!"
  130. return rpcs
  131. def extract_dorks(self):
  132. try:
  133. f = open(self.dorks_file)
  134. dorks = len(f.readlines())
  135. f.close()
  136. except:
  137. dorks = "broken!"
  138. return dorks
  139. def get_options(self, user_args=None):
  140. (options, args) = self.parse_args(user_args)
  141. if (not options.test and not options.testrpc and not options.target 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.autosearch and not options.testoffline and not options.testall):
  142. print '='*75, "\n"
  143. print "888 888 8888888888 .d88888b. 888b 888 888 "
  144. print "888 888 888 d88P" "Y888b 8888b 888 888 "
  145. print "888 888 888 888 888 88888b 888 888 "
  146. print "888 888 8888888 888 888 888Y88b 888 .d88b. 888888 "
  147. print "888 888 888 888 888 888 Y88b888 d8P Y8b 888 "
  148. print "888 888 888 888 888 888 Y88888 88888888 888 "
  149. print "Y88b. .d88P 888 Y88b. .d88P 888 Y8888 Y8b. Y88b. "
  150. print " 'Y88888P' 888 'Y88888P' 888 Y888 'Y8888 'Y8888"
  151. print self.description, "\n"
  152. print '='*75 + "\n"
  153. print 'Bots:', self.total_botnet, "= [ Z:" + str(self.zombies) + " + A:" + str(self.aliens) + " + D:" + str(self.droids) + " + U:" + str(self.ucavs) + " + R:" + str(self.rpcs) + " ] - Dorks:", self.dorks, "\n"
  154. print '='*75, "\n"
  155. print "-> For HELP use: -h or --help"
  156. print "\n-> For WEB interface use: --gui\n"
  157. print '='*75, "\n"
  158. return False
  159. return options