Есть список баннеров при сканировании ssh серверов через масскан Подскажите рецепт, чтобы средствами bash оставить только список ip столбиком при условии что оставить надо только те адреса, которые имеюt определенную версию ssh
Например вывод в формате json { "ip": "xxx.xxx.xxx.xxx", "ports": [ {"port": 21, "proto": "tcp", "status": "open", "reason": "syn-ack", "ttl": 59} ] }, { "ip": "xxx.xxx.xxx.xxx", "ports": [ {"port": 21, "proto": "tcp", "status": "open", "reason": "syn-ack", "ttl": 59} ] }, { "ip": "xxx.xxx.xxx.xxx", "ports": [ {"port": 21, "proto": "tcp", "status": "open", "reason": "syn-ack", "ttl": 59} ] }, { "ip": "xxx.xxx.xxx.xxx", "ports": [ {"port": 21, "proto": "tcp", "status": "open", "reason": "syn-ack", "ttl": 59} ] }, { "ip": "xxx.xxx.xxx.xxx", "ports": [ {"port": 21, "proto": "tcp", "service": {"name": "ftp", "banner": "220 (vsFTPd 2.3.2)\u000a530 Please login with USER and PASS."} } ] }, { "ip": "xxx.xxx.xxx.xxx", "ports": [ {"port": 21, "proto": "tcp", "service": {"name": "ftp", "banner": "220 (vsFTPd 2.3.2)\u000a530 Please login with USER and PASS."} } ] }, { "ip": "xxx.xxx.xxx.xxx", "ports": [ {"port": 21, "proto": "tcp", "service": {"name": "ftp", "banner": "220 FTP Server ready.\u000a500 AUTH not understood"} } ] }, { "ip": "xxx.xxx.xxx.xxx", "ports": [ {"port": 21, "proto": "tcp", "service": {"name": "ftp", "banner": "220 FTP Server ready.\u000a500 AUTH "} } ] }, { "ip": "xxx.xxx.xxx.xxx", "ports": [ {"port": 21, "proto": "tcp", "service": {"name": "ftp", "banner": "220 ProFTPD 1.3.3a Server (Debian) [::ffff:xxx.xxx.xxx.xxx]\u000a500 AUTH not understood"} } ] }, Необходимо получить список адресов где баннер содержит "220 (vsFTPd 2.3.2)"
Не хочется создавать под каждый вопрос тему, спрошу тут В баш скрипте необходимо получать ввод пользователя, а именно диапазона адресов Банальный пример Code: #!/bin/bash echo "Enter ip range for scan ex.10.0.0.0/8" read range Подскажите как применить маску для ввода и выдавать ошибку при некорректном вводе диапазона