fix iptools mmdb test
local iptools = require ("iptools")
-local inspect = require('inspect')
+-- local inspect = require('inspect')
local mmdb = iptools.new_geoipdb()
@@ -17,9 +17,6 @@ end
--- print("loading asn:",g:load_asn_db("/home/pbi/reb/curiefense/curiefense/curieproxy/config/maxmind/GeoLite2-ASN.mmdb"))
--- print("loading country:", g:load_country_db("/home/pbi/reb/curiefense/curiefense/curieproxy/config/maxmind/GeoLite2-Country.mmdb"))
--- print("laoded")
a, b = mmdb:lookup_asn("89.160.20.128")
print("ASN ===>", a, b)
@@ -27,4 +24,9 @@ a, b = mmdb:lookup_country("89.160.20.128")
print("country ===>", a, b)
city = mmdb:lookup_city("89.160.20.128")
-print("city ===>", inspect(city))
+-- print("city ===>", inspect(city))
+for k,v in pairs(city) do
+ for k2, v2 in pairs(v) do
+ print("city ",k,k2," ===> ", v2)
+ end
+end
