Posts

Showing posts from March, 2014

Installing Kali Linux Tools in Ubuntu or Linux Mint

Image
Kali linux is a debian based and its not easy to configure it on a typical PC. If the machine is UEFI based, then Kali is tough to customize.

So what is the alternative....? Here is the answer: Katoolin

Its the name of the package system for installing the entire kali linux tools (Penetration Testing) in Ubuntu or Debian based system.

Here I am trying to install inside my Linux Mint

OS Used: Linux Mint 18.2 Sonya
Prequisites: Python 2.7
Always perform these steps after the installation of ubuntu or Linux Mint

$] sudo apt update
$] sudo apt install build-essential autoconf automake libxmu-dev
$] sudo apt install git
$] git clone https://github.com/LionSec/katoolin.git
$] sudo cp katoolin/katoolin.py /usr/bin/katoolin
$] sudo katoolin

This will give various options as shown below
 In the above pic. Select 2 to View categories and you will get the screen as shown in the next image.
Select "0" to install all the applications.

This will install 1.3G to download and 3.5 GB space will be…

Printing the receiving threshold for Propagation models in ns2

Image
This post is helpful for you to find out the receiving threshold values of various propagation models for certain communication distance.

By default, ns2 uses a distance of 1.5m (the antenna is just placed 1.5m above the node ground). Suppose if someone needs to calculate the factor when the distance of the antenna is placed 10m above the ground, then the default value changes.

NS2 has an inbuilt mechanism to calculate the distance for certain communication range using the threshold.cc file in ~ns-2.35/indep-utils/propagation/ 

The file is not having any OTcl linkages, its a conventional C++ file that can be compiled using the command  g++

Before compiling the file, there are some changes in the threshold.cc file.
1. Change the #include<iostream.h> to#include <iostream>
2. Include the following two lines
#include <string.h>
using namespace std;

Once the changes are made, compile the file using the command
g++ -o threshold threshold.cc 
(The above command compiles and l…

Printing Routing Table in AODV: NS2

Image
There are no automatic provisioning to print a routing table for a given node in ns2. However, using the tracefile generated using ns2, routing table can be printed, but one should be good enough in processing a file using awk, python or any other scripts.

The following code will make you print the routing table when you are using AODV Protocol.

Files to be modified:
~ns-2.35/aodv/aodv.h
~ns-2.35/aodv/aodv.cc

The RED colored code indicates the addition of these lines in to the existing codes.
The following line can be added to the aodv.h file inside the class AODV in the protected scope.  probably add the line after the rt_down() function.
void rt_print(nsaddr_t nodeid);
In the aodv.cc file, add the following entry anywhere, but probably after the end of rt_down() function.  void  AODV::rt_print(nsaddr_t nodeid) { FILE *fp; fp = fopen("route_table.txt", "a"); aodv_rt_entry *rt; for (rt=rtable.head();rt; rt = rt->rt_link.le_next) { fprintf(fp, "NODE: %i %f %i %i %…