Questions tagged [jnetpcap]

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

Links

129 questions
0
votes
1 answer

jNetPcap overloading openOffline()

I'm looking for a way to overload this function in jNetPcap: Pcap openOffline(String fname, StringBuilder errbuf); I want to implement it in this way: Pcap openOffline(InputStraem stream, StringBuilder errbuf); I have downloaded the source code…
Amir Rossert
  • 1,003
  • 2
  • 13
  • 33
0
votes
2 answers

How to pass PcapPackets into Kafka queue

With the below code to pass PcapPackets to a queue, is it possible to pass this into Kafka queue so that Kafka consumer can pull PcapPackets as such from Kafka producer? StringBuilder errbuf = new StringBuilder(); Pcap pcap =…
user3823859
  • 469
  • 1
  • 7
  • 20
0
votes
1 answer

processing real time packet using spark streaming

I have received real time packet using jnetpcap. Can anyone please tell me how to extract the packet header and other details from a live packet using spark streaming?
user3823859
  • 469
  • 1
  • 7
  • 20
0
votes
1 answer

jnetpcap library unable to build on ubuntu 12.04

I am trying to install JNetPcap and followed the instructions given at here. At step 12, I am unable to run the ant command and i see the error Error: JAVA_HOME is not defined correctly. We cannot execute /usr/lib/jvm/java-6-sun/bin/java As I am…
Raghuveer
  • 2,859
  • 7
  • 34
  • 66
0
votes
1 answer

Pushing packets captured from an interface to kafka

import kafka.serializer.Encoder import kafka.utils.VerifiableProperties import org.jnetpcap.packet.PcapPacket class PcapEncoder(verifiableProperties: VerifiableProperties) extends Encoder[PcapPacket] { override def toBytes(customMessage:…
user3823859
  • 469
  • 1
  • 7
  • 20
0
votes
2 answers

Getting error while calling jnetpcap throw JSP

I want to decode .pcap file using jnetpcap library. I am using eclipse to run project and i have set all the environments. When i call java class separably then i am able to decode pcap file but when i am calling that java class throw JSP, then i…
Laxdeep
  • 9
  • 1
0
votes
2 answers

How To Capture Http Packets in LAN

Well I m working on Java project.in order to make an application that will capture all packets in my lan , and be able to see HTTP traffics . I m currently using Jnetpcap API , i succeed listing interface and do a live capture and extract HTTP…
Sam Ben
  • 229
  • 1
  • 5
  • 11
0
votes
1 answer

Why isnt the chosen device not opening in Jnetpcap (using eclipse)?

I am learning to use jnetpcap (on windows 8, 64bit). I installed Wincap first then set up the library in eclipse and ran this following example (without making any changes): http://jnetpcap.com/examples/classic. It runs without any problems but once…
pinklotus
  • 101
  • 2
  • 13
0
votes
1 answer

jNetPcap for Android Packet capture

I have been trying to capture the packets in my android app when connected to Wifi. I am using a broadcast receiver class. I have successfully received the broadcast when connected to a wifi network, using this code: ConnectivityManager cm =…
GOBINATH.M
  • 663
  • 2
  • 12
  • 24
0
votes
0 answers

Jar works from cmd - not from double-click (additional library)

I seem to have a strange issue which is most likely to be caused by not understanding how the including of additional libraries in java work. I wrote a program that uses jnetpcap.jar to work with pcap files. The application is running fine when I…
Stefan
  • 2,603
  • 2
  • 33
  • 62
0
votes
0 answers

How to forward captured packet/s to another network device using jnetpcap?

I would like to send a captured packet sniffed from network device 1 and will inject it to network device 2 without altering its contents (will act as a wire) So far I have tried byte[] buf = new byte[packet.getTotalSize()]; …
0
votes
1 answer

JNetPcap project

I have made a jNetPcap project for which the code is below: When I try executing the program I got this as result in the console tag: "Can't read list of devices, error is" and since jNetPcap depends on Libpcap C library which requires root…
N.B
  • 31
  • 1
  • 8
0
votes
2 answers

Reading header info from pcap packet

I have used following code to read Source and Destination IP from packet stored in pcap file. public void nextPacket(PcapPacket packet, String user) { Ip4 ip = new Ip4(); Ethernet eth=new Ethernet(); …
0
votes
2 answers

java android jnetpcap eclipse install not working

I have downloaded the latest version of jnetpcap and added it to my android project in eclipse as "Add external JAR". But when I'm running the program the application crashes immediately on my emulator and I receive the following error in the log:…
wasp256
  • 5,943
  • 12
  • 72
  • 119
0
votes
1 answer

How will I be able to printout the captured packets using pcap.loop() with a parameter of Pcap.LOOP_INFINITE into the JTextArea?

I'm quite new to JNetPcap and I'm still finding my way around with it, I'm trying to build a Packet sniffer for my project, Lately I'm trying printout packet information into a JTextArea by appending the information from a pcap.loop() that I am…
Rojee
  • 43
  • 8
1 2 3
8
9