6 background-color: #2F3440;
7 background-color:#232323;
9 text-transform: uppercase;
11 font-family: monospace,Arial;
15 border: 1px solid white;
18 color: rgb(140, 245, 193);
31 border-top: 1px solid white;
35 function dc(x){return document.createElement(x)}
37 function addClass(el, line, byte)
41 el.className += " blockzero";
48 //Quadruple size sectors
54 if(line % linesPerSector == 0)
56 el.className += " sectorhdr";
58 if(line % linesPerSector == (linesPerSector -1))
60 el.className += " sectortrailer";
66 if(byte < 6) el.className += " key_a";
67 else if(byte < 11) el.className += " accessconditions";
68 else el.className += " key_b";
74 function loadMifare(data)
78 for(var i = 0 ; i < data.length ; i++)
84 var bytes = line.match(/(.{1,2})/g);
85 for(var b = 0 ; b < bytes.length ; b++)
89 td.appendChild(document.createTextNode(bytes[b]));
93 document.body.appendChild(t);
95 function to_ascii(hexval)
97 var intval = parseInt(hexval,16);
98 if(intval > 31 && intval < 127)
100 return String.fromCharCode(intval);
105 function loadAscii(data)
107 var data = data.data;
109 for(var i = 0 ; i < data.length ; i++)
114 var bytes = line.match(/(.{1,2})/g);
115 for(var b = 0 ; b < bytes.length ; b++)
119 td.appendChild(document.createTextNode(to_ascii(bytes[b])))
123 document.body.appendChild(t);
151 local function getHTML(data)
152 return skel_1 .. data .. skel_2
155 return {getHTML = getHTML}