Advertisement
FlyFar

build.sh

Jan 20th, 2024
585
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.48 KB | Cybersecurity | 0 0
  1. #!/bin/sh
  2. #
  3. # build.sh
  4. # Build plainshell
  5. # By J. Stuart McMurray
  6. # Created 20160221
  7. # Last Modified 20160227
  8.  
  9. set -e
  10.  
  11. NAME="plainshell"
  12.  
  13. # Maybe clean
  14. if [ "clean" == "$1" ]; then
  15.         if [ -f "$NAME" ]; then
  16.                 rm $NAME
  17.                 echo Removed $NAME
  18.         fi
  19.         exit
  20. fi
  21.  
  22.  
  23. # Build it
  24. cc -O2 -Wall --pedantic -o $NAME -static plainshell.c -lpcap
  25. # Strip it
  26. strip $NAME
  27.  
  28. # Tell the user
  29. H=$(basename $(pwd))
  30. (cd ..; ls -l $H/$NAME)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement