Korelogic Blog Logo contact
Building FTimes With Perl 2019-04-11 00:00

This is a first in a series of blog posts focusing on the open-source tool FTimes. This blog post will demonstrate building FTimes with XMagic and an embedded Perl interpreter. In so doing, FTimes will be able to perform more complex searches by utilizing file hooks.

For this exercise, we will be using Ubuntu Linux as our build environment.

One prerequisite for building FTimes with XMagic requires PCRE and associated development libraries. Users can install this on Ubuntu and other Debian based systems using:

sudo apt-get install libpcre3 libpcre3-dev

Since we are embedding perl into FTimes, the Perl development libraries will also need to be installed:

sudo apt-get install libperl-dev

Next untar the FTimes tarball and change into the ftimes-3.12.0 source directory:

tar -zxf ftimes-3.12.0.tgz
cd ftimes-3.12.0

Create a work directory (e.g., "b" for build). This is where you will build ftimes. We prefer to create/use a separate work directory so that configuration changes can be made easily without disturbing the source directories. It also makes cleanup a breeze (i.e., a simple directory remove restores the project to its original state).

mkdir b
cd b

Next, run the configure script providing it the necessary options for building the Perl interpreter along with all associated FTimes tools.

../configure --with-all-tools --with-perl=`which perl`
make
make install

In the above command the backticks (`) are used via your shell to determine where the perl binary is installed on the build system. The full path to the perl binary (e.g., "/usr/bin/perl") can also be used.

You can now verify that your FTimes executable has been built with Perl embedded in it by running:

ftimes --version
The output should look similar to this:
ftimes 3.12.0 64-bit pcre(8.39),perl(5.28.1),xmagic

Now that Perl has been embedded in the executable, you can use its interpreter to implement file hooks (via the FileHooks control), which incorporate and utilize the KLEL library. An upcoming blog post in this series will delve into that. We hope you stay tuned.


0 comments Posted by Jay at: 00:00 permalink

Comments are closed for this story.


Please contact us if you would like more information about our services, tools, or careers with us.
Privacy Policy : Copyright 2016. KoreLogic Security. All rights reserved