Code Monkey home page Code Monkey logo

Comments (9)

wnagele avatar wnagele commented on June 24, 2024

You can override the readPayload method and create a HEX dump across that. Feel free to provide back code if it's useful to the rest of the project.

from hadoop-pcap.

kishorer747-zz avatar kishorer747-zz commented on June 24, 2024

Hi,
I know that i have to override the readpayload method. But how do I get the
packetData byte array , packetPayloadStart and packetPayloadLength? Please
help.

Thanks
Kishore

On 29 June 2015 at 15:25, Wolfgang Nagele [email protected] wrote:

You can override the readPayload method and create a HEX dump across that.
Feel free to provide back code if it's useful to the rest of the project.


Reply to this email directly or view it on GitHub
#30 (comment)
.

Cheers

Kishore
http://kishorer.in

from hadoop-pcap.

wnagele avatar wnagele commented on June 24, 2024

You don't need to do that. Simply create an extended class (see here for an example https://github.com/RIPE-NCC/hadoop-pcap/blob/master/hadoop-pcap-lib/src/main/java/net/ripe/hadoop/pcap/HashPayloadPcapReader.java). Then use this instead of the PcapReader class.

from hadoop-pcap.

kishorer747-zz avatar kishorer747-zz commented on June 24, 2024

How do i set Pcap reader class in my Mapper? If i use HttpPcapReader
instead of Packet packet = (Packet)value.get(); , i get this
error: Caused by: java.lang.ClassCastException:
net.ripe.hadoop.pcap.packet.Packet cannot be cast to
net.ripe.hadoop.pcap.packet.HttpPacket

I want raw hex dump of HTTP packets. Also how do i set datastream input for
this HttpPcap reader class? Please help.

On 29 June 2015 at 17:25, Wolfgang Nagele [email protected] wrote:

Reopened #30 #30.


Reply to this email directly or view it on GitHub
#30 (comment).

Cheers

Kishore
http://kishorer.in

from hadoop-pcap.

wnagele avatar wnagele commented on June 24, 2024

If you wanna write your own runner look here for an example: https://github.com/RIPE-NCC/hadoop-pcap/blob/master/hadoop-pcap-lib/src/main/java/net/ripe/hadoop/pcap/run/PcapReaderRunner.java

from hadoop-pcap.

mayank1807 avatar mayank1807 commented on June 24, 2024

Dear Sir,
I want to read HTTP payload from packet using Hadoop-pcap. I did not found any method for extracting payload from packet.

from hadoop-pcap.

SainathB avatar SainathB commented on June 24, 2024

Hi Sir,
In README.md file Configure reader section, I didn't get how to change the value of property net.ripe.hadoop.pcap.io.reader.class. Please help me in this.

Thanks in adavance.

from hadoop-pcap.

wnagele avatar wnagele commented on June 24, 2024

It's a Java system property so you can specify it when starting the JVM with the -D option.

from hadoop-pcap.

mayank1807 avatar mayank1807 commented on June 24, 2024

Dear Sir,

I ran example given by you "Example: Count source ports" which ran perfectly but when I make change in mapper class from "Packet packet = (Packet)value.get();" to "HttpPacket packet = (HttpPacket)value.get();" and during runtime I change reader as :
hadoop jar PcapTrial.jar /usr/local/hadoop/input /usr/local/hadoop/output -Dnet.ripe.hadoop.pcap.io.reader.class=net.ripe.hadoop.pcap.HttpPcapReader
then error came as :
java.lang.Exception: java.lang.ClassCastException: net.ripe.hadoop.pcap.packet.Packet cannot be cast to net.ripe.hadoop.pcap.packet.HttpPacket

Please help..!!

from hadoop-pcap.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.