def __init__(self, cracker_id, binary_download):
     self.config = Config()
     self.io_q = Queue()
     self.callPath = "../crackers/" + str(
         cracker_id) + "/" + binary_download.get_version()['executable']
     self.executable_name = binary_download.get_version()['executable']
     self.keyspace = 0
Esempio n. 2
0
    def __init__(self, cracker_id, binary_download):
        self.config = Config()
        self.io_q = Queue()

        # Build cracker executable name by taking basename plus extension
        self.executable_name = binary_download.get_version()['executable']
        k = self.executable_name.rfind(".")
        self.executable_name = self.executable_name[:k] + "." + self.executable_name[k + 1:]
        self.cracker_path = "crackers/" + str(cracker_id) + "/"
        self.callPath = self.executable_name
        if Initialize.get_os() != 1:
            self.callPath = "./" + self.callPath

        if not os.path.isfile(self.cracker_path + self.callPath):  # in case it's not the new hashcat filename, try the old one (hashcat<bit>.<ext>)
            self.executable_name = binary_download.get_version()['executable']
            k = self.executable_name.rfind(".")
            self.executable_name = self.executable_name[:k] + get_bit() + "." + self.executable_name[k + 1:]
            self.cracker_path = "crackers/" + str(cracker_id) + "/"
            self.callPath = self.executable_name
            if Initialize.get_os() != 1:
                self.callPath = "./" + self.callPath

        self.lock = Lock()
        self.cracks = []
        self.first_status = False
        self.usePipe = False
        self.progressVal = 0
        self.statusCount = 0
        self.last_update = 0
        self.uses_slow_hash_flag = False
        self.wasStopped = False
Esempio n. 3
0
 def __init__(self):
     self.config = Config()
     self.chunk = None
     self.last_check = None
     self.check_interval = 600
     if self.config.get_value('file-deletion-interval'):
         self.check_interval = int(
             self.config.get_value('file-deletion-interval'))
    def __init__(self, cracker_id, binary_download):
        self.config = Config()
        self.io_q = Queue()
        self.version_string = ""

        # Build cracker executable name by taking basename plus extension
        self.executable_name = binary_download.get_version()['executable']
        k = self.executable_name.rfind(".")
        self.executable_name = self.executable_name[:k] + "." + self.executable_name[k + 1:]
        self.cracker_path = "crackers/" + str(cracker_id) + "/"
        self.callPath = self.executable_name
        if Initialize.get_os() != 1:
            self.callPath = "./" + self.callPath

		# Symlink hashcat.osx in macOS
        if not os.path.isfile(self.cracker_path + "hashcat.osx"):  # in case it's not the
            if Initialize.get_os() == 2: # macOS
                try:
                    output = subprocess.check_output("ln -s $(which hashcat) hashcat.osx", shell=True, cwd=self.cracker_path)
                except subprocess.CalledProcessError as e:
                    logging.error("Error during version detection: " + str(e))
                    sleep(5)
		
        if not os.path.isfile(self.cracker_path + self.callPath):  # in case it's not the new hashcat filename, try the old one (hashcat<bit>.<ext>)
            self.executable_name = binary_download.get_version()['executable']
            k = self.executable_name.rfind(".")
            self.executable_name = self.executable_name[:k] + get_bit() + "." + self.executable_name[k + 1:]
            self.cracker_path = "crackers/" + str(cracker_id) + "/"
            self.callPath = self.executable_name
            if Initialize.get_os() != 1:
                self.callPath = "./" + self.callPath

        cmd = self.callPath + " --version"
        output = ''
        try:
            logging.debug("CALL: " + cmd)
            output = subprocess.check_output(cmd, shell=True, cwd=self.cracker_path)
        except subprocess.CalledProcessError as e:
            logging.error("Error during version detection: " + str(e))
            sleep(5)
        self.version_string = output.decode().replace('v', '')

        self.lock = Lock()
        self.cracks = []
        self.first_status = False
        self.usePipe = False
        self.progressVal = 0
        self.statusCount = 0
        self.last_update = 0
        self.uses_slow_hash_flag = False
        self.wasStopped = False
 def __init__(self, cracker_id, binary_download):
     self.config = Config()
     self.io_q = Queue()
     self.executable_name = binary_download.get_version()['executable']
     k = self.executable_name.rfind(".")
     self.executable_name = self.executable_name[:k] + get_bit() + "." + self.executable_name[k + 1:]
     self.cracker_path = "crackers/" + str(cracker_id) + "/"
     self.callPath = self.executable_name
     if Initialize.get_os() != 1:
         self.callPath = "./" + self.callPath
     self.lock = Lock()
     self.cracks = []
     self.first_status = False
     self.last_update = 0
    def __init__(self, cracker_id, binary_download):
        self.config = Config()
        self.io_q = Queue()

        # Build cracker executable name by taking basename and adding 32/64 plus extension
        self.executable_name = binary_download.get_version()['executable']
        k = self.executable_name.rfind(".")
        self.executable_name = self.executable_name[:k] + get_bit(
        ) + "." + self.executable_name[k + 1:]
        self.cracker_path = "crackers/" + str(cracker_id) + "/"
        self.callPath = self.executable_name
        if Initialize.get_os() != 1:
            self.callPath = "./" + self.callPath

        self.lock = Lock()
        self.cracks = []
        self.first_status = False
        self.usePipe = False
        self.progressVal = 0
        self.statusCount = 0
        self.last_update = 0
        self.uses_slow_hash_flag = False
        self.wasStopped = False
Esempio n. 7
0
 def __init__(self):
     self.config = Config()
     self.chunk = None
Esempio n. 8
0
 def __init__(self):
     self.taskId = 0
     self.task = None
     self.config = Config()
     self.preprocessor = None
Esempio n. 9
0
 def __init__(self):
     self.taskId = 0
     self.task = None
     self.config = Config()
Esempio n. 10
0
 def __init__(self):
     self.config = Config()
     self.last_version = None
 def __init__(self, args):
     self.config = Config()
     self.last_version = None
     self.args = args