Example #1
0
 def enterDeath(self):
     self.mapManager.index = 0  # renew
     self.accept("Death-Game", self.NewGame)
     self.accept("Death-Menu", self.request, ["Menu"])
     self.accept("Death-Quit", self.quit)
     self.death.show()
     show_cursor()
Example #2
0
 def gameOver(self, LoosingCharId):
     show_cursor()
     winningChar = 1
     if LoosingCharId == 0:
         winningChar = 2
     self.accept("KoScreen-Back", self.request, ["Credits"])
     self.koScreen.show(winningChar)
Example #3
0
 def enterArchive(self):
     show_cursor()
     self.accept("LoadArchive", self.LoadArchive)
     self.accept("DeleteArchive", self.DeleteArchive)
     self.accept("UpdateArchive", self.UpdateArchive)
     self.accept("NewGame", self.NewGame)
     self.UpdateArchive()
Example #4
0
 def gameOver(self, LoosingCharId):
     show_cursor()
     winningChar = 1
     if LoosingCharId == 0:
         winningChar = 2
     self.accept("KoScreen-Back", self.request, ["Credits"])
     self.koScreen.show(winningChar)
Example #5
0
 def stop(self):
     helper.show_cursor()
     self.level.stop()
     self.player.stop()
     self.golem.stop()
     self.hud.hide()
     self.msgWriter.hide()
     self.gameoverscreen.hide()
     self.ignoreAll()
     self.musicAmbient.stop()
     self.musicFight.stop()
Example #6
0
 def stop(self):
     helper.show_cursor()
     self.level.stop()
     self.player.stop()
     self.golem.stop()
     self.hud.hide()
     self.msgWriter.hide()
     self.gameoverscreen.hide()
     self.ignoreAll()
     self.musicAmbient.stop()
     self.musicFight.stop()
Example #7
0
 def enterMenu(self):
     show_cursor()
     self.accept("Menu-Start", self.request, ["CharSelection"])
     self.accept("Menu-Credits", self.request, ["Credits"])
     self.accept("Menu-Quit", self.quit)
     self.ignore("KoScreen-Back")
     self.koScreen.hide()
     self.menu.show()
     if self.menuMusic.status() != AudioSound.PLAYING:
         self.menuMusic.play()
     if self.fightMusic.status() == AudioSound.PLAYING:
         self.fightMusic.stop()
Example #8
0
 def enterMenu(self):
     show_cursor()
     self.accept("Menu-Start", self.request, ["CharSelection"])
     self.accept("Menu-Credits", self.request, ["Credits"])
     self.accept("Menu-Quit", self.quit)
     self.ignore("KoScreen-Back")
     self.koScreen.hide()
     self.menu.show()
     if self.menuMusic.status() != AudioSound.PLAYING:
         self.menuMusic.play()
     if self.fightMusic.status() == AudioSound.PLAYING:
         self.fightMusic.stop()
Example #9
0
 def gameOver(self, winLoose):
     self.playMusic("GameOver")
     helper.show_cursor()
     self.player.stop()
     self.endTime = time.time()
     self.gameoverscreen.show(winLoose, self.endTime - self.startTime)
Example #10
0
 def enterMenu(self):
     helper.show_cursor()
     self.menu.show()
     self.musicMenu.play()
Example #11
0
def check_one():
    clear()
    #print ("in check 1")
    print_title()
    strx = input(
        Fore.GREEN + "Enter the password you want to check: " + Fore.RED +
        "\n(It is CASE SENSITIVE and SPACES will also be counted)\n\n" +
        Fore.WHITE + "#" + Fore.BLUE + "")
    i = 0
    (Found, File) = (False, None)
    clear()
    print_title()
    print(Fore.GREEN + "\nSearching for " + Fore.RED + strx + Fore.GREEN +
          " in Password Database.\n")
    print(Fore.WHITE +
          "It may take Several Minutes. To interrupt, Press CTRL+C.\n\n")
    hide_cursor()
    try:
        total_pass = 0
        for x in files:
            total_pass = total_pass + file_len(data_path + '/' + x)

        for x in files:
            if Found:
                break
            file = open(data_path + '/' + x, 'r', encoding='latin1')
            (c, r) = get_terminal_size()
            print(Back.CYAN + (c - 1) * ' ', end='\r')

            for line in file:
                line = line.strip()
                #(c, r) = get_terminal_size()
                #print (Back.BLUE + (c-1)*' ', end = '\r')
                i = i + 1
                zx = Back.CYAN + Fore.BLACK + "Checking " + Fore.MAGENTA + "{:>13}".format(
                    line[:13]
                ) + Fore.BLACK + " in file " + Fore.MAGENTA + "{:>25}  ".format(
                    x[:25]) + Fore.RED + str((i * 100) // total_pass) + "%"
                print(zx, end='\r')
                if (line == strx):
                    (Found, File) = (True, x)
                    file.close()
                    break
            file.close()
        (c, r) = get_terminal_size()
        print(Back.BLACK + (c - 1) * ' ', end='\r')
        if Found:
            print(
                Fore.RED +
                "Your password was available in the password database in file "
                + Fore.BLUE + File + Fore.RED +
                ". You should immediately change this password if u have used it somewhere."
            )
        else:
            print(
                Fore.GREEN +
                "Great! Your password is not available in any of the Password Database, and it should be secure enough."
            )

        print(Fore.GREEN + "\n\n[+]" + Fore.WHITE +
              " Script Succeded. Result was " + Fore.BLUE +
              ("Unsecure Password" if Found else "Secure Password") +
              Fore.WHITE)
    except KeyboardInterrupt:
        (c, r) = get_terminal_size()
        print(Back.BLACK + (c - 1) * ' ', end='\r')
        print(Fore.GREEN + "\n[+]" + Fore.WHITE +
              " Script Succeded. Result was " + Fore.BLUE +
              "Interrupted by User" + Fore.WHITE)
    show_cursor()
    exit(0)
Example #12
0
 def enterPause(self):
     # self.accept("Pause-Newgame")
     # self.accept("Pause-Option")
     # self.accept("Pause-Back")
     show_cursor()
Example #13
0
 def enterOption(self):
     show_cursor()
     self.accept("ChangeVolume", self.ChangeMusic)
     self.accept("ChangeSound", self.ChangeSound)
     self.option.show()
Example #14
0
 def enterMenu(self):
     show_cursor()
     self.accept("Menu-Game", self.request, ["Archive"])
     self.accept("Menu-Option", self.request, ["Option"])
     self.accept("Menu-Quit", self.quit)
     self.menu.show()
Example #15
0
def check_substr():
    clear()
    print_title()
    strx = input(
        Fore.GREEN +
        "Enter the sub-string you want to search in Password Database: " +
        Fore.RED +
        "\n(It is CASE SENSITIVE and SPACES will also be counted)\n\n" +
        Fore.WHITE + "#" + Fore.BLUE + "")
    i = 0
    #(Found, File) = (False, None)
    clear()
    print_title()
    print(Fore.GREEN + "\nSearching for " + Fore.RED + strx + Fore.GREEN +
          " and its Sub-Strings in Password Database.\n")
    print(Fore.WHITE +
          "It may take Several Minutes. To interrupt, Press CTRL+C.\n\n")
    hide_cursor()
    num = 0
    try:
        total_pass = 0
        for x in files:
            total_pass = total_pass + file_len(data_path + '/' + x)

        for x in files:
            file = open(data_path + '/' + x, 'r', encoding='latin1')
            (c, r) = get_terminal_size()
            print(Back.CYAN + (c - 1) * ' ', end='\r')

            for line in file:
                line = line.strip()
                #(c, r) = get_terminal_size()
                #print (Back.BLUE + (c-1)*' ', end = '\r')
                i = i + 1
                zx = Back.CYAN + Fore.BLACK + "Checking " + Fore.MAGENTA + "{:>13}".format(
                    line[:13]
                ) + Fore.BLACK + " in file " + Fore.MAGENTA + "{:>25}  ".format(
                    x[:25]) + Fore.RED + str((i * 100) // total_pass) + "%"
                print(zx, end='\r')
                l = line.find(strx)
                if (l is not -1):
                    num = num + 1
                    #l = line.find (strx)
                    lenx = len(strx)
                    linex = Fore.BLUE + line[:l] + Fore.MAGENTA + line[
                        l:l + lenx] + Fore.BLUE + line[lenx:]
                    (c, r) = get_terminal_size()
                    print(Back.BLACK + (c - 1) * ' ', end='\r')
                    print(Fore.WHITE + "{:>6}: ".format(num) + " " + linex +
                          " " + Style.DIM + Fore.WHITE + " in " + Fore.BLUE +
                          x + Style.RESET_ALL)
                    (c, r) = get_terminal_size()
                    print(Back.CYAN + (c - 1) * ' ', end='\r')
            file.close()
        (c, r) = get_terminal_size()
        print(Back.BLACK + (c - 1) * ' ', end='\r')

        print(Fore.GREEN + "\n\n[+]" + Fore.WHITE +
              " Script Succeded. Result was " + Fore.BLUE +
              "{} result(s)".format(num) + Fore.WHITE)
    except KeyboardInterrupt:
        (c, r) = get_terminal_size()
        print(Back.BLACK + (c - 1) * ' ', end='\r')
        print(Fore.GREEN + "\n[+]" + Fore.WHITE +
              " Script Succeded. Result was " + Fore.BLUE +
              "Interrupted by User, {} results found.".format(num) +
              Fore.WHITE)
    show_cursor()
    exit(0)
Example #16
0
 def gameOver(self, winLoose):
     self.playMusic("GameOver")
     helper.show_cursor()
     self.player.stop()
     self.endTime = time.time()
     self.gameoverscreen.show(winLoose, self.endTime - self.startTime)
Example #17
0
        (c, r) = get_terminal_size()
        print(Back.BLACK + (c - 1) * ' ', end='\r')
        print(Fore.GREEN + "\n[+]" + Fore.WHITE +
              " Script Succeded. Result was " + Fore.BLUE +
              "Interrupted by User, {} results found.".format(num) +
              Fore.WHITE)
    show_cursor()
    exit(0)


if len(files) is 0:
    print(
        Fore.RED + "[-]" + Fore.WHITE +
        " Empty Database. Please add some password lists in '{}/' directory..."
        .format(data_path))
    show_cursor()
    exit()

print_title()
print(Fore.GREEN + "\nCHOOSE YOUR SAFE-CHECK:\n")
print(
    Fore.BLUE +
    " 1. Check a Specific password in the database.\n 2. List Passwords containing a specified sub-string or word.\n 3. Check all Passwords present as list in a .txt file.\n\n\n"
)

while (True):
    x = input(Fore.GREEN + "ENTER YOUR CHOICE (0 to exit): " + Fore.BLUE + "#")
    choice = 0
    try:
        choice = int(x)
        if (choice > 3) or (choice < 0):