Skip to content

Instantly share code, notes, and snippets.

(
printf "EHLO myhost.example.com\r\n"
sleep 1
printf "MAIL FROM:<sender@example.com>\r\n"
sleep 1
printf "RCPT TO:<recipient@example.com>\r\n"
sleep 1
printf "DATA\r\n"
sleep 1
printf "Subject: Netcat Test Email\r\n"
while IFS= read -r line; do
# Check if the line contains a tab
if [[ "$line" == *$'\t'* ]]; then
# Split the line by tabs into an array
IFS=$'\t' read -r -a cols <<< "$line"
# Only process if at least 4 columns exist
if [[ ${#cols[@]} -ge 4 ]]; then
# Grab column 4
col4="${cols[3]}"
# Do the replacements using perl
We couldn’t find that file to show.
We couldn’t find that file to show.
openssl verify -CAfile /etc/ssl/certs/ca-bundle.crt your_cert.crt
#!/usr/bin/env zsh
set -euo pipefail
if [[ $# -ne 1 ]]; then
echo "Usage: $0 <input_file>"
exit 1
fi
input_file=$1
#!/usr/bin/env bash
# runscript.sh
# Usage: ./runscript.sh <ip-address>
set -euo pipefail
IP_ADDRESS=${1:-}
if [[ -z $IP_ADDRESS ]]; then
echo "Usage: $0 <ip-address>" >&2
exit 1
fi
#!/usr/bin/env bash
# Usage: ./run.sh <ips.csv>
set -euo pipefail
IP_CSV="$1"
OUT_LOG="combined-output.log"
# 1) Clear the single output file
: > "$OUT_LOG"
#!/usr/bin/env python3
import ipaddress, csv
# ◼ Adjust these file‐names/paths as needed
CIDR_FILE = 'cidrs.tsv'
IP_FILE = 'ips.txt'
OUTPUT_FILE = 'matched.tsv'
# 1) Load and parse your CIDRs
networks = []
#!/usr/bin/env bash
# runscript.sh
# Usage: ./runscript.sh <ip-address>
set -euo pipefail
IP_ADDRESS=${1:-}
if [[ -z $IP_ADDRESS ]]; then
echo "Usage: $0 <ip-address>"
exit 1