netuniq

module
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 29, 2021 License: GPL-3.0

README

netuniq

Netuniq accepts a list of hosts, CIDR ranges, and IPs on stdin and deduplicates them. It will also filter out any domains that do not have an A record associated with them.

Usage

$ cat test.txt                                                                                                                                                master
93.184.216.34
93.184.216.32/27
example.com
dsafasdfdsafsdafsadfsadfsadfasdfasdfasdfasdasdf.com
4.2.2.2
example.com
93.184.216.34

$ cat test.txt | ./netuniq                                                                                                                                    master
example.com
93.184.216.32/27
4.2.2.2

$ cat test.txt | ./netuniq -json
[
    {
        "ips": [
            "93.184.216.34"
        ],
        "hostname": "example.com"
    },
    {
        "subnet": "93.184.216.32/27"
    },
    {
        "ips": [
            "4.2.2.2"
        ]
    }
]

Install

go install github.com/leesoh/netuniq/cmd/netuniq@latest

Directories

Path Synopsis
cmd
netuniq command
internal

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL