To make this tutorial a little easier to following, let's create an environment variable to designate this directory. This assumes you use the bash shell
export DOG=/usr/local/sycamoreChange into the examples sub-directory found in the base Sarawak directory.
cd $DOG/examples ls -lIn this directory, you will see many different examples. The following discusses these examples:
If you want to skip this example, you must at least do the following for the remaining examples to work correctly.
cd $DOG/examples/example_1 ./purge_database.pl cat data.log | ./server.pl
Example 2A shows the use of the generic sql query
Example 2B demonstrates the use of the "type-specific" query
Sarawak::Item object. An Item is either an IP address, MAC address or
a Username. Some logs will allow you to relate any two of these items. For example, the DHCP logs allow you to map a MAC address to
an IP number. These examples show how Sarawak can be used to perform these conclusions.Example 3A shows the conversion of an IP address to a MAC address
Example 3B shows the conversion of an Username to an IP address
Example 4 gives two examples of using Sarawak::Report objects.
Sarawak::CGI::Simple object.Example 5 Sarawak::CGI::Simple