mirror of
https://github.com/bacher09/pwgen-for-bios.git
synced 2024-09-19 07:18:53 -04:00
Add support for dell tag BF97
This commit is contained in:
parent
bb946f15e3
commit
0731639f02
6 changed files with 62 additions and 26 deletions
|
@ -14,7 +14,7 @@ Latest released version available [here][bios-pw] and latest testing version (*s
|
|||
|
||||
* Asus — current BIOS date. For example: ``01-02-2013``
|
||||
* Compaq — 5 decimal digits (*e.g*. ``12345``)
|
||||
* Dell — supports such series: ``595B``, ``D35B``, ``2A7B``, ``A95B``, ``1D3B``, ``6FF1``, ``1F66`` and ``1F5A``. *e.g*: ``1234567-2A7B`` or ``1234567890A-D35B`` for HDD.
|
||||
* Dell — supports such series: ``595B``, ``D35B``, ``2A7B``, ``A95B``, ``1D3B``, ``6FF1``, ``1F66``, ``1F5A`` and ``BF97``. *e.g*: ``1234567-2A7B`` or ``1234567890A-D35B`` for HDD.
|
||||
* Fujitsu-Siemens — 5 decimal digits, 8 hexadecimal digits, 5x4 hexadecimal digits, 5x4 decimal digits
|
||||
* Hewlett-Packard — 5 decimal digits, 10 characters
|
||||
* Insyde H20 (Acer, HP) — 8 decimal digits
|
||||
|
|
|
@ -49,7 +49,7 @@
|
|||
<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: monospace;">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: monospace;">1234567-595B<br>1234567-D35B<br>1234567-2A7B<br>1234567-1D3B<br>1234567-1F66<br>1234567-6FF1<br>1234567-1F5A</td></tr>
|
||||
<tr><td class="s3" style="font-weight: bold;">Dell</td><td class="s4">serial number</td><td class="s5" style="font-family: monospace;">1234567-595B<br>1234567-D35B<br>1234567-2A7B<br>1234567-1D3B<br>1234567-1F66<br>1234567-6FF1<br>1234567-1F5A<br>1234567-BF97</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: monospace;">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: monospace;">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: monospace;">AAAA-BBBB-CCCC-DEAD-BEEF</td></tr>
|
||||
|
|
|
@ -62,6 +62,16 @@ describe("Test calculateSuffix", () => {
|
|||
expect(suffix).toEqual([0x74, 0x6e, 0x76, 0x75, 0x69, 0x6f, 0x74, 0x68]);
|
||||
});
|
||||
|
||||
it("Check tag suffix for: 1234567-BF97", () => {
|
||||
let suffix = checkSuffix("1234567", DellTag.TagBF97, SuffixType.ServiceTag);
|
||||
expect(suffix).toEqual([77, 78, 120, 56, 54, 70, 114, 56]);
|
||||
});
|
||||
|
||||
it("Check tag suffix for: ABCDEFG-BF97", () => {
|
||||
let suffix = checkSuffix("ABCDEFG", DellTag.TagBF97, SuffixType.ServiceTag);
|
||||
expect(suffix).toEqual([51, 71, 109, 56, 90, 114, 51, 91]);
|
||||
});
|
||||
|
||||
// HDD
|
||||
it("Check hdd suffix for: 12345678901-595B", () => {
|
||||
let suffix = checkSuffix("12345678901", DellTag.Tag595B, SuffixType.HDD);
|
||||
|
@ -102,6 +112,11 @@ describe("Test calculateSuffix", () => {
|
|||
let suffix = checkSuffix("12345678901", DellTag.Tag1F5A, SuffixType.HDD);
|
||||
expect(suffix).toEqual([48, 51, 113, 98, 107, 48, 99, 115]);
|
||||
});
|
||||
|
||||
it("Check hdd suffix for: 12345678901-BF97", () => {
|
||||
let suffix = checkSuffix("12345678901", DellTag.TagBF97, SuffixType.HDD);
|
||||
expect(suffix).toEqual([48, 100, 54, 107, 121, 48, 81, 54]);
|
||||
});
|
||||
});
|
||||
|
||||
describe("Test keygenDell", () => {
|
||||
|
@ -176,6 +191,26 @@ describe("Test keygenDell", () => {
|
|||
.toEqual("x2zL5n7jj2Gl2TIh");
|
||||
});
|
||||
|
||||
it("Dell password for: 1234567-BF97", () => {
|
||||
expect(keygenDell("1234567", DellTag.TagBF97, SuffixType.ServiceTag))
|
||||
.toEqual("2r09GZhU[r0kW2zr");
|
||||
});
|
||||
|
||||
it("Dell password for: OPENSRC-BF97", () => {
|
||||
expect(keygenDell("OPENSRC", DellTag.TagBF97, SuffixType.ServiceTag))
|
||||
.toEqual("Dp29XkbyMrkBrp6Z");
|
||||
});
|
||||
|
||||
it("Dell password for: ABCDEFG-BF97", () => {
|
||||
expect(keygenDell("ABCDEFG", DellTag.TagBF97, SuffixType.ServiceTag))
|
||||
.toEqual("kr9Z1cmPpahGzsQ[");
|
||||
});
|
||||
|
||||
it("Dell password for: DELLSUX-BF97", () => {
|
||||
expect(keygenDell("DELLSUX", DellTag.TagBF97, SuffixType.ServiceTag))
|
||||
.toEqual("rrNM2LrbD8nGsd2P");
|
||||
});
|
||||
|
||||
// HDD
|
||||
it("Dell HDD password for: 1234567890A-595B", () => {
|
||||
expect(keygenDell("1234567890A", DellTag.Tag595B, SuffixType.HDD))
|
||||
|
@ -213,6 +248,18 @@ describe("Test keygenDell", () => {
|
|||
expect(keygenDell("12345678901", DellTag.Tag1F5A, SuffixType.HDD))
|
||||
.toEqual("QwO5Dki1zeR1n1t2");
|
||||
});
|
||||
it("Dell HDD password for: 12345678901-BF97", () => {
|
||||
expect(keygenDell("12345678901", DellTag.TagBF97, SuffixType.HDD))
|
||||
.toEqual("nDrmUU6U5DI9ZLMI");
|
||||
});
|
||||
it("Dell HDD password for: 1234567890A-BF97", () => {
|
||||
expect(keygenDell("1234567890A", DellTag.TagBF97, SuffixType.HDD))
|
||||
.toEqual("pRrky3r9ryEPNNJz");
|
||||
});
|
||||
it("Dell HDD password for: 234567890AB-BF97", () => {
|
||||
expect(keygenDell("234567890AB", DellTag.TagBF97, SuffixType.HDD))
|
||||
.toEqual("h2RDrReN37I1NLmr");
|
||||
});
|
||||
});
|
||||
|
||||
describe("Test Dell BIOS", () => {
|
||||
|
|
|
@ -188,11 +188,6 @@ class TagD35BEncoder extends Tag595BEncoder {
|
|||
}
|
||||
|
||||
class Tag1D3BEncoder extends Tag595BEncoder {
|
||||
protected f1 = encF1N;
|
||||
protected f2 = encF2N;
|
||||
protected f3 = encF3;
|
||||
protected f4 = encF4N;
|
||||
protected f5 = encF5N;
|
||||
|
||||
public makeEncode(): void {
|
||||
for (let j = 0; j < 21; j++) {
|
||||
|
@ -206,11 +201,6 @@ class Tag1D3BEncoder extends Tag595BEncoder {
|
|||
}
|
||||
|
||||
class Tag1F66Encoder extends Tag595BEncoder {
|
||||
protected f1 = encF1N;
|
||||
protected f2 = encF2N;
|
||||
protected f3 = encF3;
|
||||
protected f4 = encF4N;
|
||||
protected f5 = encF5N;
|
||||
protected md5table = md5magic2;
|
||||
|
||||
public makeEncode(): void {
|
||||
|
@ -281,17 +271,14 @@ class Tag1F66Encoder extends Tag595BEncoder {
|
|||
}
|
||||
|
||||
class Tag6FF1Encoder extends Tag595BEncoder {
|
||||
protected f1 = encF1N;
|
||||
protected f2 = encF2N;
|
||||
protected f3 = encF3;
|
||||
protected f4 = encF4N;
|
||||
protected f5 = encF5N;
|
||||
protected md5table = md5magic2;
|
||||
|
||||
protected counter1: number = 23;
|
||||
|
||||
public makeEncode(): void {
|
||||
let t: number = 0;
|
||||
|
||||
for (let j = 0; j < 23; j++) {
|
||||
for (let j = 0; j < this.counter1; j++) {
|
||||
this.A |= 0xA08097;
|
||||
this.B ^= 0xA010908;
|
||||
this.C |= 0x60606161 - j;
|
||||
|
@ -358,11 +345,6 @@ class Tag6FF1Encoder extends Tag595BEncoder {
|
|||
|
||||
class Tag1F5AEncoder extends Tag595BEncoder {
|
||||
protected md5table = md5magic2;
|
||||
protected f1 = encF1N;
|
||||
protected f2 = encF2N;
|
||||
protected f3 = encF3;
|
||||
protected f4 = encF4N;
|
||||
protected f5 = encF5N;
|
||||
|
||||
protected incrementData() {
|
||||
this.encData[0] += this.B;
|
||||
|
@ -410,6 +392,10 @@ class Tag1F5AEncoder extends Tag595BEncoder {
|
|||
}
|
||||
}
|
||||
|
||||
class TagBF97Encoder extends Tag6FF1Encoder {
|
||||
protected counter1 = 31;
|
||||
}
|
||||
|
||||
const encoders: {readonly [P in DellTag]: Encoder} = {
|
||||
"595B": Tag595BEncoder,
|
||||
"2A7B": Tag595BEncoder, // same as 595B
|
||||
|
@ -418,7 +404,8 @@ const encoders: {readonly [P in DellTag]: Encoder} = {
|
|||
"D35B": TagD35BEncoder,
|
||||
"1F66": Tag1F66Encoder,
|
||||
"6FF1": Tag6FF1Encoder,
|
||||
"1F5A": Tag1F5AEncoder
|
||||
"1F5A": Tag1F5AEncoder,
|
||||
"BF97": TagBF97Encoder
|
||||
};
|
||||
|
||||
export function blockEncode(encBlock: number[], tag: DellTag): number[] {
|
||||
|
|
|
@ -20,7 +20,8 @@ const extraCharacters: {readonly [P in DellTag]?: string} = {
|
|||
"1F5A": asciiPrintable,
|
||||
"1D3B": "0BfIUG1kuPvc8A9Nl5DLZYSno7Ka6HMgqsJWm65yCQR94b21OTp7VFX2z0jihE33d4xtrew0",
|
||||
"1F66": "0ewr3d4xtUG1ku0BfIp7VFb21OTSno7KDLZYqsJWa6HMgCQR94m65y9Nl5Pvc8AjihE3X2z0",
|
||||
"6FF1": "08rptBxfbGVMz38IiSoeb360MKcLf4QtBCbWVzmH5wmZUcRR5DZG2xNCEv1nFtzsZB2bw1X0"
|
||||
"6FF1": "08rptBxfbGVMz38IiSoeb360MKcLf4QtBCbWVzmH5wmZUcRR5DZG2xNCEv1nFtzsZB2bw1X0",
|
||||
"BF97": "0Q2drGk99rkQFMxN[Z5y3DGr16h638myIL2rzz2pzcU7JWLJ1EGnqRN4seZPRM2aBXIjbkGZ"
|
||||
};
|
||||
|
||||
/*
|
||||
|
|
|
@ -7,7 +7,8 @@ export enum DellTag {
|
|||
Tag1D3B = "1D3B",
|
||||
Tag6FF1 = "6FF1",
|
||||
Tag1F66 = "1F66",
|
||||
Tag1F5A = "1F5A"
|
||||
Tag1F5A = "1F5A",
|
||||
TagBF97 = "BF97"
|
||||
}
|
||||
|
||||
export const enum SuffixType {
|
||||
|
|
Loading…
Reference in a new issue