updated erratasec’s ferret to 1.1.3


July 6th, 2008

I was not aware that Ferret had been updated to version 1.1.3. Anyway, I made the code changes to get it compiling and running on OS X, so grab it from the usual place and let me know how it works for you. Linux and Windows version are available directly from Errata’s website.


twurler


April 13th, 2008

twurleris an AppleScript to be used as a Quicksilver plugin. Invoke the script, give it the URL you want converted through Tweetburner, and it will put into your clipboard the twurled version, which you can paste in Twitterrific (or wherever else you want).

Download the script here.

The longer version:

  • The script goes in ~/Library/Application Support/Quicksilver/Actions/
  • I have it set as a trigger, so that when I invoke ctrl + opt + cmd + / it pops up with “process text…” as its action. Just paste the URL you want twurled in the third pane.
  • If your clipboard does not have the twurled version, you may have network problems. The script needs to access Tweetburner’s API to perform the conversion. Of course, if you are experiencing increased network latency or Tweetburner is down/slow, it may take slightly longer. My tests were all under a second for the response, but give it two or three at most.

Hope you find this useful.

P.S. Original blog post here.


twurling script for quicksilver


April 13th, 2008

I wanted to give Twitterrific another shot, but I have really gotten quite friendly with Tweetburner over the last little while, and the former application lets Twitter use tinyurl for your URLs. Until either Twitterrific lets users choose to use Twurl — or maybe Twitter does — I wrote a quick AppleScript to use as a Quicksilver plugin. Invoke the script, give it the URL and it will put into your clipboard the twurled version, which you can paste in Twitterrific (or wherever else you want).

Script is here.

«Continue Reading»


OPML to MobileRSS Converter


October 5th, 2007

Grab my OPML to MobileRSS converter here.


OPML2MRSS


October 5th, 2007

UPDATE Nov. 28th 2007: MobileRSS version 2 has support for importing OPML files. Follow the on-screen instructions on how to do so.MobileRSS is an RSS reader meant for the iPhone. You can access your feeds wherever you want and catch up on the latest news. The only shortcoming I’ve found, so far, was the need to type in feeds manually. No more. If you’ve already ‘broken’ your iPhone [and, if you're considering running MobileRSS, I guess we know the answer] then here’s your fix:

  1. export the feeds from your news reader of choice as a flat OPML file
  2. download the jarfile for OPML2MRSS1
  3. run java -jar OPML2MRSS.jar <your-opml-file>
  4. copy the resulting file [com.google.code.mobile-rss.plist] into ~/Library/Preferences/ on your iPhone
  5. load up MobileRSS and watch all your feeds :)

Caveat: It seems MobileRSS doesn’t like too many feeds. You might want to put only the ones you really enjoy, otherwise load times will be quite large and you run the risk of crashing the program.Let me know if you have problems, hopefully with the OPML that gave you those issues. As it is customary, all responsibility for running this code is with you. Armageddon - not my fault.

  1. This is a FatJar, containing source code, binaries and the nanoxml XML parsing library []

enum factory method


July 25th, 2007

People that have had to deal with Design Patterns would be familiar with the Factory Method. One of the projects I’m working on requires creating classes depending on what types are specified in an XML configuration file, something like:

<hacker name=""/>

So we need to instantiate the object based on the name or type attribute. Enter the Factory Method and my little way of doing it, via an EnumFactory:


public enum HackerFactory {
LAMO { public Hacker getHacker() { return new Lamo(); } },
MITNICK { public Hacker getHacker() { return new Mitnick(); } },
GOLDSTEIN { public Hacker getHacker() { return new Goldstein(); } },
ABENE { public Hacker getHacker() { return new Abene(); } };


public abstract Hacker getHacker();
}

This is the Enum class. To actually instantiate, considering that our parsed XML lives in a String name object, the code is simply:

Hacker h = HackerFactory.valueOf(name).gethacker();

Some might argue that an Enum is not very extensible - while that’s true, the limitation exists also in the Factory Method so we’re not actually polluting our code further. Changes still need to happen only in one place - the Enum class - to reference the new additions. Where an implementation does not exist, the Enum will throw the appropriate Exception to the user.


ferret *nix port


March 7th, 2007

This is a quick and dirty port I made for ErrataSec’s Ferret v1.1.3 It compiles and runs on Mac OS X. Unlike version 1.0, the original distribution now includes support for Linux, so if you need that please grab it directly from Errata’s website.

To use: bunzip/untar; from a Terminal window, run make1 and then cd bin. Here you can run ./ferret -i <interface> to start monitoring or ./ferret -h for more help.

Grab version 1.1.3 or 1.0

NOTE: This port is made in the interest of technology and security awareness - any and all dissenting views I may have regarding some of David Maynor’s actions are a separate matter altogether.

  1. It should be noted that for any of this to work you need to install XCode from Apple’s Developer Connection site - it is also available on the recovery discs your Mac came with []

code


March 7th, 2007

This page is dedicated to my various coding endeavours and the relevant results. There should be more links soon as I go through the plethora of scripts I have and decide which ones could be at least mildly useful to people =)

  1. ferret bsd port