Less-invasive interface management, catch Exceptions at the target-level

Exception-handling should resolve #18 (move onto next target instead of crashing).

Interface management changes:
 1. Interfaces are left in monitor-mode if they were already in monitor mode
   * Previously *always* put the iface out of monitor mode & restarted network manager
 2. Only the interface that was put into monitor mode is brought back up
   * Previously all interfaces were brought back up
This commit is contained in:
derv82
2017-05-14 23:57:49 -04:00
parent 936c34bd28
commit 5031de7f3c
3 changed files with 16 additions and 9 deletions

View File

@@ -289,9 +289,9 @@ class Configuration(object):
Configuration.delete_temp()
Macchanger.reset_if_changed()
from Airmon import Airmon
if Configuration.interface is not None:
if Configuration.interface is not None and Airmon.base_interface is not None:
Airmon.stop(Configuration.interface)
Airmon.put_interfaces_up()
Airmon.put_interface_up(Airmon.base_interface)
Airmon.start_network_manager()
exit(code)