Here are several different ways to test a TCP port without telnet.
BASH (man page)
$ cat < /dev/tcp/127.0.0.1/22
SSH-2.0-OpenSSH_5.3
^C
$ cat < /dev/tcp/127.0.0.1/23
| #!/bin/bash | |
| # Diretório de backup | |
| BACKUP_DIR="${HOME}/minikube_backup_$(date +%Y%m%d_%H%M%S)" | |
| mkdir -p "${BACKUP_DIR}" | |
| # Backup dos perfis do Minikube | |
| echo "Backup dos perfis do Minikube..." | |
| minikube profile list > "${BACKUP_DIR}/minikube_profiles.txt" |
| #!/usr/bin/bash | |
| while read -r URL; do | |
| echo "Processando a url: $URL" | |
| openssl s_client -connect "$URL":443 </dev/null 2>/dev/null | openssl x509 -noout -dates -issuer | |
| echo "" | |
| done < certificados.txt |
| #!/usr/bin/env bash | |
| DOMAIN_LIST="google.com" | |
| echo "Expiration dates:" | |
| for domain in $DOMAIN_LIST | |
| do | |
| echo -n "$domain = " | |
| whois $domain | grep 'expires' | awk '{print $2}' |
| # Get interface ip addresses | |
| Get-NetIpAddress | Select-Object InterfaceAlias,IPAddress,AddressFamily | Format-Table |
| # Get my public address | |
| nslookup myip.opendns.com resolver1.opendns.com |
| #!/usr/bin/bash | |
| read -p "Digite a URL: " URL | |
| openssl s_client -connect "$URL":443 </dev/null 2>/dev/null | openssl x509 -noout -dates |
| # Set the API token and chat ID | |
| API_TOKEN="<your_api_token>" | |
| CHAT_ID="<your_chat_id>" | |
| # Set the message text | |
| MESSAGE="This is a test message" | |
| # Use the curl command to send the message | |
| curl -s -X POST https://api.telegram.org/bot$API_TOKEN/sendMessage -d chat_id=$CHAT_ID -d text="$MESSAGE" |
| [sshd] | |
| enabled = true | |
| port = ssh | |
| filter = sshd | |
| logpath = /var/log/auth.log | |
| maxretry = 3 | |
| findtime = 300 | |
| bantime = 3600 | |
| ignoreip = 127.0.0.1 |
| snap disable firefox | |
| snap remove --purge firefox | |
| sudo apt remove --autoremove firefox | |
| sudo add-apt-repository ppa:mozillateam/ppa | |
| sudo nano /etc/apt/preferences.d/99mozillateamppa |
Here are several different ways to test a TCP port without telnet.
$ cat < /dev/tcp/127.0.0.1/22
SSH-2.0-OpenSSH_5.3
^C
$ cat < /dev/tcp/127.0.0.1/23