Monday, 7 January 2013

White Paper - A Multi-Level Approach to Addressing Targeted Attacks

"A Multi-Level Approach to Addressing Targeted Attacks"
88% of targeted malware is NOT detected by anti-virus according to research by Trustwave.

Targeted malware is tailor-designed to take advantage of an organization's specific device(s), data networks or a specific employee. Taking a multi-level approach, using many solutions, businesses can enable wider coverage for all types of targeted malware, reducing the attack surface and preventing attacks.

Download this paper and learn about:
 * The current state of targeted attacks
 * How and why targeted attacks work
 * Multi-level defenses to combat malware and persistent threats
 * Targeted attacks are increasing in number and complexity - every business is at risk.

 Download this paper now to find out how to improve your security and protect your business - here


Perl Script: Include external Perl script withing Perl script

This is something different that including the package/modules, the require function provides a way to break your program into separate files and create libraries of functions.

NOTE: The last expression evaluated inside a file included by require becomes the return value. The require function checks whether this value is zero, and terminates if it is so, in this case make sure to return some non-zero value from withing your include file and the best way to do is to insert the 1; at the end of this include file.

Below Perl script show the way to include another Perl script within the Perl script.


Include File: cat include.pl
#!/usr/bin/perl

print "Inside the include file \n";
$var = 20;

1;

Source: cat require.pl
#!/usr/bin/perl

require ("include.pl");
$var = $var + 20;
print "final value of var is : $var \n";

Output: perl require.pl
Inside the include file
final value of var is : 40


Friday, 4 January 2013

Perl Script: Sorting an Array

The Perl sort function sorts a string ARRAY by an ASCII numeric value and numbers using alphanumerical order and returns the sorted list value.

The problem is that capital letters have a lower ASCII numeric value than the lowercase letters so the words beginning with capital letters will be shown first, so in order to get the desire result we need to do something else to this default sort functionality provide by the Perl.

The Perl sort function uses two operators: cmp and <=>, you can use the cmp (string comparison operator) or <=> (the numerical comparison operator) and also uses two special variables $a and $b are compared in pairs by sort to determine how to order the list.

Below is simple Perl script which demonstrate the usage of the sort functionality of Perl, feel free to copy and use this script.

Source: cat sortarray.pl
#!/bin/usr/perl

@string_array = ("Foo", "loo", "Boo", "zoo", "Moo", "hoO", "GOo", "Poo");
@sorted_stringarray = sort (@string_array);
print "This is defaul sort : ", join(", ", @sorted_stringarray), "\n";

@sorted_stringarray = ();
@sorted_stringarray = sort ({lc($a) cmp lc($b)} @string_array);
print "This is what we want: ", join(", ", @sorted_stringarray), "\n";

Continue Reading...

Wednesday, 2 January 2013

Free EBook - Introduction to Linux - A Hands on Guide

"Introduction to Linux - A Hands on Guide"

This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.

For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.

Download your free copy of "Introduction to Linux - A Hands on Guide" - here


 
//PART 2