8000 GitHub - princebot/ipgrep: simple utility to extract IPv4 and IPv6 addresses from text files
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

princebot/ipgrep

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

ipgrep

usage: ipgrep [file ...]

ipgrep scans one or more input files for valid IPv4 or IPv6 addresses and prints the result. It accepts text files in any format (plaintext, JSON, YAML, etc.) so long as the files contain IPs separated by a delimiter it can recognize (i.e., any whitespace character and any punctuation character other than . or :).

These are all valid inputs:

10.10.10.2 https://webserver.com
{"ip": "172.16.2.84"}
log -> time=13:10, event=foo, addr=192.168.0.2, desc="a foo went bar"
IP address 8.8.8.8 is for Google DNS.

ipgrep would extract 10.10.10.2, 172.16.2.84, 192.168.0.2, and 8.8.8.8 from the above.

Given this input, however —

There’s no place like 127.0.0.1.

ipgrep extracts nothing: Technically, the final . renders that IP invalid, and this utility does not aspire to robustness.

Use standard Golang-fu to install: go get -u github.com/princebot/ipgrep

About

simple utility to extract IPv4 and IPv6 addresses from text files

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

0