Skip to content

Instantly share code, notes, and snippets.

View itsreallynick's full-sized avatar
🏠
Working from home

Nick Carr itsreallynick

🏠
Working from home
View GitHub Profile
@itsreallynick
itsreallynick / confession.rules
Created April 7, 2017 12:51
They made me find you. They made me
# Detecting client or server guilt
alert icmp any any -> any any (msg:"Suspected Terrifying Confession"; content:"They made me"; pcre:"/(They made me (do|bop|twist|pull) it\.){60,}/i"; reference:url,https://twitter.com/ItsReallyNick/status/849641156153442305; sid:646965; rev:1;)
@itsreallynick
itsreallynick / colorize.sh
Last active April 1, 2016 22:22 — forked from jeffgeiger/brocolor.sh
Adding color to Bro logs (or other TSV logs)
#!/bin/bash
sed 's/^#[a-z]*s[^a-z]//' | awk 'BEGIN {FS="\t"};{for(i=1;i<=NF;i++) printf("\x1b[%sm %s \x1b[0m",(i%7)+31,$i);print ""}'
@itsreallynick
itsreallynick / longestSubstring.sh
Created June 29, 2015 15:02
Network Analysis Scripts
#!/bin/bash
# USAGE: ./longestSubstring.sh 'abcdefghi' 'abcdeghi'
word1="$1"
word2="$2"
if [ ${#word1} -lt ${#word2} ]
then
word1="$2"
word2="$1"
fi
@itsreallynick
itsreallynick / rebuild-mir2.sh
Last active August 29, 2015 14:23
MIR Rebuild Sweep
sqlite3 /opt/MAP/non_www_for_app/webclient/db/webclient.db "update collect set status='Seen' where sweep_id=NNNN and status='Completed';"
# ^replace with sweep ID and cron it appropriately
@itsreallynick
itsreallynick / binary-stack-CentOS.sh
Last active August 29, 2015 14:23
Linux Binary Stack
for i in `echo $PATH | sed "s/:/ /g"`; do for j in `ls $i/*`; do echo `hostname && md5sum $j && ls -l --time-style=iso $j`| awk -v OFS=',' '{gsub(/\/.*\//,"",$3); print $2,$3,$8,$1}'; done; done