![]() |
Есть список баннеров при сканировании ssh серверов через масскан
Подскажите рецепт, чтобы средствами bash оставить только список ip столбиком при условии что оставить надо только те адреса, которые имеюt определенную версию ssh |
формат списка бы привели
|
Цитата:
{ "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)" |
Цитата:
|
Цитата:
|
Не хочется создавать под каждый вопрос тему, спрошу тут
В баш скрипте необходимо получать ввод пользователя, а именно диапазона адресов Банальный пример Код:
#!/bin/bash |
Цитата:
|
| Время: 03:31 |