Nmap Development mailing list archives

Re: [nmap-svn] r28239 - nmap/scripts


From: David Fifield <david () bamsoftware com>
Date: Fri, 9 Mar 2012 07:07:57 -0800

On Fri, Mar 09, 2012 at 03:09:34AM -0500, Patrick Donnelly wrote:
On Thu, Mar 8, 2012 at 4:21 PM,  <commit-mailer () insecure org> wrote:
  --build a table of both directories to brute force and the corresponding WP plugins' name
  local plugin_count = 0
-  while true do
-    local line = file:read()
-    if not line then
-      break
-    end
-
+  for line in read_data_file(file) do
    if plugins_search and plugin_count >= plugins_search then
      break
    end

Why not just:

for line in file:lines() do

?

Because I want to skip comments and was building the abstraction first.

David Fifield
_______________________________________________
Sent through the nmap-dev mailing list
http://cgi.insecure.org/mailman/listinfo/nmap-dev
Archived at http://seclists.org/nmap-dev/

Current thread: