mirror of
https://github.com/Rucknium/xmrpeers.git
synced 2024-12-23 03:59:25 +00:00
139 lines
8.6 KiB
HTML
139 lines
8.6 KiB
HTML
|
<!DOCTYPE html>
|
||
|
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Collect connected peers' IP addresses — peers.ip.collect • xmrpeers</title><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Collect connected peers' IP addresses — peers.ip.collect"><meta name="description" content='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.'><meta property="og:description" content='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.'></head><body>
|
||
|
<a href="#main" class="visually-hidden-focusable">Skip to contents</a>
|
||
|
|
||
|
|
||
|
<nav class="navbar navbar-expand-lg fixed-top bg-light" data-bs-theme="light" aria-label="Site navigation"><div class="container">
|
||
|
|
||
|
<a class="navbar-brand me-2" href="../index.html">xmrpeers</a>
|
||
|
|
||
|
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.1.0</small>
|
||
|
|
||
|
|
||
|
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||
|
<span class="navbar-toggler-icon"></span>
|
||
|
</button>
|
||
|
|
||
|
<div id="navbar" class="collapse navbar-collapse ms-3">
|
||
|
<ul class="navbar-nav me-auto"><li class="active nav-item"><a class="nav-link" href="../reference/index.html">Reference</a></li>
|
||
|
</ul><ul class="navbar-nav"><li class="nav-item"><form class="form-inline" role="search">
|
||
|
<input class="form-control" type="search" name="search-input" id="search-input" autocomplete="off" aria-label="Search site" placeholder="Search for" data-search-index="../search.json"></form></li>
|
||
|
</ul></div>
|
||
|
|
||
|
|
||
|
</div>
|
||
|
</nav><div class="container template-reference-topic">
|
||
|
<div class="row">
|
||
|
<main id="main" class="col-md-9"><div class="page-header">
|
||
|
|
||
|
<h1>Collect connected peers' IP addresses</h1>
|
||
|
|
||
|
<div class="d-none name"><code>peers.ip.collect.Rd</code></div>
|
||
|
</div>
|
||
|
|
||
|
<div class="ref-description section level2">
|
||
|
<p>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. <code>ctrl + c</code> to interrupt the function.</p>
|
||
|
</div>
|
||
|
|
||
|
<div class="section level2">
|
||
|
<h2 id="ref-usage">Usage<a class="anchor" aria-label="anchor" href="#ref-usage"></a></h2>
|
||
|
<div class="sourceCode"><pre class="sourceCode r"><code><span><span class="fu">peers.ip.collect</span><span class="op">(</span></span>
|
||
|
<span> csv.file <span class="op">=</span> <span class="st">"xmr-peers-ip.csv"</span>,</span>
|
||
|
<span> unrestricted.rpc.url <span class="op">=</span> <span class="st">"http://127.0.0.1:18081"</span>,</span>
|
||
|
<span> malicious.ips <span class="op">=</span> <span class="cn">NULL</span>,</span>
|
||
|
<span> top.subnet.mask <span class="op">=</span> <span class="fl">24</span>,</span>
|
||
|
<span> n.top.subnets <span class="op">=</span> <span class="fl">10</span>,</span>
|
||
|
<span> poll.time <span class="op">=</span> <span class="fl">30</span></span>
|
||
|
<span><span class="op">)</span></span></code></pre></div>
|
||
|
</div>
|
||
|
|
||
|
<div class="section level2">
|
||
|
<h2 id="arguments">Arguments<a class="anchor" aria-label="anchor" href="#arguments"></a></h2>
|
||
|
|
||
|
|
||
|
<dl><dt id="arg-csv-file">csv.file<a class="anchor" aria-label="anchor" href="#arg-csv-file"></a></dt>
|
||
|
<dd><p>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.</p></dd>
|
||
|
|
||
|
|
||
|
<dt id="arg-unrestricted-rpc-url">unrestricted.rpc.url<a class="anchor" aria-label="anchor" href="#arg-unrestricted-rpc-url"></a></dt>
|
||
|
<dd><p>URL and port of the <code>monerod</code> unrestricted RPC.
|
||
|
Default is <code>http://127.0.0.1:18081</code></p></dd>
|
||
|
|
||
|
|
||
|
<dt id="arg-malicious-ips">malicious.ips<a class="anchor" aria-label="anchor" href="#arg-malicious-ips"></a></dt>
|
||
|
<dd><p>A character vector of IP addreses that are suspected
|
||
|
to be malicious.</p></dd>
|
||
|
|
||
|
|
||
|
<dt id="arg-top-subnet-mask">top.subnet.mask<a class="anchor" aria-label="anchor" href="#arg-top-subnet-mask"></a></dt>
|
||
|
<dd><p>Numeric value. The IP address subnet mask to print
|
||
|
summary information about.</p></dd>
|
||
|
|
||
|
|
||
|
<dt id="arg-n-top-subnets">n.top.subnets<a class="anchor" aria-label="anchor" href="#arg-n-top-subnets"></a></dt>
|
||
|
<dd><p>Number of subnets to print summary information about.</p></dd>
|
||
|
|
||
|
|
||
|
<dt id="arg-poll-time">poll.time<a class="anchor" aria-label="anchor" href="#arg-poll-time"></a></dt>
|
||
|
<dd><p>How often, in seconds, to collect data from the local
|
||
|
monero node. Default is 30 seconds.</p></dd>
|
||
|
|
||
|
</dl></div>
|
||
|
<div class="section level2">
|
||
|
<h2 id="value">Value<a class="anchor" aria-label="anchor" href="#value"></a></h2>
|
||
|
<p>NULL (invisible)</p>
|
||
|
</div>
|
||
|
|
||
|
<div class="section level2">
|
||
|
<h2 id="ref-examples">Examples<a class="anchor" aria-label="anchor" href="#ref-examples"></a></h2>
|
||
|
<div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span><span class="kw">if</span> <span class="op">(</span><span class="cn">FALSE</span><span class="op">)</span> <span class="op">{</span> <span class="co"># \dontrun{</span></span></span>
|
||
|
<span class="r-in"><span><span class="va">suspected.malicious.ips</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/readLines.html" class="external-link">readLines</a></span><span class="op">(</span></span></span>
|
||
|
<span class="r-in"><span> <span class="st">"https://raw.githubusercontent.com/Boog900/monero-ban-list/refs/heads/main/ban_list.txt"</span><span class="op">)</span></span></span>
|
||
|
<span class="r-in"><span><span class="fu">peers.ip.collect</span><span class="op">(</span>malicious.ips <span class="op">=</span> <span class="va">suspected.malicious.ips</span><span class="op">)</span></span></span>
|
||
|
<span class="r-in"><span><span class="op">}</span> <span class="co"># }</span></span></span>
|
||
|
</code></pre></div>
|
||
|
</div>
|
||
|
</main><aside class="col-md-3"><nav id="toc" aria-label="Table of contents"><h2>On this page</h2>
|
||
|
</nav></aside></div>
|
||
|
|
||
|
|
||
|
<footer><div class="pkgdown-footer-left">
|
||
|
<p>Developed by Rucknium.</p>
|
||
|
</div>
|
||
|
|
||
|
<div class="pkgdown-footer-right">
|
||
|
<p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.1.1.</p>
|
||
|
</div>
|
||
|
|
||
|
</footer></div>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
</body></html>
|
||
|
|