diff --git a/modules/exploits/linux/telnet/netgear_telnetenable.rb b/modules/exploits/linux/telnet/netgear_telnetenable.rb index 20553f3263..70feb09e85 100644 --- a/modules/exploits/linux/telnet/netgear_telnetenable.rb +++ b/modules/exploits/linux/telnet/netgear_telnetenable.rb @@ -77,7 +77,13 @@ class MetasploitModule < Msf::Exploit::Remote begin connect - if sock.get_once.length == 0 + res = begin + sock.get_once || '' + rescue EOFError + '' + end + + if res.length == 0 print_good('Detected telnetenabled on TCP') else print_good('Detected telnetd on TCP')