How to Install?
gem install terminal-table
on Code
You can set the header or size using options of the terminal-table object, and the data can be put into an Array list.require 'terminal-table'
rows = []
rows << ['xss', 'on']
rows << ['sqli', 'on']
rows << ['code', 'on']
table = Terminal::Table.new
table.title = "Cheatsheet"
table.headings = ['type', 'state']
table.rows = rows
table.style = {:width => 40}
# > puts table
+-------------------+------------------+
| Cheatsheet |
+-------------------+------------------+
| type | state |
+-------------------+------------------+
| xss | on |
| sqli | on |
| code | on |
+-------------------+------------------+
I applied this to the tool I created.
HAHWULSecurity engineer, Gopher and H4cker! |
0 κ°μ λκΈ:
Post a Comment