options.py 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. #!/usr/bin/python3
  2. # -*- coding: iso-8859-15 -*-
  3. """
  4. This file is part of the cintruder project, https://cintruder.03c8.net
  5. Copyright (c) 2012/2020 psy <epsylon@riseup.net>
  6. cintruder is free software; you can redistribute it and/or modify it under
  7. the terms of the GNU General Public License as published by the Free
  8. Software Foundation version 3 of the License.
  9. cintruder is distributed in the hope that it will be useful, but WITHOUT ANY
  10. WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
  11. FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
  12. details.
  13. You should have received a copy of the GNU General Public License along
  14. with cintruder; if not, write to the Free Software Foundation, Inc., 51
  15. Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
  16. """
  17. import optparse
  18. class CIntruderOptions(optparse.OptionParser):
  19. def __init__(self, *args):
  20. optparse.OptionParser.__init__(self,
  21. description='Captcha Intruder - OCR Bruteforcing Toolkit - by psy',
  22. prog='cintruder.py',
  23. version='\nCIntrud3r v0.4 - 2012/2020 - (GPLv3.0) -> by psy\n',
  24. usage= '\n\ncintruder [OPTIONS]')
  25. self.add_option("-v", "--verbose", action="store_true", dest="verbose", help="active verbose mode output results")
  26. self.add_option("--proxy", action="store", dest="proxy", help="use proxy server (tor: http://localhost:8118)")
  27. self.add_option("--gui", action="store_true", dest="web", help="run GUI (CIntruder Web Interface)")
  28. self.add_option("--update", action="store_true", dest="update", help="check for latest stable version")
  29. group1 = optparse.OptionGroup(self, "->Tracking")
  30. group1.add_option("--track", action="store", dest="track", help="download captchas from url (to: 'inputs/')")
  31. group1.add_option("--track-num", action="store", dest="s_num", help="set number of captchas to download (default: 5)")
  32. group1.add_option("--tracked-list", action="store_true", dest="track_list", help="list tracked captchas (from: 'inputs/')")
  33. self.add_option_group(group1)
  34. group6 = optparse.OptionGroup(self, "->Configuration (training/cracking)")
  35. group6.add_option("--set-id", action="store", dest="setids", help="set colour's ID manually (use -v for details)")
  36. self.add_option_group(group6)
  37. group2 = optparse.OptionGroup(self, "->Training")
  38. group2.add_option("--train", action="store", dest="train", help="train using common OCR techniques")
  39. self.add_option_group(group2)
  40. group3 = optparse.OptionGroup(self, "->Cracking")
  41. group3.add_option("--crack", action="store", dest="crack", help="brute force using local dictionary")
  42. self.add_option_group(group3)
  43. group4 = optparse.OptionGroup(self, "->Modules (training/cracking)")
  44. group4.add_option("--mod", action="store", dest="name", help="set a specific OCR exploiting module")
  45. group4.add_option("--mods-list", action="store_true", dest="listmods", help="list available modules (from: 'mods/')")
  46. self.add_option_group(group4)
  47. group5 = optparse.OptionGroup(self, "->Post-Exploitation (cracking)")
  48. group5.add_option("--xml", action="store", dest="xml", help="export result to xml format")
  49. group5.add_option("--tool", action="store", dest="command", help="replace suggested word on commands of another tool. use 'CINT' marker like flag (ex: 'txtCaptcha=CINT')")
  50. self.add_option_group(group5)
  51. def get_options(self, user_args=None):
  52. (options, args) = self.parse_args(user_args)
  53. options.args = args
  54. if (not options.train and not options.crack and not options.track and not options.track_list and not options.listmods and not options.web and not options.update):
  55. print('='*75)
  56. print("")
  57. print(" o8%8888, ")
  58. print(" o88%8888888. ")
  59. print(" 8'- -:8888b ")
  60. print(" 8' 8888 ")
  61. print(" d8.-=. ,==-.:888b ")
  62. print(" >8 `~` :`~' d8888 ")
  63. print(" 88 ,88888 ")
  64. print(" 88b. `-~ ':88888 ")
  65. print(" 888b \033[1;31m~==~\033[1;m .:88888 ")
  66. print(" 88888o--:':::8888 ")
  67. print(" `88888| :::' 8888b ")
  68. print(" 8888^^' 8888b ")
  69. print(" d888 ,%888b. ")
  70. print(" d88% %%%8--'-. ")
  71. print(" /88:.__ , _%-' --- - ")
  72. print(" '''::===..-' = --. `\n")
  73. print(self.description, "\n")
  74. print('='*75, "\n")
  75. print(" * Project site: https://cintruder.03c8.net", "\n")
  76. print(" * IRC: irc.freenode.net -> #cintruder", "\n")
  77. print(" * Mailing list: cintruder-users@lists.sf.net", "\n")
  78. print('='*75)
  79. print("\n -> For HELP use: -h or --help")
  80. print("\n -> For WEB interface use: --gui\n")
  81. print('='*55, "\n")
  82. return False
  83. return options