commit 8b55a8183008b8c655a30ae5ccd8fc1df905857b Author: v Date: Thu Oct 29 09:12:08 2020 -0400 Original source diff --git a/2prong.js b/2prong.js new file mode 100644 index 0000000..0b80e6a --- /dev/null +++ b/2prong.js @@ -0,0 +1,237 @@ +/* +2Prong.js +Copyright 2006 by Mark Percival - Percival Industries, LLC +*/ +if (window.XMLHttpRequest){ // try to create XMLHttpRequest + XMLReq = new XMLHttpRequest(); + XMLMail = new XMLHttpRequest(); + } +if (window.ActiveXObject) { // if ActiveXObject use the Microsoft.XMLHTTP + XMLReq = new ActiveXObject("Microsoft.XMLHTTP"); + XMLMail = new ActiveXObject("Microsoft.XMLHTTP"); + } +window.onload=kickStart; + +var genEmail = ''; +var checkMailURL = 'checkemail.php?email='; +var getMailURL = 'email.php?id='; +var recievedMail = new Array; +var emailidArray = new Array; +var position = 0; +var emailCount = 0; +var interval; +//var domain = 'iheartspam.org'; +var domain = 'reducespam.org';//update this +var XMLerror = 0; + + +function kickStart() { + setEmail(); + startAutoCheck(true); +} + +function setEmail(){ + var regex = new RegExp(/\?email=(.+)/); + var match = regex.exec(location.href); + if(!match){ + location.href = '?email='+randomEmail(10); + } + else genEmail = match[1].substr(0,15); + checkMailURL += genEmail; + setHTML('emailaddress', '' + genEmail +'@'+ domain + '' + "
Custom Address
"); + copy(genEmail+"@"+domain); + + //updated 150610 + setHTML('emailaddressincontent', '' + genEmail +'@'+ domain + ''); + applyClickToSelectEvent(); +} + +function startAutoCheck(toggle) { + if(toggle) { + throbber(true,'Checking Mail'); + checkMail(); + interval = setInterval("checkMail()", 7000); + } + else clearInterval(interval); +} + +function checkMail(){ + request(checkMailURL + '&c=' + Math.random(), checkMailProc); +} + +function checkMailProc(){ + if (XMLReq.readyState==4 && XMLReq.status == 200) { + if(XMLReq.responseText) emailidArray = XMLReq.responseText.split(","); + if (emailidArray.length > emailCount) { + getMail(emailidArray[emailidArray.length - 1]); + position = emailidArray.length; + if(emailidArray.length>1) multiMail(); + } + emailCount = emailidArray.length; + if(error=1){ throbber(true,'Checking Mail'); error=0; }//reset throbber after error + } + else if (XMLReq.readyState==4 && XMLReq.status != 200) throbber(true,'Error connecting, retrying...'); +} + +function multiMail() { + var navoutput=''; + if ((emailidArray.length >= position)&&(position!=1)) navoutput = "Prev "; + else navoutput += "Prev "; + navoutput += position +' of '+ emailidArray.length; + if (emailidArray.length > position)navoutput += " Next"; + else navoutput += " Next"; + setHTML('emailnav', navoutput); +} + +function prevMail(){ + getMail(emailidArray[position-2]); + position--; + multiMail(); +} + +function nextMail(){ + getMail(emailidArray[position]); + position++; + multiMail(); +} + +function getMail(emailid){ + requestMail('email.php?id='+emailid+'&email='+genEmail, getMailProc); +} + +function getMailProc(){ + if (XMLMail.readyState==4) { + XMLMail.responseText + setHTML('content',XMLMail.responseText); + startAutoCheck(false); + throbber(false, "Check for new mail"); + autolink('content'); + document.title = "ReduceSpam.org - New Email"; + } +} + +function request(url, callfunc) { + if (XMLReq.readyState < 1 || XMLReq.readyState > 3) { + XMLReq.open("GET", url, true); + // Set the onreadystatechange function + XMLReq.onreadystatechange = callfunc; + // Send + XMLReq.send(null); + } +} + +function requestMail(url, callfunc) { + XMLMail.open("GET", url, true); + // Set the onreadystatechange function + XMLMail.onreadystatechange = callfunc; + // Send + XMLMail.send(null); +} + + +function setHTML(div, data) +{ + document.getElementById(div).innerHTML = data; +} + +function throbber(toggle, msg) { + if(toggle) setHTML('status',msg+" "); + if(toggle) document.title = "Reduce Spams"; + else setHTML('status',msg); +} + +function randomEmail(length) +{ + chars = "abcdefghijklmnopqrstuvwxyz1234567890"; + var email = ""; + for(x=0;x\f\n\r\t\v])+/g; + document.getElementById(div).innerHTML = + document.getElementById(div).innerHTML.replace(hlink, function ($0){ + var s = $0 + if((s.charAt(s.length-1)=='.')||(s.charAt(s.length-1)==',')) + s = s.substring(0,s.length-1); + return(s.link(s)); + } + ); +} + + +function customemail (submit) { + if(submit) document.customemail.submit(); + else {setHTML('emailaddress',"\ +
@" + domain + +"
Submit"); + document.customemail.email.select(); //in case its non-IE and no flash, you can still ctrl-c + } + +} + +function letternumber(e) +{ +var key; +var keychar; + +if (window.event) + key = window.event.keyCode; +else if (e) + key = e.which; +else + return true; +keychar = String.fromCharCode(key); +keychar = keychar.toLowerCase(); + +// control keys +if ((key==null) || (key==0) || (key==8) || + (key==9) || (key==13) || (key==27) ) + return true; + +// alphas and numbers +else if ((("abcdefghijklmnopqrstuvwxyz0123456789").indexOf(keychar) > -1)) + return true; +else + return false; +} + +function copy(text2copy) { + if (window.clipboardData) { + window.clipboardData.setData("Text",text2copy); + } else { + var flashcopier = 'flashcopier'; + if(!document.getElementById(flashcopier)) { + var divholder = document.createElement('div'); + divholder.id = flashcopier; + document.body.appendChild(divholder); + } + document.getElementById(flashcopier).innerHTML = ''; + var divinfo = ''; + document.getElementById(flashcopier).innerHTML = divinfo; + } +} + +function applyClickToSelectEvent(){ + $('.clickToSelect').click(function (){ + var range, selection; + + if (window.getSelection && document.createRange) { + selection = window.getSelection(); + range = document.createRange(); + range.selectNodeContents($(this)[0]); + selection.removeAllRanges(); + selection.addRange(range); + } else if (document.selection && document.body.createTextRange) { + range = document.body.createTextRange(); + range.moveToElementText($(this)[0]); + range.select(); + } + }); +} \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..f4104e5 --- /dev/null +++ b/README.md @@ -0,0 +1,8 @@ +ReduceSpam.org +- modification required in order to run this code +1. update imap.php with your email server, email address and password +2. update 2prong.js with your domain name +3. that's all + +- things to setup on your server +1. a catch-all email for your domain using IMAP \ No newline at end of file diff --git a/_clipboard.swf b/_clipboard.swf new file mode 100644 index 0000000..2cfe371 Binary files /dev/null and b/_clipboard.swf differ diff --git a/checkemail.php b/checkemail.php new file mode 100644 index 0000000..ebcc64e --- /dev/null +++ b/checkemail.php @@ -0,0 +1,12 @@ + \ No newline at end of file diff --git a/email.php b/email.php new file mode 100644 index 0000000..8bd371a --- /dev/null +++ b/email.php @@ -0,0 +1,29 @@ + To: " . htmlspecialchars($emailContent['to']) . "
"; + echo "
From: " . htmlspecialchars($emailContent['from']) . "
"; + echo "
Subject: " . htmlspecialchars($emailContent['subject']) . "
"; + echo "
" . htmlspecialchars($emailContent['date']) . "
"; + echo "
" . nl2br($emailContent['body']) . "
"; + + } + else { + echo "
That's not going to work"; + } +?> \ No newline at end of file diff --git a/furiousstyles.css b/furiousstyles.css new file mode 100644 index 0000000..4c51331 --- /dev/null +++ b/furiousstyles.css @@ -0,0 +1,139 @@ +body { + margin:25px 0px; + padding:0px; + text-align:center; /* Hack for IE5/Win */ + font-family: arial; + font-size: 90%; + } + +a { +color: #FE8801; +text-decoration:none; +} + +a:hover { +color: #3E98FE; +text-decoration:none; +} + +a img{ +border:none; +} + +h2 { +color:#999; +margin: .1em .1em; +font-size:140%; +} + +FORM.hidden { +position: absolute; +left:-100em; +} + +input.email { +border-top:none; +border-left:none; +border-right:none; +border-bottom:1px solid #3E98FE; +text-align:right; +color:#3E98FE; +font-size:130%; +} + +#container { +width:750px; +margin-left:auto; +margin-right:auto; +} + +#header { +width:728px; +height:55px; +background:url(logob.jpg) no-repeat right; +margin: 1em auto 0 auto; +text-align:left; +} + +#footer { +width:728px; +margin: 1em auto 0 auto; +font-size:70%; +} + +#emailaddress { +display:inline; +float:right; +color:#3E98FE; +font-size:130%; +margin:0em 0em 0 0; +padding:0em; +} + +#emailaddressincontent{ +display:inline; +color:#3E98FE; +font-size:130%; +margin-left:0.5em; +} + +.custom { +text-align:right; +color:#999; +font-size:80%; +} + +#navbar { +margin:auto; +position:relative; +width:625px; +text-align:left; +padding: 5px 0px 5px 5px; +font-weight: bolder; +font-size:120%; +} + + +#emailnav{ +float:left; +color:#999; +margin: 5px 5px 0 5px; +} + +#contentbox { +margin:1em auto 0 auto; +width:750px; +border:1px solid #BFBFBF; +text-align:left; +} + +#content { +padding: 2em 1em 1em 1em; +} + +.ads { +padding: 1em 1em 1em 1em; +} + +#status { +float:right; +color:#3E98FE; +margin: 5px 5px 0 0; +} + +#status img { + +} + +.navitems { +font-family: arial; +font-weight: bolder; +} + +.to, .from, .subject, .time { +color:#999; +font-size:85%; +} + +.sponsor { +} diff --git a/imap.php b/imap.php new file mode 100644 index 0000000..e87f3a8 --- /dev/null +++ b/imap.php @@ -0,0 +1,63 @@ +to) , $email.'@reducespam.org') !== false ){ + $emailIDs[] = $email_number; + } + } + } + + /* close the connection */ + imap_close($inbox); + + return $emailIDs; + } + + function getEmail($emailID){ + global $hostname, $username, $password; + + $inbox = imap_open($hostname, $username, $password); + + /* get information specific to this email */ + $overview = imap_fetch_overview($inbox,$emailID,0); + + //refer to http://stackoverflow.com/questions/5177772/how-to-use-imap-in-php-to-fetch-mail-body-content + $message = imap_fetchbody($inbox,$emailID,1); + + $emailContent = array( + 'subject' => ($overview[0]->subject), + 'to' => ($overview[0]->to), + 'from' => ($overview[0]->from), + 'date' => $overview[0]->date, + 'body' => quoted_printable_decode($message)//refer to http://stackoverflow.com/questions/19092161/php-imap-get-body-and-make-plain-text + ); + + /* close the connection */ + imap_close($inbox); + + return $emailContent; + } + +?> \ No newline at end of file diff --git a/index.html b/index.html new file mode 100644 index 0000000..08cbb8d --- /dev/null +++ b/index.html @@ -0,0 +1,142 @@ + + + +ReduceSpam.org - Disposable Email Service + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+
+
+ + +
+
+ +
+
+
+
+

What is ReduceSpam.org?

+

+ ReduceSpam.org is the no-click disposable email system. It provides you, at no cost, a temporary email address for signing up/registering on certain websites that require verification without being bombarded by their spams. ReduceSpam.org, as its name indicates, helps to reduce spam emails in your life. +

+

How it works?

+

It is as simple as 1-2-3.

+

Step 1: Copy (Ctrl-C) this email address:

+

Step 2: Paste (Ctrl-V) it in any form that requires email verification.

+

Step 3: Wait for email to pop up here at reducespam.org

+

+ You can keep and reuse the email address for as long as long you wish (for example you can bookmark the current URL). However, the messages are kept for a maximum of 2 days. After that they are being destroyed. +

+
+
+
+ + +
+
+ + + +
+ +
+
+ + Like it? Share it: + + + + + + + + +
+
+ + + +
+
+ + + + \ No newline at end of file diff --git a/logoa.jpg b/logoa.jpg new file mode 100644 index 0000000..37b11f6 Binary files /dev/null and b/logoa.jpg differ diff --git a/logob.jpg b/logob.jpg new file mode 100644 index 0000000..8b21121 Binary files /dev/null and b/logob.jpg differ diff --git a/throbber.gif b/throbber.gif new file mode 100644 index 0000000..9ee9c59 Binary files /dev/null and b/throbber.gif differ