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/bin/env python3 | |
| import argparse | |
| import gzip | |
| import re | |
| from pathlib import Path | |
| HEADER_RE = re.compile(r"###(\d{4})###") | |
| def main(): | |
| ap = argparse.ArgumentParser(description="Merge QR frames (###0000###...) into base64, decode, and decompress.") |
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/bin/env python3 | |
| """ | |
| Generate numbered QR PNGs from an existing base64 file (single line or multi-line). | |
| Workflow (you already have the .b64): | |
| 1) This script reads the .b64 text, strips ALL whitespace (handles Qrox+ newline/space behavior too), | |
| 2) Splits into chunks (default 2000 chars total payload INCLUDING header), | |
| 3) Prefixes each chunk with a fixed header: ###0000### (10 chars), | |
| 4) Generates QR images (Version 40, Error L) with screen→phone friendly sizing. |
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
| openssl s_client -connect ret-client-sit4.efx.extnp.national.com.au:443 \ | |
| -servername efx.internal-scs </dev/null 2>/dev/null \ | |
| | openssl x509 -noout -subject -issuer -ext subjectAltName -dates |
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
| ' Returns every hyperlink in the cell (Address or SubAddress), newline-separated. | |
| Function GetAllURLs(cell As Range) As String | |
| Dim h As Hyperlink, out As String, one As String | |
| If cell Is Nothing Then Exit Function | |
| ' Case 1: Rich text hyperlinks (pasted from web, like ServiceNow) | |
| If cell.Hyperlinks.Count > 0 Then | |
| For Each h In cell.Hyperlinks | |
| one = h.Address | |
| If one = "" Then one = h.SubAddress ' internal/bookmark/mailto |
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
| ### === Custom Dev Additions === ### | |
| # Ensure GPG agent runs and caches passphrase for 9 hours | |
| export GPG_TTY=$(tty) | |
| if command -v gpgconf >/dev/null 2>&1; then | |
| gpgconf --launch gpg-agent | |
| fi | |
| # SSH helper: sj <jumpbox> <p|d> <host> | |
| sj() { |
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 | |
| # Input PKCS#12 file | |
| P12_FILE="$1" | |
| if [[ ! -f "$P12_FILE" ]]; then | |
| echo "❌ Usage: $0 site.p12" | |
| exit 1 | |
| 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
| #!/bin/bash | |
| # Input PKCS#12 file | |
| P12_FILE="$1" | |
| if [[ ! -f "$P12_FILE" ]]; then | |
| echo "❌ Usage: $0 site.p12" | |
| exit 1 | |
| 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
| #!/bin/bash | |
| # === Configuration === | |
| SMTP_SERVER="smtp.example.com" | |
| SMTP_PORT="25" # Use 25 for no encryption. Use 587/465 only with TLS support (see note below) | |
| EHLO_DOMAIN="myhost.example.com" | |
| MAIL_FROM="sender@example.com" | |
| RCPT_TO="recipient@example.com" | |
| SUBJECT="Netcat Test Email" | |
| BODY="Hello,\r\n\r\nThis is a test email sent using netcat from a Bash script.\r\n\r\nRegards,\r\nNetcat Tester" |
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
| ( | |
| 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" |
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
| 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 |
NewerOlder