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
#!/usr/bin/env bash | |
# Record process and memory information | |
function log_output() { | |
local lines_to_print="$1" | |
while IFS= read -r line_to_print; do | |
echo "[$(date -Ins --utc)] ${line_to_print}" | |
done <<< "${lines_to_print}" | |
} |
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
/** | |
* Recursive depth-first search to find all shadow roots within a webpage. | |
* | |
* Example usage: let's imagine you come across a page that has a bunch of | |
* expandable information sections, and you would like to expand all of those | |
* info sections for the sake of printing to a PDF or for the ease of | |
* performing a simple `CTRL+F` search across the information. Let's assume | |
* those expanding buttons are buried within Shadow DOM. (Perhaps the site is | |
* using Angular or something of the sort & the buttons are separate | |
* components, thus by default they end up in a Shadow DOM whenever included.) |
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
#!/usr/bin/env bash | |
# This is a script I use when checking for unexpected outbound connections. | |
# Script requires root-level permissions, so this should be executed with sudo. | |
# Before running, export INTERFACE='eth0' (or whatever interface) and | |
# export EXPECTED_IP='1.1.1.1' (or whatever IP Address you are expecting | |
# communication with). | |
# Summary of variables used in TCP Dump command: | |
# -A: This option causes tcpdump to display ASCII versions of packets, where it | |
# makes sense to do so. E.g., an unencrypted HTTP call might be displayed in |