-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
Using this branch: https://github.com/Quad9DNS/mrt2mmdb/tree/filter_issue
I get this:
(myenv) root@dev5:~/maxmind/mrt2mmdb-filterbranch/mrt2mmdb/mrt2mmdb# ./filter.py --trim `cat stuff` --mmdb ~/maxmind/GeoIP2-Enterprise_20250520/GeoIP2-Enterprise.mmdb
Apply filter to trim mmdb file : 0 prefixes [00:00, ? prefixes/s]
Traceback (most recent call last):
File "/root/maxmind/mrt2mmdb-filterbranch/mrt2mmdb/mrt2mmdb/./filter.py", line 169, in <module>
rewrite(fname, db, pb)
File "/root/maxmind/mrt2mmdb-filterbranch/mrt2mmdb/mrt2mmdb/./filter.py", line 125, in rewrite
((_, loc), _) = reader._find_address_in_tree_loc(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'Reader' object has no attribute '_find_address_in_tree_loc'. Did you mean: '_find_address_in_tree'?
(myenv) root@dev5:~/maxmind/mrt2mmdb-filterbranch/mrt2mmdb/mrt2mmdb#
(myenv) root@dev5:~/maxmind/mrt2mmdb-filterbranch/mrt2mmdb/mrt2mmdb# cat stuff
geoname_id
confidence
organization
accuracy_radius
time_zone
isp
domain
postal
metro_code
(myenv) root@dev5:~/maxmind/mrt2mmdb-filterbranch/mrt2mmdb/mrt2mmdb#
Also, I had to modify the "make_mmdb.py" file from
from args import (
get_args,
mrt_arg,
mmdb_arg,
prefix_arg,
target_arg,
lookup_file_arg,
custom_lookup_only_arg,
quiet_arg,
bgpscan_arg,
prometheus_arg,
database_type_arg,
log_level_arg,
)
from bgpscanner import parse_bgpscanner, sanitize
from prometheus import output_prometheus
from file_stats import all_files_create, arguments_filename
from flat_file import parse_flatfile
to
from mrt2mmdb.args import (
get_args,
mrt_arg,
mmdb_arg,
prefix_arg,
target_arg,
lookup_file_arg,
custom_lookup_only_arg,
quiet_arg,
bgpscan_arg,
prometheus_arg,
database_type_arg,
log_level_arg,
)
from mrt2mmdb.bgpscanner import parse_bgpscanner, sanitize
from mrt2mmdb.prometheus import output_prometheus
from mrt2mmdb.file_stats import all_files_create, arguments_filename
from mrt2mmdb.flat_file import parse_flatfile
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels