I Smell Packets


Regular Expression for Swine Domains
April 28, 2009, 4:06 am
Filed under: Regular Expression, Swine Flu

After seeing the latest diary entry on the Internet Storm Center (isc.sans.org) here, we wrote the following simple regular expression to block URLs with the word swine in them:

[a-z0-9-]*?swine[a-z0-9-]*?.com

That’s the basic expression. Now all you have to do is create additional expressions and change the .com at the end to .org, .net, and so on for the rest of the TLDs.

Advertisement

Leave a Comment so far
Leave a comment



Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s



%d bloggers like this: