Академический Документы
Профессиональный Документы
Культура Документы
variations
between
1. INTRODUCTION
To trace back the source of the DDOS attacks in the internet is
extremely hard. It is one of the extraordinary challenge to trackback the
DDOS attacks, that attackers generate huge amount of requests to victims
through compromised computers(zombies), in order to denying normal services or
degrading the quality of services. Recent survey shows that than 70 internet
operators in the world demonstrated that DDOS attack are increasing dramatically
and individual attacks are more strong and sophisticated. IP trace back
means the capability of identifying the actual source of any packet across
the internet; with the help of IP trace back schemes identify the zombies from
which the DDOS attack packets entered the internet. A number of IP trace back
approaches have been suggested to identify attackers. Among them two major
methods for IP trace back, Probabilistic
packet
marking
(PPM)
and
interchangeably. Once a DDoS attack has been identified, the victim initiates the
following pushback process to identify the locations of zombies: the victim
first identifies which of its upstream routers are in the attack tree based on
the flow entropy variations it has accumulated, and then submits requests to
the related immediate upstream routers. The upstream routers identify where the
attack flows came from based on their local entropy variations that they have
monitored. Once the immediate upstream routers have identified the attack flows,
they will
forward
the
requests
to
their
immediate
upstream
routers,
SYSTEM
HARD DISK
FLOPPY DRIVE
: 1.44 MB
MONITOR
: 15 VGA color
MOUSE
RAM
: 256 MB
KEYBOARD
40 GB
Logitech.
Operating system
: - Windows 8 Professional
Front End
: - Java
Coding Language
: - Swing.
Java having a major rolls in internet and the intranet application. The reason
for this is quite simple: Java expends the universe pf objects that can move about
freely in cyberspace. In a network, two very broad categories ob objects are
transmitted between the server and your personal computer: passive information
and dynamic, active programs.
SECURITY
As you are likely aware, every time that you download a normal program,
you are risking viral infection. Prior to java, most users did not download executable
programs frequently, and those who did scan them for viruses prior to execution.
Even so, most users still worried about the possibility of infecting their system with
a virus. When you use a java-compatible web browser, you can safely download
java applets without fear of viral infection or malicious intent. Java achieves this
protection by confining a java program to the java execution environment and not
allowing it access to other parts of computer.
PORTABILITY:
Many types of computers and operating systems are in use throughout the
world-and many are connected to the internet. For program to be dynamically
downloaded to all the various type of platforms connected to the Internet, some
means of generating portable executable code is needed.
BYTECODE:
The key that allows java to solve both the security and the portability
problems just described is that output of a java compiler is not executable code.
Rather, it is BYTECODE. Byte code is a highly optimized set of instruction designed
5
to be executed by the java run-time system, which is called the Java Virtual Machine
(JVM). That is, in its standard form, the JVM is an interpreted code.
SIMPLE:
OBJECT-ORIENTED:
ABSTRACTION:
A) ENCAPSULATION:
Encapsulation is the mechanism that binds together code and the data
it manipulates, and keeps both safe from outside interference and misuse. One way
to think about encapsulation is as a protective wrapper that prevents the code and
data from begin arbitrarily accessed by other code defined outside of the wrapper.
Access to he code and data inside the wrappers is tightly controlled through a welldefined interface. To relate this to the real world, consider the automatic
transmission on
about our engine, such as how much you are accelerating, the pitch of the surface
you are on, and the position of the shift lever.
B) INHERITANCE:
by
hierarchical
classification.
Inheritance
interacts
with
1) SINGLE INHERITANCE:
BLOCK DIAGRAM:
BASE
DERIVED
2) MULTILEVEL INHERITANCE:
BLOCK DIAGRAM:
POLYMORPHISM:
10
The JVM is an interpreter program that emulates a processor that executes the bytecode
instructions just as if it were a hardware processor executing native machine code instructions.
The platform independence of Java thus depends on the prior creation of JVMs for
different platforms.
The Java bytecode can then run on any platform in which the JVM is available and the
program should perform the same. This Write Once, Run Anywhere approach is a key goal of the
Java language.
Swing
Swing was developed to provide a more sophisticated set of GUI components than the
earlier Abstract Window Toolkit. Swing provides a native look and feel that emulates the look
and feel of several platforms, and also supports a pluggable look and feel that allows
applications to have a look and feel unrelated to the underlying platform.
Swing introduced a mechanism that allowed the look and feel of every component in an
application to be altered without making substantial changes to the application code. The
introduction of support for a pluggable look and feel allows Swing components to emulate the
appearance of native components while still retaining the benefits of platform independence.
This feature also makes it easy to make an application written in Swing look very different from
native programs if desired.
Originally distributed as a separately downloadable library, Swing has been included as
part of the Java Standard Edition since release 1.2. The Swing classes and components are
contained in the javax.swing package hierarchy.
Architecture
Swing is a platform-independent, Model-View-Controller GUI framework for Java. It
follows a single-threaded programming model, and possesses the following traits:
Platform independence
11
Swing is platform independent both in terms of its expression (Java) and its
implementation (non-native universal rendering of widgets).
Extensibility
Swing is a highly partitioned architecture, which allows for the "plugging" of various
custom implementations of specified framework interfaces: Users can provide their own custom
implementation(s) of these components to override the default implementations. In general,
Swing users can extend the framework by extending existing (framework) classes and/or
providing alternative implementations of core components.
Component-oriented
Given the programmatic rendering model of the Swing framework, fine control over the
details of rendering of a component is possible in Swing. As a general pattern, the visual
representation of a Swing component is a composition of a standard set of elements, such as a
"border", "inset", decorations, etc. Typically, users will programmatically customize a standard
Swing component (such as a JTable) by assigning specific Borders, Colors, Backgrounds,
opacities, etc., as the properties of that component. The core component will then use these
property (settings) to determine the appropriate renderers to use in painting its various aspects.
However, it is also completely possible to create unique GUI controls with highly customized
visual representation.
Configurable
12
Swing's heavy reliance on runtime mechanisms and indirect composition patterns allows
it to respond at runtime to fundamental changes in its settings. For example, a Swing-based
application can change its look and feel at runtime. Further, users can provide their own look and
feel implementation, which allows for uniform changes in the look and feel of existing Swing
applications without any programmatic change to the application code.
Swing's configurability is a result of a choice not to use the native host OS's GUI controls
for displaying itself. Swing "paints" its controls programmatically through the use of Java 2D
APIs, rather than calling into a native user interface toolkit. Thus, a Swing component does not
have a corresponding native OS GUI component, and is free to render itself in any way that is
possible with the underlying graphics APIs.
Application Code
JFC
Java 2D
Swing
AWT
Accessibility
13
Class
Description
Abstract Button
Button Group
ImageIcon
Encapsulates an Icon
JApplet
JButton
JCheckBox
JComboBOx
JLabel
JRadioButton
JScrollPane
JTabbedPane
JTable
JTextField
JTree
ADVANTAGES OF SWINGS:
Wide variety of Components
Pluggable Look and Feel
MVC Architecture
Keystroke Handling
Action Objects
Nested containers
Customized Dialogs
Compound Borders
Standard Dialog Classes
Structured Table and Tree Components
Powerful Text Manipulation
Generic Undo Capabilities
Accessibility Support
SQL SERVER
SQL Server is a relational database management system ( RDBMS) from
Microsoft that's designed for the enterprise environment. SQL Server runs on T-SQL
(Transact -SQL), a set of programming extensions from Sybase and Microsoft that
add several features to standard SQL, including transaction control, exception and
error handling, row processing, and declared variables.
15
History
Genesis
The code base for MS SQL Server (prior to version 7.0) originated in Sybase SQL Server,
and was Microsoft's entry to the enterprise-level database market, competing against Oracle, IBM,
and, later, Sybase itself. Microsoft, Sybase and Ashton-Tate originally teamed up to create and
market the first version named SQL Server 1.0 for OS/2 (about 1989) which was essentially the
same as Sybase SQL Server 3.0 on Unix, VMS, etc. Microsoft SQL Server 4.2 was shipped
around 1992 (available bundled with Microsoft OS/2 version 1.3). Later Microsoft SQL Server
4.21 for Windows NT was released at the same time as Windows NT 3.1. Microsoft SQL Server
v6.0 was the first version designed for NT, and did not include any direction from Sybase.
About the time Windows NT was released, Sybase and Microsoft parted ways and each
pursued their own design and marketing schemes. Microsoft negotiated exclusive rights to all
versions of SQL Server written for Microsoft operating systems. Later, Sybase changed the name
of its product to Adaptive Server Enterprise to avoid confusion with Microsoft SQL Server.
Until 1994, Microsoft's SQL Server carried three Sybase copyright notices as an indication of its
origin.
Since parting ways, several revisions have been done independently. SQL Server 7.0 was
the first true GUI based database server and was a rewrite from the legacy Sybase code. It was
succeeded by SQL Server 2000, which was the first edition to be launched in a variant for the IA64
architecture.
In the eight years since release of Microsoft's previous SQL Server product (SQL Server
2000), advancements have been made in performance, the client IDE tools, and several
complementary systems that are packaged with SQL Server 2005. These include: an ETL tool
(SQL Server Integration Services or SSIS), a Reporting Server, an OLAP and data mining server
(Analysis Services), and several messaging technologies, specifically Service Broker and
Notification Services.
16
Protocol layer
Protocol layer implements the external interface to SQL Server. All operations that can be
invoked on SQL Server are communicated to it via a Microsoft-defined format, called Tabular
Data Stream (TDS). TDS is an application layer protocol, used to transfer data between a
database server and a client. Initially designed and developed by Sybase Inc. for their Sybase
SQL Server relational database engine in 1984, and later by Microsoft in Microsoft SQL Server,
TDS packets can be encased in other physical transport dependent protocols, including TCP/IP,
Named pipes, and Shared memory. Consequently, access to SQL Server is available over these
protocols. In addition, the SQL Server API is also exposed over bando web services.
Data storage
The main unit of data storage is a database, which is a collection of tables with typed
columns. SQL Server supports different data types, including primary types such as Integer,
Float, Decimal, Char (including character strings), Varchar (variable length character strings),
binary (for unstructured blobs of data), Text (for textual data) among others. It also allows userdefined composite types (UDTs) to be defined and used. SQL Server also makes server statistics
available as virtual tables and views (called Dynamic Management Views or DMVs). A database
can also contain other objects including views, stored procedures, indexes and constraints, in
addition to tables, along with a transaction log. A SQL Server database can contain a maximum
of 231 objects, and can span multiple OS-level files with a maximum file size of 2 20 TB. The data
in the database are stored in primary data files with an extension .mdf. Secondary data files,
identified with an .ndf extension, are used to store optional metadata. Log files are identified
with the .ldf extension.
Storage space allocated to a database is divided into sequentially numbered pages, each 8
KB in size. A page is the basic unit of I/O for SQL Server operations. A page is marked with a
96-byte header which stores metadata about the page including the page number, page type, free
space on the page and the ID of the object that owns it. Page type defines the data contained in
the page - data stored in the database, index, allocation map which holds information about how
pages are allocated to tables and indexes, change map which holds information about the
changes made to other pages since last backup or logging, or contain large data types such as
17
image or text. While page is the basic unit of an I/O operation, space is actually managed in
terms of an extent which consists of 8 pages. A database object can either span all 8 pages in an
extent ("uniform extent") or share an extent with up to 7 more objects ("mixed extent"). A row in
a database table cannot span more than one page, so is limited to 8 KB in size. However, if the
data exceeds 8 KB and the row contains Varchar or Varbinary data, the data in those columns are
moved to a new page (or possibly a sequence of pages, called an Allocation unit) and replaced
with a pointer to the data.[For physical storage of a table, its rows are divided into a series of
partitions (numbered 1 to n). The partition size is user defined; by default all rows are in a single
partition. A table is split into multiple partitions in order to spread a database over a cluster.
Rows in each partition are stored in either B-tree or heap structure. If the table has an associated
index to allow fast retrieval of rows, the rows are stored in-order according to their index values,
with a B-tree providing the index. The data is in the leaf node of the leaves, and other nodes
storing the index values for the leaf data reachable from the respective nodes. If the index is nonclustered, the rows are not sorted according to the index keys. An indexed view has the same
storage structure as an indexed table. A table without an index is stored in an unordered heap
structure. Both heaps and B-trees can span multiple allocation units.
Network security
Network security consists of the provisions made in an underlying computer network
infrastructure, policies adopted by the network administrator to protect the network and the
network-accessible resources from unauthorized access, and consistent and continuous
monitoring and measurement of its effectiveness (or lack) combined together.
Comparison with information security
The terms network security and information security are often used interchangeably,
however network security is generally taken as providing protection at the boundaries of an
organization, keeping the intruders (e.g. black hat hackers, script kiddies, etc.) out. Network
security systems today are mostly effective, so the focus has shifted to protecting resources from
attack or simple mistakes by people inside the organization, e.g. with Data Loss Prevention
(DLP). One response to this insider threat in network security is to compartmentalize large
networks, so that an employee would have to cross an internal boundary and be authenticated
18
when they try to access privileged information. Information security is explicitly concerned with
all aspects of protecting information resources, including network security and DLP.
Network security concepts
Network security starts from authenticating any user, commonly (one factor
authentication) with a username and a password (something you know). With two factor
authentication something you have is also used (e.g. a security token or 'dongle', an ATM
card, or your mobile phone), or with three factor authentication something you are is also used
(e.g. a fingerprint or retinal scan). Once authenticated, a stateful firewall enforces access
policies such as what services are allowed to be accessed by the network users. Though effective
to prevent unauthorized access, this component fails to check potentially harmful content such as
computer worms being transmitted over the network. An intrusion prevention system (IPS)
helps detect and inhibit the action of such malware. An anomaly-based intrusion detection
system also monitors network traffic.
Suspicious content, unexpected traffic and other anomalies to protect the network e.g.
from denial of service attacks or an employee accessing files at strange times. Communication
between two hosts using the network could be encrypted to maintain privacy. Individual events
occurring on the network could be tracked for audit purposes and for a later high level analysis.
Honeypots, essentially decoy network-accessible resources, could be deployed in a
network as surveillance and early-warning tools. Techniques used by the attackers that attempt to
compromise these decoy resources are studied during and after an attack to keep an eye on new
exploitation techniques. Such analysis could be used to further tighten security of the actual
network being protected by the honeypot.
A useful summary of standard concepts and methods in network security is given by in
the form of an extensible ontology of network security attacks.
19
2. SYSTEM ANALYSIS
in
service
provider environment,
describes
that
the
frequency
and
MODULES:
Topology Creation
21
We categorize the packets that are passing through a router into flows. A flow is defined by a pair
the upstream router where the packet came from and the destination address of the
packet. Entropy is an information theoretic concept, which is a measure of randomness. We
employ entropy variation in this paper to measure changes of randomness of flows at a router for
a given time interval. We notice that entropy variation is only one of the possible metrics.
Ddos Attack Detection And Prevention
DDoS Detection
Identify the normal packet and attack packet. For the purpose of identification, we calculate
Entropy variation.
DDoS prevention
To prevent DDoS attack if NE value is less then threshold, then simply drops all packets
containing the same path for particular time interval.
Attacker Identification
Spoofed Attacker Identification In our approach, the re are two ways to identify the attacker.
A. Router Entropy:
1) If attack is there in receiver proxy server, it means NE < threshold Then calculate entropy for
each downstream router to identify suspected attack flow.
2) Those routers whose NE rate is less than threshold we suspect it as attack router. Further,
calculate the NE rate for each Neighbor router of that attack rout er until we reach the source of
attack.
IP Trackback:
1) If attack is there then first identify the packets, get there source IP address and mark value and
contact to that sender who is sending those packets to receiver.
2) Intermediate router matches those digest value to their digest table eateries and get the
IP address of particular sender router.
3) These process will continue until we reach the source of attack.
22
Economical Feasibility.
Technical Feasibility.
Operational Feasibility.
output, makes the technical feasibility assessment. The system analyst to check the technical
feasibility of the proposed system. Taking account of the hardware it is used for the system
development, data storage, processing and output, makes the technical feasibility assessment.
2.4.3 Operational Feasibility
The aspect of study is to check the level of acceptance of the system by the user. This
includes the process of training the users to use the system efficiently. The user must not feel
threatened by the system, instead must accept it as a necessity. The level of acceptance by the
users solely depends on the methods that are employed to educate the user about the system and
to make familiar with it.
Operational feasibility would pass the test if the system is developed as per rules,
regulations, laws, organizational culture, union agreements, etc., and above all with the active
involvement of the users. Besides these four main categories, the system should also be accessed
in terms of legal feasibility and schedule feasibility.
The windows application is a highly programmable environment that allows mass
customization through the immediate deployment of a large and diverse range of applications, to
millions global.
In system analyst to check the technical feasibility of the proposed system. Taking account
of the hardware it is used for the system development, data storage, processing and output,
makes the technical feasibility assessment
24
3. SYSTEM DESIGN
3.1 Introduction
System design is the creation of road map that shows system developers how to convert
system requirements into a workable and operational system by exploring system and identifying
the best design for the project.
3.1.1 Logical design
Logical design identifies the record and relationship to be handled by the system. It
focuses on the logic, or the reasoning, behind the system by breaking down the system into sub
system until the process cannot be repeated any further.
3.1.2 Physical design
The physical design transformation structural components into a procedural description of
the projects. It also describes the creatures of the system, the components or elements of the
system and their appearance to the user.
25
The physical design of the internal assessments is designed as an attractive way and the
efficient way, because the users have to easily navigate through the page and the easy way of
adding the contests into the database.
3.2 Data Flow Diagram
Data flow diagram is used to define the flow of the system and its resources such as
information. Data flow diagrams are a way of expressing project requirements in a graphical
manner. Data flow diagram represents one of the most ingenious tools used for structured
analysis. A Data Flow Diagram or DFD, as it shortly called is known as bubble chart. It has the
purpose of clarifying system requirements and identifying major transformations that will
become programs in the system design. It is the major starting point in the design phase that
functionally decomposes the requirements specifications down to the lowest level of detail.
26
27
program to run
satisfactorily, it must compile and test data correctly and tie in properly with other
programs. Achieving an error free program is the responsibility of the programmer. These errors
are shown through error message generated by the computer. Logic error the programmer must
examine the output carefully.
28
When a program is tested, the actual output is compared with the expected output.
When there is a discrepancy the sequence of instructions must be traced to determine the
problem the process the is facilitated by breaking the program down into self-contained
portions, each of which can be checked at certain key points .The idea is to compare
program values against desk-calculated values to isolate the Problems.
Unit testing has been performed the module. The syntax and logical error have been
corrected then and there. All this syntax have been rectified during compilation. The output has
been tested with the manual input. All the data are stored correctly.
4.3 Integration Testing
Programs are invariably related to one another and interact in the total system.
Each program is tested to see whether it conforms to related programs in the systems.
Each portion of the system is tested against the entire module with both the test data and
the live data before the entire system is tested as a whole. Integration testing is
systematic techniques for conducting the program structure. While at the same time
conducting tests to uncover errors associated with the interfacing.
4.4 Validation testing
This is a concern which overlaps with integration testing. Ensuring that the application
fulfils its specification is a major criterion for the construction of an integration test. Validation
testing also overlaps to a large extent with System Testing, where the application is tested with
respect to its typical working environment. Consequently for many processes no clear division
between validation and system testing can be made. Specific tests which can be performed in
either or both stages include the following.
4.5 Usability Testing
The process of usability measurement was introduced in the previous chapter. Even if
usability prototypes have been tested whilst the application was constructed, a validation test of
the finished product will always be required.
29
Prepare for System implementation, where all steps needed in advance of actually
deploying the application are performed, including preparation of both the production
environment and the Consumer communities.
Deploy System, where the full deployment plan, initially developed during System
Design and evolved throughout subsequent lifecycle phases, is executed and validated.
30
5. CONCLUSION
BIBLIOGRAPHY
REFERENCES
[1] M. T. Goodrich, "Probabilistic Packet Marking for Large Scale IP Traceback,"
IEEE/ACM Trans. Networking, vol. 16, no. 1, pp. 15-24, Feb. 2008.
[2] T. K. T. Law, J. C. S. Lui, and D. K. Y. Yau, "You Can Run, But You Can't Hide:
An Effective Statistical
Methodology
to
Traceback
Parallel and Distributed Systems, vol. 16, no. 9, pp. 799-813, Sept. 2005.
[3] S. Savage, "Network Support for IP Traceback," IEEE/ACM Trans. Networking,
vol. 9, no. 3, pp.226-237, June 2001.
[4]
Belenky
and
N.
Ansari,
"IP
Traceback
with Deterministic
Packet
Marking," IEEE Comm. Letters, vol. 7, no. 4, pp. 162-164, Apr. 2003.
[5] D. Dean, M. Franlin, and A. Stubblefield, "An Algebraic Approach to IP
Traceback,"
ACM Trans. Information and System Security, vol. 5, no. 2, pp. 119-137,
May2006.
31
APPENDICS
CODING
APPENDICES
Sample coding
/****************************************************************/
/*
HomePage
*/
/*
*/
/****************************************************************/
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
/**
* Summary description for HomePage
32
*
*/
public class HomePage extends JFrame
{
// Variables declaration
private JLabel jLabel1;
private JLabel jLabel2;
private JLabel jLabel3;
private JButton jButton1;
private JButton jButton2;
private JButton jButton3;
private JPanel contentPane;
// End of variables declaration
public HomePage()
{
super();
initializeComponent();
//
// TODO: Add any constructor code after initializeComponent call
//
33
this.setVisible(true);
}
/**
* This method is called from within the constructor to initialize the
form.
* WARNING: Do NOT modify this code. The content of this method is
always regenerated
* by the Windows Form Designer. Otherwise, retrieving design might
not work properly.
* Tip: If you must revise this method, please backup this GUI file for
JFrameBuilder
* to retrieve your design properly in future, before revising this
method.
*/
private void initializeComponent()
{
jLabel1 = new JLabel();
jLabel2 = new JLabel();
jLabel3 = new JLabel();
jButton1 = new JButton();
jButton2 = new JButton();
jButton3 = new JButton();
34
contentPane = (JPanel)this.getContentPane();
//
// jLabel1
//
jLabel1.setForeground(new Color(241, 235, 234));
jLabel1.setText("
SMOCK");
//
// jLabel2
//
jLabel2.setIcon(new
ImageIcon("D:\\Dharmaraj-
2009\\smock\\picture\\firsthome1.JPG"));
jLabel2.setText("jLabel2");
//
// jLabel3
//
jLabel3.setIcon(new
ImageIcon("D:\\Dharmaraj-
2009\\smock\\picture\\DHA.PNG"));
jLabel3.setText("jLabel3");
//
// jButton1
//
jButton1.setText("AV SERVER");
35
jButton1.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e)
{
jButton1_actionPerformed(e);
}
});
//
// jButton2
//
jButton2.setText("USER LOGIN");
jButton2.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e)
{
jButton2_actionPerformed(e);
}
});
//
// jButton3
//
jButton3.setText("EXIT");
36
jButton3.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e)
{
jButton3_actionPerformed(e);
}
});
//
// contentPane
//
contentPane.setLayout(null);
addComponent(contentPane, jLabel1, 34,3,253,23);
addComponent(contentPane, jLabel2, 17,44,290,236);
37
this.setTitle("HomePage");
this.setLocation(new Point(0, 0));
this.setSize(new Dimension(328, 440));
}
//
// TODO: Add any appropriate code in the following Event Handling
Methods
//
private void jButton1_actionPerformed(ActionEvent e)
{
//System.out.println("\njButton1_actionPerformed(ActionEvent e)
called.");
// TODO: Add any handling code here
38
new ServerHome();
e)
called.");
// TODO: Add any handling code here
// new LoginPage();
}
System.exit(0);
}
39
UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookA
ndFeel");
}
catch (Exception ex)
{
System.out.println("Failed loading L&F: ");
System.out.println(ex);
}
new HomePage();
}
//= End of Testing =
}
/****************************************************************/
40
/*
ServerHome
/*
*/
*/
/****************************************************************/
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import java.sql.*;
import java.util.*;
/**
* Summary description for ServerHome
*
*/
public class ServerHome extends JFrame
{
// Variables declaration
private JLabel jLabel1;
private JLabel jLabel2;
private JLabel jLabel3;
private JButton jButton1;
private JButton jButton2;
private JButton jButton3;
private JPanel contentPane;
41
42
* WARNING: Do NOT modify this code. The content of this method is always
regenerated
* by the Windows Form Designer. Otherwise, retrieving design might not
work properly.
* Tip: If you must revise this method, please backup this GUI file for
JFrameBuilder
* to retrieve your design properly in future, before revising this method.
*/
private void initializeComponent()
{
jLabel1 = new JLabel();
jLabel2 = new JLabel();
jLabel3 = new JLabel();
jButton1 = new JButton();
jButton2 = new JButton();
jButton3 = new JButton();
contentPane = (JPanel)this.getContentPane();
//
// jLabel1
//
jLabel1.setIcon(newImageIcon("D:\\Dharmaraj2009\\smock\\picture\\key3.JPG"));
jLabel1.setText(".");
//
43
// jLabel2
//
jLabel2.setIcon(newImageIcon("D:\\Dharmaraj2009\\smock\\picture\\serverhome1.PNG"));
jLabel2.setText("jLabel2");
//
// jLabel3
//
jLabel3.setForeground(new Color(241, 235, 234));
jLabel3.setText("AUTHENTICATION SERVER");
//
// jButton1
//
jButton1.setText("USER REGISTRATION");
jButton1.addActionListener(new Action Listener(){
});
//
44
// jButton2
//
jButton2.setText("KEY GENERATION");
jButton2.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e)
{
jButton2_actionPerformed(e);
}
});
//
// jButton3
//
jButton3.setText("EXIT");
jButton3.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e)
{
jButton3_actionPerformed(e);
}
});
45
// contentPane
//
contentPane.setLayout(null);
c.setBounds(x,y,width,height);
container.add(c);
}
//
// TODO: Add any appropriate code in the following Event Handling Methods
//
private void jButton1_actionPerformed(ActionEvent e)
{
//System.out.println("\njButton1_actionPerformed(ActionEvent
e)
called.");
// TODO: Add any handling code here
e)
48
e)
st.executeUpdate("insertintopublickeytable
values('"+userno+"','"+sk+"')");
// String np=Integer.toString(userno);
// String priv=sk+np;
st.executeUpdate("insertintoprivatekeytable
values('"+userno+"','"+priv+"')");
userno++;
}
}
catch (Exception et)
{
et.printStackTrace();
}
49
e)
System.exit(0);
}
//
// TODO: Add any method code to meet your needs in the following area
//
public String generateKeys1(int c)
{
String keys="";
gk=new GenKeys();
for(int i=0;i<c;i++)
{
keys=gk.getKeys();
}
System.out.println(keys);
return keys;
}
50
try
{
UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel"
);
}
catch (Exception ex)
{
System.out.println("Failed loading L&F: ");
System.out.println(ex);
}
new ServerHome();
}
51