Created
January 12, 2022 05:45
-
-
Save nick3499/abd883e231e585642d1889f685170330 to your computer and use it in GitHub Desktop.
Print Random Kali Tip
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/zsh | |
# print random string from list of Kali terminal arg tips | |
# color formats | |
GRN="\e[1;32m" | |
YEL="\e[1;33m" | |
BLU="\e[1;34m" | |
END="\e[0m" | |
# kali tips | |
STRINGS=( | |
"${BLU}kali@kali:~$ ${YEL}cat secret.txt | base64 -d > id_rsa\n ${GRN}redirect decoded base64 stdout into RSA key file${END}" | |
"${BLU}kali@kali:~$ ${YEL}ssh [email protected] -i id_rsa\n ${GRN}log into remote machine as username oscp with ID file${END}" | |
"${BLU}kali@kali:~$ ${YEL}ssh -i private [email protected] -t \"bash --noprofile\"\n ${GRN}log into remote server using private key; set bash not to read /profile${END}" | |
"${BLU}kali@kali:~$ ${YEL}curl http://192.168.120.203/secret.txt\n ${GRN}read secret.txt${END}" | |
"${BLU}kali@kali:~$ ${YEL}wget http://192.168.120.203/secret.txt -O secret.txt\n ${GRN}read secret.txt${END}" | |
"${BLU}kali@kali:~$ ${YEL}find / -perm -u=s -type f 2>/dev/null\n ${GRN}find binaries with special permission${END}" | |
"${BLU}kali@kali:~$ ${YEL}/bin/bash -p\n ${GRN}posix mode${END}" | |
"${BLU}kali@kali:~$ ${YEL}whoami\n ${GRN}current user${END}" | |
"${BLU}kali@kali:~$ ${YEL}id -un\n ${GRN}current user${END}" | |
"${BLU}kali@kali:~$ ${YEL}chmod 600 id_rsa\n ${GRN}set permissions for RSA key${END}" | |
"${BLU}kali@kali:~$ ${YEL}dirb http://192.168.120.216 -r\n ${GRN}scan Web content (not recursively)${END}" | |
"${BLU}kali@kali:~$ ${YEL}uname -a\n ${GRN}system info${END}" | |
"${BLU}kali@kali:~$ ${YEL}searchsploit \"3.13.0\"\n ${GRN}search exploit database archive${END}" | |
"${BLU}kali@kali:~$ ${YEL}sudo python3 -m http.server 80\n ${GRN}simple Python HTTP server${END}" | |
"${BLU}kali@kali:~$ ${YEL}gcc 37292.c -o 37292\n ${GRN}compile source code${END}" | |
"${BLU}kali@kali:~$ ${YEL}nc -t 10.129.1.17 23\n ${GRN}answer telnet negotiation${END}" | |
"${BLU}kali@kali:~$ ${YEL}nc -lvp 4444\n ${GRN}listen on port 4444 in verbose mode${END}" | |
"${BLU}kali@kali:~$ ${YEL}sudo nmap -p- 192.168.120.203\n ${GRN}scan all ports${END}" | |
"${BLU}kali@kali:~$ ${YEL}sudo nmap 192.168.120.86 --top-ports=5000 ${GRN}scan top 5000 ports that are typically open${END}" | |
"${BLU}kali@kali:~$ ${YEL}sudo nmap -p 1337 192.168.120.68 -sV\n ${GRN}scan port for server/version info${END}" | |
"${BLU}kali@kali:~$ ${YEL}sudo nmap -p 21,22,80,139,445,7080,7601,8088 -A 192.168.120.206\n ${GRN}scan for specific open ports aggressively${END}" | |
"${BLU}kali@kali:~$ ${YEL}medusa -h 192.168.120.86 -M mysql -u root -P /usr/share/wordlists/rockyou.txt -t 40 -v 4 -f\n ${GRN}bruteforce MySQL password${END}" | |
"${BLU}kali@kali:~$ ${YEL}mysql -u root -p janus -h 192.168.120.86\n ${GRN}authenticate to database server${END}" | |
"${BLU}kali@kali:~$ ${YEL}head password.lst\n ${GRN}read the first lines of a file${END}" | |
"${BLU}kali@kali:~$ ${YEL}hydra -l seppuku -P password.lst 192.168.120.206 ssh\n ${GRN}brute-force SSH credentials using password list${END}" | |
"${BLU}kali@kali:~$ ${YEL}sudo -l\n ${GRN}list commands allowed for current user${END}" | |
) | |
# print random tip | |
TOTAL=${#STRINGS[*]} | |
printf $STRINGS[$((RANDOM%$TOTAL))] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment