ioerror/blockfinder — pull request #49 by kloesing (2012-11-25 00:49:40+00:00)
Title: Please review and merge my branch to compare different data sources

This branch adds an option to compare different data sources to each other. Here's a usage example:

```
~/src/blockfinder$ ./blockfinder -e
~/src/blockfinder$ ./blockfinder -d
Importing RIR files...
~/src/blockfinder$ ./blockfinder -g
Importing Maxmind GeoIP files...
~/src/blockfinder$ ./blockfinder -p A1
Comparing assignments with overlapping assignments in other data sources...

Legend:
'<' = found assignment range with country code 'A1'
'>' = overlapping assignment range with same country code
'*' = overlapping assignment range, first conflict
'#' = overlapping assignment range, second conflict and beyond
' ' = neighboring assignment range

Assignments in 'maxmind':

US 8.10.6.244-8.12.36.255 maxmind
< A1 8.12.37.0-8.12.37.255 maxmind
US 8.12.38.0-8.14.223.255 maxmind
* US 8.0.0.0-8.255.255.255 rir

US 12.166.242.56-12.170.91.241 maxmind
< A1 12.170.91.242 maxmind
US 12.170.91.243-12.174.223.255 maxmind
* US 12.0.0.0-12.255.255.255 rir

GB 31.6.0.0-31.6.25.255 maxmind
< A1 31.6.26.0-31.6.27.255 maxmind
GB 31.6.28.0-31.6.63.255 maxmind
* GB 31.6.0.0-31.6.63.255 rir

CH 31.7.56.0-31.7.56.255 maxmind
< A1 31.7.57.0-31.7.57.255 maxmind
CH 31.7.58.0-31.7.63.255 maxmind
* CH 31.7.56.0-31.7.63.255 rir

NL 31.171.128.0-31.171.133.255 maxmind
< A1 31.171.134.0-31.171.135.255 maxmind
IT 31.171.136.0-31.171.143.255 maxmind
* NL 31.171.128.0-31.171.135.255 rir
IT 31.171.136.0-31.171.143.255 rir

[...]
```

I'm planning to use this feature to replace the awful A1 "Anonymous Proxy" assignments in MaxMind's database with something meaningful. But I could imagine there are other fun use cases, too.