Git Product home page Git Product logo

Comments (6)

mscdex avatar mscdex commented on August 27, 2024

Did you check console.dir(device)? If it's not a non-empty string, you might try doing console.dir(Cap.deviceList()) to check what network interfaces and addresses are available.

from cap.

nikhiljha avatar nikhiljha commented on August 27, 2024

console.dir(device) is undefined, so that's a problem

console.dir(Cap.deviceList()) gives a few interfaces

from cap.

mscdex avatar mscdex commented on August 27, 2024

Ok, but none of the interfaces shown include the interface with the IP address you're trying? If that is true, then you may need to find out what is unique about the missing interface.

If you execute node -e "console.dir(require('os').networkInterfaces())", do you see the IP address?

Lastly, what OS and OS version are you trying this on?

from cap.

nikhiljha avatar nikhiljha commented on August 27, 2024

Is that supposed to be my own address?

What if I'm trying to monitor arp packets from everywhere?

(It does work if I change the device = Cap.findDevice('192.168.1.131'), to my ip, but that does something else).


I see my own address with node -e "console.dir(require('os').networkInterfaces())" and loopback.


Win10

from cap.

nikhiljha avatar nikhiljha commented on August 27, 2024

Yup, figured it out.

I just used this library (which builds off of cap) - so if anyone reads this in the future is trying to work with dash buttons - read this:

I needed to put my own IP, which wasn't very idiot friendly, but it doesn't need to be.

var nodeis = require('win-node-dash-button');
var svr = new nodeis.Server(),
    tide   = new nodeis.DashButton("MAC ADDRESS OF BUTTON - WIRESHARK IT (Filter: ARP)", function () { console.log("Button pressed"); });

svr.register(tide)
   .start("YOUR LOCAL IP (like 192.168.1.111)");

from cap.

JaLe29 avatar JaLe29 commented on August 27, 2024

Not working for me, still I am getting undefined on line device = Cap.findDevice('192.168.1.131')

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.