This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
printf '%s\n' $'\e[1;31m'"$(readlink -f "$PWD/"${1:-.}"")"$'\e[0m' && echo -e " " && ls -p --group-directories-first --color --width=80 ""${1:-.}""; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
echo -e "\e[0;32mPlease enter the email address of who we're sending to: \e[0;36m"; | |
read emailaddress; | |
emaildomain=$(echo "$emailaddress" | sed -r -e 's/^[^@]*[@]//g'); | |
mailexchanger=$(dig -t mx +noall +answer $emaildomain | awk '{print $6}' | head -n 1); | |
mailserver=$(dig -t A +noall +answer $mailexchanger | awk '{print $5}' | head -n 1); | |
echo -e "\e[0;32mPlease enter the name of the relay server we're pretending to be (or make something up): \e[0;36m"; | |
read helo; | |
echo -e "\e[0;32mPlease enter your email address (for replies to be sent): \e[0;36m"; | |
read from; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
yum install docker-io | |
docker pull centos | |
docker run centos bash -c 'yum install -y openssh-server openssl passwd && echo "docker" | passwd --stdin root && /usr/bin/ssh-keygen -A && echo -e "\n\n##################\nPlease run:\n\nssh root@$(ip addr show | grep -Eio "inet [^/]*" | grep -Eio "[0-9.]*" | grep -v "127.0.0.1")\n\nand type \"docker\" as your password\n##################\n\n" && /usr/sbin/sshd -D' & disown |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
userinput=""; | |
while [ "$userinput" != "exit" ] | |
do | |
echo -e -n "\e[1;32myoutube-dl: \e[1;36m" && read userinput; | |
if [ "$userinput" == "exit" ] | |
then | |
break; | |
fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
cat /usr/share/bash-completion/completions/firewall-cmd | grep -v '^#' | tr '\n' '\r' | sed -r -e 's/[\]\r//g' | tr '\r' '\n' | grep -Eio '^[a-z_]*[=]{1}["][^"]*["]{1}' | sed -r -e 's/[=]["]/&\n/g' -e 's/["]$/\n&/g' | grep -v '"' | sed -r -e 's/\s/\n/g' | sed -r -e '/^\s*$/d' | grep -v '${' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
while read line; | |
do echo "${line}" | sed -r -e 's/(\S*)\s*(msg=audit[^)]*[)][:]).*/\n\1\n\2/g' && echo "${line}" | sed -r -e 's/\S*\s*msg=audit[^)]*[)][:](.*)msg[=].*/\1/g' | sed -r -e 's/ /\n\t/g' && echo "${line}" | sed -r -e "s/.*(msg=')[ ]?/\1\n/g" | sed -r -e 's/^/ /g' -e "s/'//g" | sed -r -e 's/[ ]/\n\t\t/g'; done <<<"$(cat /var/log/audit/audit.log)" 2>/dev/null | sed -r -e '/^\s*$/d' -e 's/type/\n&/g' | |
# This script just makes /var/log/audit/audit.log slightly easier to look at. | |
# But nothing fancy. Also note this thing is pretty slow because i'm inefficient | |
# At scripting sometimes. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
cat /etc/apache2/logs/access_log | sed -r -e 's/\s/\t/g' \ | |
-e 's/\t-\t-\t\[/\t\t\t/g' \ | |
-e 's/\t\t\t(..)\/(...)\/(....):(..):(..):(..)\t-...../\t\t\t\2 \1, \3\t\4:\5/g' \ | |
-e 's/\t.*\t\t\t/\t\t/g' \ | |
-e 's/"\t.*//g' \ | |
-e 's/\t"/\t\t/g' \ | |
-e 's/HTTP\/1.1//g' \ | |
-e 's/HTTP\/1.0//g' \ | |
-e 's/(..:..)(\t\t)/\1\2\t/g' | grep -vi "POST\|PUT\|HEAD" | sed -r -e 's/^/<div class="Meta">/g' \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getRequestForEditor(){ | |
var encodedURIVar=document.getElementById('urlinput').value; | |
var prefixURIString="./engine.html?content-type=".concat(document.getElementById('selContentType').value).concat("&theme=").concat(document.getElementById('selTheme').value).concat('&url='); | |
var requestURIVar=prefixURIString.concat(encodedURIVar); | |
document.getElementById('editorIframe').src=requestURIVar; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
USSAGE_STATEMENT=$(echo -e "\nUssage:\n\t${0} verbal\n\t${0} verbal no-color\n\n\t${0} enviroment-variables\n\t${0} enviroment-variables make-active\n\t${0} enviroment-variables make-permanent") | |
if [[ ! -z "${2}" ]] && [[ "${2}" == "no-color" ]]; then | |
NORMAL='' | |
BOLD='' | |
UNDERLINE='' | |
BLINK='' | |
REVERSE_VIDEO='' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
USSAGE_STATEMENT=$(echo -e "\nUssage:\n\t${0} verbal"\ | |
"\n\t${0} verbal no-color"\ | |
"\n\n\t${0} enviroment-variables"\ | |
"\n\t${0} enviroment-variables make-active"\ | |
"\n\t${0} enviroment-variables make-permanent") | |
ANSI_ACTIONS=("NORMAL" "BOLD" "UNDERLINE" "BLINK" "REVERSE_VIDEO" "NONDISPLAYED"\ | |
"BLACK" "RED" "GREEN" "YELLOW" "BLUE" "MAGENTA" "CYAN" "WHITE"\ |
OlderNewer