Skip to contents

Collects IP addreses of peers that the local node has established outbound connections to. The time and set of IP addreses are saved to a CSV file. These IP addreses are checked against an optional set of suspected malicious IP addresses. Information about the share of outbound connections to suspected maclicious IP addreses is printed. IP addresses are grouped by subnet and information is printed to check for possible "subnet saturation" by malicious entities. This function is an infinite loop. ctrl + c to interrupt the function.

Usage

peers.ip.collect(
  csv.file = "xmr-peers-ip.csv",
  unrestricted.rpc.url = "http://127.0.0.1:18081",
  malicious.ips = NULL,
  top.subnet.mask = 24,
  n.top.subnets = 10,
  poll.time = 30
)

Arguments

csv.file

The name of the CSV file to write to and read from. If it already exists, data will be appended to it and the whole file will be used to compute top subnet information.

unrestricted.rpc.url

URL and port of the monerod unrestricted RPC. Default is http://127.0.0.1:18081

malicious.ips

A character vector of IP addreses that are suspected to be malicious.

top.subnet.mask

Numeric value. The IP address subnet mask to print summary information about.

n.top.subnets

Number of subnets to print summary information about.

poll.time

How often, in seconds, to collect data from the local monero node. Default is 30 seconds.

Value

NULL (invisible)

Examples

if (FALSE) { # \dontrun{
suspected.malicious.ips <- readLines(
  "https://raw.githubusercontent.com/Boog900/monero-ban-list/refs/heads/main/ban_list.txt")
peers.ip.collect(malicious.ips = suspected.malicious.ips)
} # }