#!/usr/bin/perl
#################################################################################################
#    log2timeline
#################################################################################################
# This script is a part of the the program log2timeline that is designed to parse a log file,
# any supported log file, and output it in a bodyfile that can be read by supporting software for
# timeline creation.
#
# The default behaviour of the tool is to outpt in a CSV format.
#
# This script serves as the front-end for the program and it's purpose is to
# read all parameters, find and load the appropriate format file, a perl script that is designed
# to read a particular file format, and print the information found in the file in a body format.
# The script also holds some methods that are used in more than one format file (instead of repeating
# the code)
#
# The specification for the TLN body file format can be found here:
#  http://windowsir.blogspot.com/2010/02/timeline-analysisdo-we-need-standard.html
#
# The specification of the body file can be found here (the mactime body file):
#  http://wiki.sleuthkit.org/index.php?title=Body_file
#
# As said before this is the main script, it parses all arguments as well as to call other
# scripts needed to parse the actual log files. The parsing of log files is done in a so
# called format file, where each format file provides a method to parse different log format.
#
# This script then gets the output from the format file, and uses it to print out a bodyfile
# that can be used in TSK (default behaviour)
#
# Author: Kristinn Gudjonsson
# Date : 20/05/10
#
# Copyright 2009-2011 Kristinn Gudjonsson (kristinn ( a t ) log2timeline (d o t) net)
#
#  This file is part of log2timeline.
#
#    log2timeline is free software: you can redistribute it and/or modify
#    it under the terms of the GNU General Public License as published by
#    the Free Software Foundation, either version 3 of the License, or
#    (at your option) any later version.
#
#    log2timeline is distributed in the hope that it will be useful,
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#    GNU General Public License for more details.
#
#    You should have received a copy of the GNU General Public License
#    along with log2timeline.  If not, see <http://www.gnu.org/licenses/>.
#
# Uses method Win2Unix written by A. Schuster and C. Barta from ptfinder.pl
# Copyright (c) 2009 by Andreas Schuster and Csaba Barta.

use strict;

print "This is a legacy script that will be removed, new name is: 'log2timeline_legacy'\n";
print "Removing: $0\n";
my $res = unlink $0;
unless ( $res ) {
  print "Unable to remove the file, perhaps run this script as an administrator (sudo?)\n";
}
