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 | |
URL_SIZE='160'; | |
USER_AGENT_SIZE='142'; | |
REFERER_URL_SIZE='142'; | |
US="${URL_SIZE}"; | |
UAS="${USER_AGENT_SIZE}"; | |
RUS="${REFERER_URL_SIZE}"; |
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 | |
if [[ -z "${1}" ]]; then | |
read -p "Please Enter your github/gist username: " GIST_USER | |
else | |
GIST_USER="${1}"; | |
fi | |
cat <<EOF | bash -s | |
curl --include "https://gist.github.com/${GIST_USER}/" 2>/dev/null | grep -Eo 'href="/${GIST_USER}/[^"]*"' | grep -vi forks | grep -vi comments | grep -vi stars | grep -vi forked | grep -vi starred | sort -u | sed -r -e 's/href="/https:\/\/gist.githubusercontent.com/g' -e 's/"$/\/raw\//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
#! /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"\ |
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
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 | |
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
#! /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 /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 | |
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
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 |