Parses basic settings/configurations from arguments.
(cls, args)
| 168 | |
| 169 | @classmethod |
| 170 | def parse_settings_args(cls, args): |
| 171 | '''Parses basic settings/configurations from arguments.''' |
| 172 | if args.random_mac: |
| 173 | cls.random_mac = True |
| 174 | Color.pl('{+} {C}option:{W} using {G}random mac address{W} ' + |
| 175 | 'when scanning & attacking') |
| 176 | |
| 177 | if args.channel: |
| 178 | cls.target_channel = args.channel |
| 179 | Color.pl('{+} {C}option:{W} scanning for targets on channel ' + |
| 180 | '{G}%s{W}' % args.channel) |
| 181 | |
| 182 | if args.interface: |
| 183 | cls.interface = args.interface |
| 184 | Color.pl('{+} {C}option:{W} using wireless interface ' + |
| 185 | '{G}%s{W}' % args.interface) |
| 186 | |
| 187 | if args.target_bssid: |
| 188 | cls.target_bssid = args.target_bssid |
| 189 | Color.pl('{+} {C}option:{W} targeting BSSID ' + |
| 190 | '{G}%s{W}' % args.target_bssid) |
| 191 | |
| 192 | if args.five_ghz == True: |
| 193 | cls.five_ghz = True |
| 194 | Color.pl('{+} {C}option:{W} including {G}5Ghz networks{W} in scans') |
| 195 | |
| 196 | if args.show_bssids == True: |
| 197 | cls.show_bssids = True |
| 198 | Color.pl('{+} {C}option:{W} showing {G}bssids{W} of targets during scan') |
| 199 | |
| 200 | if args.no_deauth == True: |
| 201 | cls.no_deauth = True |
| 202 | Color.pl('{+} {C}option:{W} will {R}not{W} {O}deauth{W} clients ' + |
| 203 | 'during scans or captures') |
| 204 | |
| 205 | if args.num_deauths and args.num_deauths > 0: |
| 206 | cls.num_deauths = args.num_deauths |
| 207 | Color.pl('{+} {C}option:{W} send {G}%d{W} deauth packets when deauthing' % ( |
| 208 | cls.num_deauths)) |
| 209 | |
| 210 | if args.target_essid: |
| 211 | cls.target_essid = args.target_essid |
| 212 | Color.pl('{+} {C}option:{W} targeting ESSID {G}%s{W}' % args.target_essid) |
| 213 | |
| 214 | if args.ignore_essid is not None: |
| 215 | cls.ignore_essid = args.ignore_essid |
| 216 | Color.pl('{+} {C}option:{W} {O}ignoring ESSIDs that include {R}%s{W}' % ( |
| 217 | args.ignore_essid)) |
| 218 | |
| 219 | if args.clients_only == True: |
| 220 | cls.clients_only = True |
| 221 | Color.pl('{+} {C}option:{W} {O}ignoring targets that do not have ' + |
| 222 | 'associated clients') |
| 223 | |
| 224 | if args.scan_time: |
| 225 | cls.scan_time = args.scan_time |
| 226 | Color.pl('{+} {C}option:{W} ({G}pillage{W}) attack all targets ' + |
| 227 | 'after {G}%d{W}s' % args.scan_time) |