Various small fixes + tweaks
This commit is contained in:
13
py/Color.py
13
py/Color.py
@@ -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}")
|
||||
|
||||
Reference in New Issue
Block a user