--- dont_scan_printers.old	Mon Dec  1 19:17:48 2003
+++ dont_scan_printers.nasl	Wed Dec 10 17:07:34 2003
@@ -32,6 +32,7 @@
  script_copyright(english:"This script is Copyright (C) 2003 by Michel Arboi");
  family["english"] = "Settings";	# Or maybe a "scan option" family?
  script_family(english:family["english"]);
+ script_dependencie("nmap_tcp_connect.nes");
  exit(0);
 }
 
@@ -62,13 +63,13 @@
 ports = get_kb_list("Ports/tcp/*");
 # Host is dead, or all ports closed, or unscanned => cannot decide
 if (isnull(ports)) exit(0);
-# Ever seen a printer with more than 4 open ports?
-if (max_index(ports) > 4) exit(0);
+# Ever seen a printer with more than 8 open ports?
+if (max_index(ports) > 8) exit(0);
 
 # Test if open ports are seen on a printer
 # http://www.lprng.com/LPRng-HOWTO-Multipart/x4981.htm
 appsocket = 0;
-foreach p (ports)
+foreach p (keys(ports))
 {
   p = int(p - "Ports/tcp/");
   if (	   p == 35		# AppSocket for QMS
