Posts

Showing posts from 2016

To implement local search algorithm for Travelling Salesman Problem using Hill Climb > Java Program

To implement local search algorithm for Travelling Salesman Problem using Hill Climb > Java Program Artificial Intelligence Program: package javaapplication5; import java.util.*; public class JavaApplication5 {

Exploit Remote Computer using Metasploit > Kali Linux

Exploit Remote Computer using Metasploit > Kali Linux Network Technologies Using IP of Victim: Initializing msf console: root@kali:~# msfconsole Frustrated with proxy pivoting? Upgrade to layer-2 VPN pivoting with Metasploit Pro -- type 'go_pro' to launch it now.        =[ metasploit v4.8.2-2014010101 [core:4.8 api:1.0] + -- --=[ 1246 exploits - 678 auxiliary - 198 post + -- --=[ 324 payloads - 32 encoders - 8 nops

Harvester Attack Using Social Engineering Toolkit > Kali Linux

Harvester Attack Using Social Engineering Toolkit > Kali Linux Network Technologies Start SEToolkit: root@kali:~# setoolkit [-] New set_config.py file generated on: 2016-09-25 17:56:48.428780 [-] Verifying configuration update... [*] Update verified, config timestamp is: 2016-09-25 17:56:48.428780 [*] SET is using the new config, no need to restart

Demonstration of ARP Spoofing and Detection using XARP > Kali Linux

Image
Demonstration of ARP Spoofing and Detection using XARP > Kali Linux Networking Technologies ARPSPOOFING: Enable IP Forwarding: root@kali:~# echo 1 >/proc/sys/net/ipv4/ip_forward Edit Iptables: root@kali:~# iptables -t nat -A PREROUTING -p tcp --destination-port 80 -j REDIRECT --to-port 8080

Nmap

Image
Nmap Network Technologies Nmap  For Public IP: *Using nmap: root@kali:~# nmap 175.20.101.2 Starting Nmap 6.40 ( http://nmap.org ) at 2016-07-26 22:02 IST Nmap scan report for 2.101.20.175.adsl-pool.jlccptt.net.cn (175.20.101.2) Host is up (0.00057s latency). Not shown: 990 filtered ports PORT     STATE SERVICE 21/tcp   open  ftp 25/tcp   open  smtp 80/tcp   open  http 110/tcp  open  pop3 143/tcp  open  imap 443/tcp  open  https 465/tcp  open  smtps 587/tcp  open  submission 1863/tcp open  msnp 5050/tcp open  mmcc Nmap done: 1 IP address (1 host up) scanned in 5.40 seconds

An Example of using tools like whois, nslookup, dig, traceroute > Network Technologies

Image
An Example of using tools like whois, nslookup, dig, traceroute Network Technologies

Design of Perceptron AND network and program of Perceptron Training Algorithm

Image
Design of Perceptron AND network and program of Perceptron Training Algorithm Soft Computing PROGRAM : % Perceptron for AND Function clear;  clc;  x=[1 1 -1 -1;1 -1 1 -1];  t=[1 -1 -1 -1];  w=[0 0];

Washing Machine Controller using Fuzzy Logic

Image
Washing Machine Controller using Fuzzy Logic Soft Computing

Train Problem Controller using Fuzzy Logic

Image
Train Problem Controller using Fuzzy Logic Soft Computing

To plot various membership functions > Matlab

Image
To plot various membership functions ( triangular, trapezoidal and bell shaped ) > Matlab Soft Computing

TO PERFORM UNION, INTERSECTION AND COMPLIMENT OPERATIONS > Matlab

TO PERFORM UNION, INTERSECTION AND COMPLIMENT OPERATIONS > Matlab Soft Computing Program: %Enter Data u=input('ENTER THE FIRST MATRIX'); v=input('ENTER THE SECOND MATRIX');

To detect Buffer Overflow > Java Program

To detect Buffer Overflow > Java Program Cryptography and System Security Program: import java.util.Scanner; public class Overflow {     public static void main(String[] args) {

To perform adversarial search using Min Max search > Java Program

To perform adversarial search using Min Max search > Java Program Artificial Intelligence Program: import java.util.Scanner; public class MinMax {     public static void main(String[] args) {         new MinMax().go();         System.out.println("\n");     }

To implement Knapsack Cryptosystem > Java Program

To implement Knapsack Cryptosystem > Java Program Cryptography and System Security Program: import java.io.*; import java.util.*; public class Knapsack {

To implement SDES Symmetric Encryption > Java Program

To implement SDES Symmetric Encryption > Java Program Cryptography and System Security Program: import java.util.*; class KeyGeneration

To implement MD5 > Java Program

To implement MD5 > Java Program Cryptography and System Security Program: import java.io.*; import java.math.BigInteger; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; public class MD5 {     public static String getMD5(String input) {

Apply Brute Force Attack on Additive Cipher > Java Program

Apply Brute Force Attack on Additive Cipher > Java Program Cryptography and System Security Program: import java.util.Scanner; public class BruteForce {

Implement a Double Transposition Cipher > Java Program

Implement a Double Transposition Cipher > Java Program Cryptography and System Security Program import java.util.Scanner; public class Trans {

To apply informed search algorithm to solve 8 puzzle problem (A* search) > Java Program

To apply informed search algorithm to solve 8 puzzle problem (A* search)  > Java Program Artificial Intelligence Program: class Astar {

Sampling and reconstruction of signal > Matlab

Image
Sampling and reconstruction of a signal > Matlab Digital Signal Processing %Showing the Uniform sampling reconstruction close all; clear all; N=64; Fs=100; %Sampling frequency Ts=1/Fs; %Sampling time t=Ts*[-N/2:N/2-1] fo=2;%Fundamental frequency f1=4;%Fundamental frequency s=2*sin(2*pi*fo*t)+2*sin(2*pi*f1*t);

To plot standard DT signals > Matlab

Image
To plot standard DT signals > Matlab Digital Signal Processing  1)UNIT IMPULSE n1=input( 'Lower limit' ) n2=input( 'Upper limit' ) x=n1:n2; y=[x==1]; stem(x,y);

To perform Discrete Fourier Transform and to study magnitude spectrum of the DT signal > Matlab

Image
To perform Discrete Fourier Transform and to study magnitude spectrum of the DT signal > Matlab Digital Signal Processing  Program: x = [2 3 -1 4]; N = length(x); X = zeros(4,1) for k = 0:N-1     for n = 0:N-1         X(k+1) = X(k+1) + x(n+1)*exp(-j*pi/2*n*k)     end end

To find union, intersection and complement of matrices > Matlab

To find union, intersection and complement of matrices > Matlab Digital Signal Processing Program: u=input( 'Enter matrix data' ); v=input( 'Enter second matrix' );

Cross Correlation between two Digital Signals > Matlab

Image
Cross Correlation between two Digital Signals > Matlab Digital Signal Processing %Cross Correlation clear all x=input('Enter x :'); y=input('Enter y :'); m=length(x); n=length(y);

To implement convolution of two Digital Signals > Matlab

Image
To implement convolution of two Digital Signals > Matlab Digital Signal Processing %Convolution clear all x=input('Enter x :'); h=input('Enter h :'); m=length(x); n=length(h); X=[x,zeros(1,n)]; H=[h,zeros(1,m)];

Solution for Water Jug Problem with 2 Jugs > Java Program

Solution for Water Jug Problem with 2 Jugs > Java Program Artificial Intelligence Program: public class Jug {     static int flag=0;    public static void main(String[] args) {       state(0,0);        System.out.println("EXIT");     }    

To perform uninformed search using DFS Traversal > Python Program

To perform uninformed search using DFS Traversal > Python Program Artificial Intelligence Program: graph={'A':['B','C'],'B':['A','D','E'],'C':['A','E'],'D':['B','E'],'E':['D','B','C']}

To perform uninformed search using BFS Traversal > Python Program

To perform uninformed search using  BFS Traversal > Python Program Artificial Intelligence Program: graph={'A':['B','C'],'B':['A','D','E'],'C':['A','E'],'D':['B','E'],'E':['D','B','C']}

To solve Tower of Hanoi > Python Program

To solve Tower of Hanoi > Python Program Artificial Intelligence Program: #function of tower of hanoi

To find average of 2 Numbers > Python Program

To find average of Numbers > Python Program Artificial Intelligence # Function to make average of 2 nos

To add numbers using function > Python Program

To add numbers using functions > Python Program Artificial Intelligence Program: #function to add two nos

Additive Cipher > Java Program

Additive Cipher > Java Program Cryptography and System Security Program: import java.io.*; public class Adder {

Program demonstrating For loop and Functions > Matlab

Program demonstrating For loop and Functions > Matlab Soft Computing exp1.m clc clear all a=mysq(675); a b=fnew(10)

Extended Euclidean Algorithm for Modular Multiplicative Inverse > C Program

Extended Euclidean Algorithm for Modular Multiplicative Inverse > C Program Cryptography and System Security Program: #include<stdio.h> #include<conio.h> void main() {

Euclidean Algorithm to find GCD > C Program

Euclidean Algorithm to find GCD > C Program  Cryptography and Network Security  Program: #include<stdio.h> #include<conio.h> void main() { int a,b,x; clrscr(); printf("Enter 1st Number "); scanf("%d",&a); printf("Enter 2nd Number "); scanf("%d",&b); x=gcd(a,b); printf("GCD is %d",x); getch(); }

Intermediate Code Generation > C Program

Intermediate Code Generation > C Program System Programming and Compiler Construction Program: #include<stdio.h> #include<conio.h> #include<string.h> char op[2],arg1[5],arg2[5],result[5]; void main() {   FILE *fp1,*fp2;   fp1=fopen("input.txt","r");   fp2=fopen("output.txt","w");   while(!feof(fp1))   {

To create and use program Libraries in Linux > C Program

To create and use program Libraries in Linux > C Program System Programming and Compiler Construction main.c #include<stdio.h> #include<math.h> #include "shared.h" int main() { double result=5.0; result=factorial(result); printf("\n The factorial is [%g] \n",result); return 0; }

Telnet Configuration > Network Programming

Image
Telnet Configuration Network Programming [root@localhost ~]# ifconfig eth0      Link encap:Ethernet  HWaddr 00:0C:29:FD:19:13             inet addr:172.20.101.50  Bcast:172.20.101.255  Mask:255.255.255.0           inet6 addr: fe80::20c:29ff:fefd:1913/64 Scope:Link           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1           RX packets:8768 errors:0 dropped:0 overruns:0 frame:0           TX packets:856 errors:0 dropped:0 overruns:0 carrier:0           collisions:0 txqueuelen:0            RX bytes:1055718 (1.0 MiB)  TX bytes:65114 (63.5 KiB) lo        Link encap:Local Loopback             inet addr:127.0.0.1  Mask:255.0.0.0           inet...

Deadlock Detection > Java Program

Deadlock Detection > Java Program Distributed Databases Program: import java.util.Scanner; /**  *  * @author PRATHAMESH PANDIT  */ public class DeadlockDD {         public static void main(String[] args) {         // TODO code application logic here         Scanner sc = new Scanner(System.in);

Program to design and implement Macro > Assembly Program

Image
Program to design and implement Macro  > Assembly Program System Programming and Compiler Construction Program 1: macro.c #include<stdio.h> #include<conio.h> #include<string.h> struct mnt { int sr; char mn[30]; int mdtc; int p; }ntab[10];

To Develop App demonstrating transfer of Data between multiple Activities > Android App Development

Image
To Develop App demonstrating transfer of Data between multiple Activities > Android App Development Mobile Communication and Computing Programs:

To create Basic Calculator App > Android App Development

Image
To Develop Basic Calculator App > Android  Mobile Computation and Computing PROGRAM: MainActivity.java

To implement Shift Reduce Parser > C Program

Image
To Implement Shift Reduce Parser > C Program System Programming and Compiler Construction  Program:

To implement Recursive Descent Parser > C Program

Image
To implement Recursive Descent Parser > C Program System Programming and Compiler Construction  Program: #include"stdio.h" #include"conio.h" #include"string.h" #include"stdlib.h" #include"ctype.h"

To implement a Midlet that shows a Bouncing Ball > Java ME Program

Image
To implement a Midlet that shows a Bouncing Ball > Java ME Program Mobile Communication and Computing Program: package mobileapplication1; import java.util.Timer; import java.util.TimerTask; import javax.microedition.lcdui.Canvas; import javax.microedition.lcdui.Command; import javax.microedition.lcdui.CommandListener; import javax.microedition.lcdui.Display; import javax.microedition.lcdui.Displayable; import javax.microedition.lcdui.Graphics; import javax.microedition.midlet.*; public class Midlet_2 extends MIDlet {     Display d;         MyCanvas m;      Timer t;     MyTask mt;     int x=10,y=10;     int xiner=1,yiner=1;     Command start, stop;      Command c;

To change color of a shape using Timer > Java ME Program

Image
To change color of a shape using Timer > Java ME Program Mobile Communication and Computing Program: package prat; import java.util.*; import javax.microedition.lcdui.*; import javax.microedition.midlet.*; public class Midlet extends MIDlet { Display d; MyCanvas m; Command rect; Timer t; MyTask mt; public void startApp() {

To develop menu based application to draw shapes > Java ME Program

Image
To develop menu based application to draw shapes > Java ME Program Mobile Communication and Computing Program: package mobileapplication1; import javax.microedition.lcdui.*; import javax.microedition.midlet.*; public class Midlet extends MIDlet {     Display d;     DrawCan dv;     public void startApp(){

Network Programming Lab Sessions

Image
Network Programming Lab Sessions Log Network Programming Session 1: [root@localhost ~]# cd Desktop [root@localhost Desktop]# cd .. [root@localhost ~]# pwd /root [root@localhost ~]# ls 123  145  45  anaconda-ks.cfg  delhi  Desktop  india  install.log  install.log.syslog  mp  os  dp  sp  Test.class  Test.java  Test.txt [root@localhost ~]# rm dp rm: remove regular file `dp'? y [root@localhost ~]# ls 123  145  45  anaconda-ks.cfg  delhi  Desktop  india  install.log  install.log.syslog  mp  os  sp  Test.class  Test.java  Test.txt [root@localhost ~]# nano prat [root@localhost ~]# cat prat i am not a nice person

Program to design and implement Pass 1 of 2 Pass Assembler > C and Assembly Program

Image
Program to design and implement Pass 1 of 2 Pass Assembler > C and Assembly Program System programming and Compiler Construction .asm code: PG1              START 1000                     USING *, 15                      L                    1, FOUR                      A                    1, ='5'                      ST                  1, TEMP                      A                    1, ='4' FOUR         DC   ...

Program To Calculate Mathematical Expressions > Lex and Yacc Program

Program To Calculate Mathematical Expressions > Lex and Yacc Program  System Programming and Compiler Construction Programs: pratspcc3.l: %{   #include "y.tab.h"   extern int yylval; %}

To take input, process it and Display output > Java ME Program

To take input, process it and Display output > Java ME Program Mobile Communication and Computing Program: import javax.microedition.midlet.*; import javax.microedition.lcdui.*; /**  * @author prat  */ public class Midlet extends MIDlet implements CommandListener{     

To validate characters using Lex > Lex and Yacc Program

To validate characters using Lex > Lex and Yacc Program  System Programming and Compiler Construction Program: %{ /* To validate characters using lex*/ %} %% [\t]+                                    ;

To copy text from one file to another file > C Program

To copy text from one file to another file > C Program System Programming and Compiler Construction #include<stdio.h> #include<conio.h> void main() { FILE *fp1, *fp2; char ch, fname1[20], fname2[20];