Tableutil

Tableutil is a utility for converting, aggregating and performing operations.
Download

Tableutil Ranking & Summary

Advertisement

  • Rating:
  • License:
  • BSD License
  • Price:
  • FREE
  • Publisher Name:
  • Henrik Gustafsson
  • Publisher web site:
  • http://ecalc.fnord.se/

Tableutil Tags


Tableutil Description

Tableutil is a utility for converting, aggregating and performing operations. Tableutil is a utility for converting, aggregating and performing operations (currently unions, differences, complements and intersections) on lists of IP-addresses. Tableutil's primary use is to convert files into a format pfctl(8) can read, but if you find another use for it I'd really like to know about it.It can read plain-text-files with ranges (12.12.12.12-23.23.23.23), CIDR-style networks (192.168.0.0/24) single addresses (242.242.242.242) or hostnames (one.two.com). It can also read p2b-files, the preferred file-format(s) of PeerGuardian. Tableutil has two modes of operation: Quick mode, which is used for converting files to pfctl-compatible tables and advanced mode, which is used to perform more advanced operations on files, and for greater flexibility of the output format.For example, if you have three files, 'block1', 'block2' and 'exceptions' that is to be used in a table that blocks the hosts in 'block1' and 'block2', excepting the ranges in 'exceptions', create a file looking something like this:# cat blockspec$block1 = load(text, "block1"); # The block1-blocklist$block2 = load(text, "block2"); # The block2-blocklist$exceptions = load(text, "exceptions"); # List of exceptions$block = difference(union($block1, $block2), $exceptions);save(cidr, "blocklist", $block);Or, if you just want to load a peerguardian blocklist (the text-kind), do something like this:# cat update-blocklist.sh#! /bin/shURL=""rm -f /tmp/blocklistftp -V -o - ${URL} 2> /dev/null | gunzip -c - | sed "s/.*:()/1/" | tableutil -q text 2> /dev/null > /tmp/blocklistif ; then mv /etc/pfdata/blocklist /etc/pfdata/blocklist.old && cp /tmp/blocklist /etc/pfdata/blocklist && pfctl -f /etc/pf.conf -T loadfiWhat's New in This Release:· A small lexer fix was made to handle different newlines gracefully.


Tableutil Related Software