Git Product home page Git Product logo

Comments (5)

mscdex avatar mscdex commented on August 27, 2024

Assuming you're not getting an exception thrown, that doesn't look like a complete packet. You need to include every layer (including the Ethernet frame for example) and not just a TCP/UDP payload since the buffer you're sending here is what will be literally transmitted by the network card.

from cap.

wyxcoder avatar wyxcoder commented on August 27, 2024

Assuming you're not getting an exception thrown, that doesn't look like a complete packet. You need to include every layer (including the Ethernet frame for example) and not just a TCP/UDP payload since the buffer you're sending here is what will be literally transmitted by the network card.

Great! Thank you for the quick reply. Cap is great. I cannot believe the capture part just work without any problem.
So the send part. Seems the filter does nothing. I thought set filter to TCP means you can send TCP packet. So what filter I should set for sending?

from cap.

mscdex avatar mscdex commented on August 27, 2024

The filter is only for the traffic you want to capture. send() literally just sends the provided data over the network card and is not affected by anything else.

from cap.

wyxcoder avatar wyxcoder commented on August 27, 2024

I just tested, in Wireshark, I captured a packet sent from an app from my machine to a remote server. The packet size is 81, so I copied the Hex stream, and send it out. But I did't capture it in Wireshark. Any idea? Thanks!

var buffer = Buffer.from("a84e3f6c6642281878fe6aeb08004500004319c4400080060000c0a801a1ca27f132eb5b4e235bbc04e725b9a329501802007dd900008295872d0c178e280e10872d0c17872d0c1ea9370d17841c3e2487");

image

from cap.

erfanmola avatar erfanmola commented on August 27, 2024

Same issue, The library can not do any .send() with any data, as example here is my full packet :

var buffer = Buffer.from("01005E0000FB0A0027000011080045000051CB700000FF111686C0A83801E00000FB14E914E9003D119F000000000001000000000000095F7733787032373266045F737562095F626C697A7A617264045F756470056C6F63616C00000C0001");

from cap.

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.