I think this would be the solution:

 private JpcapHandler handler=new JpcapHandler(){
  public void handlePacket(Packet packet) {

   if(packet instanceof TCPPacket && ((TCPPacket)packet).dst_port==8080){

    method =new String(packet.data);

    if(method==null || method.indexOf("HTTP")==-1){
     // this packet doesn't contain HTTP header
     return;
    }

    methods.addElement(method);

  }
 };

Regards!

-----Original Message-----
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Date: Thu, 10 Jun 2004 01:09:17 +0600 (PKST)
Subject: Re: [WinPcap-users] help needed

> 
> i have but the problem with that is it does show me only headers,, ie i
> want to capture HTTP traffic in TCP payload but it only shows me TCP
> header but not the payload,,, can u help???
> 
> 
> > try Jpcap
> > http://netresearch.ics.uci.edu/kfujii/jpcap/doc/index.html
> >
> > -----Original Message-----
> > From: [EMAIL PROTECTED]
> > To: [EMAIL PROTECTED]
> > Date: Wed, 9 Jun 2004 16:05:40 +0600 (PKST)
> > Subject: [WinPcap-users] help needed
> >
> >>
> >> hi !!
> >> can some one answer me a simple question...
> >> can i implement packet sniffing with winpcap and then return some sort
> >> of
> >> string back to java code using JNI???? is this possible?????
> >> i shall be highly obliged...
> >> thanx....
> >>
> >>
> >>
> >> ==================================================================
> >>  This is the WinPcap users list. It is archived at
> >>  http://www.mail-archive.com/[EMAIL PROTECTED]/
> >>
> >>  To unsubscribe use
> >>  mailto: [EMAIL PROTECTED]
> >> ==================================================================
> >>
> >
> >
> > ==================================================================
> >  This is the WinPcap users list. It is archived at
> >  http://www.mail-archive.com/[EMAIL PROTECTED]/
> >
> >  To unsubscribe use
> >  mailto: [EMAIL PROTECTED]
> > ==================================================================
> >
> 
> 
> 
> ==================================================================
>  This is the WinPcap users list. It is archived at
>  http://www.mail-archive.com/[EMAIL PROTECTED]/
> 
>  To unsubscribe use 
>  mailto: [EMAIL PROTECTED]
> ==================================================================
> 


==================================================================
 This is the WinPcap users list. It is archived at
 http://www.mail-archive.com/[EMAIL PROTECTED]/

 To unsubscribe use 
 mailto: [EMAIL PROTECTED]
==================================================================

Reply via email to