File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Sockets and Internet Protocols and the fly likes Java packet crafter Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Bookmark "Java packet crafter" Watch "Java packet crafter" New topic
Author

Java packet crafter

Andrei Antonescu
Ranch Hand

Joined: Jul 08, 2010
Posts: 75
Hello,

I am using a Linux Cent OS box & I would like to ask you if it is possible to create a program in Java that can set TCP/IP header fields in a packet and the send it on the network. For example i would like to make a SYN scanner. Or I may need to set TOS or IHL or TTL fields in a IPv4 packet.
I haven't found method in Datagram that can do that.

Thanks in advance
Lester Burnham
Rancher

Joined: Oct 14, 2008
Posts: 1337
You'll have to resort to native code through JNI or JNA - it's not possible using pure Java code.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Java packet crafter
 
Similar Threads
creating an ip packet
Hiding a JSP from public access
DNS query, protocol
new to Java; Help Needed in networking ; packet structure equivalent in java
Java Proxy