Skip to content

Instantly share code, notes, and snippets.

View abouchara's full-sized avatar

scm618137 abouchara

View GitHub Profile
@abouchara
abouchara / test_ssl.sh
Created May 30, 2023 23:50
Lists available SSL protocol versions and Ciphers offered by a server
# ===========================================================
# Original idea by Mark Phippard <markphip_at_gmail.com>
# Date: Mon, 15 Jun 2020 08:40:37 -0400
# SRC: https://svn.haxx.se/users/archive-2020-06/0044.shtml
# ===========================================================
for v in ssl3 tls1 tls1_1 tls1_2 tls1_3; do
for c in $(openssl ciphers 'ALL:eNULL' | tr ':' ' '); do
openssl s_client -connect $1:$2 \
-cipher $c -$v < /dev/null > /dev/null 2>&1 && echo -e "$v:\t$c"
done
@abouchara
abouchara / gitstats.sh
Created November 20, 2022 10:46 — forked from xeoncross/gitstats.sh
Git - calculate how many lines of code were added/changed by someone
# Run this in the project repo from the command-line
# http://stackoverflow.com/a/4593065/99923
git log --shortstat --author "Xeoncross" --since "2 weeks ago" --until "1 week ago" | grep "files changed" | awk '{files+=$1; inserted+=$4; deleted+=$6} END {print "files changed", files, "lines inserted:", inserted, "lines deleted:", deleted}'