I've asked this to Jnetpcap forum. And didn't get any response.
I've been trying to get the website name from the request/ response packet.
This is what I've tried:
PcapPacketHandler jpacketHandler = new PcapPacketHandler() {
…
I'm using Jnetpcap 1.3.0 version for extracting the pcap file.
Below is my code snippet
/* Main Class */
public class Proceed{
public static void main(String[] args) {
PCapFile pcapFile = new PCapFile("C:/test/no-gre-sample.pcap");
…
I'm trying to build a packet using jnetpcap, according to the packets I receive.
I'm currently using jnetpcap-1.4.r1425, and am running into several problems.
The following code is common to all my problems:
JPacket wPacket = new…
I'm attempting to run a program using the command:
java Honey -cp ../../jnetpcap-1.3.0/jnetpcap.jar
and am getting the title error:
Exception in thread "main" java.lang.NoClassDefFoundError: org/jnetpcap/Pcap
at…
I am developing a simple Sniffer system for the first time using jnetpcap. I adapted some codes and I can currently read HTTP traffic (port 80) and print its fields.
private void packetHandler(){
jpacketHandler = new PcapPacketHandler()…
I'm trying to run this code which just take a HexString of bytes transform it to a byte array and try to create a PcapPacket from this array:
import org.jnetpcap.packet.PcapPacket;
public class PcapTest {
public static void main(String[] args)…
i would modify the content of Data in the UDP Packet read from a pcap file and send it on the network.
In the following example i write a string "User data" and it work correctly but if my data require more space than the previous payload opened, i…
i'm trying to recalculate UDP Checksum on a packet where i changed IPD destination, but the function udp checksum seems to doesn't accept any parameter,i'm using jnetpcap 1.4
Pcap pcap_off = Pcap.openOffline(fileName, errorBuf); //open…
I want to deploy my application on to tomcat which has a pcap parsing ability. The module was running fine on eclipse / terminal. On tomcat i see the error as below.
I have tried the following steps to resolve this issue:
Add jnetpcap.jar and *.so…
I'm getting the following error when deploying my application to Tomcat:
I have added the jnetpcap jar file to the lib folder of Tomcat. I have also added it to my classpath in eclipse.
I am deploying my application as a WAR file built using…
The following error occured while trying to read packets using jnetpcap library. What could be the reason ?
ERROR actor.OneForOneStrategy: org.jnetpcap.protocol.network.Ip4java.io.NotSerializableException: org.jnetpcap.protocol.network.Ip4
at…
I am trying to filter the packet and discard if expression matches the situation. I mean to say that If packet is coming from 192.168.1.100, It should not get deliver to the destination(which is 192.168.1.119).
I am getting packet segments in two parts.I am able to see it in wireshark as tcp reassembled.After searching on google i found out about dont fragment bit set for fragmented data.but it is not set even for fragmented data.i am using java jnetpcap…
I need to convert packets to byte format and decode it . How is it possible to convert packets captured using jnetpcap library to array[bytes] and vice-versa in Java?