From 50d03b561959b963a5a1f1a4d8a91ef9f7e97ab0 Mon Sep 17 00:00:00 2001 From: Stephen Date: Fri, 22 Mar 2024 05:36:59 +1000 Subject: [PATCH] clean up QR output --- extensions/qrcode/qrcode.rb | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/extensions/qrcode/qrcode.rb b/extensions/qrcode/qrcode.rb index 1d66e0be2..e55ccd3d1 100644 --- a/extensions/qrcode/qrcode.rb +++ b/extensions/qrcode/qrcode.rb @@ -32,11 +32,7 @@ module BeEF # Retrieve the list of network interfaces from BeEF::Core::Console::Banners interfaces = BeEF::Core::Console::Banners.interfaces - # Check if the interfaces variable is nil, indicating that network interfaces are not available - if interfaces.nil? - print_error "[QR] Error: Network interfaces information is unavailable." - print_error "[QR] Error: This will be acceptable during testing." - else + if not interfaces.nil? and not interfaces.empty? # If interfaces are available, iterate over each network interface # If interfaces are available, iterate over each network interface interfaces.each do |int| # Skip the loop iteration if the interface address is '0.0.0.0' (which generally represents all IPv4 addresses on the local machine)