help me .... class jpcapwriter!!!!!!!!!

D

Damien Legrand

i use jpcap classe for captured packet but i don't arrive to save the
packets in a file with the method jpcapwriter...
i dont know java. help me !
thanks.

class jpcapwriter doc :

http://netresearch.ics.uci.edu/kfujii/jpcap/doc/javadoc/jpcap/package-summary.html

my code is that :

import jpcap.*;

class Tcpdump implements JpcapHandler
{
public void handlePacket(Packet packet){
System.out.println(packet);
}
public static void main(String[] args) throws
java.io.IOException{
String[] lists=Jpcap.getDeviceDescription();
System.out.println("Start capturing on "+lists[0]);
Jpcap jpcap=Jpcap.openDevice(Jpcap.getDeviceList()[0],1000,false,20);
//jpcap.setFilter("host 132.147.47.98",true);
jpcap.loopPacket(-1,new Tcpdump());
}
}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,143
Latest member
DewittMill
Top