def header(self): """ Prints out header ASCII art """ license_msg = color("LICENSE: GNU Public License", "red") banner = r""" __ ____ ____ __ ______ / /_/ __ \/ __ \/ /_ ____/_ __/ / __/ / / / /_/ / __ \/ __ \/ / / /_/ /_/ / _, _/ /_/ / /_/ / / \__/\____/_/ |_/_____/\____/_/ V{VERSION} """.format(VERSION=self.__VERSION) banner = color(banner, "red") title = r""" {banner} ####################################################### # TorBot - An OSINT Tool for Dark Web # # GitHub : https://github.com/DedsecInside/TorBot # # Help : use -h for help text # ####################################################### {license_msg} """ title = title.format(license_msg=license_msg, banner=banner) print(title)
def used_without_options(self): try: cmd = importlib.import_module("commands.{}".format(self.argv[1])) cls = getattr(cmd, self.argv[1]) if cls.__doc__ == None: warning("Unavailable documentation") else: color(cls.__doc__, True) except: warning( "Command {} not found. Type help to get available commands". format(self.argv[1]))
def used_alone(self): print("Usage:") color("\t[b]help[/b] : get list of all commands", True) color( "\t[b]help <[u]commandName[/u][b]>[/b] : get a specific command documentation", True) print("Available commands:") package = commands for importer, modname, ispkg in pkgutil.iter_modules(package.__path__): if modname[0].islower(): color("\t[b]{}[/b]".format(modname), True)
def call(self): color( "[b]Good Bye {}![/b]".format( self.ftp.user if self.ftp.user != "" else "Anonymous"), True) sys.exit()