Advertisement
evilone89

Get triggered, people need thicker skin

Mar 30th, 2025
768
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.74 KB | Cybersecurity | 0 0
  1. offensive ()
  2. {
  3. #   Requires the offensive fortunes from fortune-mod to be installed; sudo apt install cowsay-off
  4. #   If you're the type of person that turns insults on in sudo then i recommend adding this to your ~/.bash_profile
  5.     fortune -s -n 144 -o
  6. : <<PACKAGE_NOTES
  7. $ sudo apt-cache policy cowsay-off fortunes-off funny-manpages
  8. cowsay-off:
  9.   Installed: 3.03+dfsg2-8
  10.   Candidate: 3.03+dfsg2-8
  11.   Version table:
  12.  *** 3.03+dfsg2-8 500
  13.         500 https://http.kali.org/kali kali-rolling/main amd64 Packages
  14.         100 /var/lib/dpkg/status
  15. fortunes-off:
  16.   Installed: 1:1.99.1-7
  17.   Candidate: 1:1.99.1-7
  18.   Version table:
  19.  *** 1:1.99.1-7 100
  20.         100 /var/lib/dpkg/status
  21. funny-manpages:
  22.   Installed: 2.3-1
  23.   Candidate: 2.3-1
  24.   Version table:
  25.  *** 2.3-1 100
  26.         100 /var/lib/dpkg/status
  27. PACKAGE_NOTES
  28. }
  29. random_cow ()
  30. {
  31.     if [[ ! -d /usr/share/cowsay/cows ]]; then
  32.         COWPATH=$(find /opt/ /usr/share /usr/local/share ~/ -type d -name 'cows' -exec dirname "{}" \;; find ~/ -type d -name 'cows' -exec dirname "{}" \;);
  33.     fi;
  34.     if [[ ! -n ${COWPATH} ]]; then
  35.         find /usr/share/cowsay/cows/ -type f | grep -Po '(?!\S+[/])[\w\-]+[._]cow' | sed -e 's/[.]cow$//g' | sort -R | head -1;
  36.     else
  37.         find $(tr ':' ' ' <<< ${COWPATH}) -type f | grep -Po '(?!\S+[/])[\w\-_]+[.]cow' | sed -e 's/[.]cow$//g' | sort -R | head -1;
  38.     fi
  39. }
  40. motd ()
  41. {
  42.     if [[ -x `which cowsay 2>/dev/null` ]] && [[ -x `which fortune 2>/dev/null` ]]; then
  43.         if [[ -n ${COWPATH} ]]; then
  44.             COWPATH=${COWPATH};
  45.             local rc=$(random_cow);
  46.             offensive | env cowsay -f ${rc};
  47.         else
  48.             local rc=$(random_cow);
  49.             offensive | env cowsay -f ${rc};
  50.         fi;
  51.     fi
  52. }
  53.  
  54. motd
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement