Skip to content

Instantly share code, notes, and snippets.

@phrz
Created January 16, 2018 16:07
Show Gist options
  • Select an option

  • Save phrz/79d462602e46ed27a1e78605a3502365 to your computer and use it in GitHub Desktop.

Select an option

Save phrz/79d462602e46ed27a1e78605a3502365 to your computer and use it in GitHub Desktop.
A quick bash alias for finding peers on a network with nmap.
alias peers="nmap -sn 192.168.1.0/24|python3 -c $'import sys\n[print(\' \'.j oin(s.split(\' \')[4:]),end=\'\') for s in sys.stdin.readlines()[2::2]]'"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment