mirror of
https://github.com/nmap/nmap.git
synced 2026-08-31 06:56:38 +00:00
merge soc07 r5209 - --iflist bug. The parameters to NmapOutputTable were in the wrong order but due to the number of interfaces on my computer it still worked
This commit is contained in:
parent
375ad32df4
commit
622995be62
1 changed files with 5 additions and 8 deletions
13
output.cc
13
output.cc
|
|
@ -331,17 +331,14 @@ int print_iflist(void) {
|
|||
|
||||
/* Display windows device names */
|
||||
if((p_ifaces = getpcapinterfaces()) != NULL && numifs > 0) {
|
||||
Tbl = new NmapOutputTable(3, numifs);
|
||||
Tbl = new NmapOutputTable(numifs+1, 2);
|
||||
Tbl->addItem(0, 0, false, "DEV");
|
||||
Tbl->addItem(0, 1, false, "WINDEVICE");
|
||||
i = numifs-1;
|
||||
i = numifs;
|
||||
|
||||
for(p_iface_iter = p_ifaces; p_iface_iter != NULL && i >= 0; i--) {
|
||||
Tbl->addItem(i+1, 0, false, iflist[i].devname);
|
||||
if(p_iface_iter->name == NULL)
|
||||
Tbl->addItem(i+1, 1, false, "(null)");
|
||||
else
|
||||
Tbl->addItem(i+1, 1, false, p_iface_iter->name);
|
||||
for(p_iface_iter = p_ifaces; p_iface_iter != NULL && i >= 1; i--) {
|
||||
Tbl->addItem(i, 0, false, iflist[i-1].devname);
|
||||
Tbl->addItem(i, 1, false, p_iface_iter->name);
|
||||
p_iface_iter = p_iface_iter->next;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue