perl script delimited file

PERL Script Tutorial – Remove Column from Delimited File

What is a Delimited File?

A delimited file is a file where the data is separated by special or unique characters. The most common form of a delimited file is the .CSV (Comma separated values) file format. These files, as you can guess, have the data separated by commas (,). For example, you can save an Excel spreadsheet document as an .CSV file and it will separate all the fields with a comma. Other examples of delimited files include .TSV (Tab separated values), quotation marks, or really any other File that has a unique character (or character pattern) that separates actual data (words, phrases) that you need to utilize.

perl script tutorial
Example of CSV (delimited) file

Continue reading

kali linux network printer install guide

Install Kali Linux Network Printer 2016

Kali Linux Network Printer

While Kali Linux is great and comes with a lot of great penetration testing tools, it isn’t too friendly when it comes to other tasks, such as installing a network (Wi-Fi) Hewlett Packard (HP) printer. Ubuntu and Mint are more user-friendly Linux distros if you are just migrating from Microsoft Windows. For Kali Linux Network Printer install can be done with HPLIP (HP Linux Imaging and Printing). On Kali, the setup is a little different as it doesn’t come pre-installed with CUPS (Common Unix Printing System).

First we will install the required dependencies, then we will configure our HP printer using HP GUI tool. Before we begin, make sure your HP printer is turned ON and that you have a USB cable. Even though we are doing a Wireless Printer setup, this technique requires a direct USB connection (from printer to your Kali system) for a brief period of time.

Continue reading

create sublime text 3 plugin

Sublime Text 3 Plugin to Webify HTML Entities Tutorial

Creating A Sublime Text 3 Plugin

In this article, I want to share with you how to create a basic Sublime Text 3 plugin (or package). Sublime Text 3 (ST3) comes with a running ‘Hello World’ plugin example, however, if you have read any of my previous posts, I am not a big fan of simple ‘Hello World’ applications. I will, however, walk you through setting up the ‘Hello World’ plugin and then we will create our own Sublime Text 3 plugin named ‘Webify’. ‘Webify’ will replace the less than (< ) and greater than (>) signs in your block of code to &lt; and &gt;, also referred to as HTML Entities.

Continue reading

Ultra Simple Handlebars, Express JS & Node JS Example 2016

Handlebars + Express JS + Node JS

Today I’m going to show you how to create an ultra simple Express JS server application and use the Handlebars framework to handle “modularization”. To follow along, please make sure you have Node and NPM configured on your machine. If you don’t have the required applications, read my Setup Node JS and NPM Tutorial. The following tutorial will introduce you to Handlebars (for templating), and ExpressJS. By the end of this tutorial you should have an basic understanding on how to create an application/website with what I like to call HEN (Handlebars, Express JS & Node JS) stack. 😉

Continue reading

Node JS Server Example

Beginner Node JS Server Example with Routing

What is a Node JS Server?

Node JS gives the front-end developer (and back-end developers) the ability to use JavaScript (JS) as the back-end server-side scripting language instead of other back-end server-side languages. This is exceptionally useful for front-end JS developers looking to do server-side scripting as well. When you develop an application using Node, the application you write is the server. Node is a framework for you to build a web server. To setup and configure Node and NPM, see my tutorial.

beginner node js server
In the following Node JS Server tutorial, I will show you how to create a simple Node JS Server for serving static files using Routing. Routing tells our Node JS server which files (web-pages) to send the user based on the URL request, submitted by the user, through their web browser (Chrome, Firefox, Safari, etc.).

Our Node JS Server will serve a simple index.html file with a logo, and a 404.html file when the user requests a page that does not exist. It is simple to follow and gives you an idea of how NodeJS Servers work.

Continue reading

best linux tools

Best Linux Tools and Utilities to Install – Kali

Update and Upgrade Linux

Before we can install my favorite linux tools, we need to be certain to update and upgrade all the necessary packages of our distribution. This can be done by opening the Terminal and running the following:

apt-get update && apt-get upgrade
  • apt-get update – updates the list of packages and their version but doesn’t actually upgrade or install the packages.
  • apt-get upgrade – installs the newer version of packages based on the updated list.

This may take a while, so just let it do it’s thing while it goes through and updates all your packages/dependencies.

After upgrading and rebooting, I was having an issue booting back into Kali. This is because my laptop has 2 graphics cards (you may not have this issue). The command lspci should help you confirm if the Nvidia is installed. If this is the case, open terminal and type:

apt-get remove nvidia* --purge 
reboot

This will remove the conflicting Nvidia drivers and use Intel graphics card.

Add New User

It’s very important to add a new user to your Kali distro. While it’s okay to use ‘root’ user, it isn’t recommended you use root for everything because root has all permissions. This means that you can damage your system files if you don’t know what you are doing. Having an account with stricter permissions will protect your sensitive files.

To add a new user, simply open terminal and type:

adduser userone

or

adduser userone sudo

replace “userone” with the username of your choice.

Continue reading

Node and NPM

Setup Node JS and NPM for JavaScript Project – 2016

What is Node JS and NPM

..Node.js is an open-source, cross-platform runtime environment for developing server-side Web applications. Although Node.js is not a JavaScript framework,[3] many of its basic modules are written in JavaScript, and developers can write new modules in JavaScript. –wikipedia.com

Node.js is also written as NodeJS,Node JSor just Node. I will try to keep it the wording uniform but please forgive me if I use different variations.

Node JS runtime environment interprets JavaScript via Google V8 JavaScript engine. What makes Node JS even more attractive for back-end server development is the huge ecosystem of Node JS libraries and applications which can be implemented by other developers.

node js

Node JS installation comes with a command line utility called NPM (node package manager) which allows you to easily install, version-control, and manage dependencies of Node JS libraries (or packages), and applications, from the vast NPM online repository. NPM CLI is much like APT, only for Node Packages. Node packages are other JavaScript modules that have been created by other developers, which can be included in your own code to simplify the coding. Some common NPM packages include, Express, Angular, Jquery, etc. (visit https://www.npmjs.com/ for a complete list)

Continue reading

sublime_main

Use Sublime Text 3 as your JavaScript IDE – 2016

Sublime Text 3 is a notepad replacement on steroids. However, it’s not just a colorful text pad, it can be transformed to a full-feature JavaScript IDE. It’s a neat, feature-rich, text-editor which allows developers to easily keep track of, and edit, their code. In my opinion it’s the best free JavaScript IDE. It is my favorite notepad replacement and coding tool, and there is no time limit on the unregistered version (unlike the 30 day trial period for WebStorm). After your license expires, you can continue to use the software however, if you do like it, I recommend buying it for $70.00 to support the Sublime team. Although WebStorm is also a great IDE, in this post I am going to show you how to setup a simple JavaScript IDE (Integrated Development Environment) in Sublime Text 3.

Sublime Text 3 is available for: WindowsLinuxMac/OSX

Continue reading

webstorm logo

Web Storm Javascript IDE Linux Install 2016

What is an IDE

Although Kali Linux is excellent tool for penetration testers, sometimes you need to use it for other tasks/projects that do not involve any type of penetration testing. If you’re looking to getting into web development, or software development in general, I recommend a product called WebStorm, developed by JetBrains. WebStorm is a JavaScript Integrated Development Enviroment (IDE) and helps you manage your code and stay organized. When building scalable applications, the number of files and modules can grow exponentially, really quickly, and therefore I recommend using an IDE to keep track of everything.

An integrated development environment (IDE) is a software suite that consolidates the basic tools developers need to write and test software. Typically, an IDE contains a code editor, a compiler or interpreter and a debugger that the developer accesses through a single graphical user interface (GUI). — techtarget.com

Continue reading

linux bash script example

Linux Bash Script Beginner Tutorial : Change MAC address – 2016

What is a Bash Script?

linux bash script example

In computer programming, a script is a program or sequence of instructions that is interpreted or carried out by another program rather than by the computer processor (as a compiled program is). — searchenterpriselinux.techtarget.com

So basically, a bash script is a file in Linux that can be used to automate a list of commands that you normally execute in a specific order. In a bash script, bash is the scripting language we are using. Bash is short for Bourne Again Shell and comes pre-installed on most Linux machines. A bash script can be written in any text editor, and usually saved with a file extension of .sh, however the .sh file extension is optional.

We can use a Bash script to simplify repetitive tasks. For example, to change the WiFi card’s MAC address using the “macchanger” utility (built into Kali Linux) we run the following commands:

ifconfig wlan0 down
macchanger --mac 00:11:22:33:44:55 wlan0
ifconfig wlan0 up
dhclient wlan0

Now, it’s okay if you want to keep typing the above commands every time you want to change your mac address, however it can get annoying after a while. Wouldn’t it be easier if we could just run a simple script that could automatically run the commands shown above? The answer is, Yes. In the following article, I am going to teach you how to create a very basic Linux Bash script, without creating the infamous “hello world” script. 🙂

Continue reading