有人攻击我的网站,而且似乎其中一些 IP 是 Tor 出口节点。
有没有什么地方可以让我输入 IP 并明确查看它是否已注册为 Tor 出口节点?
答案1
答案2
我实际上实施了 @duskwuff 建议的解决方案。
请查看 -https://github.com/assafmo/IsTorExit
命令行:
npm install -g istorexit
istorexit [ip...]
Node.js:
const IsTorExit = require("istorexit");
IsTorExit("104.200.20.46").then(console.log); // true
IsTorExit("1.1.1.1").then(console.log); // false
答案3
https://www.ipqualityscore.com/tor-ip-address-check/lookup
您可以通过此链接检查 IP 是否是 tor 出口节点。
答案4
这是一个基于 perl 的解决方案https://github.com/assafmo/IsTorExit
my @ips = ('1.1.1.1','1.2.1.1','1.3.1.1','1.4.1.1','1.5.1.1','104.200.20.46');
foreach (@ips)
{
print("IP: $_\n");
# Build the command by reversing the IP address (ie. 1.5.1.1 to 1.1.5.1)
# Checking 1.5.1.1 via 1.1.5.1.dnsel.torproject.org
# (https://2019.www.torproject.org/projects/tordnsel.html.en - How can I query the public TorDNSEL service?)
# Lookup from a linux system using dig (+short to have a light answer)
my $cmd = "dig +short ".join(".", reverse split(/\./, $_)).".dnsel.torproject.org";
my $res = `$cmd`;
$res =~ s/^\s^|\s+$//g;
print(" Command: [$cmd] ; Result: [$res]\n");
# A records inside net 127/8, except 127.0.0.1, are reserved for future use
# and should be interpreted by clients as indicating an exit node
# (https://2019.www.torproject.org/projects/tordnsel.html.en - What do the received answers mean?)
my $is_tor = 0;
$is_tor = 1 if ($res =~ /^127\.0\.0\./ && $res ne "127.0.0.1");
print(" Is Tor? [$is_tor]\n");
}