1. Engineering
2. Computer Science
3. 3 create a perl program that will do the following...

# Question: 3 create a perl program that will do the following...

###### Question details

3. Create a perl Program that will do the following

a. Create a new database called assignment2.db3

b. create a table name readme in the database with the following columns

1. Line_Number num

2. Line_Text    text

c. Read the file readme.txt which is an attachment to the assignment

d. For each line that is read insert it into the database along with the line number.

e. Once the file has been read in completely then close it.

f. Select the data from the table readme and output it to a comma seperated file named readme.csv

g. Close the file and the database.

here is the readme.txt file I was given...

Prefetch Parser

This program will read a directory that has prefetch files in it, from a mounted drive or extracted from your favorite forensic program, and parse information from each file and create the following reports:

1.  List of prefetch files, last run date, and number of times run, where the program was run from.
2.  List of loaded programs when the prefetch file was created.
3.  List of distinct devices/volumes where all files (programs run/loaded) were found on.
4.  List programs that are in the layout.ini file that are in the prefetch file list.
5.  List any prefetch files that could not be parsed becaUse they are not valid prefetch files.

The program can be called from windows using the gui or command line as an executable or command line via included perl script.  The program can be called from linux using the included perl script.

For windows gui run the following program and fill in the fields

prefetch_parser_gui.exe

For Windows/linux command line (.exe and .pl) run the following program passing the following parms

Parse_Prefetch_Info [-p Directory where Prefetch Files Are] [-w Windows Version either XP or Vista]
[-d Database name to hold temporary information] [-o output directory] [-? | -help]

Read and Parse prefetch files and report on them (CLI) v \$VERSION,

-p Directory where Prefetch files are..File name of the database to create
-d Name of Database....................File name of the database to create
-w Windows Version.....................Version of Windows either XP or Vista
-o Output Directory....................Directory where the reports will be
written to
-r Ouput Type..........................Type of Output (default html) XML, CSV
TAB, HTML
-h | -?................................Help (print this information)

Ex: C:\Parse_Prefetch_Info -p c:\windows\prefetch -w XP -d melissas_computer.db3 -r CSV -o          c:\reports\melissas\prefetch

If you are going to run this using the perl script then you need the following libraries

DBD::SQLite;
use Cwd;
use File::Basename;
use File::Path;
use Getopt::Long;
use XML::Generator::DBI;
use XML::Handler::YAWriter;