Skip to content

Commit

Permalink
Changed output format to be more readable
Browse files Browse the repository at this point in the history
  • Loading branch information
jekyc committed Mar 27, 2014
1 parent cbec472 commit 0f6132c
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 10 deletions.
15 changes: 11 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,18 @@ optional arguments:
```
# python3 wig.py www.example.com
CMS Drupal CMS: [7.25, 7.24, 7.26, 7.23, 7.22]
Operating System Microsoft Windows Server: [2008 R2]
Server Info Microsoft-IIS: [7.5, 6.0]
___ CMS ______________________________________________________
Sitecore: 7.0. (rev. 130424)
___ Operating System _________________________________________
Microsoft Windows Server: 2008 R2
___ Server Info ______________________________________________
ASP.NET: 4.0.30319
Microsoft-IIS: 7.5
______________________________________________________________
Time: 18.0 sec | Plugins: 65 | Urls: 324 | Fingerprints: 14178
Time: 36.4 sec | Plugins: 66 | Urls: 386 | Fingerprints: 16805
```

**Requirements:**
Expand Down
12 changes: 6 additions & 6 deletions classes/results.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ def __str__(self):

for category in o_cat:

out += "{0:<20}".format(category, )
#start = "___"+category
#out += start + "_" * (self.width-len(start)) + "\n"
#out += "{0:<20}".format(category, )
start = "___ " + self.color.format(category, 'red', False) + " "
out += start + "_" * (self.width - (len(category) + 5)) + "\n"
plugin_list = []

o_plug = sorted([p for p in self.results[category]])
Expand All @@ -61,11 +61,11 @@ def __str__(self):
else:
break

plug_str = " %s: " % (plugin, )
ver_str = self.color.format("[" + ", ".join(relevant) + "]", 'red', False)
plug_str = "%s: " % (plugin, )
ver_str = ", ".join(relevant)

plugin_list.append(plug_str + ver_str)

out += ", ".join(plugin_list) + "\n"
out += "\n".join(plugin_list) + "\n\n"

return out[:-1]

0 comments on commit 0f6132c

Please sign in to comment.