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
| #!/usr/local/bin/bash | |
| declare -A CFG | |
| #CFG['ignore.filetype'] | |
| # Grep for DNS and IP records | |
| # grep -IERnHis --exclude-dir={.git,.gitmodules} '(192\.168\.78\.[0-9]{1,3}|10\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}|\.(mywebsite|abcstaging)\.com)' liberty-{cron,magento,misc,models,portal,reports,services,ship{,-{client,server}},sweet,ups,warehouse} > ip-dns-references.txt |
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
| [Tue Aug 14 09:46:02| 0:000]{1:193}jdoe@MacBook-Pro:/Volumes(✓)$ df /Volumes/Secure | |
| Filesystem 512-blocks Used Available Capacity iused ifree %iused Mounted on | |
| /dev/disk4s1 35372096 1566528 33805568 5% 0 0 100% /Volumes/Secure | |
| [Tue Aug 14 09:46:06| 0:000]{1:194}jdoe@MacBook-Pro:/Volumes(✓)$ ls /Volumes/Secure | |
| chemdocs credentials data.tar.gz.enc scripts test test-data test-data.tar.gz.enc tor | |
| [Tue Aug 14 09:46:09| 0:000]{1:195}jdoe@MacBook-Pro:/Volumes(✓)$ cd /Volumes/Secure | |
| [Tue Aug 14 09:46:11| 0:000]{1:196}jdoe@MacBook-Pro:/Volumes/Secure(✓)$ ls | |
| . | |
| [Tue Aug 14 09:52:28| 0:000]{1:27}jdoe@MacBook-Pro:/Volumes/Secure(✓)$ ls . | |
| . |
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
| # Create encrypted folder with password specified in the command (CHANGEME) | |
| tar cz -P -C ./data ./ | openssl enc -aes-256-cbc -salt -pass "pass:CHANGEME" -a -A -e -out encrypted-compressed-archive.tar.gz.enc | |
| # Decrypt above file | |
| openssl enc -aes-256-cbc -a -A -d -pass "pass:CHANGEME" -in ./encrypted-compressed-archive.tar.gz.enc | tar xz -C ./data | |
| # Same thing as the above, but password isn't specified (which means the password will be requested) | |
| tar cz -P -C ./data ./ | openssl enc -aes-256-cbc -salt -a -A -e -out encrypted-compressed-archive.tar.gz.enc | |
| openssl enc -aes-256-cbc -a -A -d -in ./encrypted-compressed-archive.tar.gz.enc | tar xz -C ./data |
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
| [ | |
| [ | |
| [ | |
| null, | |
| null, | |
| null, | |
| null, | |
| {}, | |
| {}, | |
| {} |
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
| [ | |
| [ | |
| [ | |
| null, | |
| null, | |
| null, | |
| null, | |
| {}, | |
| {}, | |
| {} |
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 stfu { | |
| if [[ ${BASH_VERSINFO} -lt 4 ]]; then | |
| echo "[ERROR] You're running Bash v${BASH_VERSINFO}?? Grow some balls and upgrade to v4" 1>&2 | |
| return 1 | |
| fi | |
| declare -A font | |
| font['rst']=$(echo -en "\e[0m") | |
| font['bld']=$(echo -en "\e[1m") |
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
| # Assoc array associating a mime type to the appropriate file extension | |
| # source: https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Complete_list_of_MIME_types | |
| # | |
| # JS To gather data from source: | |
| # $('table.standard-table > tbody > tr').each(function(a,b){ | |
| # console.log('mime2ext["%s"]="%s"', | |
| # $(b).find("td:eq(2) > code").text(), | |
| # $(b).find("td:eq(0) > code").text().replace(/^\./, '')) | |
| # }) |
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
| # Assoc array associating a file extension type to the appropriate mime type | |
| # source: https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Complete_list_of_MIME_types | |
| # | |
| # JS To gather data from source: | |
| # $('table.standard-table > tbody > tr').each(function(a,b){ | |
| # console.log('ext2mime["%s"]="%s"', | |
| # $(b).find("td:eq(0) > code").text().replace(/^\./, ''), | |
| # $(b).find("td:eq(2) > code").text()) | |
| # }) |
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
| (3)[Tue May 22 05:21:28| 0:006]{1}root@localhost:/var/log(✓)# | |
| | | | | | | | | | | | |
| | | | | | | | | | \ Account type indicator | |
| | | | | | | | | | | |
| | | | | | | | | \ Last return code | |
| | | | | | | | | | |
| | | | | | | | \ Current working directory | |
| | | | | | | | | |
| | | | | | | \ Local hostname | |
| | | | | | | |