I am looking to spoof UDP packets using Java. Are there any good Java libraries out there that allow you to create your own RAW SOCKETS?
Sorry, forgot the Java stuff.
I am looking to spoof UDP packets using Java. Are there any good Java libraries out there that allow you to create your own RAW SOCKETS?
Sorry, forgot the Java stuff.
In Windows XP SP2 (and presumably higher versions, including vista, but I'm not certain of that), raw sockets are disabled. These restrictions are somewhat less strict for UDP sockets than for TCP sockets, so you may still be able to do whatever you are trying to do. That link contains info on what you can do and how to do it that will probably help you, or at least help you determine if it's possible.
I would use a Java API that wraps libpcap.
libpcap has an "inject" function that allows you to send a raw packet. (Of course, you must have root or administrator priveleges on the machine you're trying to send the packet from.) There are a number of Java APIs that are available, such as jNetPcap or jpacp. jpcap, for example, has a class that allows you to send any packet.