8000 GitHub - ralequi/net_list_minimizer: a tool to combine networks list with a specified accuracy
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

ralequi/net_list_minimizer

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

net_list_minimizer

a tool to combine networks list to desired size with the best possible accuracy

how it works

  • We build a binary tree out of all the nets in passed list. Finding the smallest common nets and creating fake net nodes.
  • Then we calculate weight for all the nets. Weight is as bigger as much we can reduce the list size if we collapse the net. And as lower as many bad IPs are covered by that net.
  • Then we recursively collapse nets starting from those who has the biggest weight (the biggest weight is infinity) until we have desired list size.

The difficult thing is that weight of the parent nets is changed when we collapse it's child.

how to run

python3 minimize_net_list.py real_net_list_example.txt 30000 | grep -v ### > result.txt

About

a tool to combine networks list with a specified accuracy

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%
0