Securita, I’m starting (finally)

Well, I’ve been delayed by one thing or another for quite some time. Anyway, I’m starting to gather my thoughts, and the various emails and conversations I’ve had with people over the project for quite some time. Just to review, Securita is a project to create a content filter for Mozilla.

The first checkin will not happen until I’m at version 0.1. Simply because it’s to messy, and a pain in the butt. At 0.1, I’ll checkin the source, and perhaps add a few devs to the project as appropriate.

The goals for 0.1

  • Load RDF datafile
  • Scan page for matches to RDF datafile
  • Display error when scan returns true
  • Make XPI for Firefox/Seamonkey

At this point, I’ve got a mini engine that can scan (including regexp, thanks to caillon) and return true if there’s a match (from an array of items).

My time is slightly limited right now, but I don’t want my short time to hold this project up any more. So what I need is the following:

Most Wanted #1

Method to load RDF datafile, and loop through for each element. Sample

Brief Rundown
String: what to search for
Scan: type of scan to perform. Either string or regexp
Type: URL, text, image , hybrid

Simply get to the point of doing a demo loop like follows:

for (i=0; i<ELEMENTS; i++){
  scan(string[i], scan[i], type[i]);
}

Most Wanted #2

Also need a method to link the script that does the processing (filterRun.js) to execute on each page loaded. I’m not exactly sure how to do this, and time is a bit short right now. If anyone can write a simple extension boilerplate that attaches the script filterRun.js to every tab that contains the following code to be executed as the page loads:

alert("Securita beats up the butterfly");

Anyone who can contribute the these two things would be extremely helpful. Email submissions as per my contact info on this website.

One thought on “Securita, I’m starting (finally)

  1. Loading of RDF should be done thorugh JSLib. It’s pretty easy. JSLib has an examble.

    Something like:

    var rdf = new RDFFile(file);
    try {
      var conts = rdf.getAllContainers();
      for (var i=0; i<conts.length; i++) {
        var list = conts[i].getSubNodes();
        for (i=0; i<list.length; i++) {
          var subject = list[i].getSubject();
          alert(list[i].getAttribute("<a href="http://robert.accettura.com/sdat#string" rel="nofollow">http://robert.accettura.com/sdat#string&quot;);</a>
        }
      }
    } catch(ex) {
    }

Leave a Reply

Your email address will not be published. Required fields are marked *