mirror of
https://git.hush.is/hush/hush3.git
synced 2025-12-07 00:03:01 -05:00
Hush port scanner
I wrote this simple port scanner in 5 minutes to verify if 3rd party Hush notary seeds from https://github.com/KomodoPlatform/dPoW/blob/master/iguana/3rd_party were running properly. Currently they are all down. $ cat contrib/notary_seeds.txt | ./contrib/hush_scanner HOST P2P RPC 103.6.12.117 DOWN DOWN 95.213.238.99 DOWN DOWN 77.75.121.139 DOWN DOWN 139.162.45.144 DOWN DOWN 152.89.105.66 DOWN DOWN 152.89.104.58 DOWN DOWN 5.53.120.34 DOWN DOWN 139.99.208.141 DOWN DOWN
This commit is contained in:
parent
3e8fd68a63
commit
230cbffcf6
29
contrib/hush_scanner
Executable file
29
contrib/hush_scanner
Executable file
@ -0,0 +1,29 @@
|
||||
#!/usr/bin/env perl
|
||||
# Copyright (c) 2019 The Hush developers
|
||||
# Released under the GPLv3
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
# Given a file of host data, one per line,
|
||||
# scan them to see if p2p/rpc ports are accessible
|
||||
# RPCs should not be open to the internet and this is
|
||||
# an easy way to check many hosts, as well as seeing
|
||||
# if a full node is down via an inaccessible p2p port.
|
||||
# Scan a different coin via P2PPORT and RPCPORT.
|
||||
|
||||
print "HOST P2P RPC\n";
|
||||
while (<>) {
|
||||
chomp;
|
||||
my $host = $_;
|
||||
my $p2pport = $ENV{P2PPORT} || 18030;
|
||||
my $rpcport = $ENV{RPCPORT} || $p2pport + 1;
|
||||
my $cmd1 = qq{nc -z -w2 $host $p2pport};
|
||||
my $cmd2 = qq{nc -z -w2 $host $rpcport};
|
||||
qx{$cmd1};
|
||||
my $errcode1 = $?;
|
||||
qx{$cmd2};
|
||||
my $errcode2 = $?;
|
||||
my $status1 = $errcode1 ? "DOWN" : "UP";
|
||||
my $status2 = $errcode2 ? "DOWN" : "UP";
|
||||
print "$host $status1 $status2\n"
|
||||
}
|
||||
8
contrib/notary_seeds.txt
Normal file
8
contrib/notary_seeds.txt
Normal file
@ -0,0 +1,8 @@
|
||||
103.6.12.117
|
||||
95.213.238.99
|
||||
77.75.121.139
|
||||
139.162.45.144
|
||||
152.89.105.66
|
||||
152.89.104.58
|
||||
5.53.120.34
|
||||
139.99.208.141
|
||||
Loading…
x
Reference in New Issue
Block a user