@@ -285,7 +285,10 @@ def _run_dual_interface(self) -> bool:
285285 if not self ._start_network_services_dual ():
286286 self .error_message = 'Failed to start network services'
287287 return False
288-
288+
289+ # Validate portal and DNS are accessible
290+ self ._validate_portal_health ()
291+
289292 # Start deauth on secondary interface (non-blocking, parallel)
290293 Color .pl ('{+} {C}Starting deauth on {G}%s{W}...' % self .interface_deauth )
291294 self .state = AttackState .STARTING_DEAUTH
@@ -500,7 +503,40 @@ def _start_network_services_dual(self) -> bool:
500503 except Exception as e :
501504 log_error ('EvilTwin' , f'Failed to start network services: { e } ' , e )
502505 return False
503-
506+
507+ def _validate_portal_health (self ):
508+ """
509+ Validate that the captive portal and DNS redirect are working.
510+
511+ Non-fatal: logs warnings if validation fails but does not abort the attack,
512+ since the portal may become reachable once a client connects and gets a DHCP lease.
513+ """
514+ if not self .portal_server :
515+ return
516+
517+ # Check portal HTTP accessibility
518+ portal_ok = self .portal_server .validate_portal ()
519+ if portal_ok :
520+ Color .pl ('{+} {G}Portal validation passed{W}' )
521+ if self .attack_view :
522+ self .attack_view .add_log ('Portal validation: OK' , timestamp = True )
523+ else :
524+ Color .pl ('{!} {O}Portal not yet reachable - may start working once clients connect{W}' )
525+ if self .attack_view :
526+ self .attack_view .add_log ('Portal validation: not reachable yet (non-fatal)' , timestamp = True )
527+
528+ # Check DNS redirect
529+ from .portal .server import PortalServer
530+ dns_ok = PortalServer .validate_dns_redirect ()
531+ if dns_ok :
532+ Color .pl ('{+} {G}DNS redirect validation passed{W}' )
533+ if self .attack_view :
534+ self .attack_view .add_log ('DNS redirect: OK' , timestamp = True )
535+ else :
536+ Color .pl ('{!} {O}DNS redirect not confirmed - clients may not auto-detect portal{W}' )
537+ if self .attack_view :
538+ self .attack_view .add_log ('DNS redirect: not confirmed (non-fatal)' , timestamp = True )
539+
504540 def _start_deauth_dual (self , interface : str ) -> bool :
505541 """
506542 Start deauth on dedicated deauth interface (dual interface mode).
0 commit comments