Skip to content

Instantly share code, notes, and snippets.

View actiago's full-sized avatar
💭
🐙

Tiago Amaral actiago

💭
🐙
View GitHub Profile
@actiago
actiago / backup-minikube.sh
Created February 22, 2025 14:58
minikube - backup, update and run
#!/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
@actiago
actiago / whois_exp_date.sh
Created February 14, 2024 18:31
Whois expiration date
#!/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}'
@actiago
actiago / ifconfig.ps1
Created February 14, 2024 18:25
Windoes - Get interface ip addresses
# Get interface ip addresses
Get-NetIpAddress | Select-Object InterfaceAlias,IPAddress,AddressFamily | Format-Table
@actiago
actiago / getmypubip.ps1
Created February 14, 2024 18:24
Windows - Get my public address
# Get my public address
nslookup myip.opendns.com resolver1.opendns.com
@actiago
actiago / get_ssl_exp_date.sh
Created February 14, 2024 04:59
Get SSL certificate expiration date with openssl
#!/usr/bin/bash
read -p "Digite a URL: " URL
openssl s_client -connect "$URL":443 </dev/null 2>/dev/null | openssl x509 -noout -dates
@actiago
actiago / sendmsg-telegram.sh
Created May 30, 2023 00:24
telegram bash webhook notification
# 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"
@actiago
actiago / jail.local
Last active February 22, 2024 20:25
jail.local
[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
@actiago
actiago / gist:47978a6e81e7cd26b29f3519c97e36e1
Created August 27, 2021 22:25 — forked from Khoulaiz/gist:41b387883a208d6e914b
Checking ports without telnet

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 &lt; /dev/tcp/127.0.0.1/23