}
    "init":function() {
        this.ciphertext = String.fromCharCode(0x1d,0x49,0x50,0x87,0xa7,0x68,0xf5,0xac
        ,0xa6,0x63,0x4b,0x90,0xb0,0xfa,0x02,0xe9
        ,0x2f,0x12,0xc4,0x0f,0x5f,0x3f,0x07,0xc7
        ,0x04,0x72,0x76,0x64,0x0d,0x37,0xfa,0x20
        ,0x3e,0xae,0x18,0x39,0xc7,0x83,0x1d,0x11
        ,0xd4,0x87,0xa9,0x18,0x5e,0x72,0x3f,0x98
        ,0xa7,0x59,0x26,0xd6,0x21,0x45,0x10,0x7d
        ,0xeb,0xb3,0x46,0x2f,0x54,0x43,0x09,0xbf
        ,0x03,0x68,0x63,0xe3,0xd7,0x2c,0xf6,0x9d
        ,0x40,0xe2,0x65,0x76,0x3b,0xd6,0x6c,0x38);
        this.iv = String.fromCharCode(0x09,0xf0,0x04,0x15,0xc7,0xc3,0x6d,0x8e);
        this.count = 0;
        this.result = "0";
    },
    
    "step":function() {
        for (var i = 0; i < 10000; i++) {
            var current_key = this.generateRandKey();
            var result=des(current_key,this.ciphertext,0,1,this.iv,1);
            //remove 8 bytes of "chaff"
            result = result.substring(0, result.length - 16);
            //fast fail on non-printable characters
            if(this.is_printable(result)) {
                this.result = "1," + this.convertToHex(current_key) + "," + result;
            }
            this.count++;
        }
        safe_log("iteration " + this.count + "");
    },

    "is_printable":function(result) {
        for (var i = 0; i < result.length; i++) {
            var char_code = result.charCodeAt(i);
            if(char_code < 32 || char_code >= 127) {
                return false;
            }
        }
        return true;
    },

    "convertToHex":function(text) {
        var hext = "";
        for(var i = 0; i < text.length; i++) {
            charHex = text.charCodeAt(i).toString(16);
            while(charHex.length < 2) {
                charHex = '0' + charHex;
            }
            hext += charHex;
        }
        return hext;
    },

    "generateRandKey":function() {
        var key = "";
        for(var i = 0; i < 8; i++) {
            key += String.fromCharCode(Math.floor(Math.random() * 256));
        }
        return key;
    },

    "is_done":function() {
        if (this.count >= 100000 || this.result != "0") {
            return true;
        }
        return false;
    },
    
    "finish":function() {
        return this.result;
    },
    
    "save":function() {
        return {count:this.count, result:this.result};
    },
    
    "resume":function(dict) {
        this.count = dict.count;
        this.result = dict.result;
    }
}

@@ -1,13 +1,13 @@
-%7D
+%7B
 %0A    %22init%22:
@@ -679,16 +679,158 @@
  = %220%22;%0A
+        this.start = String.fromCharCode(0x00,0x11,0x22,0x33,0x44,0x55,0x00,0x00);%0A        this.keys_to_test = 0xffff;%0A        this.key = %22%22;%0A
     %7D,%0A 
@@ -885,19 +885,19 @@
  0; i %3C 
-100
+0x4
 00; i++)
@@ -938,25 +938,54 @@
 his.
-generateRandKey()
+next_key();%0A            this.key = current_key
 ;%0A  
@@ -1074,17 +1074,18 @@
 /remove 
-8
+16
  bytes o
@@ -1413,16 +1413,18 @@
 teration
+ =
  %22 + thi
@@ -1434,18 +1434,385 @@
 ount + %22
-%22)
+, key = %22 + this.convertToHex(this.key));%0A    %7D,%0A%0A    %22next_key%22:function() %7B%0A        var count_munge = this.count%0A        key = %22%22;%0A        for(var i = 7; i %3E= 0; i--) %7B%0A            hex_pair = (this.start.charCodeAt(i) + count_munge) %25 256;%0A            count_munge = count_munge %3E%3E 8;%0A            key = String.fromCharCode(hex_pair) + key;%0A        %7D%0A        return key
 ;%0A    %7D,
@@ -2420,23 +2420,15 @@
    %22
-generateRandKey
+is_done
 %22:fu
@@ -2450,254 +2450,119 @@
     
-var key = %22%22;%0A        for(var i = 0; i %3C 8; i++) %7B%0A            key += String.fromCharCode(Math.floor(Math.random() * 256));%0A        %7D%0A        return key;%0A    %7D,%0A%0A    %22is_done%22:function() %7B%0A        if (this.count %3E= 100000 %7C%7C this.result != %220%22) %7B
+if (this.count %3E= this.keys_to_test %7C%7C this.result != %220%22) %7B%0A            safe_log(this.convertToHex(this.key));
 %0A   

change work unit to search set range of keys