Skip to content

Instantly share code, notes, and snippets.

View barryirwin's full-sized avatar

Barry Irwin barryirwin

View GitHub Profile
@barryirwin
barryirwin / png2mp4
Created September 6, 2017 11:09
FFMPEG Magic
ffmpeg -r 20 -pattern_type glob -i '*.png' test.mp4
@barryirwin
barryirwin / topsrc.sh
Created November 4, 2018 15:38
Top Sources form a pcap file
#!/bin/sh
# (c) Barry Irwin <bvi@moria.org>
# November 2018
# takes in a tcpdump input as below. prints out a lsit of the top sources.
# format expected
# 02:57:23.020317 IP A.B.C.D.SPORT > A.B.C.D.dport : Flags [S], seq 1995830557, win 14600, length 0
cat - | awk '{print $3}' | awk -F. '{print $1"."$2"."$3"."$4}'| sort | uniq -c | sort -rn
@barryirwin
barryirwin / dstports.sh
Created November 4, 2018 15:49
Sort for top destination ports
#!/bin/sh
# (c) Barry Irwin <bvi@moria.org>
# November 2018
# takes in a tcpdump input as below. prints out a lsit of the destination ports sources.
# format expected (TCp/UDP only)
# 02:57:23.020317 IP A.B.C.D.SPORT > A.B.C.D.dport : Flags [S], seq 1995830557, win 14600, length 0
cat - | awk '{print $5}' | awk -F. '{print $5}'| sed -e 's/://g' |sort | uniq -c | sort -rn
#!/bin/sh
# (c) Barry Irwin <bvi@moria.org>
# November 2018
# takes in a tcpdump input as below. prints out a lsit of the source ports.
# format expected (TCp/UDP only)
# 02:57:23.020317 IP A.B.C.D.SPORT > A.B.C.D.dport : Flags [S], seq 1995830557, win 14600, length 0
cat - | awk '{print $3}' | awk -F. '{print $5}'| sed -e 's/://g' |sort | uniq -c | sort -rn
@barryirwin
barryirwin / days.sh
Created November 4, 2018 16:10
count of packets by day
#!/bin/sh
# (c) Barry Irwin <bvi@moria.org>
# November 2018
# takes in a tcpdump input as below. prints out a count of traffic by day.
# format expected tcpdump needs -tttt
# 2018-09-28 20:28:47.016856 IP A.B.C.D.SPORT > A.B.C.D.dport : Flags [S], seq 1995830557, win 14600, length 0
cat - | awk '{print $1}' | sort | uniq -c
@barryirwin
barryirwin / gist:3736d580a27b1ba1786c49d130ba755c
Last active November 4, 2018 17:02
Pcap to csv ish thing
tcpdump -nqttttr pcapfile | \
sed -e 's/IP/./g' -e 's/>/./g' -e 's/://g' | \
awk -F. '{print $1" "$3"."$4"."$5"."$6" "$7" "$8"."$9"."$10" "$12}' |\
awk '{print $1","$3","$4","$5","$6}'
Example output
#day,
2018-11-01,138.255.1.254,34462,165.213.254,88
....
1) open CMD
2) findstr /si password *.txt
findstr /si password *.xml
dir /s *pass* == *cred* == *vnc* == *.config*
findstr /spin "password" *.*
reg query HKLM /f password /t REG_SZ /s
reg query HKCU /f password /t REG_SZ /s
@barryirwin
barryirwin / gist:d6d0adc1a95def747c76ae0afb809c9d
Created March 19, 2019 12:37
Font sizes in tables LATEX
There's no \medium font size between \small and \large; you have \normalsize (which is the default font size).
The standard font size switches are:
\tiny, \scriptsize, \footnotesize, \small, \normalsize, \large, \Large, \LARGE, \huge, and \Huge.
You only need one font switch command inside the table and braces are not required since table forms a group, so you can simply say something like this:
\begin{table}
\small
\begin{tabular}{p{3.5cm}p{8cm}p{5cm}}
@barryirwin
barryirwin / gist:05dd3fe890fafb38fc3afe4934d25e7d
Created September 19, 2020 16:52
Dump Wifi passwords n Windows 10
netsh wlan show profile name=WifiConnectionName key=clear
@barryirwin
barryirwin / gist:6418dce585f775e46afe3739ae892801
Created July 29, 2021 12:17
Restyling of \href in LateX
% requires fontawesome package for icon
%save old command
\let\orighref\href
%redefine the command without circular references
\renewcommand{\href}[2]{\orighref{#1}{{\small\faLink{}} #2}}
% generate a clickabel link with a link icon next to it.
\href{https://google.com}{moo}