Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The writer module is not working properly #99

Closed
Ketan-Desai opened this issue Oct 3, 2024 · 2 comments
Closed

The writer module is not working properly #99

Ketan-Desai opened this issue Oct 3, 2024 · 2 comments

Comments

@Ketan-Desai
Copy link

Ketan-Desai commented Oct 3, 2024

Hi,

Please refer to the attached zip containing following files...

  1. go source to read list of filenames in source.txt file and produce IP.db file (i.e. mmdb file)
  2. TOR.txt file containing list of IP addresses

TOR.txt file header = network,organization,address,country,lat,long,accuracy,type

After producing the IP.db file, I am verifying via mmdbinspect and it's output do not match with the source

For Example...

The first line = 171.25.193.25/1,"TOR","","Sweden",59.3247,18.056,500,13

Network: 171.25.193.25/1
org = TOR
address =
country = Sweden
lat = 59.3247
long = 18.056,500
accuracy = 500
type = 13

Where as mmdbinspect output shows...

{
"Database": "IP.db",
"Records": [
{
"Network": "171.25.193.25/1",
"Record": {
"accuracy": "1000",
"address": "Las Vegas, Nevada, 89119",
"country": "United States",
"lat": "36.102",
"long": "-115.1447",
"org": "TOR",
"type": 13
}
}
],
"Lookup": "171.25.193.25"
}

make-ip.zip

@oschwald
Copy link
Member

oschwald commented Oct 3, 2024

I have not looked at your code or your input data, but based on 171.25.193.25/1, I assume you are using invalid CIDR notation throughout. 171.25.193.25/1 is equivalent to 128.0.0.0/1 in canonical form and covers half of the IPv4 space. I assume you intended to use 171.25.193.25/32.

@Ketan-Desai
Copy link
Author

ohh, very sorry sir.

It should be /32 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants