2010/The Return of Command-Line Kung Fu

From Open Source Bridge Wiki
Jump to: navigation, search

A follow-on to last year’s highly popular presentation, Hal Pomeranz returns with another super-size helping of command-line madness!

Speaker: Hal Pomeranz

Return to this session's details

Contributed notes

Presentation slides at http://www.deer-run.com/~hal/Return_of_Command-Line_Kung_Fu(OSBridge2010).pdf

df >/dev/tcp/foo.example.com/9999

port checker: (echo >/dev/tcp/foo.example.com/23) 2>/dev/null && echo live port || echo dead port

Port Scanner: for (( i=1; $i < 1024; i++)); do echo >/dev/tcp/foo.example.com/$i && echo $i/tcp live; done 2>/dev/null

All the cool tcp redirections don't work on older Debian boxes, including older Ubuntus. (works on Debian testing :D)

Answers to Stumper Questions:

find /etc -type f | xargs file | grep ' text' | sed 's/:[^:]*$//' | xargs grep -l string

find dir1 dir2 -type f | xargs md5sum | sort -u -k1,1 | awk '{$1=""; print};


'date -d @epoch_time' will give you a human-readable version of an epoch time string. Neato!