Advertisement
FlyFar

dev/redeploy.sh

Aug 12th, 2023
952
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.16 KB | Cybersecurity | 0 0
  1. #!/bin/bash
  2. #
  3. # Copyright (C) 2017-2018  Joe Testa <jtesta@positronsecurity.com>
  4. #
  5. # This program is free software: you can redistribute it and/or modify
  6. # it under the terms version 3 of the GNU General Public License as
  7. # published by the Free Software Foundation.
  8. #
  9. # This program is distributed in the hope that it will be useful,
  10. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  12. # GNU General Public License for more details.
  13. #
  14. # You should have received a copy of the GNU General Public License
  15. # along with this program.  If not, see <http://www.gnu.org/licenses/>.
  16. #
  17. #
  18. #
  19. # This script is used during the development process to compile and re-deploy
  20. # sshd_mitm.
  21.  
  22. killall -u ssh-mitm
  23.  
  24. pushd openssh-7.5p1-mitm
  25. if [[ $1 == 'clean' ]]; then
  26.    make clean
  27.    make -j 10 > /dev/null
  28. else
  29.    make -j 10
  30. fi
  31. popd
  32.  
  33. if [[ (! -f openssh-7.5p1-mitm/sshd) || (! -f openssh-7.5p1-mitm/ssh) ]]; then
  34.    echo -e "\n\t!!!! Compile error !!!!\n"
  35.    exit -1
  36. fi
  37.  
  38. cp openssh-7.5p1-mitm/sshd ~ssh-mitm/bin/sshd_mitm
  39. cp openssh-7.5p1-mitm/ssh ~ssh-mitm/bin/ssh
  40. su - ssh-mitm -c "./run.sh"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement