From e1571c60b741b7a2c87913f30f965e790be397de Mon Sep 17 00:00:00 2001 From: Firdaus Hakimi Date: Fri, 24 Nov 2023 16:11:12 +0800 Subject: [PATCH] Update --- esppng-system-bypass/index.css | 28 ++++++++++ esppng-system-bypass/index.html | 13 +++-- esppng-system-bypass/index.js | 98 ++------------------------------- 3 files changed, 41 insertions(+), 98 deletions(-) create mode 100644 esppng-system-bypass/index.css diff --git a/esppng-system-bypass/index.css b/esppng-system-bypass/index.css new file mode 100644 index 0000000..6f20242 --- /dev/null +++ b/esppng-system-bypass/index.css @@ -0,0 +1,28 @@ +html { + font-family: 'Quicksand', sans-serif; + background-color: rgb(245, 178, 178); +} + +.hello { + position: relative; + text-align: center; +} + +input { + border-radius: 7px; + border-color: green; +} + +button { + border: none; + border-radius: 13px; + background-color: rgb(193, 2, 138); + color: white; + padding: 5px; + transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); + transition-duration: 200ms; +} + +button:hover { + transform: scale(1.3); +} \ No newline at end of file diff --git a/esppng-system-bypass/index.html b/esppng-system-bypass/index.html index de1359b..b9f46c5 100644 --- a/esppng-system-bypass/index.html +++ b/esppng-system-bypass/index.html @@ -1,19 +1,24 @@ - + + + + + login page bypass by hakimi -
+ - +

+

- + diff --git a/esppng-system-bypass/index.js b/esppng-system-bypass/index.js index f001f9a..cf5d5ee 100644 --- a/esppng-system-bypass/index.js +++ b/esppng-system-bypass/index.js @@ -1,94 +1,4 @@ -const form = document.getElementById("credentials-form"); - -function redirect(txtNoMak, txtPwd) { - const menuUrl = 'https://mrsmkualaklawang.edu.my/epelajar/MenuUtama.asp'; - const formData = new FormData(); - formData.append('txtNoMak', txtNoMak); - formData.append('txtPwd', txtPwd); - - fetch(menuUrl, { - method: 'POST', - body: formData, - mode: "no-cors" - }).then(response => { - if (response.status !== 200) { - window.alert("error") - console.log(response); - } else { - window.location.href = menuUrl; - } - }) -} - -function unlockCORSAnywhere() { - // Create a URL for the CORS Anywhere unlock endpoint - const unlockURL = 'https://cors-anywhere.herokuapp.com/corsdemo'; - - // Send an OPTIONS request to the unlock endpoint - fetch(unlockURL, { - method: 'OPTIONS', - headers: { - 'Origin': 'https://Hakimi0804.github.io', // Replace with your website's origin - 'Access-Control-Request-Method': 'POST', // Replace with the HTTP method you intend to use - }, - }) - .then(response => { - if (response.ok) { - console.log('CORS Anywhere unlocked'); - // You can now proceed to make POST requests - } else { - console.error('Failed to unlock CORS Anywhere'); - } - }) - .catch(error => { - console.error('Error:', error); - }); -} - - -form.addEventListener('submit', function(event) { - event.preventDefault(); - - const txtNoMak = document.getElementById('txtNoMak').value; - const txtPwd = document.getElementById('txtPwd').value; - - console.log(`No. Maktab: ${txtNoMak}`); - console.log(`No. KP: ${txtPwd}`); - - const menuUrl = 'https://mrsmkualaklawang.edu.my/epelajar/MenuUtama.asp'; - const formData = new FormData(document.getElementById("credentials-form")); - - // fetch(menuUrl, { - // method: 'POST', - // body: formData, - // mode: "no-cors", - // }).then(response => { - // if (!response.ok) { - // window.alert("error"); - // console.debug(response); - // } else { - // window.location.href = menuUrl; - // } - // }) - - unlockCORSAnywhere(); - fetch('https://cors-anywhere.herokuapp.com/https://mrsmkualaklawang.edu.my/epelajar/MenuUtama.asp', { - method: 'POST', - body: formData, - headers: { - 'X-Requested-With': 'XMLHttpRequest' // Required header for CORS Anywhere - } - }) - .then(response => { - if (response.ok) { - console.log('Form data sent successfully'); - window.location.href = menuUrl; - } else { - window.alert("error"); - console.error('Failed to send form data'); - } - }) - .catch(error => { - console.error('Error:', error); - }); -}); +const button = document.getElementById("btn"); +button.addEventListener("click", () => { + document.getElementById("btn").innerText = "Loading..."; +}) \ No newline at end of file