#!/bin/sh

if [ $# != 0 ]; then
  echo "Please run me as root :)"
  exit
fi

echo "This script collects informations about your system and saves them in"
echo "\"system.info\" file. By default, script tries to send it using program"
echo "mail(1). However, if this fail, please send it to <elceef@itsec.pl>."
echo "Press enter to continue or Ctrl+C to break."
read

echo "NATDet `cat natdet-version`" > system.info
uname -rom >> system.info
ls /usr/share/doc|grep pcap >> system.info
ls /usr/local/share/doc|grep pcap >> system.info
cc -v 2>&1|grep version >> system.info

echo "Collected informations:"
cat system.info

echo
echo -n "Do you want to send them to the author? [y/n] "
read answer

if [ $answer != "n" ]; then
  mail elceef@itsec.pl < system.info
fi

echo "Thanks!"

