Questions tagged [jpcap]

Jpcap is a Java Library which enables you to Send and capture Packets.

Jpcap is a library for working on Packet Level using Java. The Jpcap library is based on libpcap/winpcap and therefore Jpcap supports any system which is supported by libpcap/winpcap. Currently those include Windows, Linux, FreeBSD, Mac OS X and Solaris.

Provided functionality:

  1. Sending Network Packets
  2. Capturing Network Packets
  3. It can capture Ethernet, IPv4, IPv6, ARP/RARP, TCP, UDP, and ICMPv4 packets.
134 questions
0
votes
2 answers

How to include jpcap library?

How to include jpcap library on Netbeans or Eclipse installed in windows 7 (64-bit)
0
votes
2 answers

jpcap exception

While running my code I got this exception. I did not get what is it? Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: jpcap.JpcapCaptor.nativeOpenOffline(Ljava/lang/String;)Ljava/lang/String; at…
user2091416
  • 77
  • 2
  • 10
0
votes
2 answers

Why is getDeviceList() method in jpcap.JpcapCaptor class native in JEthereal?

I recently downloaded the JEthereal.jar file to capture packet traffic on my internet connection through JEthereal and also to study it. It reads the packets from a .pcap file just fine but on trying to capture packets it gave me a message that:…
Surender Thakran
  • 3,958
  • 11
  • 47
  • 81
0
votes
1 answer

Capturing packets on a certain ip

Is it possible to create a java class using JPCAP that capture all the packets destined to a particular IP address? Like if i need to capture all the packets destined to my router .. is it possible ?
0
votes
1 answer

Implementing Arp Sweep

I have been playing with libpcap/jpcap. Implementing a arp sweeper. I send a request for all ip's in the block to the broadcast address and read replies. Now i can't think of a way to exit from the listening function. Now i wait 2 secs and assume…
Hamza Yerlikaya
  • 49,047
  • 44
  • 147
  • 241
0
votes
2 answers

Simulate HTTP request with jpcap

How can send packet with jpcap for HTTP GET request?
0
votes
1 answer

Jpcap on windows 7 (32 bit)

I have Windows 7 (32 bit) installed on my Laptop. I am running the below code on Eclipse Juno : import jpcap.JpcapCaptor; import jpcap.NetworkInterface; public class Network { public static void main(String[] args) { NetworkInterface[]…
0
votes
2 answers

Sun Java 6 on Ubuntu

The java library I need (jpcap) only works on Java 6, it won't work with Java 7. Is it still possible to install Java 6 on Ubuntu? According to the Ubuntu Help: Oracle (Sun) Java 6 is no longer available to be distributed by Ubuntu, because of…
Shane
  • 461
  • 2
  • 8
  • 23
0
votes
1 answer

Installing Jpcap in ubuntu

I'm trying to install jpcap on ubuntu but it's giving me a bit of bother. I'm using the debian package but when I try to install it it gives me the following error message; Error: Dependency is not satisfiable: sun-java6-jdk I have java 7u9 from…
Shane
  • 461
  • 2
  • 8
  • 23
0
votes
1 answer

JpCapWriter crashes JVM

When I try to use JpCap Writer to save packets to a file, it causes JVM to crash. Code: captor=JpcapCaptor.openDevice(interfaceList[interfaceNumber], 65535, true, 20); captor.setFilter("ip and tcp",true); JpcapWriter…
Shubham Saini
  • 738
  • 3
  • 8
  • 18
0
votes
1 answer

saving a captured packet in TCPDump format (Java)

I want to save a captured packet in TCPDump format. I'm using Java with JPCap library. However, I'm not able to use JpcapWriter.writePacket() function, it gives me a JVM error. This is the code that is causing the JVM error: …
Shubham Saini
  • 738
  • 3
  • 8
  • 18
0
votes
1 answer

JPCap - cant capture TCP packets

I'm trying to implement a network sniffer using JPCap library. The problem is, it is capturing only UDP packets of other nodes. The TCP packets are not being captured. (Actually TCP packets of my computer ONLY are being sniffed) This is the code I'm…
Shubham Saini
  • 738
  • 3
  • 8
  • 18
0
votes
2 answers

JButton not working [capture network traffic]

My code which is supposed to capture the network traffic AND display it on textarea but it ain't doing it.Please have a look at the code and check if there is any correction to be made. public class NewClass { public static JTextArea textarea =…
Aj.
  • 25
  • 1
  • 4
0
votes
0 answers

Keep track of ip address

I want to keep track of ip address, where have 135 destination port then in next packet with same ip address have 4445 destination port. I try the code at below, but can't run it . How to solve it? packet = jpcap.getPacket(); …
0
votes
2 answers

jpcap.packet.Packet cannot be cast to jpcap.packet.TCPPacket

Packet packet = new Packet(); while(packet != null ) { packet = jpcap.getPacket(); TCPPacket tcp = (TCPPacket)jpcap.getPacket(); IPPacket ipp = (IPPacket)packet; UDPPacket udp =…
1 2 3
8
9