Wednesday, February 10, 2010

Artificial Intelligence Ebook

 Artificial Intelligence Book
Size: 35.23 MB 

Thursday, February 4, 2010

Network Security Experiment 1

/*
Following is a Java program to check strength of password entered by user utilizing following parameters
a)Combination of alphabets with digits & special symbols
b)Length of password
c)Repetition of characters in password


This program uses HashTable to store frequency of characters.
*/

import java.io.*;
import java.util.Hashtable;
import java.util.Enumeration;



/**
 * @author Pawan Singh
 *
 */

public class passwordStrength {


    public static void main(String[] args) throws IOException {


        System.out.println("Enter password: ");
        BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
        String password=br.readLine();
        int strength=passwordStrength.checkStrength(password); 
        // checkStrength static method called
        System.out.println("Strength is "+strength+" out of 100");


        if (strength<0)
            System.out.println("Very Weak Password");
        else if (strength<34)
            System.out.println("Weak Password");
        else if(strength<68)
            System.out.println("Good Password");
        else
            System.out.println("Strong Password");


    }
   
   


    static public int checkStrength(String password)
    {
        int strength;
        //Initially parameter evaluation
        int len =password.length(),no_of_digits=0,no_of_alpha=0,no_of_spl=0;
        Hashtable freq = new Hashtable ();
        char c;
        Integer t;


        for(int i=0;i
        {
            //Evaluating number of types of characters
            c=password.charAt(i);
            if (Character.isDigit(c))
                no_of_digits++;
            else if (Character.isLetter(c))
                no_of_alpha++;
            else
                no_of_spl++;

            if (!freq.containsKey(c))
                freq.put(c, 1);
            else
            {
                t=freq.get(c);
                freq.remove(c);
                freq.put(c,t+1);
            }
            //End of for loop
        }


        //Finally Evaluation of strength
        strength=len*4;
        Enumeration e=freq.keys(); 
        while(e.hasMoreElements())
        {
            c=(Character)e.nextElement();   
            if( freq.get(c)>1)
            {
                strength-=5*(Integer)freq.get(c);//Reduction on behalf of repetition
            }
            //End of loop   
        }

        if (no_of_digits>2)
            strength+=5;
        if(no_of_spl>2)
            strength+=10;
        if(no_of_digits>0 && no_of_alpha>0)
            strength+=15;
        if(no_of_digits>0 && no_of_spl>0)
            strength+=15;
        if(no_of_spl>0 && no_of_alpha>0)
            strength+=15;
        if(no_of_alpha==0 && no_of_spl==0)
            strength-=15;
        if(no_of_digits==0 && no_of_spl==0)
            strength-=20;
        if(strength>100)
            strength=100;

        return strength;
    }   





}


Monday, January 11, 2010

Artificial Neural Network Book




 Fundamentals of Neural Networks
 by Laurene Fausett

Data Warehouse Book



Data Warehousing Fundamentals
by Paulraj Pooniah

Wiley Publication 

Wednesday, December 30, 2009

Data Mining Book



Authors : Jiawei Han and Micheline Kamber

Data Mining: Concepts and Techniques, 2nd ed.

 Download

 

Tuesday, December 22, 2009

Blog Theme

I am working on new theme for blog and have changed the previous look with this new CSS template, students interested in improving blog theme kindly send suggestions and search for link to better theme(s) so that Blog can be renovated

Sunday, December 6, 2009

Operations Research slides

http://discovery.bits-pilani.ac.in/discipline/math/msr/aaoc222/