Skip to content

Instantly share code, notes, and snippets.

@vinnymac
Last active February 12, 2019 17:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vinnymac/0b6a5bc874e86ce898f366b64f7b26c8 to your computer and use it in GitHub Desktop.
Save vinnymac/0b6a5bc874e86ce898f366b64f7b26c8 to your computer and use it in GitHub Desktop.
Sniff machine names from a local or remotely connected network without additional installs
#!/bin/bash
for a in $(arp -n | tail -n+2 | cut -d' ' -f1);
do
nmblookup -A $a;
done
#!/bin/bash
# Helpful - `dns-sd -B _smb._tcp`
for a in $(arp -al | tail -n+2 | cut -d' ' -f1);
do
smbutil lookup $a;
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment