Merge pull request #5 from A-syncritus/master
Dell 1D3B code and update of readme
This commit is contained in:
commit
32a5fb3a47
6 files changed
+160
-113
No files matched your search
@@ -1,9 +1,21 @@
|
||||
Pwgen For BIOS
|
||||
Pwgen For BIOS
|
||||
============================
|
||||
|
||||
About
|
||||
About
|
||||
---------------------------
|
||||
This code are based on python programs from [Dogbert's Blog](http://dogber1.blogspot.com/2009/05/table-of-reverse-engineered-bios.html).
|
||||
|
||||
It can calculate password for bios by hash.
|
||||
This code is based on python programs from [Dogbert's Blog](http://dogber1.blogspot.com/2009/05/table-of-reverse-engineered-bios.html) and research by Asyncritus.
|
||||
|
||||
It can calculate recovery password for bios from a service tag hash.
|
||||
|
||||
Supported BIOS types:
|
||||
* Compaq - 5 decimal digits
|
||||
* Dell - serial number for series -595B, -D35B. -2A7B and -1D3B
|
||||
* Fujitsu-Siemens - 5 decimal digits, 8 hexadecimal digits, 5x4 hexadecimal digits, 5x4 decimal digits
|
||||
* Hewlett-Packard - 5 decimal digits, 10 characters
|
||||
* Insyde H20 (generic) - 8 decimal digits
|
||||
* Phoenix (generic) - 5 decimal digits
|
||||
* Sony - 7 digit serial number
|
||||
* Samsung - 12 hexadecimal digits
|
||||
|
||||
For more information [read this](http://dogber1.blogspot.com/2009/05/table-of-reverse-engineered-bios.html).
|
||||
+104
-86
@@ -1,7 +1,7 @@
|
||||
/* May be need add 51,52 and 53 symbol */
|
||||
var keyboardDict = { 2: '1', 3: '2', 4: '3', 5: '4', 6: '5', 7: '6', 8: '7', 9: '8', 10: '9', 11: '0',
|
||||
16: 'q', 17: 'w', 18: 'e', 19: 'r', 20: 't', 21: 'y', 22: 'u', 23: 'i', 24: 'o', 25: 'p',
|
||||
30: 'a', 31: 's', 32: 'd', 33: 'f', 34: 'g', 35: 'h', 36: 'j', 37: 'k', 38: 'l',
|
||||
30: 'a', 31: 's', 32: 'd', 33: 'f', 34: 'g', 35: 'h', 36: 'j', 37: 'k', 38: 'l',
|
||||
44: 'z', 45: 'x', 46: 'c', 47: 'v', 48: 'b', 49: 'n', 50: 'm' };
|
||||
|
||||
var SONY = 'sony';
|
||||
@@ -23,7 +23,7 @@ var DELL_HDD_NEW = 'dell_hdd_new';
|
||||
var DELL_HDD_OLD = 'dell_hdd_old';
|
||||
|
||||
|
||||
var DELL_SERIES_PREFIX = ['595B','D35B','2A7B','A95B'];
|
||||
var DELL_SERIES_PREFIX = ['595B','D35B','2A7B','A95B','1D3B'];
|
||||
|
||||
|
||||
var encscans = [0x05,0x10,0x13,0x09,0x32,0x03,0x25,0x11,0x1F,0x17,0x06,
|
||||
@@ -33,15 +33,11 @@ var encscans = [0x05,0x10,0x13,0x09,0x32,0x03,0x25,0x11,0x1F,0x17,0x06,
|
||||
|
||||
|
||||
var chartabl2A7B = "012345679abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0";
|
||||
var chartabl1D3B = "0BfIUG1kuPvc8A9Nl5DLZYSno7Ka6HMgqsJWm65yCQR94b21OTp7VFX2z0jihE33d4xtrew0";
|
||||
|
||||
|
||||
var scancods = "\00\0331234567890-=\010\011qwertyuiop[]\015\377asdfghjkl;'`\377\\zxcvbnm,./";
|
||||
|
||||
var encData = [ 0x67452301 | 0, // For bit alignment
|
||||
0xEFCDAB89 | 0,
|
||||
0x98BADCFE | 0,
|
||||
0x10325476 | 0];
|
||||
|
||||
var MD5magic_o = [
|
||||
0xd76aa478, 0xe8c7b756, 0x242070db, 0xc1bdceee,
|
||||
0xf57c0faf, 0x4787c62a, 0xa8304613, 0xfd469501,
|
||||
@@ -78,7 +74,7 @@ function SignedToUnsigned(num){
|
||||
return num >>> 0;
|
||||
}
|
||||
|
||||
/* Keys function for hashArray for compability
|
||||
/* Keys function for hashArray for compability
|
||||
* with browsers witch does't have keys function */
|
||||
if(typeof(Object.keys) == 'undefined'){
|
||||
Object.keys = function (hash){
|
||||
@@ -89,9 +85,9 @@ if(typeof(Object.keys) == 'undefined'){
|
||||
return mkeys;
|
||||
};
|
||||
}
|
||||
var keys = Object.keys;
|
||||
var keys = Object.keys;
|
||||
|
||||
/* values function for hashArray for compability
|
||||
/* values function for hashArray for compability
|
||||
* with browsers witch does't have values function */
|
||||
if(typeof(values) == 'undefined'){
|
||||
values = function (hash){
|
||||
@@ -131,12 +127,12 @@ if(typeof(String.prototype.trim) === "undefined"){
|
||||
function min(x, y){
|
||||
if (x < y){
|
||||
return x;
|
||||
}
|
||||
}
|
||||
return y;
|
||||
}
|
||||
|
||||
function CreateHashTable2(mkeys, mvalues){
|
||||
var k = min(mkeys.length, mvalues.length);
|
||||
var k = min(mkeys.length, mvalues.length);
|
||||
var hash = new Object();
|
||||
for(var i=0;i<k;i++){
|
||||
hash[mkeys[i]] = mvalues[i];
|
||||
@@ -277,11 +273,11 @@ function keyToAscii(inKey){
|
||||
for(var i=0;i<inKey.length;i++){
|
||||
if (inKey[i] == 0) return out;
|
||||
if(inKey[i] < 32 || inKey[i] > 127) return undefined;
|
||||
out += String.fromCharCode(inKey[i]);
|
||||
out += String.fromCharCode(inKey[i]);
|
||||
}
|
||||
return out;
|
||||
}
|
||||
|
||||
|
||||
/* Decode Keyboard code to Ascii symbol */
|
||||
function keyboardEncToAscii(inKey){
|
||||
var out= "";
|
||||
@@ -327,7 +323,7 @@ function bruteForce(hash, salt, digitsOnly, charsOnly, minLen, maxLen){
|
||||
charsOnly = (typeof(charsOnly) == 'undefined') ? true : charsOnly;
|
||||
minLen = (typeof(minLen) == 'undefined') ? 3 : minLen;
|
||||
maxLen = (typeof(maxLen) == 'undefined') ? 7 : maxLen;
|
||||
|
||||
|
||||
var encodedPwd = [0,0,0,0,0,0,0];
|
||||
|
||||
if(hash > 0x3FFF){
|
||||
@@ -345,7 +341,7 @@ function bruteForce(hash, salt, digitsOnly, charsOnly, minLen, maxLen){
|
||||
var my_keyboard_dict_len = my_keyboard_dict_keys.length;
|
||||
|
||||
while(true){
|
||||
var rndVal = Math.random()*my_keyboard_dict_len;
|
||||
var rndVal = Math.random()*my_keyboard_dict_len;
|
||||
for(var i=0; i<7; i++){
|
||||
var value = Math.floor(rndVal % my_keyboard_dict_len);
|
||||
encodedPwd[i]= my_keyboard_dict_keys[value];
|
||||
@@ -366,10 +362,10 @@ function bruteForce(hash, salt, digitsOnly, charsOnly, minLen, maxLen){
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
function calc_in(l_arr){
|
||||
return [ (l_arr[1] >> 1),
|
||||
((l_arr[1] >> 6) | (l_arr[0] << 2)),
|
||||
((l_arr[1] >> 6) | (l_arr[0] << 2)),
|
||||
(l_arr[0] >> 3) ];
|
||||
}
|
||||
|
||||
@@ -378,7 +374,7 @@ function begin_calc(serial, s_arr){
|
||||
if(typeof(serial)=="string"){
|
||||
serial = StringToArray(serial);
|
||||
}
|
||||
|
||||
|
||||
ret_arr[0] = serial[ s_arr[3] ];
|
||||
ret_arr[1] = ( serial[ s_arr[3] ] >> 5) |
|
||||
(( (serial[ s_arr[2] ] >> 5) | (serial[ s_arr[2] ] << 3))
|
||||
@@ -387,7 +383,7 @@ function begin_calc(serial, s_arr){
|
||||
ret_arr[3] = (serial[ s_arr[2] ] >> 7) | (serial[ s_arr[1] ] << 1);
|
||||
ret_arr[4] = (serial[ s_arr[1] ] >> 4) | (serial[ s_arr[0] ] << 4);
|
||||
|
||||
ret_arr = ret_arr.concat(calc_in(serial));
|
||||
ret_arr = ret_arr.concat(calc_in(serial));
|
||||
|
||||
return toByte(ret_arr);
|
||||
}
|
||||
@@ -402,7 +398,7 @@ function end_calc(serial, calced_arr, s_arr, table){
|
||||
(calced_arr[i] & 4) && ( r ^= serial[ s_arr[2] ]);
|
||||
(calced_arr[i] & 8) && (r ^= serial[1]);
|
||||
(calced_arr[i] & 16) && (r ^= serial[0]);
|
||||
|
||||
|
||||
ret_arr[i] = table[r % table.length];
|
||||
}
|
||||
return ret_arr;
|
||||
@@ -412,9 +408,11 @@ function calc_suffix_shortcut(serial, s_arr1, s_arr2){
|
||||
var serial_arr = StringToArray(serial);
|
||||
var ret_arr = begin_calc(serial_arr,s_arr1);
|
||||
if(dell_get_serial_line(serial) == '2A7B'){
|
||||
return end_calc(serial_arr,ret_arr,s_arr2,StringToArray(chartabl2A7B));
|
||||
}
|
||||
return end_calc(serial_arr, ret_arr, s_arr2, encscans);
|
||||
return end_calc(serial_arr,ret_arr,s_arr2,StringToArray(chartabl2A7B));
|
||||
} else if(dell_get_serial_line(serial) == '1D3B'){
|
||||
return end_calc(serial_arr,ret_arr,s_arr2,StringToArray(chartabl1D3B));
|
||||
}
|
||||
return end_calc(serial_arr, ret_arr, s_arr2, encscans);
|
||||
}
|
||||
|
||||
function calc_suffix_tag(serial){
|
||||
@@ -428,7 +426,7 @@ function calc_suffix_hdd_new(serial){
|
||||
/* Depends only in first two chars */
|
||||
function calc_suffix_hdd_old(serial){
|
||||
// encscans[26], enscans[0xAA % enscans.length]
|
||||
var ret_arr = [49,49,49,49,49];
|
||||
var ret_arr = [49,49,49,49,49];
|
||||
var serial_arr = StringToArray(serial);
|
||||
ret_arr = ret_arr.concat(calc_in(serial_arr));
|
||||
// lower bits then 5 are never change
|
||||
@@ -442,50 +440,66 @@ function calc_suffix_hdd_old(serial){
|
||||
}
|
||||
|
||||
|
||||
function blockEncode(encBlock,f1, f2, f3, f4 ,f5){
|
||||
function blockEncode(encBlock,f1, f2, f3, f4 ,f5,repeater){
|
||||
|
||||
var encData = [ 0x67452301 | 0, // Reinit each run
|
||||
0xEFCDAB89 | 0,
|
||||
0x98BADCFE | 0,
|
||||
0x10325476 | 0];
|
||||
|
||||
|
||||
var A = encData[0] | 0; // For bit alignment
|
||||
var B = encData[1] | 0;
|
||||
var C = encData[2] | 0;
|
||||
var D = encData[3] | 0;
|
||||
|
||||
|
||||
function rol(t, bitsrot, num){
|
||||
var k = bitsrot[num >> 4][i & 3];
|
||||
return (SignedToUnsigned(t)/ Math.pow(2,32 - k)) |
|
||||
return (SignedToUnsigned(t)/ Math.pow(2,32 - k)) |
|
||||
((SignedToUnsigned(t) << k) | 0 );
|
||||
}
|
||||
|
||||
function f_shortcut(func, key, num){
|
||||
return (A + f1(func, B, C , D, MD5magic[num] + encBlock[ key ])) | 0;
|
||||
}
|
||||
|
||||
|
||||
var S = [ [ 7, 12, 17, 22 ],
|
||||
[ 5, 9, 14, 20 ],
|
||||
[ 4, 11, 16, 23 ],
|
||||
[ 6, 10, 15, 21 ]
|
||||
];
|
||||
var t;
|
||||
for(i=0;i<64;i++){
|
||||
switch(i >> 4){
|
||||
case 0:
|
||||
t = f_shortcut(f2, i & 15, i); // Use half byte
|
||||
break;
|
||||
case 1:
|
||||
t = f_shortcut(f3, (i*5 + 1) & 15, i);
|
||||
break;
|
||||
case 2:
|
||||
t = f_shortcut(f4, (i*3 + 5) & 15, i);
|
||||
break;
|
||||
case 3:
|
||||
t = f_shortcut(f5, (i*7) & 15, i);
|
||||
break;
|
||||
for(j=0;j<=repeater*20;j++){
|
||||
if(repeater){
|
||||
A|=0x97;
|
||||
B^=0x8;
|
||||
C|=(0x60606161 - j);
|
||||
D^=(0x50501010 + j);
|
||||
}
|
||||
A = D, D = C, C = B, B = (rol(t,S,i) + B) | 0;
|
||||
for(i=0;i<64;i++){
|
||||
switch(i >> 4){
|
||||
case 0:
|
||||
t = f_shortcut(f2, i & 15, i); // Use half byte
|
||||
break;
|
||||
case 1:
|
||||
t = f_shortcut(f3, (i*5 + 1) & 15, i);
|
||||
break;
|
||||
case 2:
|
||||
t = f_shortcut(f4, (i*3 + 5) & 15, i);
|
||||
break;
|
||||
case 3:
|
||||
t = f_shortcut(f5, (i*7) & 15, i);
|
||||
break;
|
||||
}
|
||||
A = D, D = C, C = B, B = (rol(t,S,i) + B) | 0;
|
||||
}
|
||||
encData[0]+=A;
|
||||
encData[1]+=B;
|
||||
encData[2]+=C;
|
||||
encData[3]+=D;
|
||||
}
|
||||
|
||||
return CorectBits([ A + encData[0],
|
||||
B + encData[1],
|
||||
C + encData[2],
|
||||
D + encData[3]]);
|
||||
return CorectBits([encData[0],encData[1],encData[2],encData[3]]);
|
||||
|
||||
}
|
||||
|
||||
@@ -506,33 +520,35 @@ function choseEncode(encBlock, serial){
|
||||
function encF2(num1, num2, num3) {
|
||||
return ((( num3 ^ num2) & num1) ^ num3);
|
||||
}
|
||||
|
||||
|
||||
function encF3 (num1, num2, num3) {
|
||||
return ((( num1 ^ num2) & num3) ^ num2);
|
||||
}
|
||||
|
||||
|
||||
function encF4(num1, num2, num3) {return (( num2 ^ num1) ^ num3); }
|
||||
|
||||
|
||||
function encF5(num1, num2, num3) {return (( num1 | ~num3) ^ num2); }
|
||||
|
||||
function encF1(func, num1,num2, num3, key){
|
||||
return (func(num1,num2,num3) + key) | 0; // For bit alignment
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Negative functions
|
||||
function encF1N(func, num1, num2, num3, key) {
|
||||
function encF1N(func, num1, num2, num3, key) {
|
||||
return encF1(func,num1,num2, num3, -key);
|
||||
}
|
||||
function encF2N(num1, num2, num3){ return encF2(num1, num2, ~num3); }
|
||||
function encF4N(num1, num2, num3){ return encF4(num1, ~num2, num3); }
|
||||
function encF5N(num1, num2, num3){ return encF5(~num1, num2, num3); }
|
||||
|
||||
|
||||
/* Main part */
|
||||
var type = dell_get_serial_line(serial);
|
||||
if(type == 'D35B'){
|
||||
return blockEncode(encBlock, encF1, encF2, encF3, encF4, encF5);
|
||||
return blockEncode(encBlock, encF1, encF2, encF3, encF4, encF5,0);
|
||||
} else if(type == '1D3B'){
|
||||
return blockEncode(encBlock, encF1N, encF2N, encF3, encF4N, encF5N,1);
|
||||
} else {
|
||||
return blockEncode(encBlock, encF1N, encF2N, encF3, encF4N, encF5N);
|
||||
return blockEncode(encBlock, encF1N, encF2N, encF3, encF4N, encF5N,0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -542,24 +558,26 @@ function answerToString(b_arr, serial){
|
||||
for(var i = 0;i<16;i++){
|
||||
if(dell_get_serial_line(serial) == "2A7B"){
|
||||
ret_str += chartabl2A7B.charAt( b_arr[i] % chartabl2A7B.length);
|
||||
} else if(dell_get_serial_line(serial) == "1D3B"){
|
||||
ret_str += chartabl1D3B.charAt( b_arr[i] % chartabl1D3B.length);
|
||||
} else if( ( r <= i) && (ret_str.length < 8) ){
|
||||
ret_str += scancods.charAt(encscans[b_arr[i] % encscans.length]);
|
||||
}
|
||||
}
|
||||
return ret_str;
|
||||
return ret_str;
|
||||
}
|
||||
|
||||
function dell_encode(in_str, cnt, serial){
|
||||
in_str[cnt] = 0x80;
|
||||
var encBlock = StringToIntArr(in_str);
|
||||
encBlock = fill_zero(encBlock,6,16);
|
||||
encBlock[14] = (cnt << 3);
|
||||
|
||||
encBlock[14] = (cnt << 3);
|
||||
|
||||
return IntArrToByteArr(choseEncode(encBlock, serial));
|
||||
|
||||
}
|
||||
|
||||
/* 7 symbols + 4 symbols ( 595B, D35B, 2A7B, A95B ) */
|
||||
/* 7 symbols + 4 symbols ( 595B, D35B, 2A7B, A95B, 1D3B ) */
|
||||
function getBiosPwdForDellTag(serial){
|
||||
if(dell_get_serial_line(serial) == 'A95B'){ // A95B
|
||||
serial = dell_get_serial_main(serial) + '595B';
|
||||
@@ -708,7 +726,7 @@ function getBiosPwdForHpmini(serial){
|
||||
'n': '9', 'q': '5', 'p': '2', 's': 'N', 'r': 'B', 'u': 'L',
|
||||
't': 'A', 'w': 'D', 'v': '6', 'y': 'I', 'x': '4', 'z': '0'
|
||||
};
|
||||
|
||||
|
||||
var table2 = {'1': '3', '0': '1', '3': 'F', '2': '7', '5': 'Q', '4': 'V',
|
||||
'7': 'X', '6': 'G', '9': 'O', '8': 'U', 'a': 'C', 'c': 'E',
|
||||
'b': 'P', 'e': 'M', 'd': 'T', 'g': 'H', 'f': '8', 'i': 'Y',
|
||||
@@ -716,7 +734,7 @@ function getBiosPwdForHpmini(serial){
|
||||
'n': '9', 'q': '5', 'p': '2', 's': 'N', 'r': 'B', 'u': 'L',
|
||||
't': 'A', 'w': 'D', 'v': '6', 'y': 'I', 'x': 'R', 'z': '0'
|
||||
};
|
||||
|
||||
|
||||
var password1 = "";
|
||||
var password2 = "";
|
||||
serial = serial.toLowerCase();
|
||||
@@ -751,8 +769,8 @@ function getBiosPwdForFsi20dec_old(serial){
|
||||
}
|
||||
|
||||
function codeToBytes(code){
|
||||
var numbers = [parseInt(code.slice(0,5), 10),
|
||||
parseInt(code.slice(5,10), 10),
|
||||
var numbers = [parseInt(code.slice(0,5), 10),
|
||||
parseInt(code.slice(5,10), 10),
|
||||
parseInt(code.slice(10,15), 10),
|
||||
parseInt(code.slice(15,20), 10)
|
||||
];
|
||||
@@ -763,7 +781,7 @@ function getBiosPwdForFsi20dec_old(serial){
|
||||
}
|
||||
return bytes;
|
||||
}
|
||||
|
||||
|
||||
/* op_arr - array with that operations do, ar1,ar2 - numbers */
|
||||
function interleave(op_arr,ar1, ar2 ){
|
||||
var arr = copy_array(op_arr);
|
||||
@@ -788,14 +806,14 @@ function getBiosPwdForFsi20dec_old(serial){
|
||||
for(var i=0;i<bytes.length;i++){
|
||||
bytes[i] = bytes[i] ^ ord(XORkey.charAt(i));
|
||||
}
|
||||
|
||||
|
||||
// swap two bytes
|
||||
bytes.swap(2,6);
|
||||
bytes.swap(3,7);
|
||||
|
||||
|
||||
bytes = interleave(bytes, [0,1,2,3],[0,1,2,3]);
|
||||
bytes = interleave(bytes, [4,5,6,7],[6,7,4,5]);
|
||||
|
||||
|
||||
// final rotations
|
||||
bytes[0] = ((bytes[0] << 3) & 0xFF) | (bytes[0] >> 5);
|
||||
bytes[1] = ((bytes[1] << 5) & 0xFF) | (bytes[1] >> 3);
|
||||
@@ -804,10 +822,10 @@ function getBiosPwdForFsi20dec_old(serial){
|
||||
bytes[5] = ((bytes[5] << 6) & 0xFF) | (bytes[5] >> 2);
|
||||
bytes[6] = ((bytes[6] << 1) & 0xFF) | (bytes[6] >> 7);
|
||||
bytes[7] = ((bytes[7] << 2) & 0xFF) | (bytes[7] >> 6);
|
||||
|
||||
|
||||
// len(solution space) = 10 + 26
|
||||
bytes = convert_to_remainder(bytes);
|
||||
|
||||
|
||||
return bytesToString(bytes);
|
||||
}
|
||||
|
||||
@@ -816,7 +834,7 @@ function getBiosPwdForFsi20dec_old(serial){
|
||||
|
||||
/* For Fujinsu-Siemens. 5x4 dicimal digits. new */
|
||||
function getBiosPwdForFSI20dec_new(serial){
|
||||
var f_keys = ["4798156302", "7201593846", "5412367098", "6587249310",
|
||||
var f_keys = ["4798156302", "7201593846", "5412367098", "6587249310",
|
||||
"9137605284", "3974018625", "8052974163"];
|
||||
|
||||
var pwdHash = serial.charAt(0) + serial.charAt(2) + serial.charAt(5) +
|
||||
@@ -837,7 +855,7 @@ function getBiosPwdForFSI20dec(serial){
|
||||
|
||||
return CreateHashTable([FSI_20_DEC_NEW,FSI_20_DEC_OLD],
|
||||
[getBiosPwdForFSI20dec_new(serial),getBiosPwdForFsi20dec_old(serial)]);
|
||||
|
||||
|
||||
}
|
||||
|
||||
/* For Fujinsu-Siemens. 8 or 5x4 hexadecimal digits. */
|
||||
@@ -853,7 +871,7 @@ function getBiosPwdForFSIhex(serial){
|
||||
crc = (crc << 1);
|
||||
if(crc & 0x10000){
|
||||
crc = crc ^ 0x1021;
|
||||
}
|
||||
}
|
||||
}
|
||||
table.push(crc & 0xFFFF);
|
||||
}
|
||||
@@ -863,15 +881,15 @@ function getBiosPwdForFSIhex(serial){
|
||||
function hashToChar(hash,code, num){
|
||||
return chr(code + ((hash >> num) % 16) % 10);
|
||||
}
|
||||
|
||||
|
||||
function hashToString(hash){
|
||||
var a = ord('0')
|
||||
return (hashToChar(hash, a, 12) +
|
||||
return (hashToChar(hash, a, 12) +
|
||||
hashToChar(hash, a, 8) +
|
||||
hashToChar(hash, a, 4) +
|
||||
hashToChar(hash, a, 0) );
|
||||
}
|
||||
|
||||
|
||||
function calculateHash(word, table){
|
||||
var hash = 0;
|
||||
var d =0;
|
||||
@@ -881,12 +899,12 @@ function getBiosPwdForFSIhex(serial){
|
||||
}
|
||||
return hash
|
||||
}
|
||||
|
||||
|
||||
function decryptCode(code){
|
||||
var table = generateCRC16Table();
|
||||
return (hashToString(calculateHash(code.slice(0,4), table)) +
|
||||
hashToString(calculateHash(code.slice(4,8), table)));
|
||||
|
||||
|
||||
}
|
||||
if (serial.length == 20){
|
||||
serial = serial.slice(12,20);
|
||||
@@ -926,7 +944,7 @@ function dellChecker(serial, len_arr, series_arr){
|
||||
if(!series_arr) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
for(var i=0;i<series_arr.length;i++){
|
||||
if(dell_get_serial_line(serial) == series_arr[i]){
|
||||
return true;
|
||||
@@ -1032,20 +1050,20 @@ function autoGetBiosPwdForFSIhex(serial){
|
||||
}
|
||||
|
||||
function autoGetBiosPwdForDellHddOld(serial){
|
||||
return dellCheckAndRunWithKey(serial, getBiosPwdForDellHddOld,
|
||||
return dellCheckAndRunWithKey(serial, getBiosPwdForDellHddOld,
|
||||
DELL_HDD_OLD, [11], false);
|
||||
}
|
||||
|
||||
/* 7 symbols + 4 symbols ( 595B, D35B, 2A7B, A95B ) */
|
||||
/* 7 symbols + 4 symbols ( 595B, D35B, 2A7B, A95B, 1D3B ) */
|
||||
function autoGetBiosPwdForDellTag(serial){
|
||||
return dellCheckAndRunWithKey(serial, getBiosPwdForDellTag,
|
||||
return dellCheckAndRunWithKey(serial, getBiosPwdForDellTag,
|
||||
DELL_TAG, [11],DELL_SERIES_PREFIX);
|
||||
}
|
||||
|
||||
|
||||
function metaDellManyTag(serial, len, key, func){
|
||||
if(serial.length == len){
|
||||
var answ_arr = [];
|
||||
var answ_arr = [];
|
||||
for(var i=0;i<DELL_SERIES_PREFIX.length;i++){
|
||||
answ_arr[i] = func(serial + DELL_SERIES_PREFIX[i]);
|
||||
}
|
||||
@@ -1061,9 +1079,9 @@ function metaDellManyTag(serial, len, key, func){
|
||||
}
|
||||
|
||||
|
||||
/* 11 symbols + 4 symbols ( 595B, D35B, 2A7B, A95B ) */
|
||||
/* 11 symbols + 4 symbols ( 595B, D35B, 2A7B, A95B, 1D3B ) */
|
||||
function autoGetBiosPwdForDellHddNew(serial){
|
||||
return dellCheckAndRunWithKey(serial, getBiosPwdForDellHddNew,
|
||||
return dellCheckAndRunWithKey(serial, getBiosPwdForDellHddNew,
|
||||
DELL_HDD_NEW, [15],DELL_SERIES_PREFIX);
|
||||
}
|
||||
|
||||
|
||||
Vendored
+12
-12
@@ -1,32 +1,32 @@
|
||||
var keyboardDict={2:"1",3:"2",4:"3",5:"4",6:"5",7:"6",8:"7",9:"8",10:"9",11:"0",16:"q",17:"w",18:"e",19:"r",20:"t",21:"y",22:"u",23:"i",24:"o",25:"p",30:"a",31:"s",32:"d",33:"f",34:"g",35:"h",36:"j",37:"k",38:"l",44:"z",45:"x",46:"c",47:"v",48:"b",49:"n",50:"m"},SONY="sony",SAMSUNG="samsung",PHOENIX="phoenix",HP_COMPAQ="hp_compaq_phoenix",FSI_PHOENIX="fsi_phoenix",FSI_L_PHOENIX="fsi_l_phoenix",FSI_P_PHOENIX="fsi_p_phoenix",FSI_S_PHOENIX="fsi_s_phoenix",FSI_X_PHOENIX="fsi_x_phoenix",INSYDE="insyde",
|
||||
HP_MINI="hp_mini",FSI_20_DEC_NEW="fsi_20_dec_new",FSI_20_DEC_OLD="fsi_20_dec_old",FSI_HEX="fsi_hex",DELL_TAG="dell_tag",DELL_HDD_NEW="dell_hdd_new",DELL_HDD_OLD="dell_hdd_old",DELL_SERIES_PREFIX=["595B","D35B","2A7B","A95B"],encscans=[5,16,19,9,50,3,37,17,31,23,6,21,48,25,38,34,10,2,44,47,22,20,7,24,36,35,49,32,30,8,45,33,4,11,18,46],chartabl2A7B="012345679abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0",scancods="\x00\u001b1234567890-=\b\tqwertyuiop[]\r\u00ffasdfghjkl;'`\u00ff\\zxcvbnm,./",
|
||||
encData=[1732584193,-271733879,-1732584194,271733878],MD5magic_o=[3614090360,3905402710,606105819,3250441966,4118548399,1200080426,2821735955,4249261313,1770035416,2336552879,4294925233,2304563134,1804603682,4254626195,2792965006,1236535329,4129170786,3225465664,643717713,3921069994,3593408605,38016083,3634488961,3889429448,568446438,3275163606,4107603335,1163531501,2850285829,4243563512,1735328473,2368359562,4294588738,2272392833,1839030562,4259657740,2763975236,1272893353,4139469664,3200236656,
|
||||
681279174,3936430074,3572445317,76029189,3654602809,3873151461,530742520,3299628645,4096336452,1126891415,2878612391,4237533241,1700485571,2399980690,4293915773,2240044497,1873313359,4264355552,2734768916,1309151649,4149444226,3174756917,718787259,3951481745];function CorectBits(a){if("object"==typeof a){for(var b=0;b<a.length;b++)a[b]|=0;return a}return a|0}var MD5magic=CorectBits(MD5magic_o);function SignedToUnsigned(a){return a>>>0}
|
||||
HP_MINI="hp_mini",FSI_20_DEC_NEW="fsi_20_dec_new",FSI_20_DEC_OLD="fsi_20_dec_old",FSI_HEX="fsi_hex",DELL_TAG="dell_tag",DELL_HDD_NEW="dell_hdd_new",DELL_HDD_OLD="dell_hdd_old",DELL_SERIES_PREFIX=["595B","D35B","2A7B","A95B","1D3B"],encscans=[5,16,19,9,50,3,37,17,31,23,6,21,48,25,38,34,10,2,44,47,22,20,7,24,36,35,49,32,30,8,45,33,4,11,18,46],chartabl2A7B="012345679abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0",chartabl1D3B="0BfIUG1kuPvc8A9Nl5DLZYSno7Ka6HMgqsJWm65yCQR94b21OTp7VFX2z0jihE33d4xtrew0",
|
||||
scancods="\x00\u001b1234567890-=\b\tqwertyuiop[]\r\u00ffasdfghjkl;'`\u00ff\\zxcvbnm,./",MD5magic_o=[3614090360,3905402710,606105819,3250441966,4118548399,1200080426,2821735955,4249261313,1770035416,2336552879,4294925233,2304563134,1804603682,4254626195,2792965006,1236535329,4129170786,3225465664,643717713,3921069994,3593408605,38016083,3634488961,3889429448,568446438,3275163606,4107603335,1163531501,2850285829,4243563512,1735328473,2368359562,4294588738,2272392833,1839030562,4259657740,2763975236,
|
||||
1272893353,4139469664,3200236656,681279174,3936430074,3572445317,76029189,3654602809,3873151461,530742520,3299628645,4096336452,1126891415,2878612391,4237533241,1700485571,2399980690,4293915773,2240044497,1873313359,4264355552,2734768916,1309151649,4149444226,3174756917,718787259,3951481745];function CorectBits(a){if("object"==typeof a){for(var b=0;b<a.length;b++)a[b]|=0;return a}return a|0}var MD5magic=CorectBits(MD5magic_o);function SignedToUnsigned(a){return a>>>0}
|
||||
"undefined"==typeof Object.keys&&(Object.keys=function(a){var b=[],c;for(c in a)a.hasOwnProperty(c)&&b.push(c);return b});var keys=Object.keys;"undefined"==typeof values&&(values=function(a){var b=[],c;for(c in a)a.hasOwnProperty(c)&&b.push(a[c]);return b});Array.prototype.swap=function(a,b){var c=this[a];this[a]=this[b];this[b]=c;return this};Array.prototype.getUnique=function(){for(var a={},b=[],c=0,d=this.length;c<d;++c)this[c]in a||(b.push(this[c]),a[this[c]]=1);return b};
|
||||
"undefined"===typeof String.prototype.trim&&(String.prototype.trim=function(){return String(this).replace(/^\s+|\s+$/g,"")});function min(a,b){return a<b?a:b}function CreateHashTable2(a,b){for(var c=min(a.length,b.length),d={},e=0;e<c;e++)d[a[e]]=b[e];return d}function CreateHashTable3(a){for(var b={},c=0;c<a.length;c++)b[a[c][0]]=a[c][1];return b}function CreateHashTable(a,b){return"undefined"==typeof b?CreateHashTable3(a):CreateHashTable2(a,b)}function ord(a){return a.charCodeAt(0)}
|
||||
function chr(a){return String.fromCharCode(a)}function div(a,b){return a/b-a%b/b}function copy_array(a){for(var b=[],c=0;c<a.length;c++)b[c]=a[c];return b}function StringToArray(a){var b=[];if("object"==typeof a)return a;for(var c=0;c<a.length;c++)b[c]=a.charCodeAt(c);return b}function ArrayToString(a){for(var b="",c=0;c<a.length;c++)b+=chr(a[c]);return b}function toByte(a){for(var b=0;b<a.length;b++)a[b]&=255;return a}function isHexNumber(a){return/[0-9ABCDEF]/gi.test(a)}
|
||||
function isDecNumber(a){return/[0-9]/gi.test(a)}function filterFalse(a){for(var b=[],c=0;c<a.length;c++)a[c]&&b.push(a[c]);return b}function ByteArrToIntArr(a){for(var b=a.length>>2,c=[],d=0;d<=b;d++)c[d]=a[4*d]|a[4*d+1]<<8|a[4*d+2]<<16|a[4*d+3]<<24;return c}function StringToIntArr(a){return"object"==typeof a?ByteArrToIntArr(a):ByteArrToIntArr(StringToArray(a))}function IntToByteArr(a){var b=[];b[0]=a&255;b[1]=a>>8&255;b[2]=a>>16&255;b[3]=a>>24&255;return b}
|
||||
function IntArrToByteArr(a){for(var b=[],c=0;c<a.length;c++)b=b.concat(IntToByteArr(a[c]));return b}function fill_zero(a,b,c){for(;b<c;b++)a[b]=0;return a}var keyboardDictDigits=CreateHashTable(keys(keyboardDict).slice(0,9),values(keyboardDict).slice(0,9)),keyboardDictChars=CreateHashTable(keys(keyboardDict).slice(10,36),values(keyboardDict).slice(10,36));function keyToAscii(a){for(var b="",c=0;c<a.length&&0!=a[c];c++){if(32>a[c]||127<a[c])return;b+=String.fromCharCode(a[c])}return b}
|
||||
function keyboardEncToAscii(a){for(var b="",c=0;c<a.length&&0!=a[c];c++)if(a[c]in keyboardDict)b+=keyboardDict[a[c]];else return"";return b}function badCRC16(a,b){for(var c="undefined"==typeof b?0:b,d=0,d=0;d<a.length;d++)for(var c=c^a[d],e=8;e--;)c=c&1?c>>1^8193:c>>1;return c}
|
||||
function bruteForce(a,b,c,d,e,f){b="undefined"==typeof b?0:b;e="undefined"==typeof e?3:e;f="undefined"==typeof f?7:f;var g=[0,0,0,0,0,0,0];if(16383<a)return"Bad hash";var h=0;c=keys(!0==("undefined"==typeof d?!0:d)?keyboardDictChars:!0==("undefined"==typeof c?!1:c)?keyboardDictDigits:keyboardDict);for(d=c.length;;){for(var l=Math.random()*d,k=0;7>k;k++)g[k]=c[Math.floor(l%d)],l*=7;h++;if(5E4<h)return"No";for(k=e;k<=f;k++)if(badCRC16(g.slice(0,k),b)==a)return g=g.slice(0,k),keyboardEncToAscii(g)}}
|
||||
function calc_in(a){return[a[1]>>1,a[1]>>6|a[0]<<2,a[0]>>3]}function begin_calc(a,b){var c=[];"string"==typeof a&&(a=StringToArray(a));c[0]=a[b[3]];c[1]=a[b[3]]>>5|(a[b[2]]>>5|a[b[2]]<<3)&241;c[2]=a[b[2]]>>2;c[3]=a[b[2]]>>7|a[b[1]]<<1;c[4]=a[b[1]]>>4|a[b[0]]<<4;c=c.concat(calc_in(a));return toByte(c)}function end_calc(a,b,c,d){for(var e=0,f=[],g=0;8>g;g++)e=170,b[g]&1&&(e^=a[c[0]]),b[g]&2&&(e^=a[c[1]]),b[g]&4&&(e^=a[c[2]]),b[g]&8&&(e^=a[1]),b[g]&16&&(e^=a[0]),f[g]=d[e%d.length];return f}
|
||||
function calc_suffix_shortcut(a,b,c){var d=StringToArray(a);b=begin_calc(d,b);return"2A7B"==dell_get_serial_line(a)?end_calc(d,b,c,StringToArray(chartabl2A7B)):end_calc(d,b,c,encscans)}function calc_suffix_tag(a){return calc_suffix_shortcut(a,[1,2,3,4],[4,3,2])}function calc_suffix_hdd_new(a){return calc_suffix_shortcut(a,[1,10,9,8],[8,9,10])}
|
||||
function bruteForce(a,b,c,d,e,f){b="undefined"==typeof b?0:b;e="undefined"==typeof e?3:e;f="undefined"==typeof f?7:f;var h=[0,0,0,0,0,0,0];if(16383<a)return"Bad hash";var k=0;c=keys(!0==("undefined"==typeof d?!0:d)?keyboardDictChars:!0==("undefined"==typeof c?!1:c)?keyboardDictDigits:keyboardDict);for(d=c.length;;){for(var l=Math.random()*d,g=0;7>g;g++)h[g]=c[Math.floor(l%d)],l*=7;k++;if(5E4<k)return"No";for(g=e;g<=f;g++)if(badCRC16(h.slice(0,g),b)==a)return h=h.slice(0,g),keyboardEncToAscii(h)}}
|
||||
function calc_in(a){return[a[1]>>1,a[1]>>6|a[0]<<2,a[0]>>3]}function begin_calc(a,b){var c=[];"string"==typeof a&&(a=StringToArray(a));c[0]=a[b[3]];c[1]=a[b[3]]>>5|(a[b[2]]>>5|a[b[2]]<<3)&241;c[2]=a[b[2]]>>2;c[3]=a[b[2]]>>7|a[b[1]]<<1;c[4]=a[b[1]]>>4|a[b[0]]<<4;c=c.concat(calc_in(a));return toByte(c)}function end_calc(a,b,c,d){for(var e=0,f=[],h=0;8>h;h++)e=170,b[h]&1&&(e^=a[c[0]]),b[h]&2&&(e^=a[c[1]]),b[h]&4&&(e^=a[c[2]]),b[h]&8&&(e^=a[1]),b[h]&16&&(e^=a[0]),f[h]=d[e%d.length];return f}
|
||||
function calc_suffix_shortcut(a,b,c){var d=StringToArray(a);b=begin_calc(d,b);return"2A7B"==dell_get_serial_line(a)?end_calc(d,b,c,StringToArray(chartabl2A7B)):"1D3B"==dell_get_serial_line(a)?end_calc(d,b,c,StringToArray(chartabl1D3B)):end_calc(d,b,c,encscans)}function calc_suffix_tag(a){return calc_suffix_shortcut(a,[1,2,3,4],[4,3,2])}function calc_suffix_hdd_new(a){return calc_suffix_shortcut(a,[1,10,9,8],[8,9,10])}
|
||||
function calc_suffix_hdd_old(a){var b=[49,49,49,49,49];a=StringToArray(a);for(var b=b.concat(calc_in(a)),c=5;8>c;c++){var d=170;b[c]&8&&(d^=a[1]);b[c]&16&&(d^=a[0]);b[c]=encscans[d%encscans.length]}return b}
|
||||
function blockEncode(a,b,c,d,e,f){function g(a,c,b){c=c[b>>4][i&3];return SignedToUnsigned(a)/Math.pow(2,32-c)|SignedToUnsigned(a)<<c|0}function h(c,d,e){return l+b(c,k,m,p,MD5magic[e]+a[d])|0}var l=encData[0]|0,k=encData[1]|0,m=encData[2]|0,p=encData[3]|0,q=[[7,12,17,22],[5,9,14,20],[4,11,16,23],[6,10,15,21]],n;for(i=0;64>i;i++){switch(i>>4){case 0:n=h(c,i&15,i);break;case 1:n=h(d,5*i+1&15,i);break;case 2:n=h(e,3*i+5&15,i);break;case 3:n=h(f,7*i&15,i)}l=p;p=m;m=k;k=g(n,q,i)+k|0}return CorectBits([l+
|
||||
encData[0],k+encData[1],m+encData[2],p+encData[3]])}function dell_get_serial_line(a){return"object"==typeof a?ArrayToString(a.slice(a.length-4,a.length)).toUpperCase():a.substr(a.length-4,a.length).toUpperCase()}function dell_get_serial_main(a){return a.substr(0,a.length-4)}
|
||||
function choseEncode(a,b){function c(a,c,b){return(b^c)&a^b}function d(a,c,b){return(a^c)&b^c}function e(a,c,b){return c^a^b}function f(a,c,b){return(a|~b)^c}function g(a,c,b,d,e){return a(c,b,d)+e|0}function h(a,c,b,d,e){return a(c,b,d)+-e|0}function l(a,c,b){return(~b^c)&a^~b}function k(a,c,b){return~c^a^b}function m(a,c,b){return(~a|~b)^c}return"D35B"==dell_get_serial_line(b)?blockEncode(a,g,c,d,e,f):blockEncode(a,h,l,d,k,m)}
|
||||
function answerToString(a,b){for(var c=a[0]%9,d="",e=0;16>e;e++)"2A7B"==dell_get_serial_line(b)?d+=chartabl2A7B.charAt(a[e]%chartabl2A7B.length):c<=e&&8>d.length&&(d+=scancods.charAt(encscans[a[e]%encscans.length]));return d}function dell_encode(a,b,c){a[b]=128;a=StringToIntArr(a);a=fill_zero(a,6,16);a[14]=b<<3;return IntArrToByteArr(choseEncode(a,c))}
|
||||
function blockEncode(a,b,c,d,e,f,h){function k(a,c,b){c=c[b>>4][i&3];return SignedToUnsigned(a)/Math.pow(2,32-c)|SignedToUnsigned(a)<<c|0}function l(c,d,e){return n+b(c,m,p,q,MD5magic[e]+a[d])|0}var g=[1732584193,-271733879,-1732584194,271733878],n=g[0]|0,m=g[1]|0,p=g[2]|0,q=g[3]|0,s=[[7,12,17,22],[5,9,14,20],[4,11,16,23],[6,10,15,21]],r;for(j=0;j<=20*h;j++){h&&(n|=151,m^=8,p|=1616929121-j,q^=1347424272+j);for(i=0;64>i;i++){switch(i>>4){case 0:r=l(c,i&15,i);break;case 1:r=l(d,5*i+1&15,i);break;case 2:r=
|
||||
l(e,3*i+5&15,i);break;case 3:r=l(f,7*i&15,i)}n=q;q=p;p=m;m=k(r,s,i)+m|0}g[0]+=n;g[1]+=m;g[2]+=p;g[3]+=q}return CorectBits([g[0],g[1],g[2],g[3]])}function dell_get_serial_line(a){return"object"==typeof a?ArrayToString(a.slice(a.length-4,a.length)).toUpperCase():a.substr(a.length-4,a.length).toUpperCase()}function dell_get_serial_main(a){return a.substr(0,a.length-4)}
|
||||
function choseEncode(a,b){function c(a,c,b){return(b^c)&a^b}function d(a,c,b){return(a^c)&b^c}function e(a,c,b){return c^a^b}function f(a,c,b){return(a|~b)^c}function h(a,c,b,d,e){return a(c,b,d)+e|0}function k(a,c,b,d,e){return a(c,b,d)+-e|0}function l(a,c,b){return(~b^c)&a^~b}function g(a,c,b){return~c^a^b}function n(a,c,b){return(~a|~b)^c}var m=dell_get_serial_line(b);return"D35B"==m?blockEncode(a,h,c,d,e,f,0):"1D3B"==m?blockEncode(a,k,l,d,g,n,1):blockEncode(a,k,l,d,g,n,0)}
|
||||
function answerToString(a,b){for(var c=a[0]%9,d="",e=0;16>e;e++)"2A7B"==dell_get_serial_line(b)?d+=chartabl2A7B.charAt(a[e]%chartabl2A7B.length):"1D3B"==dell_get_serial_line(b)?d+=chartabl1D3B.charAt(a[e]%chartabl1D3B.length):c<=e&&8>d.length&&(d+=scancods.charAt(encscans[a[e]%encscans.length]));return d}function dell_encode(a,b,c){a[b]=128;a=StringToIntArr(a);a=fill_zero(a,6,16);a[14]=b<<3;return IntArrToByteArr(choseEncode(a,c))}
|
||||
function getBiosPwdForDellTag(a){"A95B"==dell_get_serial_line(a)&&(a=dell_get_serial_main(a)+"595B");var b=StringToArray(a),b=b.concat(calc_suffix_tag(b));return answerToString(dell_encode(b,23,a),a)}function getBiosPwdForDellHddNew(a){if("A95B"==dell_get_serial_line(a)){var b=chr(0)+chr(0)+chr(0);a=a.slice(3,a.length-4)+b+"595B"}b=StringToArray(a);b=b.concat(calc_suffix_hdd_new(b));return answerToString(dell_encode(b,23,a),a)}
|
||||
function getBiosPwdForDellHddOld(a){a=calc_suffix_hdd_old(a);for(var b="",c=0;c<a.length;c++)b+=scancods.charAt(a[c]);return b}function getBiosPwdForSony(a){if(7!=a.length)return"";for(var b=0,c="",d=0;d<a.length;d++)c+="0987654321876543210976543210982109876543109876543221098765436543210987".charAt(parseInt(a.charAt(d),10)+10*b),b++;return c}
|
||||
function getBiosPwdForSamsung(a){function b(a,c,b){for(var d=[],e=0;e<a.length;e++)d.push(a[e]<<b[7*c+e]&255|a[e]>>8-b[7*c+e]);return d}for(var c=[7,1,5,3,0,6,2,5,2,3,0,6,1,7,6,1,5,2,7,1,0,3,7,6,1,0,5,2,1,5,7,3,2,0,6],d=[1,6,2,5,7,3,0,7,1,6,2,5,0,3,0,6,5,1,1,7,2,5,2,3,7,6,2,1,3,7,6,5,0,1,7],e=[],f=1;f<div(a.length,2);f++)e.push(parseInt(a.charAt(2*f)+a.charAt(2*f+1),16));f=parseInt(a.substring(0,2),16)%5;a=keyboardEncToAscii(b(e,f,c));""==a&&(a=keyboardEncToAscii(b(e,f,d)));c=keyToAscii(b(e,f,c));
|
||||
d=keyToAscii(b(e,f,d));return filterFalse([a,c,d])}function getBiosPwdForGenericPhoenix(a){return bruteForce(parseInt(a,10))}function getBiosPwdForHPCompaqPhoenix(a){return bruteForce(parseInt(a,10),17232)}function getBiosPwdForFsiPhoenix(a){return bruteForce(parseInt(a,10),65,!0,!1,3,7)}function getBiosPwdForFsiLPhoenix(a){return bruteForce(parseInt(a,10)+1,ord("L"),!0,!1,3,7)}function getBiosPwdForFsiPPhoenix(a){return bruteForce(parseInt(a,10)+1,ord("P"),!0,!1,3,7)}
|
||||
function getBiosPwdForFsiSPhoenix(a){return bruteForce(parseInt(a,10)+1,ord("S"),!0,!1,3,7)}function getBiosPwdForFsiXPhoenix(a){return bruteForce(parseInt(a,10)+1,ord("X"),!0,!1,3,7)}function getBiosPwdForInsyde(a){for(var b="",c=0,d=0,e=0;8>e;e++)d=c=ord("Iou|hj&Z".charAt(e))^ord(a.charAt(e)),d*=1717986919,d=Math.floor(d/Math.pow(2,32)),d=d>>2|d&192,d&2147483648&&d++,d*=10,b+=(c-d).toString();return b}
|
||||
function getBiosPwdForHpmini(a){var b={1:"3",0:"1",3:"F",2:"7",5:"Q",4:"V",7:"X",6:"G",9:"O",8:"U",a:"C",c:"E",b:"P",e:"M",d:"T",g:"H",f:"8",i:"Y",h:"Z",k:"S",j:"W",m:"4",l:"K",o:"J",n:"9",q:"5",p:"2",s:"N",r:"B",u:"L",t:"A",w:"D",v:"6",y:"I",x:"4",z:"0"},c={1:"3",0:"1",3:"F",2:"7",5:"Q",4:"V",7:"X",6:"G",9:"O",8:"U",a:"C",c:"E",b:"P",e:"M",d:"T",g:"H",f:"8",i:"Y",h:"Z",k:"S",j:"W",m:"4",l:"K",o:"J",n:"9",q:"5",p:"2",s:"N",r:"B",u:"L",t:"A",w:"D",v:"6",y:"I",x:"R",z:"0"},d="",e="";a=a.toLowerCase();
|
||||
function getBiosPwdForHpmini(a){var b={1:"3","0":"1",3:"F",2:"7",5:"Q",4:"V",7:"X",6:"G",9:"O",8:"U",a:"C",c:"E",b:"P",e:"M",d:"T",g:"H",f:"8",i:"Y",h:"Z",k:"S",j:"W",m:"4",l:"K",o:"J",n:"9",q:"5",p:"2",s:"N",r:"B",u:"L",t:"A",w:"D",v:"6",y:"I",x:"4",z:"0"},c={1:"3","0":"1",3:"F",2:"7",5:"Q",4:"V",7:"X",6:"G",9:"O",8:"U",a:"C",c:"E",b:"P",e:"M",d:"T",g:"H",f:"8",i:"Y",h:"Z",k:"S",j:"W",m:"4",l:"K",o:"J",n:"9",q:"5",p:"2",s:"N",r:"B",u:"L",t:"A",w:"D",v:"6",y:"I",x:"R",z:"0"},d="",e="";a=a.toLowerCase();
|
||||
for(var f=0;f<a.length;f++)d+=b[a.charAt(f)],e+=c[a.charAt(f)];return d==e?d.toLowerCase():[d.toLowerCase(),e.toLowerCase()]}
|
||||
function getBiosPwdForFsi20dec_old(a){function b(a,b,e){var f=copy_array(a);f[b[0]]=(a[e[0]]>>4|a[e[3]]<<4)&255;f[b[1]]=a[e[0]]&15|a[e[3]]&240;f[b[2]]=a[e[1]]>>4|a[e[2]]<<4&255;f[b[3]]=a[e[1]]&15|a[e[2]]&240;return f}return function(a){for(var d=0;d<a.length;d++)a[d]^=ord(":3-v@e4i".charAt(d));a.swap(2,6);a.swap(3,7);a=b(a,[0,1,2,3],[0,1,2,3]);a=b(a,[4,5,6,7],[6,7,4,5]);a[0]=a[0]<<3&255|a[0]>>5;a[1]=a[1]<<5&255|a[1]>>3;a[2]=a[2]<<7&255|a[2]>>1;a[3]=a[3]<<4&255|a[3]>>4;a[5]=a[5]<<6&255|a[5]>>2;a[6]=
|
||||
a[6]<<1&255|a[6]>>7;a[7]=a[7]<<2&255|a[7]>>6;for(var d=[],e=0;e<a.length;e++)d[e]=a[e]%36;a=d;d="";for(e=0;e<a.length;e++)d+=9<a[e]?chr(ord("a")+a[e]-10):chr(ord("0")+a[e]);return d}(function(a){a=[parseInt(a.slice(0,5),10),parseInt(a.slice(5,10),10),parseInt(a.slice(10,15),10),parseInt(a.slice(15,20),10)];for(var b=[],e=0;e<a.length;e++)b.push(a[e]%256),b.push(Math.floor(a[e]/256));return b}(a))}
|
||||
function getBiosPwdForFSI20dec_new(a){var b="4798156302 7201593846 5412367098 6587249310 9137605284 3974018625 8052974163".split(" ");a=a.charAt(0)+a.charAt(2)+a.charAt(5)+a.charAt(11)+a.charAt(13)+a.charAt(15)+a.charAt(16);for(var c="",d=0,e=0;e<a.length;e++)c+=b[d].charAt(parseInt(a.charAt(e),10)),d++;return c}function getBiosPwdForFSI20dec(a){return CreateHashTable([FSI_20_DEC_NEW,FSI_20_DEC_OLD],[getBiosPwdForFSI20dec_new(a),getBiosPwdForFsi20dec_old(a)])}
|
||||
function getBiosPwdForFSIhex(a){function b(a){var b=ord("0");return chr(b+(a>>12)%16%10)+chr(b+(a>>8)%16%10)+chr(b+(a>>4)%16%10)+chr(b+(a>>0)%16%10)}function c(a,b){for(var c=0,g=0,h=0;h<a.length;h++)g=b[(ord(a.charAt(h))^c>>8)%256],c=(c<<8^g)&65535;return c}20==a.length&&(a=a.slice(12,20));return function(a){for(var e=[],f=0,g=0;256>g;g++){for(var f=g<<8,h=0;8>h;h++)f<<=1,f&65536&&(f^=4129);e.push(f&65535)}return b(c(a.slice(0,4),e))+b(c(a.slice(4,8),e))}(a)}
|
||||
function getBiosPwdForFSIhex(a){function b(a){var b=ord("0");return chr(b+(a>>12)%16%10)+chr(b+(a>>8)%16%10)+chr(b+(a>>4)%16%10)+chr(b+(a>>0)%16%10)}function c(a,b){for(var c=0,h=0,k=0;k<a.length;k++)h=b[(ord(a.charAt(k))^c>>8)%256],c=(c<<8^h)&65535;return c}20==a.length&&(a=a.slice(12,20));return function(a){for(var e=[],f=0,h=0;256>h;h++){for(var f=h<<8,k=0;8>k;k++)f<<=1,f&65536&&(f^=4129);e.push(f&65535)}return b(c(a.slice(0,4),e))+b(c(a.slice(4,8),e))}(a)}
|
||||
function has_element(a,b){for(var c=0;c<b.length;c++)if(b[c]==a)return!0;return!1}function numberChecker(a,b,c,d){c="undefined"==typeof c?!0:c;d="undefined"==typeof c?!1:d;var e=!1,f=a.length;if(c)e=isDecNumber(a);else if(d)e=isHexNumber(a);else return!1;return!0==e&&has_element(f,b)?!0:!1}function dellChecker(a,b,c){c="undefine"==typeof c?!1:c;if(has_element(a.length,b)){if(!c)return!0;for(b=0;b<c.length;b++)if(dell_get_serial_line(a)==c[b])return!0}return!1}
|
||||
function autoCheckAndRun(a,b,c,d,e){return numberChecker(a,c,d,e)?b(a):!1}function autoCheckAndRunWithKey(a,b,c,d,e,f){a=autoCheckAndRun(a,b,d,e,f);return!1!=a?(b={},b[c]=a,b):!1}function dell_serial_normalize(a){return dell_get_serial_main(a)+dell_get_serial_line(a)}function dellCheckAndRunWithKey(a,b,c,d,e){return dellChecker(a,d,e)?(d={},d[c]=b(dell_serial_normalize(a)),d):!1}function autoGetBiosPwdForSony(a){return autoCheckAndRunWithKey(a,getBiosPwdForSony,SONY,[7],!0,!1)}
|
||||
function autoGetBiosPwdForSamsung(a){return autoCheckAndRunWithKey(a,getBiosPwdForSamsung,SAMSUNG,[12,16,18],!1,!0)}function autoGetBiosPwdForAllPhoenix(a){return numberChecker(a,[5],!0)?CreateHashTable([PHOENIX,HP_COMPAQ,FSI_PHOENIX,FSI_L_PHOENIX,FSI_P_PHOENIX,FSI_S_PHOENIX,FSI_X_PHOENIX],[getBiosPwdForGenericPhoenix(a),getBiosPwdForHPCompaqPhoenix(a),getBiosPwdForFsiPhoenix(a),getBiosPwdForFsiLPhoenix(a),getBiosPwdForFsiPPhoenix(a),getBiosPwdForFsiSPhoenix(a),getBiosPwdForFsiXPhoenix(a)]):!1}
|
||||
|
||||
@@ -29,8 +29,8 @@
|
||||
<div class="container">
|
||||
<div class="hero-unit">
|
||||
<h1></h1>
|
||||
<p>BIOS Password Removal for Laptops</p>
|
||||
Quick and easy way to bypass BIOS passwords on laptops. More details <a href="http://dogber1.blogspot.com/2009/05/table-of-reverse-engineered-bios.html">here</a>.
|
||||
<p>BIOS Password Recovery for Laptops</p>
|
||||
Quick and easy way to recover BIOS passwords on laptops. More details <a href="http://dogber1.blogspot.com/2009/05/table-of-reverse-engineered-bios.html">here</a>.
|
||||
</div>
|
||||
<div class="row" >
|
||||
<div id="control_id" >
|
||||
@@ -42,11 +42,27 @@
|
||||
</form>
|
||||
</div>
|
||||
<div id="result_id">
|
||||
<span class="label important" style="display: none;" id="try_this">Try this:</span><br/>
|
||||
<div id="answer">
|
||||
</div>
|
||||
<h3 style="display: none;" id="try_this"><br/>Try one of the following codes:</h2>
|
||||
<div id="answer"></div>
|
||||
<span class="label notice" style="display: none;" id="dell_note">* for some Dell codes press Ctrl-Enter, not Enter, when entring code into the BIOS</span><br/><br/>
|
||||
</div>
|
||||
</div>
|
||||
<table><tbody>
|
||||
<tr style="background: #ddd;"><th>Vendor</th><th>Type</th><th>Hash Code/Serial example</th></tr>
|
||||
<tr><td class="s3" style="font-weight: bold;">Compaq</td><td class="s4">5 decimal digits</td><td class="s5" style="font-family: arial;">12345</td></tr>
|
||||
<tr><td class="s3" style="font-weight: bold;">Dell</td><td class="s4">serial number</td><td class="s5" style="font-family: arial;">1234567-595B<br>1234567-D35B<br>1234567-2A7B<br>1234567-1D3B</td></tr>
|
||||
<tr><td class="s7" style="font-weight: bold;">Fujitsu-Siemens</td><td class="s8">5 decimal digits</td><td class="s9" style="font-family: arial;">12345</td></tr>
|
||||
<tr><td class="s7" style="font-weight: bold;">Fujitsu-Siemens</td><td class="s8">8 hexadecimal digits</td><td class="s9" style="font-family: arial;">DEADBEEF</td></tr>
|
||||
<tr><td class="s7" style="font-weight: bold;">Fujitsu-Siemens</td><td class="s8">5x4 hexadecimal digits</td><td class="s9" style="font-family: arial;">AAAA-BBBB-CCCC-DEAD-BEEF</td></tr>
|
||||
<tr><td class="s7" style="font-weight: bold;">Fujitsu-Siemens</td><td class="s8">5x4 decimal digits</td><td class="s9" style="font-family: arial;">1234-4321-1234-4321-1234</td></tr>
|
||||
<tr><td class="s7" style="font-weight: bold;">Hewlett-Packard</td><td class="s8">5 decimal digits</td><td class="s9" style="font-family: arial;">12345</td></tr>
|
||||
<tr><td class="s7" style="font-weight: bold;">Hewlett-Packard/Compaq Netbooks</td><td class="s8">10 characters</td><td class="s9" style="font-family: arial;">CNU1234ABC</td></tr>
|
||||
<tr><td class="s11" style="font-weight: bold;">Insyde H20 (generic)</td><td class="s8">8 decimal digits</td><td class="s9" style="font-family: arial;">03133610</td></tr>
|
||||
<tr><td class="s11" style="font-weight: bold;">Phoenix (generic)</td><td class="s8">5 decimal digits</td><td class="s9" style="font-family: arial;">12345</td></tr>
|
||||
<tr><td class="s7" style="font-weight: bold;">Sony</td><td class="s8">7 digit serial number</td><td class="s9" style="font-family: arial;">1234567</td></tr>
|
||||
<tr><td class="s7" style="font-weight: bold;">Samsung</td><td class="s8">12 hexadecimal digits</td><td class="s9" style="font-family: arial;">07088120410C0000</td></tr>
|
||||
</tbody></table>
|
||||
|
||||
<footer style="text-align: center;">
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
@@ -13,9 +13,9 @@ var sDescription = CreateHashTable([[SONY,"Old Sony"],
|
||||
[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"]
|
||||
[DELL_TAG,"Dell from serial number"],
|
||||
[DELL_HDD_OLD,"Dell from hdd serial number (old)"],
|
||||
[DELL_HDD_NEW,"Dell from hdd serial number (new)"]
|
||||
]);
|
||||
|
||||
|
||||
@@ -80,6 +80,7 @@ function calcPass(){
|
||||
var th = document.getElementById('try_this');
|
||||
th.style.display = (k>0) ? "" :"none";
|
||||
var an = document.getElementById("answer");
|
||||
var th2 = document.getElementById('dell_note');
|
||||
th2.style.display = (k>0) ? "" :"none";
|
||||
an.innerHTML = str;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,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>"}
|
||||
[FSI_20_DEC_OLD,"Fujitsu-Siemens old"],[FSI_HEX,"Fujitsu-Siemens"],[DELL_TAG,"Dell from serial number"],[DELL_HDD_OLD,"Dell from hdd serial number (old)"],[DELL_HDD_NEW,"Dell from 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};
|
||||
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";var c=document.getElementById("answer");document.getElementById("dell_note").style.display=0<b?"":"none";c.innerHTML=a};
|
||||
Reference in new issue
Block a user