[MENU] | |||||||||
[THOUGHTS] | [TECH RESOURCES] | [TRASH TALK] | |||||||
[DANK MEMES] | [FEATURED ARTISTS] | [W] |
Hello fellas!
I decided to code this stupid awkward script.
When you have very low privileges (let's say `www-data`) but you would like to note every connections on the server while you are being away, you can just put this thing in somewhere on victim server.
DO YOU FEEL THAT, YOU ARE BEING APT NOW? *chuckles*
So here it is:
- #!/usr/bin/env bash
-
- export TERM=xterm-256color
- clear
-
- echo
- echo
- echo " * ***"
- echo " ** ***"
- echo " ** **"
- echo " ** **"
- echo " ** ** ****"
- echo " *** **** ** *** *** ** * *** * *** **** "
- echo " * *** * *** * ** * *** * *** ** * **** **** **** * "
- echo " * *** * **** *** *** * *** ** ** ** ** **** "
- echo "** *** ** ** ** ** *** ** ** ** ** ** "
- echo "******** ** ** ** ******** ** ** ** ** ** "
- echo "******* ** ** ** ******* ** ** ** ** ** "
- echo "** ** ** ** ** ** ** ** ** ** "
- echo "**** * *** * ** ** **** * ** ****** ** ** "
- echo " ******* ******* ** ** ******* *** * **** *** *** "
- echo " ***** ***** ** ** ***** *** *** *** "
- echo " * "
- echo " * "
- echo " * "
- echo " * "
-
- echo
- echo "Agent 47"
- sleep 3
-
-
-
- touch /dev/shm/monitoring
- touch /dev/shm/new
-
- file=$(mktemp)
- progress() {
- pc=0;
- while [ -e $file ]
- do
- clear
- cat /dev/shm/monitoring
- echo -ne "$pc sec\033[0K\033[0K\r"
- sleep 1
- ((pc++))
- done
- }
-
- progress &
-
- while [[ true ]]; do
- (netstat -antp | grep -iv ":80" | grep ".*ESTABLISHED" | sort -u > /dev/shm/new) &> /dev/null &&
- cat /dev/shm/new /dev/shm/monitoring | sort -u > /dev/shm/monitoring &&
- rm /dev/shm/new
- done