Sunday, December 25, 2011

What Linux distro/version is running

Most people know about uname -a to get a good amount of information. However, if you want an easy way to discover the distro/version you can run:

cat /etc/issue

The problem is that /etc/issue was never meant to keep track of the release version. So it may not exist on certain machines. I believe the most reliable method would be to:

cat /etc/*release

or

lsb_release -a

Wednesday, December 14, 2011

Downloading DefCon Videos - The Easy Way

curl & wget is your friend.

The following commands will get you the download links for the different defcon videos they allow for download on their site.

Defcon 19
curl "http://defcon.org/html/links/dc-archives/dc-19-archive.html" | grep -o "https.*\.m4v"
Defcon 18
curl "http://defcon.org/html/links/dc-archives/dc-18-archive.html" | grep -o "https.*\.m4v"
Defcon 17
curl "http://defcon.org/html/links/dc-archives/dc-17-archive.html" | grep -o "https.*Video.*\.m4v\"
Defcon 16
curl "http://defcon.org/html/links/dc-archives/dc-16-archive.html" | grep -o "https.*m4v\"" | cut -d ' ' -f1 | tr -d '"'
Defcon 15
curl "http://defcon.org/html/links/dc-archives/dc-15-archive.html" | grep -o "http://media.*\.m4v"
Defcon 14
curl "http://defcon.org/html/links/dc-archives/dc-14-archive.html" | grep -o "https.*\.m4v"
Defcon 13
curl "http://defcon.org/html/links/dc-archives/dc-13-archive.html" | grep -o "https.*\.m4v"
Defcon 12
curl "http://defcon.org/html/links/dc-archives/dc-12-archive.html" | grep -o "https.*\.m4v"
Defcon 11
curl "http://defcon.org/html/links/dc-archives/dc-11-archive.html" | grep -o "https.*\.m4v"
Defcon 10
curl "http://defcon.org/html/links/dc-archives/dc-10-archive.html" | grep -o "https.*\.m4v"
Defcon 9
curl "http://defcon.org/html/links/dc-archives/dc-9-archive.html" | grep -o "https.*\.m4v"
Defcon 8
curl "http://defcon.org/html/links/dc-archives/dc-8-archive.html" | grep -o "https.*\.m4v"
Defcon 7
curl "http://defcon.org/html/links/dc-archives/dc-7-archive.html" | grep -o "https.*\.m4v"