Do not show handshake files that are in cracked.txt with a key (match on filename) (#133)
Make cracked.txt a configurable variable * Do not show handshake files that are in cracked.txt with a key (match on filename). * Don't ask user for a crack-tool when attacking PMKIDs only * Few minor cleanups Fixed any_pmkid -> all_pmkid (to decide that we are strictly using hashcat) * Added a safe-check to make sure we are indeed using hashcat for the PMKID hashes * Changed the ugly split() to basename() Making an FR from the TODO
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from ..util.color import Color
|
||||
from ..config import Configuration
|
||||
|
||||
import os
|
||||
import time
|
||||
@@ -11,7 +12,7 @@ class CrackResult(object):
|
||||
''' Abstract class containing results from a crack session '''
|
||||
|
||||
# File to save cracks to, in PWD
|
||||
cracked_file = 'cracked.txt'
|
||||
cracked_file = Configuration.cracked_file
|
||||
|
||||
def __init__(self):
|
||||
self.date = int(time.time())
|
||||
@@ -55,8 +56,8 @@ class CrackResult(object):
|
||||
this_dict['date'] = entry.get('date')
|
||||
if entry == this_dict:
|
||||
# Skip if we already saved this BSSID+ESSID+TYPE+KEY
|
||||
Color.pl('{+} {C}%s{O} already exists in {G}cracked.txt{O}, skipping.' % (
|
||||
self.essid))
|
||||
Color.pl('{+} {C}%s{O} already exists in {G}%s{O}, skipping.' % (
|
||||
self.essid, Configuration.cracked_file))
|
||||
return
|
||||
|
||||
saved_results.append(self.to_dict())
|
||||
@@ -67,7 +68,7 @@ class CrackResult(object):
|
||||
|
||||
@classmethod
|
||||
def display(cls):
|
||||
''' Show cracked targets from cracked.txt '''
|
||||
''' Show cracked targets from cracked file '''
|
||||
name = cls.cracked_file
|
||||
if not os.path.exists(name):
|
||||
Color.pl('{!} {O}file {C}%s{O} not found{W}' % name)
|
||||
|
||||
Reference in New Issue
Block a user