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

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

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

Setup a free JavaScript IDE with Sublime Text 3

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

Kali Linux Install – Setup Kali persistent USB 2016

Kali Persistent USB Setup

After recently deciding to get back into Linux, I decided to start using Kali and ditch Backtrack 5. As you all know, Kali is basically a new, debian, version of Backtrack Linux. kali persistent logo If you haven’t already tried out Kali, a persistent USB is a perfect way to test it out. A Kali persistent USB drive will allow you to run your Linux OS off the USB drive itself, and keep track of your changes. This is great if you want to save your downloaded tools for later, or if you switch between multiple computers often. It’s actually easier than ever to create a persistent copy of Kali. I recommend a USB 3.0 flash drive with 8GB or more of space. I used a 32GB flash drive — Kali itself should take up around 3.5GB to 4GB of space. I am going to be assuming that you are currently a Windows user.

Requirements

  • USB 3.0 drive with at least 8GB of space
  • Windows computer (some software we will use requires Windows)

Continue reading

WPA_Supplicant config for WPA encryption Backtrack 5

Why use WPA_Supplicant Daemon?

Wpa_supplicant config

So after finding an old Backtrack 5 R3 persistent USB drive I had created years ago, I booted it up to browse the content I had on it. Last time I used it, I was connected to a WEP encrypted network, but as we all know those offer weak protection and are slightly outdated for today. The tools and techniques to break WEP encryption have been around for a while and therefore WEP is rarely used these days. That being said, WPA encryption isn’t flawless, but a better alternative. I’m not going to discuss how to crack those here. Anyway, I figured I would share with you how to connect to a WPA encrypted network in Linux using the terminal and WPA_Supplicant daemon.

If you’re still using Backtrack 5 R3, I recommend upgrading to Kali Linux by creating a persistent USB.

Normally, we use iwconfig to configure wireless networks. However, iwconfig does not support WPA/WPA2 encryption. We have to use the “WPA_Supplicant Daemon” to connect to a WPA encrypted network.

Wpa_supplicant comes pre-installed in most Linux distros (including Backtrack 5 R3, Kali Linux and Ubuntu). Since Backtrack 5 R3 is outdated, it is configured to make connecting to WEP encrypted networks easily,

Continue reading

TechSide - Robocopy Command Line

Robocopy Command Line Tutorial

For: Windows

In an earlier blog entry, I showed you how to use Xcopy. This time I will show you an even more powerful Command(CMD) line utility called Robocopy, which is short for “Robust File Copy”. The Robocopy command line utility has even more advanced options (or switches), and was apparently released to replace Xcopy in newer Windows versions. I’m running Windows 10 and I have Xcopy commmand line and Robocopy commmand line, pre-installed on both of my Windows machines.

…[Robocopy Command Line] strengths include the ability to copy all NTFS file attributes and to mirror the contents of an entire folder hierarchy across local volumes or over a network.

Robocopy Command Line Syntax

robocopy Source Destination [File[ ...]] [Options]

To see the full list of options, type robocopy /? in the command prompt. The syntax of robocopy command line is different from other copy commands in that it accepts folder names as its source and destination — meaning you cannot use *.* or ?. However, certain files can be selected. If we want to copy a file named myinfo.txt from C:\draft” to “C:\published” then we can run the following command:

robocopy c:\draft c:\published myinfo.txt

Robocopy Command Line Key Features

robocopy command line syntaxGood Robocopy command line picture

Continue reading

XCOPY usage - quickly copy files in Windows

“XCOPY” stands for Extended Copy, and was created to add more functions then the standard copy command. If you are using Windows, it should be installed already.

XCOPY is a command used on PC DOS, MS-DOS, OS/2, Microsoft Windows, and related operating systems for copying multiple files or entire directory trees from one directory to another and for copying files across a network. — Wikipedia

Xcopy copies multiple files and folders and can create the same structure to the copied location. (Something the copy command cannot do.)

Syntax:

xcopy Source [Destination] [/w] [/p] [/c] [/v] [/q] [/f] [/l] [/g] [/d[:mm-dd-yyyy]] [/u] [/i] [/s [/e]] [/t] [/k] [/r] [/h] [{/a|/m}] [/n] [/o] [/x] [/exclude:file1[+[file2]][+[file3]] [{/y|/-y}] [/z]

Continue reading