๐ง HMAS TIP
May 21, 2025โข274 words
๐ฅ๏ธ SSH Welcome Message with Hacker Style ๐
Give your server logins some hacker flair by pulling a dynamic message
from HMAS every time you SSH in. ๐ฌ
No more boring Last login: โ now it says something spicy. ๐ถ๏ธ
๐ What This Script Does
- Connects to HMAS API on SSH login
- Calls:
api.php?as=admin&apikey=... - Prints the message as a login banner (like a stylish MOTD)
๐ Script: api_login_message.sh
#!/bin/bash
# === BASIC CONFIG ===
API_KEY="your_api_key"
API_URL="https://carlostkd.ch/hmas/api.php"
MSG="admin"
# === FETCH AND DISPLAY MESSAGE ===
RESPONSE=$(curl -s -G "$API_URL" \
--data-urlencode "as=$MSG" \
--data-urlencode "apikey=$API_KEY")
if [[ -n "$RESPONSE" ]]; then
echo -e "\n[1;36m๐ฌ Admin Message:[0m"
echo -e "$RESPONSE\n"
fi
๐ ๏ธ Installation Instructions
๐ง For a Single User:
- Save the script to your home directory:
bash nano ~/api_login_message.sh - Paste the code above and update your
API_KEYandAPI_URL. Optionaly replace "admin" with anything else - Make it executable:
bash chmod +x ~/api_login_message.sh - Add this to the end of
~/.bashrc:bash bash ~/api_login_message.sh
๐ For All Users (Global MOTD Style):
- Save the script to
/etc/profile.d/:bash sudo nano /etc/profile.d/api_login_message.sh - Paste the code and update the credentials.
- Make it executable:
bash sudo chmod +x /etc/profile.d/api_login_message.sh
๐ง Pro Tips
- Works great for red team ops and themed environments ๐ถ๏ธ
- Use custom messages like
as=securityoras=alertonce youโre ready - Combine with
/etc/motdfor ultimate login experience
๐ Bonus Message
โThey logged into the Matrix and all I got was this lousy shell.โ
Happy hacking!