iglov / mmdb-editor Goto Github PK
View Code? Open in Web Editor NEWMake your own GeoIP database!
License: MIT License
Make your own GeoIP database!
License: MIT License
Hi,
I'm trying to fix the issue with some IP addresses that don't have some information, like the dataset.json below:
{ "41.59.208.37": { "subdivisions": [ { "iso_code": "TZ", "names": { "en": "Tanzania" } } ], "city": { "names": { "en": "Tanzania" } } } }
That is because Graylog generates errors when those fields are Null.
But when I run mmdb-editor-windows-amd64.exe -i GeoLite2-City.mmdb
it generates: Error during Unmarshal(): json: cannot unmarshal object into Go value of type []main.Dataset
What am I doing wrong? Thank you!
something like that:
[
{
"81.2.69.160/18" : {
"city" : {
"geoname_id" : 2643743,
"names" : {
"de" : "London",
"en" : "London",
"es" : "Londres",
"fr" : "Londres",
"ja" : "ロンドン",
"pt-BR" : "Londres",
"ru" : "Лондон"
}
},
"continent" : {
"code" : "EU",
"geoname_id" : 6255148,
"names" : {
"de" : "Europa",
"en" : "Europe",
"es" : "Europa",
"fr" : "Europe",
"ja" : "ヨーロッパ",
"pt-BR" : "Europa",
"ru" : "Европа",
"zh-CN" : "欧洲"
}
},
"country" : {
"geoname_id" : 2635167,
"iso_code" : "GB",
"names" : {
"de" : "Vereinigtes Königreich",
"en" : "United Kingdom",
"es" : "Reino Unido",
"fr" : "Royaume-Uni",
"ja" : "イギリス",
"pt-BR" : "Reino Unido",
"ru" : "Великобритания",
"zh-CN" : "英国"
}
},
"location" : {
"accuracy_radius" : 100,
"latitude" : 51.5142,
"longitude" : -0.0931,
"time_zone" : "Europe/London"
},
"registered_country" : {
"geoname_id" : 6252001,
"iso_code" : "US",
"names" : {
"de" : "USA",
"en" : "United States",
"es" : "Estados Unidos",
"fr" : "États-Unis",
"ja" : "アメリカ合衆国",
"pt-BR" : "Estados Unidos",
"ru" : "США",
"zh-CN" : "美国"
}
},
"subdivisions" : [
{
"geoname_id" : 6269131,
"iso_code" : "ENG",
"names" : {
"en" : "England",
"es" : "Inglaterra",
"fr" : "Angleterre",
"pt-BR" : "Inglaterra"
}
}
]
}
},
{
"10.0.0.0/8" : {
"country" : {
"geoname_id" : 6255148,
"iso_code" : "NA",
"names" : {
"en" : "My private property"
}
}
}
},
{
"8.8.8.8/32" : {
"country" : {
"geoname_id" : 6255148,
"iso_code" : "NA",
"names" : {
"en" : "Now it's owned by ME!"
}
}
}
},
{
"214.78.120.0/22" : {
"city" : {
"geoname_id" : 5391811,
"names" : {
"de" : "San Diego",
"en" : "San Diego",
"es" : "San Diego",
"fr" : "San Diego",
"ja" : "サンディエゴ",
"pt-BR" : "San Diego",
"ru" : "Сан-Диего"
}
},
"continent" : {
"code" : "NA",
"geoname_id" : 6255149,
"names" : {
"de" : "Nordamerika",
"en" : "North America",
"es" : "Norteamérica",
"fr" : "Amérique du Nord",
"ja" : "北アメリカ",
"pt-BR" : "América do Norte",
"ru" : "Северная Америка",
"zh-CN" : "北美洲"
}
},
"country" : {
"geoname_id" : 6252001,
"iso_code" : "US",
"names" : {
"de" : "Vereinigte Staaten",
"en" : "United States",
"es" : "Estados Unidos",
"fr" : "États Unis",
"ja" : "アメリカ",
"pt-BR" : "EUA",
"ru" : "США",
"zh-CN" : "美国"
}
},
"location" : {
"accuracy_radius" : 100,
"latitude" : 32.7405,
"longitude" : -117.0935,
"metro_code" : 825,
"time_zone" : "America/Los_Angeles"
},
"postal" : {
"code" : "92105"
},
"registered_country" : {
"geoname_id" : 6252001,
"iso_code" : "US",
"names" : {
"de" : "Vereinigte Staaten",
"en" : "United States",
"es" : "Estados Unidos",
"fr" : "États Unis",
"ja" : "アメリカ",
"pt-BR" : "EUA",
"ru" : "США",
"zh-CN" : "美国"
}
},
"subdivisions" : [
{
"geoname_id" : 5332921,
"iso_code" : "CA",
"names" : {
"de" : "Kalifornien",
"en" : "California",
"es" : "California",
"fr" : "Californie",
"ja" : "カリフォルニア州",
"pt-BR" : "Califórnia",
"ru" : "Калифорния",
"zh-CN" : "加州"
}
}
]
}
}
]
... when it released (august).
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.