14
14
15
15
from mpt import functions
16
16
17
- __version__ = '0.7.16 '
17
+ __version__ = '0.7.17 '
18
18
19
19
from mpt import settings , logger
20
20
from mpt .config import Config
@@ -722,11 +722,14 @@ def configure_access_point():
722
722
723
723
ap_name = functions .generate_funny_wifi_name ()
724
724
ap_password = functions .generate_wifi_password ()
725
+ ap_ip = conf .get_default_access_point_ip ()
725
726
726
- conf .update ('access-point' , {'internet-interface' : internet_interface , 'ap-interface' : ap_interface , 'name' : ap_name , 'password' : ap_password })
727
+ conf .update ('access-point' , {'internet-interface' : internet_interface , 'ap-interface' : ap_interface , 'ap-ip' : ap_ip , ' name' : ap_name , 'password' : ap_password })
727
728
log .info (f"* WiFi SSID: { ap_name } " )
728
729
log .info (f"* AP Interface: { ap_interface } " )
729
730
log .info (f"* Default Gateway: { internet_interface } " )
731
+ log .info (f"* IP: { ap_ip } " )
732
+ log .warn (f"Configure Burp to set a proxy listener on the IP: { ap_ip } " )
730
733
log .success ('Access point configured' )
731
734
732
735
@@ -742,10 +745,18 @@ def access_point():
742
745
log .warn ("sudo ./lnxrouter -o <WiFi-Internet> --ap <AP-WiFi> <SSID> -p <Password> --qr" )
743
746
log .info (f"AP WiFi SSID: { access_point_conf ['name' ]} " )
744
747
log .info (f"Connect your device to { access_point_conf ['name' ]} with password { access_point_conf ['password' ]} " )
745
- functions .run_command (command =
746
- f'{ linux_router_bin } -o { access_point_conf ['internet-interface' ]} '
747
- f'--ap { access_point_conf ['ap-interface' ]} { access_point_conf ['name' ]} -p "{ access_point_conf ['password' ]} " --qr' ,
748
- print_output = True )
748
+ log .warn (f"Configure Burp to set a proxy listener on the IP: { Fore .CYAN } { access_point_conf ['ap-ip' ]} { Style .RESET_ALL } " )
749
+ try :
750
+ log .info ("Press Ctrl+C to interrupt this script." )
751
+ functions .run_command (command =
752
+ f'{ linux_router_bin } -g { access_point_conf ['ap-ip' ]} -o { access_point_conf ['internet-interface' ]} '
753
+ f'--ap { access_point_conf ['ap-interface' ]} { access_point_conf ['name' ]} -p "{ access_point_conf ['password' ]} " --qr' ,
754
+ print_output = True )
755
+
756
+ except KeyboardInterrupt :
757
+ log .warn ('Canceled by user' )
758
+ log .warn ('Access point deactivated' )
759
+
749
760
else :
750
761
configure_access_point ()
751
762
0 commit comments