options.py 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. #!/usr/bin/python
  2. # -*- coding: iso-8859-15 -*-
  3. """
  4. This file is part of the cintruder project, http://cintruder.03c8.net
  5. Copyright (c) 2012/2016 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='\nCIntruder v0.3 - 2016 - (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. self.add_option_group(group1)
  33. group2 = optparse.OptionGroup(self, "->Training")
  34. group2.add_option("--train", action="store", dest="train", help="train using common OCR techniques")
  35. group2.add_option("--set-id", action="store", dest="setids", help="set colour's ID manually (use -v for details)")
  36. self.add_option_group(group2)
  37. group3 = optparse.OptionGroup(self, "->Cracking")
  38. group3.add_option("--crack", action="store", dest="crack", help="brute force using local dictionary")
  39. self.add_option_group(group3)
  40. group4 = optparse.OptionGroup(self, "->Modules (training/cracking)")
  41. group4.add_option("--list", action="store_true", dest="listmods", help="list available modules (from: 'mods/')")
  42. group4.add_option("--mod", action="store", dest="name", help="set a specific OCR exploiting module")
  43. self.add_option_group(group4)
  44. group5 = optparse.OptionGroup(self, "->Post-Exploitation (cracking)")
  45. group5.add_option("--xml", action="store", dest="xml", help="export result to xml format")
  46. 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')")
  47. self.add_option_group(group5)
  48. def get_options(self, user_args=None):
  49. (options, args) = self.parse_args(user_args)
  50. options.args = args
  51. if (not options.train and not options.crack and not options.track and not options.listmods and not options.web and not options.update):
  52. print '='*75
  53. print ""
  54. print " o8%8888, "
  55. print " o88%8888888. "
  56. print " 8'- -:8888b "
  57. print " 8' 8888 "
  58. print " d8.-=. ,==-.:888b "
  59. print " >8 `~` :`~' d8888 "
  60. print " 88 ,88888 "
  61. print " 88b. `-~ ':88888 "
  62. print " 888b \033[1;31m~==~\033[1;m .:88888 "
  63. print " 88888o--:':::8888 "
  64. print " `88888| :::' 8888b "
  65. print " 8888^^' 8888b "
  66. print " d888 ,%888b. "
  67. print " d88% %%%8--'-. "
  68. print " /88:.__ , _%-' --- - "
  69. print " '''::===..-' = --. `\n"
  70. print self.description, "\n"
  71. print '='*75, "\n"
  72. print " * Project site: http://cintruder.03c8.net", "\n"
  73. print " * IRC: irc.freenode.net -> #cintruder", "\n"
  74. print " * Mailing list: cintruder-users@lists.sf.net", "\n"
  75. print '='*75
  76. print "\n -> For HELP use: -h or --help"
  77. print "\n -> For WEB interface use: --gui\n"
  78. print '='*55, "\n"
  79. return False
  80. return options