Hey guys i need help to wirte a script in order to get a court case against a german lawyer girl who was illegaly interrogating me. They are using radio EEG on me to stop me making the program, its just a short php / javascript. the idea is use a search engine to find peoples email addresses based on sites found by given keyword, then send them a mail that is entered before,
index.php
<?php
session_start();
// get the action parameter
$action = null;
if (isset($_GET["action"])) {
$action = $_GET["action"];
}
// send email action
if ($action == "email") {
$result = array();
$emails = $_POST["emails"];
$websiteEmails = json_decode($emails);
foreach ($websiteEmails["emails"] as $index => $to) {
$config = $_SESSION["config"];
$from = $config["from"];
$subject = $config["subject"];
$message = $config["message"];
$header = "MIME-Version: 1.0\r\n";
$header .= "Content-type: text/plain; charset=iso-8859-1\r\n";
$header .= "From: $from\r\n";
$header .= "Reply-To: $from\r\n";
$header .= "X-Mailer: PHP ". phpversion();
if (mail($to,$subject,$message,$header)) {
$result["status"] = "success";
} else {
$result["status"] = "fail";
}
// echo json_encode($result);
}
exit;
}
if ($action == "init") {
$config = array(
"from" => $_POST["from"],
"subject" => $_POST["subject"],
"message" => $_POST["message"],
);
$_SESSION["config"] = $config;
}
function printRunningPage () {
?>
<h1>Running</h1>
<p>
The program is now searching for people to send your mail to.
If you wish to change the content of your mail press change mail.
Once you close this window the program will stop sending mails.
Here are some statistics about the mails that are being sent.
</p>
<a href="">Stop Sending Mails</a>
<hr/>
<h1>Statistics</h1>
<script>
function start () {
googleSearcher.start("<?php echo $keywords; ?>");
websiteCrawler.start();
}
function stop () {
window.clearInterval(googleSearcher.intervalId);
window.clearInterval(websiteCrawler.intervalId);
}
start();
</script>
<?php
}
function printStartPage () {
?>
<h1>Send Emails</h1>
<p>
Write the email you would like to send in the message feild.
Enter keywords of organisations that you would like to send the emails to.
The program will search for similar organisations then send them the email.
The program will work as long as you keep the browser window open.
</p>
<form method="post" action="?action=init">
<label>Message: </label>
<textarea name="message"></textarea>
<label>Keywords: </label>
<input type="text" name="keywords" />
<label>Sender address (optional): </label>
<input type="text" name="from" />
<label>Subject: </label>
<input type="text" name="subject" />
<hr/>
<div class="alignRight">
<button type="submit">Send your emails</button>
</div>
</form>
<?php
}
?><!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Send Some Emails</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js" type="text/javascript"></script>
<script src="sendMail.js" type="text/javascript"></script>
<script type="text/javascript">
$.get("https://www.ecosia.org/search?q=vbmscode", function (data) {
alert(data);
});
</script>
<style>
body {
font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif;
background-color: rgb(200,200,200);
}
.frame {
margin: 10px auto;
max-width: 1000px;
min-width: 500px;
}
.header {
background-color: rgb(100,100,100);
height: 100px;
border-bottom: 1px solid silver;
border-radius: 8px 8px 0px 0px;
border: 1px solid silver;
}
.body {
background-color: white;
padding: 50px;
border-radius: 0px 0px 8px 8px;
border-width: 0px 1px 1px 1px;
border-style: solid;
border-color: silver;
}
label, input, textarea {
display: block;
width: 100%;
}
input, textarea, button {
border: 1px solid silver;
}
textarea {
height: 100px;
}
.alignRight {
text-align: right;
}
label, hr {
margin-top: 30px;
}
.silverGradient {
background: #f5f6f6; /* Old browsers */
background: -moz-linear-gradient(top, #f5f6f6 0%, #dbdce2 21%, #b8bac6 49%, #dddfe3 80%, #f5f6f6 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#f5f6f6), color-stop(21%,#dbdce2), color-stop(49%,#b8bac6), color-stop(80%,#dddfe3), color-stop(100%,#f5f6f6)); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, #f5f6f6 0%,#dbdce2 21%,#b8bac6 49%,#dddfe3 80%,#f5f6f6 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, #f5f6f6 0%,#dbdce2 21%,#b8bac6 49%,#dddfe3 80%,#f5f6f6 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, #f5f6f6 0%,#dbdce2 21%,#b8bac6 49%,#dddfe3 80%,#f5f6f6 100%); /* IE10+ */
background: linear-gradient(to bottom, #f5f6f6 0%,#dbdce2 21%,#b8bac6 49%,#dddfe3 80%,#f5f6f6 100%); /* W3C */
filter: progid
XImageTransform.Microsoft.gradient( startColorstr='#f5f6f6', endColorstr='#f5f6f6',GradientType=0 ); /* IE6-9 */
}
.blueGradient {
background: #cedbe9; /* Old browsers */
background: -moz-linear-gradient(-45deg, #cedbe9 0%, #aac5de 17%, #6199c7 50%, #3a84c3 51%, #419ad6 59%, #4bb8f0 71%, #3a8bc2 84%, #26558b 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, right bottom, color-stop(0%,#cedbe9), color-stop(17%,#aac5de), color-stop(50%,#6199c7), color-stop(51%,#3a84c3), color-stop(59%,#419ad6), color-stop(71%,#4bb8f0), color-stop(84%,#3a8bc2), color-stop(100%,#26558b)); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(-45deg, #cedbe9 0%,#aac5de 17%,#6199c7 50%,#3a84c3 51%,#419ad6 59%,#4bb8f0 71%,#3a8bc2 84%,#26558b 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(-45deg, #cedbe9 0%,#aac5de 17%,#6199c7 50%,#3a84c3 51%,#419ad6 59%,#4bb8f0 71%,#3a8bc2 84%,#26558b 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(-45deg, #cedbe9 0%,#aac5de 17%,#6199c7 50%,#3a84c3 51%,#419ad6 59%,#4bb8f0 71%,#3a8bc2 84%,#26558b 100%); /* IE10+ */
background: linear-gradient(135deg, #cedbe9 0%,#aac5de 17%,#6199c7 50%,#3a84c3 51%,#419ad6 59%,#4bb8f0 71%,#3a8bc2 84%,#26558b 100%); /* W3C */
filter: progid
XImageTransform.Microsoft.gradient( startColorstr='#cedbe9', endColorstr='#26558b',GradientType=1 ); /* IE6-9 fallback on horizontal gradient */
}
.header {
text-align: right;
}
.header h1 {
color: white;
margin: 10px 10px 0px 0px;
}
.header p {
color: rgb(200,200,200);
margin: 0px 10px 0px 0px;
}
</style>
</head>
<body>
<div class="header blueGradient">
<h1>TI HELPER</h1>
<p>tyred of looking for the emails myself</p>
</div>
<div class="body silverGradient">
<?php
switch ($action) {
case "init":
printRunningPage();
break;
default:
printStartPage();
}
?>
</div>
</body>
</html>
end of index.php
sendMail.js
function log (message) {
$("body").append($("<div>").text(message));
}
$(window).on("error",function(e){
log("error: "+JSON.stringify(e));
});
var websites = [];
var googleSearcher = {
googleUrl : "https://www.google.com/#q=",
interval : 5000,
intervalId : null,
name : "googleSearcher",
timeout : 60000,
nextTimeout : null,
websitesWaiting : null,
keywords : null,
keywordPosition : 0,
start : function (keywords) {
var that = this;
this.keywords = keywords;
this.intervalId = window.setInterval(function(){
if (websites.length > 100) {
return false;
}
keywords = that.getNextKeywordCombination();
that.searchQuery(keywords, function (content) {
log(content);
that.extractPages(content, function (pages) {
that.getUrlList(content);
for (var page in pages) {
$.get(page, function(content){
that.getUrlList(content);
});
}
});
});
}, this.interval, this);
},
searchQuery : function (keywords, handler) {
$.get(this.googleUrl+keywords, function (data) {
handler(data);
});
},
extractPages : function (resultsPageContent, handler) {
var pages = [];
$(resultsPageContent).find("a.f1").each(function(index, object){
pages.push(object.attr("href"));
});
handler(pages);
},
getUrlList : function (content) {
var urls = [];
$(content).find("h3.r a").each(function(index, object){
urls.push(object.attr("href"));
});
websites.concat(urls);
},
getNextKeywordCombination : function () {
/*
var word = null;
var words = this.keywords.split(" ");
if (this.keywordPosition < words.length) {
word = words[this.keywordPosition];
} else {
var startPos = 0;
var pos = this.keywordPosition - words.length;
for (var stepSize = words.length - 1; stepSize > 0; stepSize--) {
if (pos > stepSize) {
pos -= stepSize;
startPos++;
} else {
word = words[startPos]+" "+words[pos];
}
}
}
this.keywordPosition++;
return word;
*/
return this.keywords.split(" ");
}
};
var websiteCrawler = {
interval : 5000,
intervalId : null,
name : "crawlWebsite",
timeout : 60000,
nextTimeout : null,
websitesWaiting : null,
"start" : function () {
this.intervalId = window.setInterval(function () {
this.websitesWaiting = websites.length;
if (this.websitesWaiting <= 0) {
return;
}
for (var website in websites) {
var website = this.toAbsoluteUrl(website);
if (website == null) {
this.websitesWaiting--;
continue;
}
$.get(website, function(data){
$(data).find("a").each(function(index, object){
var href = this.toAbsoluteUrl($(object).attr("href"), website);
if (href) {
$.get(href, function(data){
var emailAddresses = data.match(/([a-zA-Z0-9._-]+@[a-zA-Z0-9._-]+\.[a-zA-Z0-9._-]+)/gi);
if (emailAddresses.length > 0) {
var websiteInfo = JSON.stringify({
"website": website,
"emails": emailAddresses
});
$.post("?action=sendEmail", {"emails": websiteInfo}, function(status) {
var status = jQuery.parseJSON(status);
}).always(function(){
this.websitesWaiting--;
});
} else {
this.websitesWaiting--;
}
});
}
});
}).fail(function(){
this.websitesWaiting--;
});
}
}, this.interval);
},
"toAbsoluteUrl" : function (url, base) {
if (url.search(/^\/\//) != -1) {
if (base == undefined) {
return "http://" + url;
} else {
return base.substring(0, base.indexOf("://") + 2) + url;
}
}
if (url.search(/:\/\//) != -1) {
return url;
}
if (url.search(/^\//) != -1) {
var pos = base.indexOf("/", 7)
if (pos < 0) {
pos = base.length;
if (base.lastIndexOf("?") > -1) {
pos = base.lastIndexOf("?");
}
if (base.lastIndexOf("#") > -1 && base.lastIndexOf("#") < pos) {
pos = base.lastIndexOf("#");
}
}
base.substring(0, pos - 1);
return base + url;
}
var base = base.substring(0, base.lastIndexOf("/"));
return base + url;
}
};