6 background-color: #2F3440;
7 background-color:#232323;
9 text-transform: uppercase;
11 font-family: monospace,Arial;
15 border: 1px solid white;
21 color: rgb(140, 245, 193);
34 border-top: 1px solid white;
38 function dc(x){return document.createElement(x)}
40 function addClass(el, line, byte)
44 el.className += " blockzero";
51 //Quadruple size sectors
57 if(line % linesPerSector == 0)
59 el.className += " sectorhdr";
61 if(line % linesPerSector == (linesPerSector -1))
63 el.className += " sectortrailer";
69 if(byte < 6) el.className += " key_a";
70 else if(byte < 10) el.className += " accessconditions";
71 else el.className += " key_b";
77 function loadMifare(data)
81 for(var i = 0 ; i < data.length ; i++)
87 var bytes = line.match(/(.{1,2})/g);
88 for(var b = 0 ; b < bytes.length ; b++)
92 td.appendChild(document.createTextNode(bytes[b]));
96 document.body.appendChild(t);
98 function to_ascii(hexval)
100 var intval = parseInt(hexval,16);
101 if(intval > 31 && intval < 127)
103 return String.fromCharCode(intval);
108 function loadAscii(data)
110 var data = data.data;
112 for(var i = 0 ; i < data.length ; i++)
117 var bytes = line.match(/(.{1,2})/g);
118 for(var b = 0 ; b < bytes.length ; b++)
122 td.appendChild(document.createTextNode(to_ascii(bytes[b])))
126 document.body.appendChild(t);
154 local function getHTML(data)
155 return skel_1 .. data .. skel_2
158 return {getHTML = getHTML}