Skip to content

Network

Ping, port scan, traceroute, and WHOIS lookup.

4 modules

ModuleDescription
PingPing a host to check connectivity and measure latency
Port ScanScan ports on a host to check which are open
TracerouteTrace the route packets take to reach a destination host
WHOIS LookupPerform WHOIS lookup for a domain to retrieve registration information

Modules

Ping

network.ping

Ping a host to check connectivity and measure latency

Parameters:

NameTypeRequiredDefaultDescription
hoststringYes-Hostname or IP address to ping
countnumberNo4Number of ping packets to send
timeoutnumberNo5Timeout in seconds for each packet

Output:

FieldTypeDescription
hoststringThe pinged host
alivebooleanWhether the host responded
packets_sentnumberNumber of packets sent
packets_receivednumberNumber of packets received
packet_loss_pctnumberPacket loss percentage
latency_msobjectLatency statistics in milliseconds (min, avg, max)

Example: Ping a host

yaml
host: google.com
count: 4
timeout: 5

Port Scan

network.port_scan

Scan ports on a host to check which are open

Parameters:

NameTypeRequiredDefaultDescription
hoststringYes-Hostname or IP address to scan
portsstringNo-Ports to scan: comma-separated (80,443), range (80-443), or leave empty for common ports
timeoutnumberNo1.0Connection timeout in seconds per port

Output:

FieldTypeDescription
hoststringThe scanned host
open_portsarrayList of open port numbers
closed_portsarrayList of closed port numbers
scan_time_msnumberTotal scan time in milliseconds

Example: Scan common ports

yaml
host: example.com

Example: Scan specific port range

yaml
host: example.com
ports: 80-443
timeout: 2.0

Traceroute

network.traceroute

Trace the route packets take to reach a destination host

Parameters:

NameTypeRequiredDefaultDescription
hoststringYes-Hostname or IP address to trace route to
max_hopsnumberNo30Maximum number of hops to trace
timeoutnumberNo5Timeout in seconds for each probe

Output:

FieldTypeDescription
hoststringThe target host
hopsarrayList of hops along the route
total_hopsnumberTotal number of hops to reach destination

Example: Trace route to host

yaml
host: google.com
max_hops: 30

WHOIS Lookup

network.whois

Perform WHOIS lookup for a domain to retrieve registration information

Parameters:

NameTypeRequiredDefaultDescription
domainstringYes-Domain name to look up

Output:

FieldTypeDescription
domainstringThe queried domain
registrarstringDomain registrar
creation_datestringDomain creation date
expiration_datestringDomain expiration date
name_serversarrayList of name servers
rawstringFull raw WHOIS output

Example: WHOIS lookup

yaml
domain: example.com

Released under the Apache 2.0 License.