Skip to main content

Posts

Showing posts from February, 2014

Simulation of ARP/RARP

Here is the core simulation of the ARP(Address Resolution Protocol) and RARP(Reverse Address Resolution Protocol) ARP used to map the ip address with the corresponding MAC address and RARP do that in reverse. it maps the MAC with the ip. #include "stdio.h" #include "string.h" int main() { char table[3][2][40]; char ipin[10],macin[30]; int i,j,found; strcpy(table[0][0],"127.0.0.1"); strcpy(table[0][1],"44:dd:22:11:33"); strcpy(table[1][0],"10.1.1.8"); strcpy(table[1][1],"33:aa:fe:4e:2d"); strcpy(table[2][0],"10.1.8.5"); strcpy(table[2][1],"23:a3:5d:33:9d"); printf("IP address\t MAC address\n"); for(i=0;i<3;i++) { printf("%s\t %s\n",table[i][0],table[i][1]); } printf("simulating ARP\n\n"); printf("enter the IP address\n"); scanf("%s",&ipin); for(i=0;i<3;i++) { if(str

Workshop on IBM BIGDATA

Here is my shell script which i wrote to make the process of installing the IBM biginsight (hadoop) on the lab. My team installed the hadoop using this script for around 70 systems, it saved lots of time for us, and we successfully conducted the workshop on it today. #!/bin/bash #generating keygen for the root user with no password ssh-keygen -f $HOME/.ssh/id_rsa -t rsa -N '' echo "key generated in $HOME" #append it to the authorized_keys cat $HOME/.ssh/id_rsa.pub >> $HOME/.ssh/authorized_keys echo "appended to authorized_keys" #create a usergroup

Cipher engine in ruby

Recently i have started to learn ruby because it's the core language for the rails framework. Here the cipher engine which uses the old caesar cipher algorithm, i have used file concepts to read and write the both encrypted and decrypted outputs to files. We can also use other methods separately, launch your irb then load 'encryptor.rb' make an instance of the Encryptor class by e = Encryptor.new to check all the available methods e.methods