This file contains 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 | |
# SLACK_WEBHOOK=$(printenv YOUR_SLACK_WEBHOOK) | |
SLACK_WEBHOOK="<INSERT_YOUR_SLACK_WEBHOOK>" | |
f_send_slack() { | |
SLACK_TEXT="$@" | |
SLACK_JSON="""payload={ | |
\"channel\": \"#general\", | |
\"username\": \"your-slack-bot\", | |
\"icon_emoji\": \":monkey_face:\", | |
\"text\": \"${SLACK_TEXT}\" |
This file contains 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 | |
############################################################################### | |
# Author: Mike Abreu | |
############################################################################### | |
main() { | |
display_message $CBLUE "[*] System Update Starting." | |
display_message $CORANGE "[+] Updating Aptitude Repositories:${CGREEN} sudo apt-get update" | |
sudo apt-get update |
This file contains 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
$dir=(Join-Path -Path $ENV:USERPROFILE -ChildPath "sysinternals") | |
New-Item -Path $dir -ItemType Directory -ErrorAction "SilentlyContinue" | |
$sysinternals = Invoke-WebRequest -Uri 'https://live.sysinternals.com' | |
$sysinternals | %{$_.Links.Href} | %{$_.substring(1)} | %{curl "https://live.sysinternals.com/$_" -OutFile "$dir\$_"} |
This file contains 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 | |
# Add these functions to your .bashrc or .zshrc and use from your terminal. | |
get_certs_domains() { | |
# Credit goes to Ronnie Flathers, taken from https://twitter.com/ropnop/status/972151279463124994 | |
curl -s https://crt.sh\?q\=%25.$1 | awk -v pattern="<TD>.*$1" '$0 ~ pattern {gsub("<[^>]*>","");gsub(//,""); print}' | sort -u | |
} | |
get_certs() { | |
curl -s https://crt.sh\?q\=%25.$1 | awk '/\?id=[0-9]*/{nr[NR]; nr[NR+1]; nr[NR+3]; nr[NR+4]}; NR in nr' | sed 's/<TD style="text-align:center"><A href="?id=//g' | sed 's#">[0-9]*</A></TD>##g' | sed 's#<TD style="text-align:center">##g' | sed 's#</TD>##g' | sed 's#<TD>##g' | sed 's#<A style=["a-z: ?=0-9-]*>##g' | sed 's#</A>##g' | sed 'N;N;N;s/\n/\t\t/g' | |
} |