Parses and sets WEP-specific args (-chopchop, -fragment, etc)
(cls)
| 404 | |
| 405 | @classmethod |
| 406 | def parse_wep_attacks(cls): |
| 407 | '''Parses and sets WEP-specific args (-chopchop, -fragment, etc)''' |
| 408 | cls.wep_attacks = [] |
| 409 | import sys |
| 410 | seen = set() |
| 411 | for arg in sys.argv: |
| 412 | if arg in seen: continue |
| 413 | seen.add(arg) |
| 414 | if arg == '-arpreplay': cls.wep_attacks.append('replay') |
| 415 | if arg == '-fragment': cls.wep_attacks.append('fragment') |
| 416 | if arg == '-chopchop': cls.wep_attacks.append('chopchop') |
| 417 | if arg == '-caffelatte': cls.wep_attacks.append('caffelatte') |
| 418 | if arg == '-p0841': cls.wep_attacks.append('p0841') |
| 419 | if arg == '-hirte': cls.wep_attacks.append('hirte') |
| 420 | |
| 421 | if len(cls.wep_attacks) == 0: |
| 422 | # Use all attacks |
| 423 | cls.wep_attacks = ['replay', |
| 424 | 'fragment', |
| 425 | 'chopchop', |
| 426 | 'caffelatte', |
| 427 | 'p0841', |
| 428 | 'hirte' |
| 429 | ] |
| 430 | elif len(cls.wep_attacks) > 0: |
| 431 | Color.pl('{+} {C}option:{W} using {G}%s{W} WEP attacks' |
| 432 | % '{W}, {G}'.join(cls.wep_attacks)) |
| 433 | |
| 434 | |
| 435 | @classmethod |