Allows command line export of host data

Fixes #1916
This commit is contained in:
Simone Mainardi 2018-08-16 20:18:58 +02:00
parent 102da47f26
commit 32688764a7
2 changed files with 13 additions and 8 deletions

View file

@ -10,10 +10,13 @@ local json = require("dkjson")
sendHTTPContentTypeHeader('application/json', 'attachment; filename="exported_data.json"')
local mode = _POST["mode"]
local mode = _GET["mode"]
local ifId = _GET["ifid"]
interface.select(ifId)
if mode == "filtered" then
local host_info = url2hostinfo(_POST)
local host_info = url2hostinfo(_GET)
local host
if not isEmptyString(host_info["host"]) then