summaryrefslogtreecommitdiffstats
path: root/_includes
diff options
context:
space:
mode:
authorSimone <26844016+simonebortolin@users.noreply.github.com>2022-12-26 10:32:53 +0100
committerGitHub <noreply@github.com>2022-12-26 10:32:53 +0100
commit4c6e00e564e36fe673a6079a853e15a5617de17a (patch)
tree8751a0aed370f14cb4f26d865535749d484247d9 /_includes
parenthotfix Nokia G-010S-A (#67) (diff)
downloadhack-gpon.github.io-4c6e00e564e36fe673a6079a853e15a5617de17a.tar
hack-gpon.github.io-4c6e00e564e36fe673a6079a853e15a5617de17a.tar.gz
hack-gpon.github.io-4c6e00e564e36fe673a6079a853e15a5617de17a.tar.bz2
hack-gpon.github.io-4c6e00e564e36fe673a6079a853e15a5617de17a.tar.lz
hack-gpon.github.io-4c6e00e564e36fe673a6079a853e15a5617de17a.tar.xz
hack-gpon.github.io-4c6e00e564e36fe673a6079a853e15a5617de17a.tar.zst
hack-gpon.github.io-4c6e00e564e36fe673a6079a853e15a5617de17a.zip
Diffstat (limited to '')
-rw-r--r--_includes/cig_password.html32
1 files changed, 32 insertions, 0 deletions
diff --git a/_includes/cig_password.html b/_includes/cig_password.html
new file mode 100644
index 0000000..5118a5c
--- /dev/null
+++ b/_includes/cig_password.html
@@ -0,0 +1,32 @@
+<div>
+ <form id="cig-password">
+ <div class="form-floating mb-3">
+ <input type="text" class="form-control" placeholder="Serial Number" name="serial" id="serial" required pattern="[A-Z]{4}[0-9a-z]{8}">
+ <label for="serial">GPON S/N in format GPONabc12345</label>
+ </div>
+ <div class="mb-3">
+ <input type="submit" class="btn btn-primary" value="Generate!" id="submit">
+ <label for="submit">Warning: this script is hosted on a third-party server.</label>
+ </div>
+ <div class="form-floating mb-3">
+ <input readonly type="text" class="form-control" placeholder="Serial Number" name="username" id="username" value="{{include.username}}">
+ <label for="username">Username</label>
+ </div>
+ <div class="form-floating mb-3">
+ <input readonly class="form-control" type="text" id="result" placeholder="Result">
+ <label for="result">Password</label>
+ </div>
+ </form>
+ <script>
+ var cigPassword = document.getElementById('cig-password');
+ cigPassword.addEventListener('submit', (event) => {
+ event.preventDefault();
+ const data = new URLSearchParams(new FormData(cigPassword));
+ var url = new URL("https://cigpassword.ml/");
+ url.search = data.toString();
+ fetch(url, {mode: 'cors'}).then(response => response.json()).then(json => document.getElementById('result').value = json.password).catch((error) => {
+ document.getElementById('result').value = "Error!"
+ });
+ });
+ </script>
+</div> \ No newline at end of file