< Perl and Oinkmaster - Snort Rules Update Tool | Java & Friends  | Perl and Windows Script Host (WSH) >


 

 

Running Perl from Windows Console

 

 

What do we have in this session?

  1. Running Perl from Windows Console

  2. Testing the Perl Engine

  3. Setting-up Perl Script Example for IIS Server

 

 

 

 

 

Running Perl from Windows Console

 

Next, from Windows command prompt, go to Perl root folder and run the perl command.

 

C:\>Perl>perl -h

 

ActivePerl, Perl for Windows - running perl command with -h option from Windows console

 

Testing the Perl Engine

 

There are several ways to test Perl engine on Windows machine that running IIS.

 

Setting-up Perl Script Example for IIS Server

 

In order to setup PerlScript examples for Windows IIS follow the following steps.

 

a.       Run the Management Console.

b.      Create a new virtual directory called PerlScript.

 

ActivePerl, Perl for Windows - creating virtual directory for IIS

 

Select the Default Web Site (or any name given to your default web site) > right click mouse > select New > select Virtual Directory sub menu. Click Next.

 

ActivePerl, Perl for Windows - IIS virtual directory creation wizard

 

Give the virtual directory alias name, in this case we use PerlScript. Click Next.

 

ActivePerl, Perl for Windows - setting up the virtual directory alias name to PerlScript

 

c.       Set the path to this directory to be aspSamples. Find and select the physical path to the sample Perl script. In this case it is C:\Perl\eg\aspSamples

 

ActivePerl, Perl for Windows - setting up the IIS virtual directory physical path

 

ActivePerl, Perl for Windows - selecting the IIS virtual directory physical path

 

 

ActivePerl, Perl for Windows - the IIS virtual directory physical path

 

Set the directory access permission as needed. Click Next.

 

ActivePerl, Perl for Windows - the IIS virtual directory access permission

 

Click Finish to complete the setup.

 

 

 

 

 

 

 

 

 

-------------------------------------------------------

ActivePerl, Perl for Windows - the IIS virtual directory setup was completed successfully

 

During the installation, the environment variable has been setup for us.

 

ActivePerl, Perl for Windows - the environment variable for Perl was setup properly

 

Next, open IIS console management. The default first document already there (index.htm).

 

ActivePerl, Perl for Windows - the index.htm file of the Perl script example

 

Select PerlScript virtual directory > right click mouse > select Browse menu.

 

ActivePerl, Perl for Windows - testing the Perl script using Internet Explorer

 

If the web page doesn’t display, you may need to restart the IIS service.

 

ActivePerl, Perl for Windows - restarting the IIS server from IIS Admin Console

 

Then, re-browse the web page.

 

ActivePerl, Perl for Windows - Perl script example loaded into browser

 

d.      Next, test from Internet browser. From Internet browser load http://localhost/PerlScript/index.htm

 

Note: If you want to test the ADO samples, ActivePerl requires 'Microsoft Data Access Components MDAC 2.5 RTM' available at Microsoft Data Access Component (MDAC).

 

ActivePerl, Perl for Windows - testing the Perl script example from Internet browser

 

ActivePerl, Perl for Windows - the Perl Hello World script example tested from Internet browser

 

 

 

 

 

 


 

< Perl and Oinkmaster - Snort Rules Update Tool | Java & Friends  | Perl and Windows Script Host (WSH) >