The two main issues that we address in context of such response policies are that of policy matching, and policy administration. For the policy matching problem, we propose two algorithms that efficiently search the policy database for policies that match an anomalous request. We also extend the Postgre SQL DBMS with our policy matching mechanism, and report experimental results. The experimental evaluation shows that our techniques are very efficient. The other issue that we address is that of administration of response policies to prevent malicious modifications to policy objects from legitimate users. We propose a novel Joint Threshold Administration Model (JTAM) that is based on the principle of separation of duty. The key idea in JTAM is that a policy object is jointly administered by at least k database administrator (DBAs), that is, any modification made to a policy object will be invalid unless it has been authorized by at least k DBAs. We present design details of JTAM which is based on a cryptographic threshold signature scheme, and show how JTAM prevents malicious modifications to policy objects from authorized users.

With greater data integration, aggregation and disclosure, preventing data theft, from both inside and outside organizations, has become a major challenge.StandardDatabase security mechanisms, such as access control, authentication, and encryption, are not of much help when it comes to preventing data theft from insiders [5]. Such threats have thus forced organizations to reevaluate securitystrategies for their internal databases [4]. Database to detect potential intrusions, intrusion detection (ID), is a crucial technique that has to be part of any comprehensive security solution for high-assurance database security.

A response policy is required by the database security administrator to specify

appropriate response actions for different circumstances. In this paper, we proposea high-level language for the specification of such policies which makes it very easy to specify and modify them. The two main issues that we address in the context of such response policies are that of policy matching and policy administration. Policy matching is the problem of searching for policies applicable to an anomalous request.

We present a framework for specifying intrusion response policies in the context of a DBMS. We present a novel administration model called JTAM for administration of response policies. implement JTAM in the PostgreSQL DBMS, and report experimental results on the efficiency of our techniques. When an anomaly is detected, the response system must search through the policy database and find policies that match theanomaly.

 Standard database security mechanisms, such as access control, authentication, and encryption, are not of much help when it comes to preventing data theft from insiders.  The Intrusion Detection systems that are developed are not customized for a Database Management System (DBMS).

 There are three main types of response actions that we refer to, respectively, as conservative actions, fine-grained actions, and aggressive actions, the key issue to address is which response measure to take under a given situation.

The fundamental problem in such administration model is that of conflict-of-interest. The main issue is essentially that of insider threats, that is, how to protect a response policy object from malicious modifications made by a database user that has legitimate access rights to the policy object.

 Two main elements which is specifically customized to a DBMS is used: an anomaly detection (AD) system and an anomaly response system.  The first element is based on the construction of database access profiles of roles and users, and on the use of such profiles for the AD task.  The second element takes some actions once an anomaly is detected.

 Interactive response policy language is used which makes it very easy for the database administrators to specify appropriate response actions for different circumstances depending upon the nature of the anomalous request.  Two main issues are addressed: policy matching, and policy administration

Front End Operating System : Java : Windows

2.4 HARDWARE REQUIREMENTS Process RAM Hard Disk Monitor :PENTIUM 2.6 GHz :256Mb and above :10GB :VGA and High Resolution Monitor

5 FUNCTIONAL REQUIREMENTS INTRODUCTION Provide an overview of the system and some additional information to place the system in context. white papers. etc. response time. Describe who is producing the document and why. A software requirements specification (SRS) is a comprehensive description of the intended purpose and environment for software under development.2. availability. PURPOSE Provide an overall description of the FRD. security and speed of recovery from adverse events are evaluated. REFERENCES List references and controlling documents. other programs and human users in a wide variety of real-world situations. maintainability. portability. footprint. The SRS fully describes what the software will do and how it will be expected to perform. SCOPE Discuss the scope of the document and how it accomplishes its purpose of the project. A good SRS defines how an application will interact with system hardware. . its purpose. BACKGROUND Describe the organization and its overall responsibilities. An SRS minimizes the time and effort required by developers to achieve desired goals and also minimizes the development cost. Reference the system name and identifying information about the system to be implemented. including: meeting summaries. other deliverables. Parameters such as operating speed.

strategic decisions. and what . As the functional requirements are decomposed. CONSTRAINTS Constraints are boundary conditions on how the system must be designed and constructed.ASSUMPTIONS AND CONSTRAINTS Provide a list of contractual or task level assumptions and/or constraints that are preconditions to preparation of the FRD. a delivery date is a constraint only if there are real business consequences that will happen as a result of not meeting the date. user or business. legal changes and policy decisions. User requirement information can be in text or process flow format for each major user class that shows what inputs will initiate the system functions. If failing to have the subject application operational by the specified date places the organization in legal default. system interactions. Provide the type of security or other distinguishing characteristics of each set of users. ASSUMPTIONS Examples of assumptions include: availability of a technical platform. should be noted as such. whose outcomes influence the success of a project. Constraints exist because of real business conditions. Preferences. Preferences are arbitrary. the date is a constraint. Inclusion of lower level functional requirements is not mandatory in the traceability to user requirements if the parent requirements are already traced to them. DOCUMENT OVERVIEW Provide a description of the document organization. the highest level functional requirements are traced to the user requirements. List the functional requirements that compose each user requirement. For example. taking into account all major classes/categories of users. if included in the FRD. technical standards. USER REQUIREMENTS Provide requirements of the system. Assumptions are future situations beyond the control of the project. For example. Examples include: legal requirements. a date chosen arbitrarily is a preference.

The data requirements describe the business data needed by the application system.Other guidelines should include whether they are written in a way that is unambiguous and easy to understand. they are constraints on implementing the functional requirements as defined in the use case documents and other documents or models. Requirements may be labeled with a leading “U” or other label indicating user requirements. LOGICAL DATA MODEL/DATA DICTIONARY Create the initial Logical Data Model. Data requirements do not describe the physical database and are not at the level of identifying field names. These diagrams are further decomposed during design. Data flow diagrams should be decomposed down to the functional primitive level. DATA FLOW DIAGRAMS Decompose the context level diagrams to determine the functional requirements. The scenarios should be comprehensive. Rather.outputs are expected to be generated by the system. The first rule of defining nonfunctional requirements. and definitions in a data dictionary. is to ensure that they are testable. A requirement that cannot be tested may as well not be included as a requirement. If it is not obvious then ask a test developer how they would test it. to the extent that all user types and all major functions are covered. Typically. Give each user requirement a unique number. Describe data requirements by providing data entities. NON FUNCTIONAL REQUIREMENTS Non-Functional Requirements are not really requirements at all.Nonfunctional requirements may be present in other documents and models where they have been . Some of the requirements may be very technical in nature so not all can be expected to be understood by non-technical people. for the purposes of requirements management they are considered to be requirements and. decomposition. need to be tested. as such. However. However. The best way to ensure that nonfunctional requirements can be tested is to think about how they might be tested when they are written. user requirements have a numbering system that is separate from the functional requirements. those who will have to implement them and those who will have to test them should be able to understand them easily and completely. therefore.

STAKEHOLDER NEEDS LIST These are single line statements of needs gather early in the project from all stakeholders. Add them to the appropriate section of the non-functional requirements documents as single sentence statements. If so. add the requirements to the non-functional requirements document and reference them in the use case document. Search all relevant activities for notes relating to non-functional requirements and add them to the non-functional requirements document. These include the stakeholder needs list. Scan through the list and look for those needs that would not have been included in the use case documents. Add these to the non-functional requirements document and update the project overview with references to them. that requirements that apply across more than one use case have been included. however. and the use case documents PROJECT OVERVIEW The chapter 1 one contain the Project Overview summary of known major technical constraints. . Update the stakeholder needs list with the reference to the requirement in the non-functional requirements document. BUSINESS PROCESS MODEL When the business process model is created notes may have been added to the processes as attachment to activities on activity diagrams regarding stakeholder requirements as they have been mentioned by the stakeholder representative or process owner. USE CASE DOCUMENTS Use Case Documents have a specific section for non-functional requirements. These should normally apply specifically to the use case in question. the business process model. Update the activity notes with the reference to the requirement in the non-functional requirements document.added as notes or as high-level requirements. the project overview. It may be.

RELIABILITY Reliability is notoriously difficult to test before the system goes live as it relies on continuous use and metrics. If there is to be no documentation at all and the system is to be learnt from the developers demonstrating it to the users. . Figures should be defined on the basis of the metrics available for existing systems and the expectations for improvement or relaxation of these values. then say so. Notes to this effect should be included. For example. PERFORMANCE Performance can and should be tested early on the development as part of the architectural development phase. Some guidance here on what is realistic to expect should be sought in consultation with stakeholders. Be specific about the mechanism by which each aspect will be met. Care needs to be taken to specify throughput and response times in terms of the creation and processing of major data entities with reference to specific use cases in the use case model.USABILITY Resist making statements such as “The system shall be user friendly”. The non-functional requirements document template breaks the section down into seven subsections and prompts for completion of each section. If the system is to share infrastructure resources with other systems specify what proportion of those resources must be available if the response times are to be met. It will only be known if the system meets these requirements if proper metrics and requirements gathering are put in place. If no serious attempt is to be made to do this. then write „None‟ in each section. Ensure that the requirements are written in such a way that the testing of them will be straightforward. It is entirely insufficient. Also include any dependencies on outside systems and specify how these are expected to respond if resource and throughput targets are to be met. in the section „Learnability‟ say whether the user is expected to learn how to use the system by looking up the help or using a tutorial or whether the system can be put into a „learner mode‟ whereby it guid es a learner user through a use case by offering detailed prompts at every step.

Consider. SUPPORTABILITY Specify ease of installation. Otherwise describe just the constraint. Specify the required capacity for each of these. worms and all kinds of malicious code attacks including denial of service. This includes management of usernames and passwords. software and networks on which the system is expected to run. firewalls and protection against viruses. If .SECURITY Security includes all steps that are to be taken to secure the system against both voluntary and involuntary corruption. It may be useful to refer to the standards specified in section 8. Implementation constraints. When referring to system interfaces. legacy systems and databases refer to the design documentation for these. Create a deployment diagram. the amount of capacity that needs to be available for the system to meet its performance requirements. configuration and testing in terms both of the time to achieve the goal and specific means for achieving it. describe constraints on the design by which what it is to do will be achieved. or. or equivalent which shows all processing nodes. the developers could use any language they like then say so.g. IMPLEMENTATION CONSTRAINTS A constraint is a requirement which leaves no design option. Think carefully about how each of these requirements will actually be tested. If there is no constraint in a section.3 under implementation constraints. e. for example. Also specify any external systems of services upon which this system will depend in terms of the performance that is required of these systems if this system is to meet its performance targets. use cases for configuration and automatic self-testing. where the system runs on existing infrastructure. peripherals and communication links. Add important diagrams to Appendix A and refer to them in the text. Trojans. encryption of data transfers both internally and across external systems such as the internet. INFRASTRUCTURE REQUIREMENTS These should include description of existing or new hardware. rather than describing what the system will do. installation software and scripts.

is a crucial technique that has to be part of any comprehensive security solution for high-assurance database security.6 ANALYSIS MODULE SPECIFICATION  Anomalous Request  Intrusion Detection. whereas the aggressive actions can effectively block the anomalous request. MODULE DESCRIPTIONS: Anomalous Request : Interactive response policy language makes it very easy for the database administrators to specify appropriate response actions for different circumstances depending upon the nature of the anomalous request. Intrusion Detection : Monitoring a database to detect potential intrusions. .there is insufficient information about these external systems then mention that this information will need to be completed for the purposes of the development of this system. The two main issues that we address in context of such response policies are that of policy matching. 2. such as sending an alert.  Policy Administration. and policy administration. Recall that a response policy is created to select a response action to be executed in the event of an anomalous request. The conservative actions. We present a framework for specifying intrusion response policies in the context of a DBMS.  Intrusion Response.  Protection Data Transmission.  Policy Matching. allow the anomalous request to go through. intrusion detection (ID).

Policy Matching: Policy matching is the problem of searching for policies applicable to an anomalous request. Policy Administration : The main issue in the administration of response policies is how to protect a policy from malicious modifications made by a DBA that has legitimate access rights to the policy object. thus efficiency of the policy search procedure is crucial. the response system must search through the policy database and find policies that match the anomaly. and delete commands tomake malicious modifications to the policies. This is the problem of data security. Corporate organizations may seek to protect data related to proprietary interests.Propose an administration model referred to as the JTAM. data must be protected from unauthorized access and tampering. update. The threat scenario that we assume is that a DBA has all the privileges in the DBMS. Our ID mechanism is a real-time intrusion detection and response system. An action is the response action executed by the engine Our implementation of the response system can be configured to include/exclude other user-defined anomaly attributes. and wish to limit access to private data files. Protection Data Transmission : Data protection must deal with two general problems. Individual users may be concerned with personal privacy. and thus it is able to execute arbitrary SQL insert. data must be protected from errors by authorized system users. Intrusion Response: A condition is specified on the attributes of the detected anomaly. we address is that of administration of response policies to prevent malicious modifications to policy objects from legitimate users. Second. First. . When an anomaly is detected. Concern for data security will take different forms in different system applications. .

project planning and feasibility studies should show how much the company will earn once the project is created. For one. Statistical data will always play a crucial role in proving why the particular software is good for public use. . Before the software is even created. It will also take a look at the possible competition and how will the software be different compared to other companies. the idea will be evaluated again and again. researchers will be interviewing individuals in order to get their opinion if they will use if that software is available in the market. Investment will dictate how many people will be working for the project. They will be presenting the current market situation. investment will dictate how much the company will spend to create certain software. This will be the backbone of every project. This is even truer for companies that usually hire project based developers. software engineers and developers should be able to: Identify the Business Value Developing a software is not just creating a good software and presenting them to the market with hopes that someone will actually use or buy it. This objective has to be fulfilled by the company‟s researchers. current users need or World Wide Web that software engineers can fill. Estimate Investment and Reward on the Project In project planning. If it‟s just a tool for businesses. the investment on a certain project has to be revealed. Most of the time.FEASIBILITY STUDY Objectives: In project development and feasibility studies stage of the SDLC. it should show how it can increase the productivity of the employees and its actual impact in financial sense. Aside from investment. Analyze Feasibility Researchers or proponents of the software will actually show why the software is needed in the actual business sense.

Any changes made to the requirements in the future will have to go through formal change approval process. Each phase starts with a design goal and ends with a client reviewing the progress thus far. .1DESIGN METHDOLOGIES This document play a vital role in the development of life cycle (SDLC) as it describes the complete requirement of the system.3. Planning an designing the second prototype. This usually involves interviewing a number of users representing all the external or internal users and other aspects of the existing system. The steps for Spiral Model can be generalized as follows:  The new system requirements are defined in as much details as possible. Analysis and engineering efforts are applied at each phase of the project. This is usually a scaled-down system. Evaluating the first prototype in terms of its strengths. 2.  A first prototype of the new system is constructed from the preliminary design. “A spiral Model of Software Development and Enhancement. and risks.  A preliminary design is created for the new system. and represents an approximation of the characteristics of the final product. As originally envisioned. Constructing and testing the second prototype.  A second prototype is evolved by a fourfold procedure: 1. Defining the requirements of the second prototype. It means for use by developers and will be the basic during testing phase. but it was the first model to explain why the iteration models. This model was not the first model to discuss iterative development. 3. the iterations were typically 6 months to 2 years long. with an eye toward the end goal of the project. SPIRAL MODEL was defined by Barry Boehm in his 1988 article. 4. weakness.

or any other factor that could. in the customer‟s judgment. based on the refined prototype. result in a less-than-satisfactory final product.  The final system is thoroughly evaluated and tested. At the customer option. Routine maintenance is carried on a continuing basis to prevent large scale failures and to minimize down time. another prototype is developed from it according to the fourfold procedure outlined above. the entire project can be aborted if the risk is deemed too great.  The existing prototype is evaluated in the same manner as was the previous prototype. Risk factors might involved development cost overruns.  The final system is constructed.  The preceding steps are iterated until the customer is satisfied that the refined prototype represents the final product desired. The following diagram shows how a spiral model acts like: Fig -Spiral Model . and if necessary. operating-cost miscalculation.

 Software engineers can get their hands in and start woring on the core of a project earlier. they can easily become a maintenance and security night mare The N-tier Applications provide specific advantages that are vital to the business continuity of the enterprise. The N-Tier Applications provide strategic benefits to Enterprise Solutions. schedule etc . While 2-tier.e. Typical features of a real life n-tier may include the following:  Security  Availability and Scalability  Manageability  Easy Maintenance  Data Abstraction The above mentioned points are some of the key design goals of a successful n-tier application that intends to provide a good Business Solution.ADVANTAGES  Estimates(i. .  It is more able to cope with the changes that are software development generally entails. APPLICATION DEVELOPMENT N-TIER APPLICATIONS N-Tier Applications can easily implement the concepts of Distributed Application Design and Architecture. because important issues discoved earlier.) become more relistic as work progresses. client-server can help us create quick and easy solutions and may be used for Rapid Prototyping. budget.

In other words. Each layer can potentially treat the other layer as a „Block-Box‟. an n-tier application helps us distribute the overall functionality into various tiers or layers:  Presentation Layer  Business Rules Layer  Data Access Layer  Database/Data Store Each layer can be developed independently of the other provided that it adheres to the standards and communicates with the other layers as per the specifications. Fig -N-Tier Architecture .DEFINITION Simply stated. each layer does not care how other layer processes the data as long as it sends the right data in a correct format. This is the one of the biggest advantages of the n-tier application.

In an n-tier application. The different application layers send the data requests to this layer and receive the response from this layer. To have a separate layer for business logic is of a great advantage. The rest of the Application should remain unaffected. For example: Windows/Web Forms and buttons. THE BUSINESS RULES LAYER This layer encapsulates the Business rules or the business logic of the encapsulations. For instance. etc. any changes to the processing logic in this layer can be made without impacting the others. Tables. etc do not affect the rest of the application because of the Data Access layer. If used in the right way. A lot of client-server apps failed to implement successfully as changing the business logic was a painful process. etc. the entire application can be implemented in such a way that it is independent of the actual Database. 2. Simply put changes made to the database. 1. Flat files. tables.THE PRESENTATION LAYER Also called as the client layer comprises of components that are dedicated to presenting the data to the user. grids. this layer provides a level of abstraction for the database structures. The Actual database could be created using SQL Server. edit boxes. Text boxes. . etc. Views. THE DATA ACCESS LAYER This layer comprises of components that help in accessing the Database. As long as the interface between the layers remains the same. 3. you could change the Database Location with minimal changes to Data Access Layer. Oracle. labels. THE DATABASE LAYER This layer comprises of the Database Components such as DB Files. This is because any changes in Business Rules can be easily handled in this layer.




i nt. i nt. Com ponent. i nt. i nt.. Com ponent. i nt) : void Detector3() i ni ti al i zeCom ponent() : voi d j Button1_acti onPerform ed(Acti onEvent) : voi d j T abbedPane1_stateChanged(ChangeEvent) : voi d m ai n(Stri ng[]) : voi d server() : voi d JFram e JFram e Detector2 ~ ~ ~ ~ + + + + cl i ent_1: Socket cl i ent_2: Socket contentPane: JPanel di s: DataInputStream tem p: l ong addCom ponent(Contai ner. b: Stri ng ([]) = {"Graph". i nt) : void i ni ti al i zeCom ponent() : voi d j Button1_acti onPerform ed(Acti onEvent) : voi d j T abbedPane1_stateChanged(ChangeEvent) : voi d m ai n(Stri ng[]) : voi d server() : voi d Si nk2() Si nk3() Sink2 JFram e Sink3 ~ ~ ~ + + + contentPane: JPanel desti nati on: Stri ng i : i nt = 1 j Button1: JButton j Label 1: JLabel j Panel 1: JPanel socket_1: Socket addCom ponent(Contai ner. i nt) : void i ni ti al i zeCom ponent() : voi d j Button1_acti onPerform ed(Acti onEvent) : voi d j T abbedPane1_stateChanged(ChangeEvent) : voi d m ai n(Stri ng[]) : voi d server() : voi d Si nk1() JFram e JFram e Source1 ~ ~ ~ ~ ~ + + + + + + a: Stri ng ([]) = {"Sel ect". contentPane: JPanel d: doubl e dest1: Stri ng desti nati on: Stri ng Detect: JButton fi l epath: JLabel j Button2_acti onPerform ed(Acti onEvent) : voi d j Button3_acti onPerform ed(Acti onEvent) : voi d j Com boBox1_acti onPerform ed(Acti onEvent) : voi d j T extFi el d1_acti onPerform ed(Acti onEvent) : voi d m ai n(Stri ng[]) : voi d pai nt(Graphi cs) : voi d sendData(Stri ng. Com ponent. i nt) : void Detector2() i ni ti al i zeCom ponent() : voi d j Button1_acti onPerform ed(Acti onEvent) : voi d j T abbedPane1_stateChanged(ChangeEvent) : voi d m ai n(Stri ng[]) : voi d server() : voi d Si nk2() ~ ~ ~ ~ ~ ~ + + + contentPane: JPanel desti nati on: Stri ng i : i nt = 1 Reci eved1: Stri ng rr: Stri ng = "" server_1: ServerSocket socket_1: Socket transferT i m e: JLabel Sink1 JFram e addCom ponent(Contai ner. Com ponent. i nt. i nt. i nt. i nt) : void i ni ti al i zeCom ponent() : voi d j Button1_acti onPerform ed(Acti onEvent) : voi d j T abbedPane1_stateChanged(ChangeEvent) : voi d m ai n(Stri ng[]) : voi d server() : voi d Si nk3() Class diagram Technology Description . i nt.. i nt. i nt."probe. i nt. i nt. i nt.. Stri ng) : voi d setDest(Stri ng) : Stri ng Source1() vi ew_acti onperform ed(Acti onEvent) : voi d ~ ~ ~ ~ ~ ~ + + + + contentPane: JPanel desti nati on: Stri ng i : i nt = 1 j Button1: JButton j Label 1: JLabel j Panel 1: JPanel j Panel 2: JPanel j Scrol l Pane1: JScrol l Pane j Scrol l Pane2: JScrol l Pane j T abbedPane1: JT abbedPane j T extArea1: JT extArea j T extArea2: JT extArea Reci eved1: Stri ng rr: Stri ng = "" server_1: ServerSocket socket_1: Socket addCom ponent(Contai ner. i nt.class Class M odel JFram e Detector1 ~ ~ ~ + + + + + cl i ent_1: Socket cl i ent_2: Socket tem p: l ong Detector1() Detector2() Detector3() i ni ti al i zeCom ponent() : voi d m ai n(Stri ng[]) : voi d server() : voi d ~ ~ ~ ~ ~ ~ ~ ~ + + + Detector3 cl i ent_1: Socket cl i ent_2: Socket j T extArea1: JT extArea l ength: i nt l ength1: i nt sen: Stri ng = "" server_1: ServerSocket socket_1: Socket tem p: l ong addCom ponent(Contai ner."Prob. i nt. Com ponent. i nt..

the programmer can perform his desired actions without fear. We can download applets with confidence that no harm will be done and no security will be breached. To overcome all these fears java has safety and security as its key design principle. SIMPLE AND POWERFUL Java was designed to be easy for the professional programmer to learn and use efficiently. People feel that conducting commerce over the Internet is a safe as printing the credit card number on the first page of a Newspaper. Java makes itself simple by not having surprising features. Unlike other programming systems that provide dozens of complicated ways to perform a simple task. Using Java Compatible Browser. For downloading programs through different platforms connected to the internet. Java provides a small number of clear ways to achieve a given task. the same mechanism that gives security also helps in portability.JAVA Java was designed to meet all the real world requirements with its key features. which are explained in the following paragraph. Java achieves this protection by confining a java program to the java execution environment and by making it inaccessible to other parts of the computer. anyone can safely download java applets without the fear of viral infection or malicious intent. some portable. Since it exposes the inner working of a machine. Java‟s answer to these problems is its well designed architecture. PORTABLE In java. Many types of computers and operating systems are in use throughout the world and are connected to the internet. executable code is needed. SECURE Today everyone is worried about safety and security. . Threatening of viruses and system hackers also exists.

Debugger and profiler interfaces for the JVM are available. Collections offer a new way to solve several common programming problems.  Various tools such as javac. Using this concept it is possible to dynamically link code. while simple types.OBJECT-ORIENTED Java was designed to be source-code compatible with any other language. NEWLY ADDDED FEATURES IN JAVA 2  SWING is a set of user interface components that is entirely implemented in java the user can use a look and feel that is either specific to a particular operating system or uniform across operating systems. in which small fragments of byte code may be dynamically updated on a running system. The object model in java is simple and easy to extend.  Various security tools are available that enable the user to create the user to create and store cryptographic keys ad digital certificates.  Collections are a group of objects. java and javadoc have been enhanced. and check the signature of a JAR file. Java provides several types of collection. are kept as high-performance non -objects. Dynamic property of java adds strength to the applet environment. for our use. A JUST-IN-TIME (JIT) compiler is included in the JDK. Java team gave a clean. realistic approach to objects. usable.  Digital certificates provide a mechanism to establish the identity of a user. DYNAMIC Java programs carry with them extensive amounts of run-time information that is used to verify and resolve accesses to objects at run-time. such as integers. dynamic arrays. and hash tables. . such as linked lists.  Performance improvements have been made in several areas. sign Java Archive(JAR) files. which can be referred as electronic passports.

SWINGS Swing components facilitate efficient graphical user interface (GUI) development. These components are a collection of lightweight visual components. Swing components contain a replacement for the heavyweight AWT components as well as complex user interface components such as Trees and Tables. Swing components contain a pluggable look and feel (PL & F). This allows all applications to run with the native look and feel on different platforms. PL & F allows applications to have the same behaviour on various platforms. JFC contains operating system neutral look and feel. Swing components do not contain peers. Swing components allow mixing AWT heavyweight and Swing lightweight components in an application. The major difference between lightweight and heavyweight components is that lightweight components can have transparent pixels while heavyweight components are always opaque. Lightweight components can be non-rectangular while heavyweight components are always rectangular. Swing components are JavaBean compliant. This allows components to be used easily in a Bean aware application building program. The root of the majority of the Swing hierarchy is the JComponent class. This class is an extension of the AWT Container class. Swing offers a number of advantages, which include  Wide variety of Components  Pluggable Look and Feel  MVC Architecture  Keystroke Handling  Action Objects  Nested Containers  Virtual Desktops  Compound Borders  Customized Dialogues  Standard Dialog Classes

 Structured Table and Tree Components  Powerful Text Manipulation  Generic Undo Capabilities  Accessibility Support JAVA DATABASE CONNECTIVITY (JDBC) JDBC AND ODBC IN JAVA: Most popular and widely accepted database connectivity called Open Database Connectivity (ODBC) is used to access the relational databases. It offers the ability to connect to almost all the databases on almost all platforms. Java applications can also use this ODBC to communicate with a database. Then we need JDBC why? There are several reasons: 1. ODBC API was completely written in C language and it makes an extensive use of pointers. Calls from Java to native C code have a number of drawbacks in the security, implementation, robustness and automatic portability of applications. 2. ODBC is hard to learn. It mixes simple and advanced features together, and it has complex options even for simple queries. Structured Query Language (SQL): SQL (Pronounced Sequel) is the programming language that defines and manipulates the database. SQL databases are relational databases; this means simply the data is store in a set of simple relations. A database can have one or more table. You can define and manipulate data in a table with SQL commands. You use the data definition language (DDL) commands to creating and altering databases and tables. You can update, delete or retrieve data in a table with data manipulation commands (DML). DML commands include commands to alter and fetch data. The most common SQL commands include commands is the SELECT command, which allows you to retrieve data from the database. In addition to SQL commands, the oracle server has a procedural language called PL/SQL. PL/SQL enables the programmer to program SQL statement. It allows you to control the flow of a SQL program, to use variables, and to write error-handling procedures.


Class1: /****************************************************************/ /* Source1 */ /* */ /****************************************************************/ import java.awt.*; import java.awt.event.*; import javax.swing.*; import java.io.*; import java.net.*; import java.sql.*; /** * Summary description for Source1 * */ public class Source1 extends JFrame { // Variables declaration String fp; Double fs; Double tt; Double rt; Long ls; JTextArea jtr; private JLabel jLabel1; private JLabel jLabel2; private JLabel jLabel3; private JLabel filesize; private JLabel jfileSize; private JLabel transferTime; private JLabel jtransferTime; private JLabel filepath; private JLabel Jfilepath; private JLabel readTime; private JLabel JreadTime; private JTextArea show; private Long los; private JComboBox graph; //private JLabel private JButton view,insert; long loss;

String str; //private JTextField JfileSize; private JTextField jTextField1; private JComboBox jComboBox1; private JTextArea jTextArea1; private JScrollPane jScrollPane1,jsp,jsp1,jsp2,jsp3; private JButton jButton1; private JButton jButton2; private JButton jButton3; private JPanel contentPane; private JButton Detect; private int lossspace; JScrollPane js; Object o; //private JComboBox graph; //private JButton Detect; String dest1; int len; double d; double time; long read; double rd; private String r=""; String msg=""; int flag=1; int flag1=1; Socket n1_client; String destination; int limit; String a[]={"Select","Probe","Dos","R2L","U2R","Normal"}; //int len; int packets; int rem; String b[]={"Graph","probe","DOS","R2L","U2R"}; //int d; FileInputStream fis=null; Image im; // End of variables declaration

public Source1() { super();

jfileSize=new JLabel().txt"). // // TODO: Add any constructor code after initializeComponent call // this. * WARNING: Do NOT modify this code. filepath=new JLabel(). jButton2 = new JButton().80). * Tip: If you must revise this method.BOLD. jLabel1. while((d=f.initializeComponent(). . filesize=new JLabel(). before revising this method. jButton1 = new JButton().//Detector. jLabel2 = new JLabel().read())!=-1) { r+=(char)d. please backup this GUI file for JFrameBuilder * to retrieve your design properly in future. jComboBox1 = new JComboBox(a). jtransferTime=new JLabel(). view=new JButton("View"). } }catch(Exception ex){ex. */ private void initializeComponent() { jLabel1 = new JLabel().15)). JreadTime=new JLabel(). jButton3 = new JButton(). jTextField1 = new JTextField(). jTextArea1 = new JTextArea(). try{ FileInputStream f=new FileInputStream(". readTime=new JLabel().printStackTrace().} } /** * This method is called from within the constructor to initialize the form. transferTime=new JLabel(). Jfilepath=new JLabel().setVisible(true). show=new JTextArea(70. jScrollPane1 = new JScrollPane(). jLabel3 = new JLabel().setFont(new Font("Arial". retrieving design might not work properly.Font. Otherwise. The content of this method is always regenerated * by the Windows Form Designer.

// readTime.size=\"6\">SOURCE1</font><u></i></h1></html>").255)).graph=new JComboBox(b). transferTime.setText("<html><b><font color=\'white'. 255.setText("<html><b><font color=\'white'>Layers No</font></b></html>"). // // jLabel1 // jLabel1. // // jTextField1 // jTextField1.createImage("d:/sin. Detect=new JButton("Detection"). contentPane = (JPanel)this. 102)). // jLabel3 // jLabel3. jtr=new JTextArea(). filesize.setBackground(new Color(255.setForeground(new Color(0. js=new JScrollPane().addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { jTextField1_actionPerformed(e). insert=new JButton("Insert"). filepath.setText("<html><font color=\'white'.255. // im=Toolkit. transferTime.size=\"4\">FileSize:</font></b></html>").getContentPane().setText("<html><b><font color=\'white'. .size=\"4\">TransferTime:</font></b></html>"). // jLabel2 // jLabel2.setText("<html><h1><b><u><font color=\'white'.size=\"4\">lossSpace:</font></h1></html>"). 255)).png"). filesize. 0.getDefaultToolkit().size=\"4\">ReadTime:</font></h1></html>").setText("<html><b><font color=\'white' >Status Information</font></b></html>").setBackground(new Color(255.setText("<html><font color=\'white'. // jLabel1.

// // jButton2 // jButton2. Detect.setViewportView(jTextArea1).setText("<html><b><font color=\'black' >Browse</font></b></html>"). } }).addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { jButton1_actionPerformed(e). // // jComboBox1 // jComboBox1. jButton1. 255. jButton2. 255. // // jButton1 // jButton1.setText("<html><b><font color=\'black' >Send</font></b></html>"). // // jTextArea1 // // // jScrollPane1 // jScrollPane1. . jButton1.setViewportView(jtr). } }).setBackground(new Color(255. } }).setBackground(new Color(255.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { jComboBox1_actionPerformed(e). 255)). js.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { Detect_actionperformed(e). 255)).} }).

addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { jButton2_actionPerformed(e). } }). } }).addActionListener(new ActionListener() { public void actionPerformed(ActionEvent ae) { graph_actionPerformed(ae).30).addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { view_actionperformed(e). view.172. jButton3.jButton2.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { jButton3_actionPerformed(e). jButton3. . insert. // // jButton3 // // Color colr = new Color(0. } }). 0.238)). } }). 255).setBackground(new Color(92. //jButton3. } }).105.setText("Exit"). // // contentPane // contentPane.setLayout(null).addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { insert_actionperformed(e). graph. Color colr = new Color(210.

60. jButton3.28).310.500.extends JFrame"). 255)).310. addComponent(contentPane.150. addComponent(contentPane.JreadTime.28).149. container.600.setBackground(new Color(0.int width. 41.60.transferTime.83.setVisible(false). } // // TODO: Add any appropriate code in the following Event Handling Methods .250.22). jScrollPane1. addComponent(contentPane.28). jLabel2.setBackground(Color.500. jComboBox1.136. jButton2. // // Source1 // this.350. jButton1.550. jLabel1.28).60. jLabel1.28).28).136.28).136. jLabel3.147.28). addComponent(contentPane.setSize(new Dimension(783. addComponent(contentPane.136. addComponent(contentPane.550.136.jtr.28).setBackground(colr).280. addComponent(contentPane.390.23).80. 180.width. 165.136.14.view. jtr. // jLabel1.550.20). this. jTextField1.jfileSize.100.28). addComponent(contentPane.80. addComponent(contentPane.180. } /** Add Component Without a Layout Manager (Absolute Positioning) */ private void addComponent(Container container.//contentPane.28).400.246).28).180. addComponent(contentPane.int y. addComponent(contentPane.28). 158.500. addComponent(contentPane. contentPane.red). addComponent(contentPane.height).filepath. c.136.600.147.100.140.Jfilepath. addComponent(contentPane.600.int x.118.y.136. addComponent(contentPane. 317.300. addComponent(contentPane.78.setTitle("Source1 . addComponent(contentPane.jtransferTime.60.setLocation(new Point(66. 317.350.600. addComponent(contentPane.28).200).500.390.18). addComponent(contentPane. 317.Detect.filesize.graph.136. 635)).28). addComponent(contentPane. 100. addComponent(contentPane.int height) { c. 48)). addComponent(contentPane.550.add(c).setForeground(colr).200.readTime. this.83.

long length=f. // TODO: Add any handling code here try { int b.showOpenDialog(null). long size1=f1.append("Reading First::"+n+"\n\n").out.show().println("\njComboBox1_actionPerformed(ActionEvent e) called.getFreeSpace().getPath(). int sizedata=fos.getSelectedFile()."). File f1=jf. // lossspace=(int)freespace.available(). int n=sizedata/4. flag=0."). JFileChooser jf=new JFileChooser()."). // File le=new File(fos). long freespace=f1. FileDialog fd=new FileDialog(this.out. // TODO: Add any handling code here } private void jComboBox1_actionPerformed(ActionEvent e) { System.println("\njTextField1_actionPerformed(ActionEvent e) called.LOAD). // File f=new File(fd).// private void jTextField1_actionPerformed(ActionEvent e) { System.getFile()). FileInputStream fos=new FileInputStream(str). //FileInputStream fos=new FileInputStream(fd.getTotalSpace(). File f=new File(str). int s=jf. loss=size1-freespace. } private void jButton1_actionPerformed(ActionEvent e) { System. o = jComboBox1.out. . msg="".FileDialog.length(). Long l=0L. // jTextArea1."Open".println("\njButton1_actionPerformed(ActionEvent e) called. //fd.getDirectory()+fd.getSelectedItem(). destination=""+o. str=f1.

setText(""+fd. // jtransferTime.length(). String sbyte=new String(by).getDirectory()+fd. fos. // jTextArea1. String source=jTextField1.setText("<html><img src='str' width='100' height='100'></img></html>"). // los=Long.append("Currnt Time"+time).getText().append("\n\nSource1 Address::"+source+"\n\n"). jTextArea1.setText(""+rd+"Sec").currentTimeMillis()). JreadTime.getDirectory().getDirectory()+fd. } byte by[]=new byte[fos. jTextArea1. . jTextArea1. fos. flag1=0.append("Reading Files:"+l+"bytes"+"\n\n").//String str=fd.getFile()+"</b>"+"\n\n"). time=d/60. jTextArea1.append("Total Size::"+len+"bytes"+"\n\n"). //jTextField1.close().read(by).getFile()).setText(""+d+"Kb"). d=len/1024. len=msg. System.println(""+System.append("Byte to kb"+d+"Kbytes"). Jfilepath.setText(str). jTextArea1. rd=read/60.append("Selected File Path "+"<b>"+fd.setText("Size"). jTextArea1. l+=b.append("Total Freespace::"+freespace+"bytes"+"\n\n").setText(""+time+"sec").setText(fd. read=l/1024.available()/2. //FileInputStream fos=new FileInputStream(str). // jTextField1. while((b=fos. // n=fos.append().append("Total space::"+size1+"bytes"+"\n\n").available()]. jTextArea1. jfileSize.getSize()).out.toString(loss). // jTextArea1. //jTextArea1. jTextField1.setText(""+loss). //jTextArea1.read())!=-1) { msg+=(char)b.

600.OracleDriver")."+d+". }} public void view_actionperformed(ActionEvent e) { addComponent(contentPane.time).driver. // if(e.out."intursion".println("retrieved************"). JOptionPane.printStackTrace(). Class.getS electedItem()+"'."Record Inserted"). .driver.fileSize.showMessageDialog(null.time).filePath.show.jdbc. try { System.println(str+d+time+rd+loss).getSource()=="view") // { // chart c=new chart(rd."+rd+")".getConnection("jdbc:oracle:thin:@localhost:1521:xe".forName("oracle.} //jTextArea1. try { Class.out.executeUpdate(ss).readTime)values('"+str+"'.58)."+time+".236."intursion ").transferTime.readTime. // String ss="insert into sour2(filePath.append("Size". catch (Exception ex) { ex."+rd+". Connection con=DriverManager.fileSize.280.println("record inserted"). } catch(Exception ex) { ex.jdbc."+d+". System.OracleDriver"). //System."+time+". String ss="insert into sour1(layerports. Statement stm=con.printStackTrace().createStatement().'"+str+"'.transferTime. stm.lossSpace)values('"+jComboBox1. }} public void insert_actionperformed(ActionEvent e) { // if(e.getSource()=="view") // { // chart c=new chart(rd.forName("oracle."+loss+")".out.

436.i++) { stab[i][0]=rs.createStatement()."intursion".getString(1).append(fp+"\t\t"+fs+"\t\t"+tt+"\t\t"+rt+"\t\t"+ls+"\t\t"). //String ss=Double.getDouble(4)). int h=ScrollPaneConstants. for(int i=0.Connection con=DriverManager. stab[i][3]=Double.toString(rs. JScrollPane jsp=new JScrollPane(jt. stab[i][4]=Double.executeQuery("select * from sour1").getString(6).println(str+d+time+rd+loss).append("========================================================== ======================="+"\n").158).toString(rs."ReadTime". stab[i][5]=Double. // show.getDouble(6))."LossSpace"}. // show. Statement stm=con. //ps.v.tb). int v=ScrollPaneConstants.getConnection("jdbc:oracle:thin:@localhost:1521:xe"."TransferTime". stab[i][1]=rs."FileSize".executeUpdate().HORIZONTAL_SCROLLBAR_AS_NEEDED.out."Record Inserted"). String tb[]={"Layers".rs.showMessageDialog(null. String stab[][]=new String[50][50].500.getDouble(5)).VERTICAL_SCROLLBAR_AS_NEEDED.next()."FilePath". // JOptionPane.450.getDouble(3)). stab[i][2]=Double. // int i=0.toString(rs. System. addComponent(contentPane. } catch(Exception ex) { } } . // show. //System. ResultSet rs=stm.append("FilePath"+"\t"+"FileSize"+"\t"+"TransferTime"+"\t"+"ReadTime"+"\t"+"LossSpa ce"+"\n"). } JTable jt=new JTable(stab.out.h). // stab[i][6]=rs."intursion ").jsp.getString(2).toString(rs.getDouble(4)).println("record inserted").toString(rs.

dest1=""+o1."intursion".i++) . jsp3. stab[i][2]=Double.200).setVisible(false).toString(rs.v.toString(rs. System. stab[i][5]=Double."LossSpace"}. addComponent(contentPane.toString(rs.public void graph_actionPerformed(ActionEvent ae) { //if(a[1].forName("oracle.h).setVisible(false).getDouble(4)).) Object o1=graph."intursion ").getSelectedItem().500."TransferTime".436.createStatement()."FileSize".rs. Connection con=DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:xe".OracleDriver"). } JTable p=new JTable(stab.getDouble(6)). jsp2.out. stab[i][4]=Double. // for(int i=0. demo."FilePath". try { Class.250. demo. if(dest1.getDouble(3)). stab[i][1]=rs.centerFrameOnScreen(demo).jdbc. stab[i][3]=Double.setVisible(true).getString(2).rs.HORIZONTAL_SCROLLBAR_AS_NEEDED.next(). String stab[][]=new String[50][50].jsp. String tb[]={"Layers". demo. ResultSet rs=stm.VERTICAL_SCROLLBAR_AS_NEEDED.toString(rs.i++) { stab[i][0]=rs.getDouble(5)).getString(1).next(). jsp=new JScrollPane(p. jsp1.executeQuery(str)."ReadTime". Statement stm=con. for(int i=0.setVisible(false). // RefineryUtilities.equalsIgnoreCase(a[1])) { final probe1chart demo = new probe1chart("Probe1 Layer"). int v=ScrollPaneConstants.setLocation(200. int h=ScrollPaneConstants.println("a[3]="+a[3]+"a[4]="+a[4]).driver.tb). String str="select* from sour1 where layerports='"+a[1]+"'".pack().158).

jdbc.200). } JTable p=new JTable(stab.getDouble(4))."U2R" // final probechart demo = new probechart("probe1").OracleDriver")."FileSize".rs. for(int i=0.forName("oracle. stab[i][3]=Double. demo. stab[i][5]=Double."DOS".VERTICAL_SCROLLBAR_AS_NEEDED. try { Class."intursion ").createStatement(). int v=ScrollPaneConstants."R2L"."ReadTime".next(). stab[i][2]=Double.getDouble(6)).setLocation(200. stab[i][4]=Double. //demo. Statement stm=con.setVisible(true). String stab[][]=new String[50][50].centerFrameOnScreen(demo).pack().toString(rs. demo.getDouble(3)).getDouble(5)). // RefineryUtilities.pack()."intursion". ResultSet rs=stm.equalsIgnoreCase(a[2])) { final Doschart1 demo = new Doschart1("Dos1 Layer").setLocation(200. String str="select* from sour1 where layerports='"+a[2]+"'". String tb[]={"Layers". demo."FilePath".executeQuery(str).toString(rs.200).centerFrameOnScreen(demo).setVisible(true).i++) { stab[i][0]=rs.getString(2). stab[i][1]=rs.driver.tb). Connection con=DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:xe".toString(rs. . int h=ScrollPaneConstants. //demo.HORIZONTAL_SCROLLBAR_AS_NEEDED. //demo.getString(1)."LossSpace"}."TransferTime". // RefineryUtilities.toString(rs. // } } catch(Exception ex) { } else if(dest1.// {probe1".

200).rs.setVisible(false). String stab[][]=new String[50][50]. // RefineryUtilities.OracleDriver"). stab[i][2]=Double.setLocation(200.i++) // {probe1".next().pack(). //demo."FilePath".setLocation(200.toString(rs.centerFrameOnScreen(demo).forName("oracle."intursion ").getConnection("jdbc:oracle:thin:@localhost:1521:xe". for(int i=0. jsp3.200).getString(1)."U2R" // final probechart demo = new probechart("probe1"). . demo.setVisible(false). stab[i][1]=rs. Statement stm=con.jsp1.createStatement()."R2L".250. demo. addComponent(contentPane.i++) { stab[i][0]=rs. //demo.next().setVisible(true).equalsIgnoreCase(a[3])) { final R2Lchart1 demo = new R2Lchart1("R2L Layer").centerFrameOnScreen(demo).getString(2).setVisible(false).v. Connection con=DriverManager.setVisible(true).getDouble(3)).rs.pack(). String str="select* from sour1 where layerports='"+a[3]+"'". demo.jdbc."LossSpace"}.500. try { Class. String tb[]={"Layers". jsp. ResultSet rs=stm.436.h)."DOS".driver."FileSize".158). // }} catch(Exception ex) { }} else if(dest1. // RefineryUtilities.executeQuery(str)."ReadTime". jsp2.jsp1=new JScrollPane(p. //demo. // for(int i=0."TransferTime"."intursion".

String str="select* from sour1 where layerports='"+a[4]+"'".pack(). jsp1."intursion ").getDouble(4)). //demo.getDouble(6))."intursion".setVisible(false).setLocation(200. int v=ScrollPaneConstants.200). //demo.centerFrameOnScreen(demo).equalsIgnoreCase(a[4])) { System.250.getDouble(5)).setLocation(200.next().setVisible(false). // RefineryUtilities.getConnection("jdbc:oracle:thin:@localhost:1521:xe"."U2R" // final probechart demo = new probechart("probe1"). // RefineryUtilities. ResultSet rs=stm.toString(rs.i++) // {probe1". //demo.v.setVisible(true).centerFrameOnScreen(demo). jsp.println("U2RChart**************").rs.500. demo. stab[i][4]=Double. addComponent(contentPane.driver.toString(rs. demo.jdbc.h). Statement stm=con. jsp2=new JScrollPane(p. // } } catch(Exception ex) { }} else if(dest1."R2L".stab[i][3]=Double.createStatement(). int h=ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED.tb). final U2Rchart1 demo = new U2Rchart1("U2R Layer").executeQuery(str).toString(rs. // for(int i=0.out. demo.200).setVisible(true).jsp2. Connection con=DriverManager.158). jsp3.setVisible(false)."DOS". try { Class.forName("oracle. } JTable p=new JTable(stab. .436.pack().OracleDriver"). stab[i][5]=Double.VERTICAL_SCROLLBAR_AS_NEEDED.

"FilePath".500.158).. g.. } catch(Exception ex) { } } } public void paint(Graphics g) { // Draw the previously loaded image to Component. jsp1. stab[i][1]=rs.436. jsp3=new JScrollPane(p."ReadTime".setVisible(false). // . 0. jsp. and other things.toString(rs.String tb[]={"Layers".next().toString(rs.getString(2).jdbc.setVisible(false).getString(1). } private void Detect_actionperformed(ActionEvent ae) { try { Class.rs. .250. null). int v=ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED.drawImage(im.getDouble(5)).getDouble(4)).i++) { stab[i][0]=rs. 0. stab[i][2]=Double."FileSize". } JTable p=new JTable(stab.setVisible(false)."TransferTime". stab[i][4]=Double.tb).VERTICAL_SCROLLBAR_AS_NEEDED.toString(rs. addComponent(contentPane.toString(rs. String stab[][]=new String[50][50]. jsp2."LossSpace"}.OracleDriver").h).jsp3.v. for(int i=0. stab[i][5]=Double.forName("oracle. stab[i][3]=Double.getDouble(6)). int h=ScrollPaneConstants.driver..getDouble(3)). // Draw sprites.

String s2=rs. } double s7=s6/i.getDouble(4). while(rs.out. //Probe ResultSet rs=stm.getConnection("jdbc:oracle:thin:@localhost:1521:xe".println("pobe transferTime="+s7+"\t"+"ReadTime"+s9).getDouble(6).at. double st=0.getDouble(4)+st.getString(2).next()) { String s1=rs.getDouble(4). System. String sa1="select * from sour1 where layerports='"+a[1]+"'". double s3=rs.out.next()) { String s1=rs.getDouble(6). // double r=rs.executeQuery(sa1). //rs. st=rs.ar. j++. String sa2="select * from sour1 where layerports='"+a[2]+"'". sr=rs.createStatement().sr=0.getString(1). System. String s2=rs. int j=1. // double r=rs."intursion ").getDouble(5)+sr. double s6=0. Statement stm=con. double s3=rs.getString(1). double s4=rs. s8=rs. String sa3="select * from sour1 where layerports='"+a[3]+"'". s6=rs.Connection con=DriverManager."intursion". . double s4=rs. String sa4="select * from sour1 where layerports='"+a[4]+"'".close().s8=0.getDouble(4)+s6. while(rs. int i=1.getDouble(5)+s8.s9=0. i++.getString(2).executeQuery(sa2). s9=s8/i.getDouble(3).println("TransferTime"+r). //Dos rs=stm.getDouble(3).

//System. // double r=rs.println("s6"+s6+"ddddd"+s7). double s3=rs.getDouble(6).out. . st2=rs.println("R2L transferTime="+at1+"\t"+"ReadTime"+ar1). } at=st/j. //U2R rs=stm. l++.ar2. double s3=rs. ar1=sr1/k.next()) { String s1=rs.getDouble(5)+sr2. System. String s2=rs. rs. sr2=rs.getDouble(3). ar=sr/j.getDouble(3).executeQuery(sa4).close().at1.ar1. int l=1.getDouble(6).close().out.out.getString(1). //rs2. st1=rs. //R2L rs=stm.getDouble(5)+sr1.sr1=0.// System. } at1=st1/k. double st1=0. double s4=rs.next()) { String s1=rs.getDouble(4)+st1.getDouble(4). double s4=rs. while(rs. String s2=rs. int k=1. // double r=rs.out.at2.println("Dos transferTime="+at+"\t"+"ReadTime"+ar).getDouble(4). k++.getString(1).out.println("TransferTime"+r).getString(2).println("TransferTime"+r). // System. while(rs.getString(2).sr2=0.getDouble(4)+st2. double st2=0.executeQuery(sa3). sr1=rs. System.

"). // JScrollPane jsp1=new JScrollPane(jtr. jtr.equalsIgnoreCase(a[0])) { JOptionPane. jtr.at2.. jtr.append("Probe"+"\t"+(Math. } else if(destination.at1.ar2). jtransferTime. ar2=sr2/l. } catch(Exception ex) { ex.append("U2R"+"\t"+Math.abs(at2)+"\t"+""+Math.equalsIgnoreCase(a[1])) { //dba1 code .ar.300). System.abs(ar1)+"\n").setVisible(true).abs(s9)+"\n"). // int h=ScrollPaneConstants."Select the Destination!.showMessageDialog(null.println("\njButton2_actionPerformed(ActionEvent e) called.out. jtr.close().setSize(300.VERTICAL_SCROLLBAR_AS_NEEDED.append("R2L"+"\t"+Math.s7.abs(s7))+"\t"+""+Math. ld.abs(at)+"\t"+""+Math.setText(""+time).abs(at1)+"\t"+""+Math.append("Dos"+"\t"+Math.h).append("Name"+"\tAvgTransferTime"+"\t"+"AvgReadTime"+"\n").println("U2R transferTime="+at2+"\t"+"ReadTime"+ar2).println("TransferTime"+r). } at2=st2/l.abs(ar)+"\n").// System. LineChartDemo6 ld=new LineChartDemo6("Detection".HORIZONTAL_SCROLLBAR_AS_NEEDED.out.v.ar1."). if(flag==0) { if(destination.at.setVisible(true). jtr.out. } } private void jButton2_actionPerformed(ActionEvent e) { System.printStackTrace(). // TODO: Add any handling code here String dest.s9. //int v=ScrollPaneConstants. //rs3.abs(ar2)+"\n"). jtr.append("============================================================ =======================\n"). ld. jtr.

showMessageDialog(null. if(dba1conform!=0){ JOptionPane.showMessageDialog(null. Response Action : ShutDown"). System.equals("")){ int dba2conform= JOptionPane. } }else{ JOptionPane.exit(0)."JTAM : Since DBA 2 not accepted / not entered signature this transaction is failed."DBA 1: Is it Conformed?").out. } //dba2code // JOptionPane."This Is From PROBE Layer : This transaction need authentication from 4 DBAs"). System.println("dba2sign : "+dba2sign).equals("")){ .println("dba2conform : "+dba2conform).println("dba1sign : "+dba1sign). } }else{ JOptionPane. if(dba1sign!=null&&!dba1sign.out. System.showMessageDialog(null. Response Action : ShutDown").exit(0)."JTAM : Since DBA 1 not accepted / not entered signature this transaction is failed.showMessageDialog(null."JTAM : Since DBA 2 not conformed signature this transaction is failed.equals("")){ int dba1conform= JOptionPane."JTAM : Since DBA 1 not conformed signature this transaction is failed. System.showInputDialog("JTAM : Enter Threshold Signature of DBA 2 "). } //dba2code //dba3code // JOptionPane. Response Action : ShutDown")."This Is From PROBE Layer : This transaction need authentication from 4 DBAs").println("dba3sign : "+dba3sign). System. System. String dba2sign=JOptionPane. String dba3sign=JOptionPane.println("dba1conform : "+dba1conform).showInputDialog("JTAM : Enter Threshold Signature of DBA 3 "). System.out. if(dba3sign!=null&&!dba3sign.JOptionPane.showInputDialog("JTAM : Enter Threshold Signature of DBA 1 ").showMessageDialog(null.exit(0)."DBA 2: Is it Conformed?"). if(dba2conform!=0){ JOptionPane.showMessageDialog(null.showMessageDialog(null. Response Action : ShutDown").out.out.showConfirmDialog(null. String dba1sign=JOptionPane. if(dba2sign!=null&&!dba2sign. System."This Is From PROBE Layer : This transaction need authentication from 4 DBAs").exit(0).showConfirmDialog(null. System.

"JTAM : Since DBA 3 not conformed signature this transaction is failed.println("dba4conform : "+dba4conform). } }else{ JOptionPane.println("dba3conform : "+dba3conform).equals("")){ int dba4conform= JOptionPane. if(dba4conform JOptionPane.out. . } else if(destination.dest). Response Action : ShutDown"). System.int dba3conform= JOptionPane. dest=setDest(a[1]). System. if(dba3conform!=0){ JOptionPane.println("dba4sign : "+dba4sign). Response Action : ShutDown").exit(0)."DBA 3: Is it Conformed?").111. Response Action : ShutDown")."JTAM : Since DBA 4 not conformed signature this t ransaction is failed. sendData(r. System. System."This Is From Dos Layer")."Now you can insert details of a file into Database "). System.showMessageDialog(null."DBA 4: Is it Conformed?"). if(dba4sign!=null&&!dba4sign.showMessageDialog(null. String dba4sign=JOptionPane.equalsIgnoreCase(a[2])) { JOptionPane.out.showConfirmDialog(null. Response Action : ShutDown").out. int a. System.showMessageDialog(null.showMessageDialog(null. } }else{ JOptionPane.showInputDialog("JTAM : Enter q Threshold Signature of DBA 4 "). } //dba4code // JOptionPane.showConfirmDialog(null.showMessageDialog(null.exit(0).showMessageDialog(null."JTAM : Since DBA 3 not accepted / not entered signature this transaction is failed. } JOptionPane.dest)."This Is From PROBE Layer : This transaction need authentication from 4 DBAs"). dest=setDest(a[2]).exit(0). sendData(r."JTAM : Since DBA 4 not accepted / not entered signature this transaction is failed.111. System.exit(0).showMessageDialog(null.

} //dba2code // JOptionPane."This Is From PROBE Layer : This transaction need authentication from 4 DBAs").exit(0)."JTAM : Since DBA 2 not accepted / not entered signature this transaction is failed. String dba1sign=JOptionPane. //dba1 code JOptionPane.println("dba2conform : "+dba2conform).showConfirmDialog(null. . Response Action : ShutDown").showMessageDialog(null.out. if(dba2sign!=null&&!dba2sign.showInputDialog("JTAM : Enter Threshold Signature of DBA 2 ")."JTAM : Since DBA 1 not accepted / not entered signature this transaction is failed.showInputDialog("JTAM : Enter Threshold Signature of DBA 1 "). String dba2sign=JOptionPane.} else if(destination.equals("")){ int dba1conform= JOptionPane.showMessageDialog(null.println("dba1sign : "+dba1sign).out.exit(0).out.out.showMessageDialog(null.showMessageDialog(null."JTAM : Since DBA 2 not conformed signature this transaction is failed.showConfirmDialog(null."This Is From PROBE Layer : This transaction need authentication from 4 DBAs"). System.equals("")){ int dba2conform= JOptionPane. System. System. Response Action : ShutDown").exit(0)."DBA 1: Is it Conformed?").showMessageDialog(null. System. if(dba2conform!=0){ JOptionPane. System. System."JTAM : Since DBA 1 not conformed signature this transaction is failed. System. if(dba1conform!=0){ JOptionPane. if(dba1sign!=null&&!dba1sign. } }else{ JOptionPane."DBA 2: Is it Conformed?")."This Is From R2L layer").showMessageDialog(null. System. } }else{ JOptionPane. Response Action : ShutDown").println("dba2sign : "+dba2sign). Response Action : ShutDown").showMessageDialog(null.println("dba1conform : "+dba1conform).exit(0).equalsIgnoreCase(a[3])) { JOptionPane.

showMessageDialog(null."This Is From PROBE Layer : This transaction need authentication from 4 DBAs"). } //dba4code // JOptionPane. } .println("dba4sign : "+dba4sign).println("dba4conform : "+dba4conform). if(dba3conform!=0){ JOptionPane. } }else{ JOptionPane.showConfirmDialog(null."DBA 4: Is it Conformed?").showMessageDialog(null. } }else{ JOptionPane. System.out. System. System. if(dba3sign!=null&&!dba3sign.showInputDialog("JTAM : Enter Threshold Signature of DBA 3 ").} //dba2code //dba3code // JOptionPane."JTAM : Since DBA 4 not conformed signature this transaction is failed. String dba3sign=JOptionPane.equals("")){ int dba4conform= JOptionPane. System.out.out.showConfirmDialog(null. if(dba4conform!=0){ JOptionPane.exit(0).equals("")){ int dba3conform= JOptionPane.exit(0)."JTAM : Since DBA 4 not accepted / not entered signature this transaction is failed."JTAM : Since DBA 3 not conformed signature this transaction is failed. System."This Is From PROBE Layer : This transaction need authentication from 4 DBAs"). Response Action : ShutDown").showMessageDialog(null. Response Action : ShutDown").println("dba3conform : "+dba3conform).exit(0).out.exit(0). String dba4sign=JOptionPane."DBA 3: Is it Conformed?"). Response Action : ShutDown"). System. System."JTAM : Since DBA 3 not accepted / not entered signature this transaction is failed. Response Action : ShutDown"). System.showMessageDialog(null.showMessageDialog(null.showMessageDialog(null. if(dba4sign!=null&&!dba4sign.println("dba3sign : "+dba3sign).showInputDialog("JTAM : Enter Threshold Signature of DBA 4 ").

showConfirmDialog(null. sendData(r. Response Action : ShutDown"). System. Response Action : ShutDown"). } }else{ JOptionPane.out. System. System. String dba2sign=JOptionPane."This Is From PROBE Layer : This transaction need authentication from 4 DBAs").exit(0).showMessageDialog(null. if(dba1conform!=0){ JOptionPane.out."Now you can insert details of a file into Database ").println("dba2conform : "+dba2conform).equals("")){ int dba1conform= JOptionPane.equalsIgnoreCase(a[4])) { JOptionPane. if(dba2sign!=null&&!dba2sign. System.showMessageDialog(null. } //dba2code // JOptionPane.showMessageDialog(null."This Is From PROBE Layer : This transaction need authentication from 4 DBAs")."DBA 2: Is it Conformed?"). System.println("dba2sign : "+dba2sign).showInputDialog("JTAM : Enter Threshold Signature of DBA 1 ")."DBA 1: Is it Conformed?"). String dba1sign=JOptionPane.showConfirmDialog(null.println("dba1conform : "+dba1conform). System. if(dba1sign!=null&&!dba1sign.showInputDialog("JTAM : Enter Threshold Signature of DBA 2 ").JOptionPane.showMessageDialog(null.dest).println("dba1sign : "+dba1sign).222.out. } else if(destination."JTAM : Since DBA 1 not conformed signature this transaction is failed. dest=setDest(a[3]).exit(0). if(dba2conform!=0){ . //dba1 code JOptionPane.showMessageDialog(null.equals("")){ int dba2conform= JOptionPane."This Is From U2R Layer").showMessageDialog(null."JTAM : Since DBA 1 not accepted / not entered signature this transaction is failed.out.

String dba4sign=JOptionPane. } //dba4code // JOptionPane. System. } }else{ JOptionPane. if(dba3sign!=null&&!dba3sign.out."DBA 3: Is it Conformed?").exit(0). String dba3sign=JOptionPane. } //dba2code //dba3code // JOptionPane. Response Action : ShutDown").JOptionPane. if(dba4sign!=null&&!dba4sign. Response Action : ShutDown")."This Is From PROBE Layer : This transaction need authentication from 4 DBAs")."JTAM : Since DBA 3 not conformed signature this transaction is failed. if(dba4conform!=0){ JOptionPane.showMessageDialog(null.out.println("dba4conform : "+dba4conform)."JTAM : Since DBA 2 not conformed signature this transaction is failed. System."JTAM : Since DBA 3 not accepted / not entered signature this transaction is failed.println("dba4sign : "+dba4sign).showMessageDialog(null.exit(0). System.showMessageDialog(null.showConfirmDialog(null.exit(0)."JTAM : Since DBA 4 not conformed signature this transaction is failed. Response Action : ShutDown"). } .out."DBA 4: Is it Conformed?"). Response Action : ShutDown").showConfirmDialog(null. if(dba3conform!=0){ JOptionPane.exit(0). System.println("dba3conform : "+dba3conform).exit(0). System."JTAM : Since DBA 2 not accepted / not entered signature this transaction is failed.println("dba3sign : "+dba3sign).equals("")){ int dba4conform= JOptionPane.showMessageDialog(null.showInputDialog("JTAM : Enter Threshold Signature of DBA 3 ").out. System.showInputDialog("JTAM : Enter Threshold Signature of DBA 4 "). Response Action : ShutDown"). System.showMessageDialog(null. System. System."This Is From PROBE Layer : This transaction need authentication from 4 DBAs"). } }else{ JOptionPane.showMessageDialog(null.equals("")){ int dba3conform= JOptionPane.showMessageDialog(null.

sendData(r.dest). DataOutputStream out=new DataOutputStream(n1_client.showMessageDialog(null. } . System.}else{ JOptionPane. Response Action : ShutDown").showMessageDialog(null.exit(0). } } else JOptionPane. dest=setDest(a[4]). } else if(destination."JTAM : Since DBA 4 not accepted / not entered signature this transaction is failed..port).").222. } private void jButton3_actionPerformed(ActionEvent e) { System. dest=setDest(a[5]).int port.showMessageDialog(null.println("\njButton3_actionPerformed(ActionEvent e) called. } JOptionPane."This Is From Normal").getOutputStream()).222. if(out!=null) { out. // TODO: Add any handling code here } // // TODO: Add any method code to meet your needs in the following area // public void sendData(String name.").flush()."Load the File OR Select the Destination!.dest).showMessageDialog(null. sendData(r.out.String dest) { try { n1_client=new Socket(name.equalsIgnoreCase(a[5])) { JOptionPane."Now you can insert details of a file into Database ").

out.println("else than 48").out. } else { System. jTextArea1.writeInt(tlength). .writeUTF(dest+msg. int tlength=buffer. finalst=prefinal+msg+"\n"+"null". } out.length/48. byte buffer[]=msg.substring(end. String finalst="".substring(st. int len1=len.int outgoing=0.append("Packet: "+"\t"+(++outgoing)+"\t"+msg.substring(end. if(len<=48) { System. out.append("packet\t"+(++outgoing)+"\t"+msg+"\n").println("smaller than 48"). out.len)+"\n").end)+"\n"). out. if(length11!=0) { tlength++.writeUTF(dest+msg. jTextArea1.append("Packet: "+"\t"+(++outgoing)+"\t"+msg. int end=48.append("Packet Length:"+len+"\n"). while(len1>48) { len1-=48.writeUTF(destination).length. int len=buffer.println("greateer than 48"). int length11=buffer.getBytes().out.end)). if(len1<=48) { System.length%48.len)). int st=0.writeUTF(dest+msg). jTextArea1. jTextArea1. String prefinal="".out.substring(st.

} else { System.append("Packet: "+"\t"+(++outgoing)+"\t"+msg.equalsIgnoreCase(a[4])) { Destinationname="Source1-->D4".printStackTrace(). } else if(Destname. } else if (Destname. end=sp. } } public String setDest(String Destname) { String Destinationname="".writeUTF(dest+msg.equalsIgnoreCase(a[5])) { Destinationname="Source1-->D5".sp)+"\n").println("else than 48").equalsIgnoreCase(a[2])) { Destinationname="Source1-->D2".sp)). } else if (Destname. jTextArea1. } } } } catch (Exception exp) { exp. out.substring(end. int sp=end+48.equalsIgnoreCase(a[3])) { Destinationname="Source1-->D3". if(Destname.substring(end.out. } .equalsIgnoreCase(a[1])) { Destinationname="Source1-->D1". } else if(Destname.

/** * Summary description for Sink1 * */ public class Sink1 extends JFrame { // Variables declaration private JLabel jLabel1. private JButton jButton1.awt. } //= End of Testing = } Class2: /****************************************************************/ /* Sink1 */ /* */ /****************************************************************/ import java. import javax. private JPanel contentPane.swing. import java.*.awt. =// //==================================================================== ==// public static void main(String[] args) { new Source1(). private JScrollPane jScrollPane1.you may simply delete it.=// //= After testing.swing.io.*. import javax.event. . import java. //----private JTextArea jTextArea1.*.*.event. private JTabbedPane jTabbedPane1.*.return Destinationname. } //============================= Testing ================================// //= =// //= The following main method is just for testing this class you built.net. import java.*.

//----// End of variables declaration public Sink1() { super(). * WARNING: Do NOT modify this code. initializeComponent(). The content of this method is always regenerated * by the Windows Form Designer. } // // TODO: Add any constructor code after initializeComponent call // this. int i=1. . ServerSocket server_1. private JScrollPane jScrollPane2. private JLabel transferTime. } catch (Exception exp) { exp. try { server_1=new ServerSocket(101). //----String Recieved1. } /** * This method is called from within the constructor to initialize the form.printStackTrace(). Otherwise. String destination.setVisible(true). private JPanel jPanel2. Socket socket_1. retrieving design might not work properly. private JLabel JtransferTime. //----private JTextArea jTextArea2.private JPanel jPanel1. String rr="".

white).16)). // jTabbedPane1 // jTabbedPane1. jTabbedPane1.setText("\t**********THIS IS FROM PORT PROBE*************\n\n"). transferTime.setText("\t**********THIS IS FROM PORT DoS1**************\n\n").setText("TransferTime").30)). before revising this method.addChangeListener(new ChangeListener() { public void stateChanged(ChangeEvent e) { jTabbedPane1_stateChanged(e).105.setForeground(Color. //----// jTextArea2. jPanel2).BOLD.setForeground(Color. jPanel1 = new JPanel(). jTabbedPane1 = new JTabbedPane(). please backup this GUI file for JFrameBuilder * to retrieve your design properly in future. //----jTextArea1 = new JTextArea(). // . //----jLabel1. JtransferTime=new JLabel().addTab("Dest1". */ private void initializeComponent() { jLabel1=new JLabel(). transferTime=new JLabel(). jScrollPane1 = new JScrollPane().* Tip: If you must revise this method. jTabbedPane1.getContentPane(). jTabbedPane1.Font. jLabel1. jButton1 = new JButton(). } }). jScrollPane2 = new JScrollPane().setFont(new Font("Serief". jTextArea1.white). jPanel1). jTabbedPane1.setForeground(new Color(210.addTab("Dest2". jPanel2 = new JPanel(). //----jTextArea2 = new JTextArea(). contentPane = (JPanel)this.

jButton1. jScrollPane1. contentPane.100.setLayout(null). // // jTextArea1 // // // jScrollPane1 // jScrollPane1.473.374).setLayout(null). // // contentPane // contentPane.setText("Exit"). addComponent(contentPane.500.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { jButton1_actionPerformed(e).418.setText("Sink1").JtransferTime. } }).19.setViewportView(jTextArea2). addComponent(contentPane.transferTime. // // jTextArea2 // // // jScrollPane2 // jScrollPane2. 23. // // jButton1 // jButton1.193. jButton1.setBackground(new Color(210. jTabbedPane1.38). 21.38).301).// // jLabel1 // jLabel1.193. addComponent(contentPane. 232. // // jPanel1 // jPanel1.30)). addComponent(jPanel1.32).193.500.425. // .44. jLabel1. addComponent(contentPane.88. 228. addComponent(contentPane.setViewportView(jTextArea1).

int width.setLayout(null).setViewportView(jTextArea3).y.305).int height) { c. // // Sink1 // this.out.extends JFrame"). this.println("\njTabbedPane1_stateChanged(ChangeEvent e) called. addComponent(jPanel2.Component c. 22.height). jScrollPane2. 0)).18. } /** Add Component Without a Layout Manager (Absolute Positioning) */ private void addComponent(Container container. //addComponent(jPanel3.add(c). } // // TODO: Add any appropriate code in the following Event Handling Methods // private void jTabbedPane1_stateChanged(ChangeEvent e) { System.setLayout(null). 30.width. jScrollPane3.416.setBounds(x.414.").int y.out.println("\njButton1_actionPerformed(ActionEvent e) called. // TODO: Add any handling code here } private void jButton1_actionPerformed(ActionEvent e) { System. this.setLocation(new Point(0. 494)). // // jPanel3 // //jPanel3. // // jTextArea3 // // // jScrollPane3 // //jScrollPane3.19.").setTitle("Sink1 .setSize(new Dimension(544.302).int x.// jPanel2 // jPanel2. // TODO: Add any handling code here . container.

i++.equalsIgnoreCase("Dos1")) { jTextArea2..readInt().readUTF().accept(). if(destination.. } i=1.equalsIgnoreCase("probe")) { jTextArea1.append("Packet "+i+"\t"+rr+" Recieved. } else if (destination. .getInputStream()). DataInputStream dis=new DataInputStream(socket_1.showMessageDialog(null.readUTF().} // // TODO: Add any method code to meet your needs in the following area // public void server() { try { String rr="".. while(length>0) { rr=dis. } else JOptionPane.append("Packet "+i+"\t"+rr+" Recieved. int length=dis. length--.."No Packets Received"). socket_1=server_1. String destination=dis. } catch (Exception exp) { .\n").\n").

} } //= End of Testing = } Class3: /****************************************************************/ /* Detector1 */ /* */ /****************************************************************/ import java.*. import java.lang. import java.printStackTrace().net. /** * Summary description for Detector1 * */ public class Detector1 extends JFrame { . import java.swing. while(true) { s1.awt.you may simply delete it.=// //= After testing. import javax.awt.event.*.exp.*.*. =// //==================================================================== ==// public static void main(String[] args) { Sink1 s1=new Sink1().io. } } //============================= Testing ================================// //= =// //= The following main method is just for testing this class you built.*. import java.server().*.

int i=1.read())!=-1) { sen+=(char)length1. while((length1=f. try { server_1=new ServerSocket(111). private JTextArea jTextArea1. private JScrollPane jScrollPane1. long temp. Socket client_1.//Sink.setVisible(true). int length. initializeComponent().out. DataOutputStream dis2.// Variables declaration private JLabel jLabel1. } System. int length1. Socket client_2. String sen="". DataOutputStream dis1. ServerSocket server_1.txt"). private JButton jButton1.println(sen). Socket socket_1. DataInputStream dis. // End of variables declaration public Detector1() { super(). FileInputStream f=new FileInputStream(". private JPanel contentPane.printStackTrace(). this. } catch (Exception exp) { exp. } // // TODO: Add any constructor code after initializeComponent call // .

} }). jScrollPane1 = new JScrollPane(). please backup this GUI file for JFrameBuilder * to retrieve your design properly in future. // // jButton1 // jButton1. contentPane = (JPanel)this. 255)).this. // // contentPane . jTextArea1 = new JTextArea(). * WARNING: Do NOT modify this code. jButton1.setViewportView(jTextArea1).addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { jButton1_actionPerformed(e).setVisible(true). // // jLabel1 // jLabel1. retrieving design might not work properly. jLabel1. before revising this method.setText("INTRUSION DETECTOR1"). } /** * This method is called from within the constructor to initialize the form.setText("Exit"). jButton1 = new JButton(). * Tip: If you must revise this method. jButton1. 255. // // jTextArea1 // // // jScrollPane1 // jScrollPane1.setForeground(Color. The content of this method is always regenerated * by the Windows Form Designer. Otherwise.white).getContentPane().setBackground(new Color(255. */ private void initializeComponent() { jLabel1 = new JLabel().

105. contentPane. jLabel1. addComponent(contentPane.441.accept().28). int length=dis. socket_1=server_1. addComponent(contentPane. 0))."). 462)). this.37.133. } // // TODO: Add any appropriate code in the following Event Handling Methods // private void jButton1_actionPerformed(ActionEvent e) { System. 26.width.int x.83. 204.341). // // Detector1 // this. container. } /** Add Component Without a Layout Manager (Absolute Positioning) */ private void addComponent(Container container.add(c).setSize(new Dimension(505.int y.out.readInt().30)).Component c.int height) { c. dis=new DataInputStream(socket_1.// contentPane.int width.println("\njButton1_actionPerformed(ActionEvent e) called.9.setLocation(new Point(0. this.setLayout(null). // TODO: Add any handling code here } // // TODO: Add any method code to meet your needs in the following area // public void server() { try { String rr="".setBackground(new Color(210.390. addComponent(contentPane.height). jButton1.38).getInputStream()). 172.setTitle("Detector1 . jScrollPane1.y.extends JFrame").setBounds(x. .

jTextArea1. dis1=new DataOutputStream(client_1.awt. Public void actionPerformed(ActionEvent evt) { if(count<=10) { java. jTextArea1. length--. jTextArea1. if(destination. new ActionListener() { int count=1. dis1. length--. while(length>0) { rr=dis.getOutputStream()).writeUTF(rr).beep().append("\t\tPacket "+i+"\t"+rr. sb.substring(4.String destination=dis.append("\t**********************************\n").append("\t**********************************\n").delete(7..Toolkit. } i=1.writeUTF(destination). while(length>0) { rr=dis. dis1.readUTF()..append("\t**********************************\n"). } else if (destination. i++.append("\tTHIS IS FROM PORT Probe \n"). jTextArea1. dis1=new DataOutputStream(client_1.writeInt(length).101).append("\t**********************************\n"). StringBuffer sb=new StringBuffer(rr). int delay = 100. //milliseconds Timer t=new Timer(delay.readUTF().equalsIgnoreCase("Dos")) { jTextArea1.15)+" Recieved. i++.append("\tTHIS IS FROM PORT U2R\n"). Client_1=new Socket(sen.getDefaultToolkit(). jTextArea1.. jTextArea1..getOutputStream()).readUTF().append("Packet "+i+"\t"+rr+" Recieved.\n").10).\n"). dis1. count++ } else .equalsIgnoreCase("probe")) { jTextArea1. } i=1.

exit(0).getOutputStream()). dis1. length--. dis1.writeUTF(destination). client_1=new Socket(sen. } i=1.e. while (true) { r1. jTextArea1.\n"). i++.Shutdown !!!!!!").start(). dis1=new DataOutputStream(client_1.writeInt(length).."Detector1:Intursion Response System : Taken Aggresive action i.showMessageDialog(null. } } public static void main(String[] args) { Detector1 r1=new Detector1(). JOptionPane.append("\tTHIS IS FROM PORT Dos1\n"). TextArea1.writeUTF(rr).showMessageDialog(null.printStackTrace(). dis1. dis1=new DataOutputStream(client_1.. jTextArea1."Detector1:From Policy Matching : This is an Anomalous Request :This modification to policy object is invalid").return. } }).append("Packet "+i+"\t"+rr+" Recieved.showMessageDialog(null.append("\t**********************************\n").server(). } } . jOptionPane."Detector1:From Policy Administration : Intursion Response System : This request should get authentication from k authorised users ").readUTF(). t. System.getOutputStream()). }} catch (Exception exp) { exp.append("\t**********************************\n").equalsIgnoreCase("DoS1")) { jTextArea1. JOptionPane.101). while(length>0){ rr=dis. }else if (destination.

controlling the errors.When the data is entered it will check for its validity. This design is important to avoid errors in the data input process and show the correct direction to the management for getting correct information from the computerized system. avoiding extra steps and keeping the process simple. Efficient and intelligent output design improves the system‟s relationship to help user decision-making. Data can be entered with the help of screens. avoiding delay. The input is designed in such a way so that it provides security and ease of use with retaining the privacy. 3. It is achieved by creating user-friendly screens for the data entry to handle large volume of data. OBJECTIVES 1. It comprises the developing specification and procedures for data preparation and those steps are necessary to put transaction data in to a usable form for processing can be achieved by inspecting the computer to read data from a written or printed document or it can occur by having people keying the data directly into the system. The data entry screen is designed in such a way that all the data manipulates can be performed. In any system results of processing are communicated to the users and to other system through outputs. Methods for preparing input validations and steps to follow when error occur.Input Design is the process of converting a user-oriented description of the input into a computer-based system. Thus the objective of input design is to create an input layout that is easy to follow. Appropriate messages are provided as when needed so that the user will not be in maize of instant. The goal of designing input is to make data entry easier and to be free from errors. which meets the requirements of the end user and presents the information clearly. It also provides record viewing facilities. 2. In output design it is determined how the information is to be displaced for immediate need and also the hard copy output. OUTPUT DESIGN A quality output is one. It is the most important and direct source information to the user. The design of input focuses on controlling the amount of input required. .INPUT DESIGN The input design is the link between the information system and the user. Input Design considered the following things:     What data should be given as input? How the data should be arranged or coded? The dialog to guide the operating personnel in providing input.

The output form of an information system should accomplish one or more of the following objectives.1. . Confirm an action. opportunities. Signal important events. or warnings. 2.      Convey information about past activities.Select methods for presenting information.Create document. current status or projections of the Future. 3. the right output must be developed while ensuring that each output element is designed so that people will find the system can use easily and effectively. or other formats that contain information produced by the system. Designing computer output should proceed in an organized. they should Identify the specific output that is needed to meet the requirements. When analysis design computer output. report. problems. Trigger an action. well thought out manner.

4 SCREEN DESIGNS Process Specification(Techniques And Algorithm Used)  Policy Matching  Policy Administration File Sending .3.

Open the project and run it .

File Running .

Sending Data .

Providing DBA Name .

Conformation of DBA .

Intrusion Detection .

Data Receiving in Sink1 .

Request Rejecter .

Data Receiving by the DBA .

Result of the request .

The tester does not ever examine the programming code and does not need any further knowledge of the program other than its specifications. in a black box test on a software design the tester only knows the inputs and what the expected outcomes should be and not how the program arrives at those outputs. System testing is usually required before and after a system is put in place. called units. These procedures tell the tester how the system should perform and where common mistakes may be found. Once all of the units in a program have been found to be working in the most efficient and error-free manner possible. A series of systematic procedures are referred to while testing is being performed.1 SYSTEM TESTING Black Box testing Black Box testing is also known as functional testing. The test is accurate only if the tester knows what the program is supposed to do. Unit testing is often automated but it can also be done manually. Unlike black box testing. white box testing uses specific knowledge of programming code to examine outputs. structural. larger components of the program can be evaluated by means of integration testing. System testing System testing is the process of performing a variety of tests on a system to explore functionality or to identify problems. This encourages developers to modify the source code without immediate concerns about how such changes might affect the functioning of other units or the program as a whole.Unit testing involves only those characteristics that are vital to the performance of the unit under test. are individually and independently scrutinized for proper operation. clear box and open box testing. White box testing does not account for errors caused by omission. He or she can then see if the program diverges from its intended goal. A software testing technique whereby the internal workings of the item being tested are not known by the tester. and all visible code must also be readable. Testers usually try to "break the system" by entering data that may cause . A software testing technique whereby explicit knowledge of the internal workings of the item being tested are used to select the test data. For example. Unit testing Unit testing is a software development process in which the smallest testable parts of an application.4. White box testing White box testing also known as glass box.

Integration testing Integration testing is also known as integration and testing.There are two major ways of carrying out an integration test. is a software development process which program units are combined and tested as groups in multiple ways. to see how the system will respond to the incorrect input. called the bottom-up method and the top-down method. For example.the system to malfunction or return incorrect information. Integration testing can expose problems with the interfaces among program components before trouble occurs in real-world program execution. followed by tests of progressively higher-level combinations of units called modules or builds. a unit is defined as the smallest testable part of an application. . the highest-level modules are tested first and progressively lower-level modules are tested after that. In top-down integration testing. a tester may put in a city in a search engine designed to only accept states. In this context. Bottom-up integration testing begins with unit testing.

First of all we need to install the software java jdk 1. .5. Select image from file menu which we want to send to the receiver. Open project in Net Beans and run it. Then a window appears which provides user interface to interact with the application. Place the EEVCS application in Net Beans 4. 2. 5.6.1 HOW TO OPERATE THE PACKAGE Steps in the execution of a EEVCS Application: 1. 6. Next install Net Beans ide for executing this application 3.


CONCLUSION The response component of intrusion detection system for a DBMS is described. The two main issues that is addressed in the context of such response policies are policy matching. The response component is responsible for issuing a suitable response to an anomalous user request. an algorithm is described to efficiently search the policy database for policies matching an anomalous request assessment. An interactive Event-Condition-Action type response policy language is presented that makes it very easy for the database security administrator to specify appropriate response actions for different circumstances depending upon the nature of the anomalous request. The other issue that is addressed is the administration of response policies to prevent malicious modifications to policy objects from legitimate users.7. and policy administration. For the policy matching procedure. .

July 2009.” http://www. Kincaid and W. July 2009. “Practical Threshold Signatures.111/b28318/ datadict. Wheatman. Kamra and E.” Proc. Brackney.org/. and L. Cryptology. pp. 2001. Mogull. Ann. rfc 4800. 2007). 5.org/rfc/ rfc4880.com/showArticle. Terzi. 2005). 2008. Kamra. [8] A.com.ietf. [6] A. “Top Five Steps to Prevent Data Loss and Information Leaks. .gartner.V. Springer. Goan. Bertino. 207.” Proc. “Detecting Anomalous Access Patterns in Relational Databases. pp. [12] V. Martin. and E.com. pp. Bertino. [10] J. July 2009. “Dam Technology Provides Monitoring and Analytics with Less Overhead. 2010. Computer Security Applications Conf.” Proc. [2] R.” J. [5] D. [3] M. 50. Widom and S. and R. Brooks Cole. “The Threat from within. 2004. 346-347. [4] R.oracle. Ann.66. 2008.” http:// download. Active Database Systems: Triggers and Rules for Advanced Database Processing. jhtml?articleID=166400792.networkcomputing. Natan. 2000. no. Gennaro. Rabin. July 2008. 3. 393-400. A. 2010. vol. Cheney.” http://www. Bertino. Morgan Kaufmann. Gartner Research (Nov.postgresql.1). Network Computing (Aug. pp. Computer Security Applications Conf.BIBLIOGRAPHY [1] A. The Postgresql Global Development Group.” http://www. 1063-1077. E. “Responding to Anomalous Database Requests.com/docs/cd/B28359_01/server. Numerical Analysis: Mathematics of Scientific Computing. [15] “Openpgp Message Format.htm. “Design and Implementation of SAACS: A State-Aware Access Control System. S. T. [13] R. Nehme. Ott. no.8.” J. [9] “Postgresql 8.B. Theory and Application of Cryptographic Techniques (EUROCRYPT). 2007. Digital Press.txt. [11] “Oracle Database Concepts 11g Release 1 (11. Kamra. T.” http://www. “Robust and Efficient Sharing of RSA Functions.” http://www. Very Large DataBases (VLDB). Gartner Research (July 2006).220. “The Cyber Enemy within Countering the Threat from Malicious Insiders. Int‟l Conf. Jarecki. E. 1995. pp.gartner. [14] D. Shoup. 20. Nicolett and J. Conry-Murray. (ACSAC). 2005. [7] A.” Secure Data Management. 17. Implementing Database Security and Auditing. Ceri. Krawczyk.3. (ACSAC). vol. and H. 2009.

Sign up to vote on this title
UsefulNot useful

Master Your Semester with Scribd & The New York Times

Special offer: Get 4 months of Scribd and The New York Times for just $1.87 per week!

Master Your Semester with a Special Offer from Scribd & The New York Times