My Codes:
from terminaltables import SingleTable
...
def show(self, nametuple):
datas = []
datas.append(("id",) + nametuple._fields[:-1])
for i, data in enumerate(self.data):
datas.append((i,) + data[:-1])
print SingleTable(datas).table
. [ 19%]
test/test_dataBase.py .s..┌────┬────────────┬─────────┬─────────┐
│ id │ ip │ web │ pwn │
├────┼────────────┼─────────┼─────────┤
│ 0 │ 10.10.10.1 │ 8080 80 │ 9090 90 │
│ 1 │ 10.10.10.2 │ 8080 80 │ 9090 90 │
│ 2 │ 10.10.10.3 │ 8080 80 │ 9090 90 │
│ 3 │ 10.10.10.4 │ 8080 80 │ 9090 90 │
│ 4 │ 10.10.10.5 │ 8080 80 │ 9090 90 │
└────┴────────────┴─────────┴─────────┘
it workds ok,but after i import pwntools
from terminaltables import SingleTable
...
from pwn import *
...
def show(self, nametuple):
datas = []
datas.append(("id",) + nametuple._fields[:-1])
for i, data in enumerate(self.data):
datas.append((i,) + data[:-1])
print SingleTable(datas).table
test/test_dataBase.py .s..lqqqqwqqqqqqqqqqqqwqqqqqqqqqwqqqqqqqqqk
x id x ip x web x pwn x
tqqqqnqqqqqqqqqqqqnqqqqqqqqqnqqqqqqqqqu
x 0 x 10.10.10.1 x 8080 80 x 9090 90 x
x 1 x 10.10.10.2 x 8080 80 x 9090 90 x
x 2 x 10.10.10.3 x 8080 80 x 9090 90 x
x 3 x 10.10.10.4 x 8080 80 x 9090 90 x
x 4 x 10.10.10.5 x 8080 80 x 9090 90 x
mqqqqvqqqqqqqqqqqqvqqqqqqqqqvqqqqqqqqqj
.lqqqqwqqqqqqqqqqqqqwqqqqqqwqqqqqqqqqqwqqqqqqqqqqk
My Codes:
. [ 19%] test/test_dataBase.py .s..┌────┬────────────┬─────────┬─────────┐ │ id │ ip │ web │ pwn │ ├────┼────────────┼─────────┼─────────┤ │ 0 │ 10.10.10.1 │ 8080 80 │ 9090 90 │ │ 1 │ 10.10.10.2 │ 8080 80 │ 9090 90 │ │ 2 │ 10.10.10.3 │ 8080 80 │ 9090 90 │ │ 3 │ 10.10.10.4 │ 8080 80 │ 9090 90 │ │ 4 │ 10.10.10.5 │ 8080 80 │ 9090 90 │ └────┴────────────┴─────────┴─────────┘it workds ok,but after i import pwntools