--
Save live audio stream to file:
-% mplayer -ao pcm:file=$FILE
+% mplayer -ao pcm:file=$FILE $URL
+--
+Save live stream to file:
+
+% mplayer -dumpfile $FILE -dumpstream $STREAM
or
-% mencoder mms://file.wmv -o $FILE -ovc copy -oac copy
+% mencoder mms://$URL -o $FILE -ovc copy -oac copy
or
--
Read HTTP via netcat:
-echo "GET / HTTP/1.0\r\n\r\n" | netcat $DOMAIN 80
+echo -e "GET / HTTP/1.1\r\nHost: $DOMAIN\r\n\r\n" | netcat $DOMAIN 80
--
Get X ressources for specific program:
Develop, test and use exploit code with the Metasploit Framework:
cd /tmp
-wget http://framework-mirrors.metasploit.com/msf/downloader/framework-3.0.tar.gz
-unp framework-3.0.tar.gz
-cd framework-3.0
+wget http://spool.metasploit.com/releases/framework-3.2.tar.gz
+unp framework-3.2.tar.gz
+cd framework-3.2
./msfcli
--
Useful documentation:
First method - manual:
~~~~~~~~~~~~~~~~~~~~~~
Get information for SYSFS address:
-# udevinfo -a -p /sys/class/net/eth0/ | grep address
+# udevadm info -a -p /sys/class/net/eth0/ | grep address
Then create udev rules:
# cat /etc/udev/network.rules
--
Write a Microsoft compatible boot record (MBR) using ms-sys
-Write a Windows 2000/XP/2003 MBR to device:
+Write a Windows 2000/XP/2003 MBR to a device:
# ms-sys -m /dev/ice
+
+Notice: grab ms-sys from http://ms-sys.sourceforge.net/ - demo:
+
+ wget http://surfnet.dl.sourceforge.net/sourceforge/ms-sys/ms-sys-2.1.3.tgz
+ unp ms-sys-2.1.3.tgz
+ cd ms-sys-2.1.3
+ make
+ ./bin/ms-sys ...
--
Use a Vodafone 3G Datacard (UMTS) with Linux:
Plug in your vodafone card and check in syslog whether the appropriate
(probably /dev/ttyUSB0 or /dev/noz0) has been created. If so run:
-# gcom -d $DEVICE
+# comgt -d $DEVICE
# wvdial --config /etc/wvdial.conf.umts $PROFILE
Usage examples:
-# gcom -d /dev/ttyUSB0
+# comgt -d /dev/ttyUSB0
# wvdial --config /etc/wvdial.conf.umts a1usb
-# gcom -d /dev/noz0
+# comgt -d /dev/noz0
# wvdial --config /etc/wvdial.conf.umts tmnozomi
-# gcom -d /dev/noz0
+# comgt -d /dev/noz0
# wvdial --config /etc/wvdial.conf.umts dreiusb
+# comgt -d /dev/ttyACM0
+# wvdial --config /etc/wvdial.conf.umts yesss
+
If you receive invalid DNS nameservers when connecting, like:
[...]
To get a list of available providers execute:
-# gcom -s -d /dev/ttyUSB0 /usr/share/doc/gcom/examples/operator
+# comgt -s -d /dev/ttyUSB0 /etc/comgt/operator
--
hdparm - get/set hard disk parameters
Check filesystem's LABEL:
generic way:
-# vol_id -l /dev/sda1
+# blkid /dev/sda1
-ext2/3 without vol_id:
+ext2/3 without blkid:
# dumpe2fs /dev/sda1 | grep "Filesystem volume name"
-xfs without vol_id:
+xfs without blkid:
# xfs_admin -l /dev/sda1
-reiserfs without vol_id:
+reiserfs without blkid:
# debugreiserfs /dev/sda1 | grep -i label
-jfs without vol_id:
+jfs without blkid:
# jfs_tune -l /dev/sda1 | grep -i label
-reiser4 without vol_id:
+reiser4 without blkid:
# debugfs.reiser4 /dev/sda1 | grep -i label
--
Check filesystem's UUID:
generic way:
-# vol_id -u /dev/sda1
+# blkid /dev/sda1
-ext2/3 without vol_id:
+ext2/3 without blkid:
# dumpe2fs /dev/sda1 | grep -i UUID
-xfs without vol_id:
+xfs without blkid:
# xfs_admin -u /dev/sda1
-reiserfs without vol_id:
+reiserfs without blkid:
# debugreiserfs /dev/sda1 | grep -i UUID
-reiser4 without vol_id:
+reiser4 without blkid:
# debugfs.reiser4 /dev/sda1 | grep -i UUID
--
Change a filesystem's LABEL:
Set up a CGI server on your webserver:
% cp hgwebdir.cgi ~/public_html/hg/index.cgi
% $EDITOR ~/public_html/hg/index.cgi # adjust the defaults
-
-Mercurial repositories of grml can be found at http://hg.grml.org/
--
Download binary codecs for mplayer:
--
Test UTF-8 capabilities of terminal:
-wget http://melkor.dnp.fmph.uniba.sk/~garabik/debian-utf8/download/UTF-8-demo.txt.gz
+wget http://www.linux-cjk.net/Console/garabik/UTF-8-demo.txt.gz
zcat UTF-8-demo.txt.gz
or:
--
Create netboot package for grml-terminalserver:
-# sh /usr/share/doc/grml-terminalserver/examples/create-netboot
+# bash /usr/share/doc/grml-terminalserver/examples/create-netboot
--
To boot grml via network (PXE) check out grml-terminalserver:
Convert Flash to Avi:
% ffmpeg -i input.flv output.avi
+
+Extract MP3 from Flash file:
+
+% for i in *.flv; do ffmpeg -i $i -acodec copy ${i%.flv}.mp3 ; done
--
Usage example for cryptsetup / -luks encrypted partition on LVM:
use approx in grml-debootstrap like:
% grml-debootstrap -r lenny -t /dev/sda1 -m http://127.0.0.1:9999/debian
--
+Simple webserver with python:
+
+% python -m SimpleHTTPServer
+--
+Upgrade only packages from the grml-stable Debian repository:
+
+echo 'deb http://deb.grml.org/ grml-stable main' > /etc/apt/grml-stable.list
+apt-get -o Dir::Etc::sourcelist=/etc/apt/grml-stable.list -o Dir::Etc::sourceparts=/doesnotexist update
+apt-get upgrade
+--
+Install Centos into a directory:
+
+% febootstrap centos-5 directory http://mirror.centos.org/centos-5/5.3/os/i386/
+--
+Install Fedora into a directory:
+
+% febootstrap fedora-11 target_directory
+--
+Use Nessus / OpenVAS (remote network security auditor):
+
+Install software packages:
+# apt-get update
+# apt-get install openvas-client openvas-server openvas-plugins-base openvas-plugins-dfsg
+
+Add a user:
+# openvas-adduser
+
+Start openvas server (takes a while):
+# Start openvas-server
+
+Invoke client as user:
+% OpenVAS-Client
+--
+Find packages not available from any active apt repository:
+
+% apt-show-versions | awk '/No available version in archive/{print $1}'
+--
+Simple mailserver with python:
+
+% python -m smtpd -n -c DebuggingServer localhost:1025
+--
+finger via netcat:
+
+echo $USER | nc $HOST 79