options.py 20 KB

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