Saturday, March 31, 2012

Convert an IP Address Range into CIDR Notation

While looking for a way to convert a range of IP addresses to CIDR notation, I came across a really neat Perl module on CPAN. It is called Net::CIDR.

Among other thigs, the module converts IP addressed given as a range such as - into CIDR notation:

It even works if the address range is not a single block (quite common with the whois servers run by spam friendly ISP's). For example - converts to:

use strict;
use warnings;

use Net::CIDR;

# snarf lines from STDIN
my @rlist = ();
foreach my $line (<STDIN>) {
  chomp $line;
  next unless $line;
  push @rlist,$line;

# convert to CIDR notation
foreach my $line (Net::CIDR::range2cidr(@rlist)) {
  print $line . "\n";

If you want the output sorted by IP address pipe the output from the above program through the sort command:

sort -n -t '.' -k 1,1 -k 2,2 -k 3,3 -k 4,4

Wednesday, March 28, 2012

Eye for an Eye?

By now anyone not living under a bridge has heard of George Zimmerman and Trayvon Martin. Now the "New Black Panthers" are offering $10,000 for the "capture" of George Zimmerman.

New Black Panther leader Mikhail Muhammad announced the reward during a protest in Sanford Saturday. And when asked whether he was inciting violence, Muhammad replied defiantly: "An eye for an eye, a tooth for a tooth."

It seems to me that an eye-for-eye eventualy leads to lots of blind people. Similarly, a tooth-for-a-tooth mentality leaves a lot of people gumming their morning mush. I wonder if the fool quoted above remembers just who will be King in his country of the toothless blind.

Friday, March 9, 2012

Just When You Thought it was Safe to Fly Again.

An engineer shows how easy it is to defeat the new whole body scanners.

$1B of TSA Nude Body Scanners Made Worthless By Blog — How Anyone Can Get Anything Past The Scanners

H/T to Wendy McElroy

In Time of War

Jonathon Turley writing for Foreign Policy reports on a presentation by Eric Holder defending the claim the President has the authority to kill any US citizen he considers a threat.

On Monday, March 5, Northwestern University School of Law was the location of an extraordinary scene for a free nation. U.S. Attorney General Eric Holder presented President Barack Obama's claim that he has the authority to kill any U.S. citizen he considers a threat. It served as a retroactive justification for the slaying of American-born cleric Anwar al-Awlaki last September by a drone strike in northeastern Yemen, as well as the targeted killings of at least two other Americans during Obama's term.

Read the rest here

If you are one of those smart enough to find your way to this blog you are probably smart enough to know this is a bad idea on several levels. Holder is invoking the ancient principle of "Inter arma enim silent lex" or "In time of War the Law is silent." This was a bad idea when Cicero stole it from Thucydides and it is still a bad idea now.

My response to any President claiming this power is, "Ave Imperator. Potes meos suaviari culus!" For you that don't understand Latin that means, "Hail the Emperor. You can kiss my ass!"

H/T to The Blog formerly known as Arctic Patriot.

Saturday, March 3, 2012

Federal Monitoring Word List

The "official" list of words DHS uses to monitor social network sites was obtained by the Electronic Privacy Information Center (EPIC) using a Freedom 0f Information lawsuit. This article lists them for your convenience.

H/T to Wendy McElroy

Friday, March 2, 2012

#EFAD at Number 2.

What is at number 1?

Really? I mean really? A wanna be Harlequin romance is beating out a free copy of Enemies Foreign and Domestic?

Thursday, March 1, 2012

Operation #EFAD II

Here is the link. Go download a copy for your Kindle now.