Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to decode packets #265

Open
DarrenRainey opened this issue May 23, 2020 · 4 comments
Open

Unable to decode packets #265

DarrenRainey opened this issue May 23, 2020 · 4 comments

Comments

@DarrenRainey
Copy link

DarrenRainey commented May 23, 2020

Currently I'm having the following error when ever I try to decode any packets:
I installed pcap via npm i pcap

/root/node_modules/pcap/decode/ieee802.11/radio_packet.js:86
            throw new Error('Radiotap Namespace / Vendor Namespace not implemented yet');
            ^

Error: Radiotap Namespace / Vendor Namespace not implemented yet
    at buildDecoder (/root/node_modules/pcap/decode/ieee802.11/radio_packet.js:86:19)
    at RadioPacket.decode (/root/node_modules/pcap/decode/ieee802.11/radio_packet.js:57:37)
    at PcapPacket.decode (/root/node_modules/pcap/decode/pcap_packet.js:46:54)
    at Function.decode [as packet] (/root/node_modules/pcap/decode/index.js:11:36)
    at PcapSession.<anonymous> (/root/test.js:8:26)
    at PcapSession.emit (events.js:198:13)
    at PcapSession.on_packet_ready (/root/node_modules/pcap/pcap.js:107:10)
    at PcapSession.session.read_callback (/root/node_modules/pcap/pcap.js:72:45)

This is the code I'm trying to test:

var pcap=require('pcap');
pcap.createSession("wlan0mon", '(type mgt) and (type mgt subtype probe-req )').
        on('packet', function (raw_packet) {
                with(pcap.decode.packet(raw_packet).link.ieee802_11Frame)
                        if (type == 0 && subType == 4)
                                console.log("Probe request",shost, "-> ",bssid);
        }
);
@mildsunrise
Copy link
Contributor

hello, if you're still hitting the problem please send us a .pcap of that interface, or the bytes of raw_packet which fails decoding

@DarrenRainey
Copy link
Author

hello, if you're still hitting the problem please send us a .pcap of that interface, or the bytes of raw_packet which fails decoding

Unfortunately I don't have a pcap file as I'm streaming directly from my wifi card I did some research on this a while ago and apparently it has something to do with the api change between v2 and v3 although I haven't gotten around to rewriting it yet.

@About7Sharks
Copy link

Can confirm, ran into this issue today. Only happens when trying to decode the packet; leaving in raw works fine :/

@mildsunrise
Copy link
Contributor

please, send us a .pcap with the captured packets (you can obtain one with i.e. wireshark or tcpdump)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants