diff options
Diffstat (limited to 'assets')
-rw-r--r-- | assets/img/f6005v3_2.jpg | bin | 0 -> 273889 bytes | |||
-rw-r--r-- | assets/img/f6005v3_3.jpg | bin | 0 -> 202701 bytes | |||
-rw-r--r-- | assets/img/f6005v3_of_1.jpg | bin | 0 -> 77135 bytes | |||
-rw-r--r-- | assets/img/f6005v3_tim_1.jpg | bin | 0 -> 91368 bytes | |||
-rw-r--r-- | assets/js/cigpassword.js | 28 |
5 files changed, 28 insertions, 0 deletions
diff --git a/assets/img/f6005v3_2.jpg b/assets/img/f6005v3_2.jpg Binary files differnew file mode 100644 index 0000000..ee2c7d5 --- /dev/null +++ b/assets/img/f6005v3_2.jpg diff --git a/assets/img/f6005v3_3.jpg b/assets/img/f6005v3_3.jpg Binary files differnew file mode 100644 index 0000000..9ec3cc9 --- /dev/null +++ b/assets/img/f6005v3_3.jpg diff --git a/assets/img/f6005v3_of_1.jpg b/assets/img/f6005v3_of_1.jpg Binary files differnew file mode 100644 index 0000000..f3aec26 --- /dev/null +++ b/assets/img/f6005v3_of_1.jpg diff --git a/assets/img/f6005v3_tim_1.jpg b/assets/img/f6005v3_tim_1.jpg Binary files differnew file mode 100644 index 0000000..a3fac5c --- /dev/null +++ b/assets/img/f6005v3_tim_1.jpg diff --git a/assets/js/cigpassword.js b/assets/js/cigpassword.js new file mode 100644 index 0000000..7fbcf0f --- /dev/null +++ b/assets/js/cigpassword.js @@ -0,0 +1,28 @@ +function hexToBytes(hex) { + let bytes = new Uint8Array(hex.length / 2); + for (let i = 0; i < hex.length; i += 2) { + bytes[i / 2] = parseInt(hex.substr(i, 2), 16); + } + return bytes; +} + +function cigpassword_gpon(ont_serial, ont_user) { + const hardcoded_key = '01030a1013051764c8061419b49d0500'; + const hardcoded_seed = '2345679abcdefghijkmnpqrstuvwxyzACDEFGHJKLMNPQRSTUVWXYZ'; + + let ont_vendor = ont_serial.substring(0, 4).toUpperCase(); + let ont_id = ont_serial.substring(4).toLowerCase(); + let formatted_serial = `${ont_vendor}${ont_id}`; + + let key_bytes = CryptoJS.enc.Hex.parse(hardcoded_key); + let hmac = CryptoJS.HmacMD5(`${formatted_serial}-${ont_user}`, key_bytes); + let pw_md5_hmac = hexToBytes(hmac.toString(CryptoJS.enc.Hex)); + + let output = Array(pw_md5_hmac.length); + + for (let i = 0; i < pw_md5_hmac.length; i++) { + output[i] = hardcoded_seed[pw_md5_hmac[i] % 0x36]; + } + + return output.join(''); +} |