Various small fixes + tweaks

This commit is contained in:
derv82
2017-05-14 09:34:09 -04:00
parent b0bd0342d7
commit 62503b0d0c
7 changed files with 36 additions and 23 deletions

View File

@@ -21,7 +21,7 @@ class Color(object):
# Helper string replacements
replacements = {
'{+}': ' {W}[{G}+{W}]',
'{!}': ' {W}[{R}!{W}]'
'{!}': ' {O}[{R}!{O}]{W}'
}
last_sameline_length = 0
@@ -74,6 +74,17 @@ class Color(object):
sys.stdout.flush()
Color.last_sameline_length = 0
@staticmethod
def pattack(attack_type, target, attack_name, progress):
'''
Prints a one-liner for an attack
Includes attack type (WEP/WPA), target BSSID/ESSID & power, attack type, and progress
[name] ESSID (MAC @ Pwr) Attack_Type: Progress
e.g.: [WEP] Router2G (00:11:22 @ 23db) replay attack: 102 IVs
'''
Color.p("\r{+} {G}%s{W} ({C}%s @ %sdb{W}) {G}%s {C}%s{W}: %s " % (
target.essid, target.bssid, target.power, attack_type, attack_name, progress))
if __name__ == '__main__':
Color.pl("{R}Testing{G}One{C}Two{P}Three{W}Done")
print Color.s("{C}Testing{P}String{W}")