Questions tagged [jnetpcap]

jNetPcap is an open-source Java wrapper for nearly all libpcap library native calls.

Links

129 questions
2
votes
0 answers

UDP DNS Packet Sniffing

So I have used jNetPcap to sniff network packets in one of my projects. My question is how do I extract DNS query and response from UDP packets? jNetPcap is just a Java wrapper on libpcap, if that helps. I know to etract DNS packets I need to look…
Jishan
  • 1,654
  • 4
  • 28
  • 62
2
votes
0 answers

How to analyze the network usage of processes separately in windows using java

I am developing a java tool to gather information about network usage of processes in windows. Intention of this project is to filter out unwanted or malicious traffic. As the first step I could create a code to analyze network traffic using jpcap…
2
votes
0 answers

How to use hadoop-pcap library to extract packet payload data, specifically hexdump of any packet?

I am using a hadoop-pcap library from here: hadoop-pcap-lib But i am unable to extract packet payload data. I need hexdump of each packet. In Jnetpcap i am able to do that by using packet.toHexdump(packet.size(), false, true, false);. I want to use…
kishorer747
  • 810
  • 1
  • 10
  • 24
2
votes
1 answer

Extracting packet details using jnetpcap library

How to extract protocol field , source ip and destination ip from offline pcap file using jnetpcap library?
user3823859
  • 469
  • 1
  • 7
  • 20
2
votes
2 answers

how to get protocol details from packets stored in a pcap file

I want to make a switch loop (in java) whose cases are the protocol of the ip header of the packets stored in a pcap file. I am using jnetpcap library to access the packets. I know how to get ip address, port numbers etc. from the packet but I want…
2
votes
1 answer

jNetPcap - Analysing ARP packets from a PCAP file

I'm trying to obtain information on ARP packets within a PCAP file using the jNetPcap library for Java. What I'm really after is reading the Source and Destination addresses within the Ethernet frame, as well as the Sender MAC and Target MAC within…
2
votes
2 answers

java error, jnetpcap library in eclipse

I try to write simple sniffer, i would like to get list of devices. here is my function but doesn't work, i don't know what is wrong because i just started work with this library. import java.util.ArrayList; import java.util.List; import…
user3650992
2
votes
1 answer

JnetPcap Wireless Interface

Will I'm working on project using JnetPcap API,I was able to list to run the ClassicPcapExample successfully public class ClassicPcapExample { /** * Main startup method * * @param args * ignored */ public static void main(String[]…
Sam Ben
  • 229
  • 1
  • 5
  • 11
2
votes
1 answer

jnetpcap for android development on linux

If have downloaded the latest jnetpcap version and installed it on my linux machine (copied the libjnetpcap.so to /usr/lib and set the PATH). I used eclipse to test the library in a simple JAVA PROJECT which worked fine. But in my ANDROID PROJECT in…
wasp256
  • 5,943
  • 12
  • 72
  • 119
2
votes
2 answers

Remove duplicated packets using jnetpcap

I have an application in Java that analyses .pcap files using jnetpcap library. I need to remove all the duplicated, retransmitted and out-of-order packets. Is there any way I can use the jnetpcap library to do that? At least to remove the…
1
vote
0 answers

How i can calcul bandwith by uisng pcap4j

I am having issues with the pcap4j library. I want to calculate the bandwidth using a pcap file and I have tried many codes but I have not been successful. One of the codes I have used is: import org.pcap4j.core.PcapHandle; import…
elnino17
  • 31
  • 1
1
vote
1 answer

java.lang.UnsatisfiedLinkError: com.slytechs.library.NativeLibrary.dlopen(Ljava/lang/String;)J

I am working with a Raspberry pi 3 b+. My program is in java and I am using the jnetpcap library. When executing the code, I get the following error: I think the problem is that the shared object (.so) corresponding to jnetpcap is not the one for…
Nfernandez
  • 646
  • 1
  • 5
  • 16
1
vote
1 answer

jNetPcap permissions on Linux based Netbeans Java project

Netbeans 11.2 running on Linux Mint 19.2 Cinnamon, Kernel 4.15.0-72-generic I’ve moved a custom network packet sniffing project I developed some years ago over from Windows 7 to Linux. This uses jNetPcap to do the actual packet capture. JnetPcap is…
JohnF
  • 29
  • 3
1
vote
0 answers

Jnetpcap not finding ALL devices

I am using JnetPcap on my Wifi, I want it to find devices connected to my internet like my mobile phone and listen for data, I am using the current method to find devices: private static List getDevices() { List devices =…
MakeN
  • 39
  • 5
1
vote
0 answers

Execute external software via Python

I have a Java program that is executed normally via the terminal. However, when I try to execute it via another python code and more specifically via the os.system() or subprocess.run() functions, I get the following error: Exception in thread…
Panagiotis
  • 511
  • 8
  • 26
1
2
3
8 9