2021-01-15 15:00:57 +00:00
|
|
|
# conn
|
2021-11-27 22:46:08 +00:00
|
|
|
|
2021-01-18 21:32:06 +00:00
|
|
|
quick and dirty server availability check <br> <br>
|
|
|
|
basically just a way too complex wrapper for nmap and fping <br>
|
2021-12-05 12:47:00 +00:00
|
|
|
the pre-rewrite version is available as conn.sh.old and is no longer maintained <br>
|
2021-01-18 21:32:06 +00:00
|
|
|
|
|
|
|
### features:
|
2021-12-05 12:45:05 +00:00
|
|
|
- ~~multi-input detection~~ (not needed anymore since the rewrite)
|
|
|
|
- ~~ipv4 input detection~~ (not needed anymore since the rewrite)
|
|
|
|
- ~~ipv6 input detection~~ (not needed anymore since the rewrite)
|
2021-01-16 23:19:56 +00:00
|
|
|
- waiting for availability
|
|
|
|
- send notification on availability
|
2021-01-19 19:04:57 +00:00
|
|
|
- updater built in
|
2021-01-15 15:00:57 +00:00
|
|
|
|
2021-01-16 01:43:39 +00:00
|
|
|
# usage
|
2021-12-05 12:45:05 +00:00
|
|
|
Usage: conn <args> [IP(s)/hostname(s)] <br>
|
2021-01-16 01:43:39 +00:00
|
|
|
Options: <br>
|
2021-12-05 12:45:05 +00:00
|
|
|
-h / --help show help page (this) <br>
|
|
|
|
-6 / --force-ipv6 force ipv6 portscanning (also forces portscanning) <br>
|
|
|
|
-4 / --force-ipv4 force ipv4 portscanning (also forces portscanning) <br>
|
|
|
|
-y / --yes portscan without asking <br>
|
|
|
|
-n / --no dont portscan <br>
|
|
|
|
-w / --wait wait for active connection <br>
|
|
|
|
-u / --update update the script <br>
|
|
|
|
-f / --fast disable os check <br>
|
|
|
|
-s / --simple simplify output <br>
|
2021-01-17 16:15:15 +00:00
|
|
|
|
|
|
|
# installation
|
|
|
|
1. download the script: <br>
|
|
|
|
```bash
|
|
|
|
wget https://git.byreqz.de/byreqz/conn/raw/branch/main/conn.sh
|
|
|
|
```
|
|
|
|
2. run it with <br>
|
|
|
|
``
|
|
|
|
bash conn.sh
|
|
|
|
``
|
|
|
|
or <br>
|
|
|
|
``
|
2021-01-22 22:08:58 +00:00
|
|
|
chmod +x conn.sh && ./conn.sh
|
2021-01-17 16:15:15 +00:00
|
|
|
``
|
|
|
|
3. optionally alias it <br>
|
|
|
|
``alias conn="~/conn.sh"``
|
2021-02-15 14:12:34 +00:00
|
|
|
|
|
|
|
# sample output
|
|
|
|
```bash
|
2021-12-05 12:45:05 +00:00
|
|
|
./conn.sh nils.lol
|
|
|
|
checking connection status for nils.lol
|
2021-02-15 14:12:34 +00:00
|
|
|
-------------------Availability----------------------
|
2021-12-05 12:45:05 +00:00
|
|
|
nils.lol is alive (35.5 ms)
|
2021-02-15 14:12:34 +00:00
|
|
|
note: this seems to be a linux machine
|
|
|
|
-----------------------------------------------------
|
2021-12-05 12:45:05 +00:00
|
|
|
portscan? (y/n) (default: y)
|
|
|
|
|
2021-02-15 14:12:34 +00:00
|
|
|
-------------------Portscan---------------------
|
2021-12-05 12:45:05 +00:00
|
|
|
Starting Nmap 7.92 ( https://nmap.org ) at 2021-12-05 13:42 CET
|
|
|
|
Nmap scan report for nils.lol (168.119.185.158)
|
|
|
|
Host is up, received user-set (0.048s latency).
|
|
|
|
Not shown: 995 filtered tcp ports (no-response)
|
|
|
|
PORT STATE SERVICE REASON
|
|
|
|
21/tcp open ftp syn-ack
|
|
|
|
22/tcp open ssh syn-ack
|
|
|
|
80/tcp open http syn-ack
|
|
|
|
81/tcp closed hosts2-ns conn-refused
|
|
|
|
443/tcp open https syn-ack
|
|
|
|
|
|
|
|
Nmap done: 1 IP address (1 host up) scanned in 5.54 seconds
|
2021-02-15 14:12:34 +00:00
|
|
|
|
2021-12-05 12:45:05 +00:00
|
|
|
nils.lol : [0], 64 bytes, 36.5 ms (36.5 avg, 0% loss)
|
|
|
|
nils.lol : [1], 64 bytes, 35.7 ms (36.1 avg, 0% loss)
|
|
|
|
nils.lol : [2], 64 bytes, 34.7 ms (35.6 avg, 0% loss)
|
|
|
|
nils.lol : [3], 64 bytes, 33.5 ms (35.1 avg, 0% loss)
|
2021-02-15 14:12:34 +00:00
|
|
|
|
2021-12-05 12:45:05 +00:00
|
|
|
nils.lol : xmt/rcv/%loss = 4/4/0%, min/avg/max = 33.5/35.1/36.5
|
2021-02-15 14:12:34 +00:00
|
|
|
------------------------------------------------
|
|
|
|
```
|