Skip to content

Networking#

Utilities for networking.


curl-get#

Download a file from a URL using curl. Primarily designed to download files in scripts, but can be used interactively as well (you may want to add the --progress-meter and --progress-bar options).

Usage

curl-get URL OUTPUT [EXTRA...]

Params:
URL                URL of the file to download
OUTPUT             Path to the output file
EXTRA              Optional extra params to 'curl'

dns-mail#

Retrieve email related DNS records: MX, SPF (Sender Policy Framework: a method to detect forged sender addresses), DMARC (Domain-based Message Authentication, Reporting & Conformance: an email policy, and reporting protocol) and DKIM (DomainKeys Identified Mail: an authentication method to digitally sign emails).

Usage

dns-mail DOMAIN SELECTOR

Params:
DOMAIN             Domain to inspect
SELECTOR           DKIM selector

iplocation#

Query Ipstack for GeoIP data. You need an Ipstack account and an access key to query information. This function looks for this token in an environment variable: IPSTACK_TOKEN. You can configure this in your .bashrc or if you prefer not to provide credentials in env vars, you can give token just for this command: IPSTACK_TOKEN=yourtoken iplocation 8.8.8.8.

Usage

iplocation [IP]...

Params:
IP                 IP address to check

whatsmyip4#

Return you own external IPv4 address. Retrieved from Google nameservers.

Usage

whatsmyip4

whatsmyip6#

Return you own external IPv6 address. Retrieved from Google nameservers.

Usage

whatsmyip6