mirror of
https://github.com/adulau/passive-dns-atlas.git
synced 2025-01-04 23:13:17 +00:00
Improved the CSV format for D3 js
This commit is contained in:
parent
82380cb7cf
commit
0198e4e03d
1 changed files with 3 additions and 2 deletions
|
@ -38,9 +38,10 @@ for field in fieldsSagan:
|
|||
print (table)
|
||||
elif args.csvd3js:
|
||||
with open("{}/{}.csv".format(args.outputdir,field.upper()), 'w') as f:
|
||||
f.write("id,value")
|
||||
f.write("id,value\n")
|
||||
for value in c:
|
||||
f.write("{},{}\n".format(value[0].decode(),value[1]))
|
||||
f.write("{},\n".format(value[0].decode()))
|
||||
f.write("{},{}\n".format(value[0].decode(),int(value[1])))
|
||||
|
||||
else:
|
||||
print ("You need a specify an output like --table or at least one of the options below")
|
||||
|
|
Loading…
Reference in a new issue