Questions tagged [jnetpcap]

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

Links

129 questions
1
vote
2 answers

Add jnetpcap to maven fails

I try to add jnetpcap as a dependency to maven. I found on the internet the following that should be added to the pom file: jnetpcap jnetpcap
1
vote
0 answers

jNetPcap PcapDumper append captured packet to file

I am using the jNetPcap java library (v.1.4.r1425) for network packet capture. At this time I am using the dump(PcapPktHdr hdr, java.nio.ByteBuffer packet) method to write packets of interest to a dump file. This works great, however if my service…
ngasw
  • 53
  • 3
1
vote
1 answer

using jnetpcap on android

I want to create a packet and send to over network(2nd layer of network) in android application I use android studio.I download jnetpcap-1.3.0 file , this file include some file such as jnetPcap.jar , I add this jar file to my android project,Is it…
jack
  • 51
  • 7
1
vote
1 answer

How to validate a message in pcap?

I have a requirement to expand required tree in decoded parameters of pcap file and validate a message in it. Example: Open "Transmission Control Protocol" as shown in screenshot and and validate for the message "This is an ACK to the segment in…
prashanth
  • 66
  • 5
1
vote
0 answers

How to manipulate a packet and write the packet to a pcap file?

I used to code with Scapy in python. Now I'm going to manipulate packets in a pcap file using java. For example I need to read the pcap file and then alter one packet's source ip. Actually, I've altered one field using jNetStream library, but I…
Mojtaba Yousefi
  • 626
  • 1
  • 9
  • 27
1
vote
1 answer

Jnetpcap: installation error

I've troubles installing jnetpcap in ubuntu/eclipse!! I've downloaded following files: jnetcap-1.3.b3-1 jnetcap-javadox-1.3.b3-1 jnetcap-src-1.3.b3-1 Copied libjnetpcap.1.3.b3 to /usr/lib, build my .jar file in eclipse and when I try to run it,…
stepBYstep
  • 11
  • 4
1
vote
0 answers

Appreciation about Pcap devices

I'm just trying to get automatically the active device on my System. For Example: My PC has two devices. 1. TAP-Windows Adapter V9 2. Intel(R) Ethernet Connection Actually the active device is the Intel Connection. So I want that my application can…
Ceeya
  • 65
  • 1
  • 10
1
vote
1 answer

Using Android NDK for JnetPcap library

I' m new user in Android NDK. I want to use the JnetPcap library in one android project and i have already found an another project that has contained the JNI folder with the JnetPcap library and other files, such as Android.mk. I copy the JNI…
Panagiotis
  • 511
  • 8
  • 26
1
vote
0 answers

jnetpcap trying to run a capture from another program

so I have two Projects that run fine. But when I try to put them together I get the error at the bottom immediately. Separate files (first two belong together): File1 : package pkg2buttongui; import javax.swing.*; import java.awt.*; import…
1
vote
1 answer

Scanner fails when executing "sudo java" in Eclipse

I have followed this procedure in order to run Java applications as root when needed from Eclipse (as I use Xubuntu, for instance, when using jnetpcap to capture and analyse packets). The problem I have is that any Scanner statement reading from…
logo_writer
  • 283
  • 2
  • 10
1
vote
0 answers

HTTP Request limit with jnetpcap

i'm developing sniffer in java with eclipse . i can sniff HTTP packet, TCP , UDP . But i need to control or ''state'' if request limit more than 10 in one second. İ know with jnetpcap we can't block , i just want to know it is possible i can get…
tanya
  • 11
  • 1
1
vote
1 answer

How to know number of packets in a pcap file from WireShark using JNetPCAP

I am using WireShark to analyse the network traffic. After saving traffic in a .pcap file and I need to analyse it using JNetPCAP API. There is some way to know the numbers of packets contained in the pcap file? Sample Code: final String FILENAME =…
Alberto Crespo
  • 2,429
  • 5
  • 28
  • 51
1
vote
0 answers

Capture packets in vector or data structure

Im trying to capture network packets and put them in a Vector. Im having trouble doing this because If I create a Vector it wont be visible in the handler. I tried making the Vector public but I cant make it work. I would like to store the packets…
1
vote
2 answers

How to get IP address from ICMP packets using jnetpcap

I am using jnetpcap to analyze pcap files. I know how to get addresses when I encounter IP header if(packet.hasHeader(ip)&&packet.hasHeader(tcp)&&tcp.flags_SYN()) { sIP = packet.getHeader(ip).source(); sourceIP =…
giorgos
  • 37
  • 2
  • 12
1
vote
0 answers

How to get TCP analysis flags in JNETPCAP

I am trying to use jnetpcap to get the values from an offline file read for the TCP analysis flags like those shown in wireshark under the TCP header. I was able to obtain the TCP header packet but it does not contain this Analysis flag help will be…
Taher Galal
  • 297
  • 4
  • 23
1 2
3
8 9