dmorn / lsaddr

List network addresses used by your apps

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

lsaddr

GoDoc Go Report Card Release Build Status Reviewed by Hound

Before we start

Supported OS

  • macOS
  • linux
  • windows

External dependencies

OS Dep Notes
macOS lsof (tested revision: 4.89)
macOS pgrep
Linux lsof
Windows netstat
Windows tasklist

Installation

Choose one

  • $ go get -u github.com/booster-proj/lsaddr
  • $ bash <(curl -s https://raw.githubusercontent.com/booster-proj/lsaddr/master/install.sh)
  • download your favourite release from the releases section

Big thanks to goreleaser and godownloader which made the releasing process FUN! šŸ¤©

Usage

The idea is to easily filter the list of open network files of a specific application. The list is filtered with a regular expression: only the lines that match against it are kept, the others discarded.

Examples

Find connections opened by "Spotify"

% bin/lsaddr Spotify
PID,CMD,NET,SRC,DST
62822,Spotify,tcp,10.7.152.118:52213,104.199.64.50:80
62822,Spotify,tcp,10.7.152.118:52255,35.186.224.47:443
62826,Spotify,tcp,10.7.152.118:52196,35.186.224.53:443

Increment verbosity (debugging)

Note: debug information is printed to stderr, command's output to stdout.

% bin/lsaddr Spotify --verbose
...

(output omitted for readiness)

Dump Spotify's network traffic using tcpdump

% bin/lsaddr -f bpf Spotify | xargs -0 sudo tcpdump

About

List network addresses used by your apps

License:GNU Affero General Public License v3.0


Languages

Language:Go 98.7%Language:Makefile 1.3%