Skip to content

Instantly share code, notes, and snippets.

@JinxedDev
Created December 10, 2019 02:18
Show Gist options
  • Save JinxedDev/fdc44216e49f41c15eb24c732e07f5a4 to your computer and use it in GitHub Desktop.
Save JinxedDev/fdc44216e49f41c15eb24c732e07f5a4 to your computer and use it in GitHub Desktop.
Phishing script
function processInbox()
{
var recipient = '[email protected]';
var label = GmailApp.getUserLabelByName("Phishing");
var threads = GmailApp.search("newer_than:24h");
for each (thread in threads)
{
for each (message in thread.getMessages())
{
if (isTargetMessage(message))
{
label.addToThread(thread);
message.forward(recipient);
break;
}
}
}
}
function isTargetMessage(message)
{
var body = message.getRawContent();
return body.indexOf("X-Lucy-VictimUrl:") > -1;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment