From 4478ada6500b88d4c0b512998dba4a018aa04298 Mon Sep 17 00:00:00 2001 From: Jon Bernard Date: Fri, 13 Jun 2014 14:31:49 -0400 Subject: Include access field in machine output --- porterbox | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/porterbox b/porterbox index 2f62d13..f6b0edc 100755 --- a/porterbox +++ b/porterbox @@ -15,10 +15,13 @@ for machine_entry in machine_entries: machine_data = machine_entry.find_all('td') try: purpose = machine_data[3].text.strip() + access = machine_data[5].text.strip() if purpose == 'porterbox': hostname = machine_data[0].text.strip() architecture = machine_data[1].text.strip() - print('%-18s %s' % (architecture, hostname)) + if access == "": + access = "[unknown]" + print('%-18s %-24s %s' % (architecture, hostname, access)) except IndexError: # malformed entry, skip it -- cgit v1.2.3