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

exec, sending along details? #2

Closed
sourcequench opened this issue Jul 21, 2022 · 2 comments
Closed

exec, sending along details? #2

sourcequench opened this issue Jul 21, 2022 · 2 comments

Comments

@sourcequench
Copy link

Could you provide an example of how to pass along details of the from the discovery to the exec command? I am trying to send along details of a discovery to pushbullet - but I don't know how I might get the IP/MAC into the exec. Also - I know that the .dat file has the OUI lookup manufacturer, but arpwitch output does not provide that (unless I am just using it to query the dat). Ideally I'd like to send along ip/mac/manufacturer to pushbullet.

$ arpwitch --datafile /tmp/arpwitch.dat --exec "pushbullet push note --body arpwitch"
@ndejong
Copy link
Owner

ndejong commented Jul 21, 2022

Yep - the documentation could provide more examples and clear details here

If you take a look at the cli help you'll find this hidden in that wall of text

ARP event command execution arguments:
  The following exec command substitutions are available: {IP}=ipv4-address, 
  {HW}=hardware-address, {TS}=timestamp-utc, {ts}=timestamp-utc-short

I don't know pushbullet, but I'm guessing you'll get something closer to what I think you're looking to achieve like this

arpwitch --datafile /tmp/arpwitch.dat --exec "pushbullet push note --body arpwitch:{TS}:{IP}:{HW}"

... and you ought to put quotes around that as well I'd reckon.

The point about not being able to access the OUI device manufacturer - this is a sensible feature request

@sourcequench
Copy link
Author

Worked great. Thanks!

@ndejong ndejong closed this as completed Dec 1, 2023
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

2 participants