Posts

Lynis

Lynis  is an open-source security auditing tool for UNIX derivatives like Linux, Mac OS, BSD, other Unix-based operating systems, etc. Performing extensive health scans of systems that support   System Hardening  and  Compliance Testing . An open-source software with GPL License. This tool also scans for general system information, vulnerable software packages, and configuration issues. It is useful for System Administrators, Auditors, and Security Professionals .  Lynis scanning is modular and opportunistic, it is used to test components like available system tools and their libraries. The advantage of the Lynis tool is there is no additional installations of tools are required so systems are clean. The more components discovered, the more extensive the audit will be. Using this method, Lynis can run with no dependencies.   Lynis Tool Installation: Lynis is lightweight and most users install Lynis using a package that would require more time to install. Th...

Nmap

  What       -is    -Nmap Nmap, short for Network Mapper, is a free and open source tool used for vulnerability checking, port scanning, and, of course, network mapping. Despite being created back in 1997, Nmap remains the gold standard against which all other similar tools, either commercial or open source, is judged. Nmap has maintained its preeminence because of the large community of developers and coders who help to maintain and update it. The Nmap community reports that the tool, which anyone can get for free, is downloaded several thousand times every week.  Because of its flexible, open source code base, it can be modified to work within most customized or heavily specialized environments. There are distributions of Nmap specific to Windows, Mac, and Linux environments, but Nmap also supports less popular or older operating systems like Solaris, AIX, or AmigaOS. The source code is available in C, C++, Perl, and Python. What is Ze...

PHP Strings

What is String in PHP A string is a sequence of letters, numbers, special characters, and arithmetic values or a combination of all. The simplest way to create a string is to enclose the string literal (i.e. string characters) in single quotation marks ('), like this: $my_string  = 'Hello World'; You can also use double quotation marks ("). However, single and double quotation marks work in different ways. Strings enclosed in single quotes are treated almost literally. In contrast, the strings delimited by the double quotes replace variables with the string representations of their values as well as especially interpret specific escape sequences. The escape-sequence replacements are: \n  is replaced by the newline character \r  is replaced by the carriage-return character \t  is replaced by the tab character \$  is replaced by the dollar sign itself ( $ ) \"  is replaced by a single double-quote ( " ) \\  is replaced by a single backslash ( \ ) Here's ...

PHP Data Types

 Data Types in PHP The values assigned to a PHP variable may be of different data types including simple string and numeric types to more complex data types like arrays and objects. PHP supports a total of eight primitive data types: Integer, Floating point number or Float, String, Booleans, Array, Object, resource, and NULL. These data types are used to construct variables. Now let's discuss each one of them in detail. PHP Integers Integers are whole numbers, without a decimal point (..., -2, -1, 0, 1, 2, ...). Integers can be specified in decimal (base 10), hexadecimal (base 16 - prefixed with  0x ) or octal (base 8 - prefixed with  0 ) notation, optionally preceded by a sign ( -  or  + ) . <?php $a = 123 ; // decimal number var_dump ( $a ) ; echo "<br>" ; $b = - 123 ; // a negative number var_dump ( $b ) ; echo "<br>" ; $c = 0x1A ; // hexadecimal number var_dump ( $c ) ; echo "<br>" ; $d = 0123 ; /...

PHP echo

The echo statement can output one or more strings. In general terms, the echo statement can display anything that can be displayed to the browser, such as strings, numbers, variables values, the results of expressions, etc. Since echo is a language construct not actually a function (like  if  a statement), you can use it without parentheses e.g.  echo  or  echo() . However, if you want to pass more than one parameter to echo, the parameters must not be enclosed within parentheses. Display Strings of Text <?php // Displaying string of text echo "Hello World!" ; ?> The output of the above PHP code will look something like this: Hello World! Display HTML Code <?php // Displaying HTML code echo "<h4>This is a simple heading.</h4>" ; echo "<h4 style='color: red;'>This is heading with style.</h4>" ; ?> The output of the above PHP code will look something like this: This is a simple heading. This is heading wi...