def main(): """ Fungsi utama untuk menjalankan brutemap di terminal """ printBanner() show_exit_msg = True try: initOptions(cmdLineParser()) printStatus() initialize() except SystemExit: print show_exit_msg = False finally: if show_exit_msg: printStatus(start=False) if IS_WINDOWS: stdoutWrite("[#] Press any key to continue... ") raw_input()
def __init__(self, message, maxval=None): self.marker = itertools.cycle(SPINNER_CHARS) self.message = message self.curval = 0 self.maxval = maxval or 100 self._width = 0 stdoutWrite(message)
def done(self): stdoutWrite("\b") stdoutWrite("(done)\n")
def write(self, msg): backspace = "\b" * self._width newmsg = backspace + msg.ljust(self._width) stdoutWrite(newmsg) self._width = max(self._width, len(msg))