forked from bacher09/pwgen-for-bios
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ui.min.js
4 lines (4 loc) · 1.51 KB
/
ui.min.js
1
2
3
4
var sDescription=CreateHashTable([[SONY,"Old Sony"],[SAMSUNG,"Samsung"],[PHOENIX,"Generic Phoenix"],[HP_COMPAQ,"HP/Compaq Phoenix BIOS"],[FSI_PHOENIX,"Fujitsu-Siemens Phoenix"],[FSI_L_PHOENIX,"Fujitsu-Siemens (model L) Phoenix "],[FSI_P_PHOENIX,"Fujitsu-Siemens (model P) Phoenix "],[FSI_S_PHOENIX,"Fujitsu-Siemens (model S) Phoenix "],[FSI_X_PHOENIX,"Fujitsu-Siemens (model X) Phoenix "],[INSYDE,"InsydeH2O BIOS (Acer, HP)"],[HP_MINI,"HP/Compaq Mini Netbooks"],[FSI_20_DEC_NEW,"Fujitsu-Siemens new"],
[FSI_20_DEC_OLD,"Fujitsu-Siemens old"],[FSI_HEX,"Fujitsu-Siemens"],[DELL_TAG,"Dell by serial number"],[DELL_HDD_OLD,"Dell by hdd serial number old"],[DELL_HDD_NEW,"Dell by hdd serial number new"]]);function converToTable(b){for(var a='<table class="answer_table">',c=0;c<b.length;c++){for(var a=a+"<tr>",d=0;d<b[c].length;d++){a+="<td>";if("object"==typeof b[c][d])for(var e=0;e<b[c][d].length;e++)a+=b[c][d][e]+"<br />";else a+=b[c][d];a+="</td>"}a+="</tr>"}return a+"</table>"}
function toArray(b){var a=[],c;for(c in b)a.push([c,b[c]]);return a}function toDescription(b){for(var a=0;a<b.length;a++)b[a][0]=sDescription[b[a][0]];return b}function enterPress(b){var a=0;b.which?a=b.which:window.event&&(a=b.keyCode);13==a&&(b.preventDefault?b.preventDefault():b.returnValue=!1,calcPass())}
function calcPass(){var b=document.getElementById("serial_id").value,a=toDescription(toArray(autoGetBiosPwd(b))),b=a.length,a=converToTable(a);document.getElementById("try_this").style.display=0<b?"":"none";document.getElementById("answer").innerHTML=a};