Skip to content

Instantly share code, notes, and snippets.

@vinnymac

vinnymac/sniff-linux.sh

Last active Feb 12, 2019
Embed
What would you like to do?
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