1
0
mirror of https://github.com/byReqz/conn.git synced 2024-11-25 02:04:54 +00:00
Go to file
2021-12-06 17:21:14 +01:00
.github/workflows fix hash action 2021-04-15 09:24:21 +02:00
.gitignore add note files to gitignore 2021-11-27 23:37:57 +01:00
conn.sh quick fix for v6 adresses being rejected 2021-12-06 17:20:32 +01:00
conn.sh.old prepare branch 2021-11-27 23:46:08 +01:00
LICENSE Initial commit 2021-01-15 14:40:34 +00:00
README.md add notion about old version 2021-12-05 12:47:00 +00:00

conn

quick and dirty server availability check

basically just a way too complex wrapper for nmap and fping
the pre-rewrite version is available as conn.sh.old and is no longer maintained

features:

  • 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)
  • waiting for availability
  • send notification on availability
  • updater built in

usage

Usage: conn [IP(s)/hostname(s)]
Options:
-h / --help show help page (this)
-6 / --force-ipv6 force ipv6 portscanning (also forces portscanning)
-4 / --force-ipv4 force ipv4 portscanning (also forces portscanning)
-y / --yes portscan without asking
-n / --no dont portscan
-w / --wait wait for active connection
-u / --update update the script
-f / --fast disable os check
-s / --simple simplify output

installation

  1. download the script:
wget https://git.byreqz.de/byreqz/conn/raw/branch/main/conn.sh
  1. run it with
    bash conn.sh or
    chmod +x conn.sh && ./conn.sh
  2. optionally alias it
    alias conn="~/conn.sh"

sample output

./conn.sh nils.lol
checking connection status for nils.lol
-------------------Availability----------------------
nils.lol is alive (35.5 ms)
note: this seems to be a linux machine
-----------------------------------------------------
portscan? (y/n) (default: y)

-------------------Portscan---------------------
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

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)

nils.lol : xmt/rcv/%loss = 4/4/0%, min/avg/max = 33.5/35.1/36.5
------------------------------------------------