mailing list archives
Re: Printing Manufacturer Counts
From: HD Moore <hdm () metasploit com>
Date: Sat, 15 May 2010 15:04:09 -0500
On 5/15/2010 10:40 AM, Bynar wrote:
Just two questions:
1. I am wondering, is there a way of checking the console width? The
reason is, I am printing percentages out as hashes across the console as
a visual aid and wanted to do this proportional to the console width.
This is not a good idea in general; the output file descriptor may not
be a terminal at all, so getting the width and doing incremental output
would break things going over XMLRPC.
2. Would this be a useful feature? For example, below are the reuslts
of an arp_sweep. A lookup is performed on the db_hosts mac column
against the wireshark manuf file in order to get a feel for the type of
manufacturers in use on the LAN.
Printing status lines at increments works for now - eventually we would
like to have a print_progress(x,y), print_complete() API, which could be
a no-op when the output handle is not a terminal.