You are on page 1of 126

A PROJECT REPORT ON ANTIVIRUS

1.INRODUCTION
Antivirus (or anti-virus) software is used to prevent, detect, and remove malware, including computer viruses, worms, and trojan horses. Such programs may also prevent and remove adware, spyware, and other forms of malware.

Antivirus software is used to prevent, detect, and remove malware and other computer viruses. Anti virus software systems detections involve searching for known malicious patterns in executable code. it is possible for a user to be infected with new viruses that have no sign or symptoms or existence. To counter this problem of zero day threats, anti virus systems can be used to detect these viruses when you don't even know that they are there.

TYPES OF COMPUTER ANTIVIRUS


There are many different types of anti virus software that have been developed over the years. Original products were just scanners that would search through the hard disk looking for viruses. As viruses have become more common and difficult, the more anti virus software is being made to keep up with current virus issues. There are many different types of general virus scanners that are used on PCs today:

Conventional Disk Scanner


This is the stand virus check program. It can be ran upon the users request, and it scans the contents of the disks, directories or files that the users wants, for any boot sectors or files that contain viruses that it recognizes. These are usually ran manually by the user as a preventive maintenance activity or when they thing a virus is suspected. The user can schedule automatic scanning through the use of a program scheduler.

Memory Resident Scanners


An anti virus software that now come with a special program that sits in the background while your using your computer and it automatically scans for viruses based on different triggers. These programs can automatically scan as they run or scan floppy disks when you command a shutdown of your system. This scanner offers increased protection and more chances of catching a virus before it does damage to your computer.

Behavior Based Detection


Some products offer an option where they will sit in memory and look for virus like behavior and suspicious activity. Behavior based detection is looking for the types of actions taken on files or boot sectors that might be performed by viruses trying to spread. This type of antivirus software will look for a trap, and will generically catch viruses red handed.

Start up Scanners
This type of antivirus scanner is designed to be run every time the PC is booted up. It preforms a quick scan of the disks boot sectors and critical system files. the idea is to catch these viruses before the PC boots up reducing the chance of it to spread.

Inoculation
Instead of scanning for viruses this type of antivirus software looks for changes that the viruses make to files and boot sectors. With a clean system the software will get a snap shot of information in each boot sector about its content and size. Periodically it will re examine these files to see if anything has changed.

Top Anti Virus Software


The Shield Deluxe 2009 Antivirus & Antispyware Webroot Antivirus with Antispyware 6.0 BitDefender Antivirus 2009 CA Anti-Virus Plus 2009 McAfee VirusScan Plus 2009 Norton Antivirus 2009 ESET NOD 32 3.0

ADVANTAGES OF ANTIVIRUS

Having a good anti-virus program can be the difference between the life and death of yourcomputer. With so many computer viruses in existence, protecting your computer's security should be one of your top priorities. Aside from just stopping viruses, most anti-virus programs have other features, such as firewalls, that will ensure the well-rounded safety and security of your valued computer.

1.Protection from Viruses


The greatest and most obvious advantage to installing anti-virus software on your computer is that it will prevent you from getting viruses such as trojans, malware and spyware. Viruses range in severity from the harmless to the downright system crippling. Not only can a virus destroy all of the valued data on your computer, it can make the computer utterly worthless by infecting and destroying processes vital to your computer's performance.

2.Protecting Personal Information


Hackers and viruses go hand in hand. A good anti-virus program will protect you while you surf the Internet, preventing hackers from gaining access to personal things such as credit card information and bank account access. The firewall feature included with most anti-virus software will block any unauthorized incoming connections to your network or computer, preventing hackers from digging their hooks into your life and your computer.

3.Cost Savings
Though some anti-virus programs are quite pricey, there are some very good options for those wanting something relatively cheap or even free. Many free anti-virus programs are available that will protect your system just as well as a subscription-based anti-virus program. Even if you choose to go with a program you have to pay for, the cost of the program and subscription to their service will almost certainly extend the life of your computer, meaning you'll have to purchase new computers less frequently than those who choose not to use anti-virus software.

4.Convenience
Though you may find it inconvenient to have to run virus scans and worry about the security of your computer, you'd have more to worry about without proper anti-virus protection. A computer left open for viruses and hackers will often start to show premature signs of wear and a significant slow down will be noticeable, making normal computing tasks take much longer and causing much more hassle. Let's assume your system does get infected with a virus. Without protection you'd be at the mercy of the virus and you'd have to waste time trying to find it, delete

it and restore any damage it has caused and it will still probably be there, even after deletion. Yet with proper real-time anti-virus software working you will simply get a notification that a virus has been detected and be asked if you would like to delete it. These notifications usually come as soon as the virus is detected, leaving it without enough time to do its damage.

WHAT IS COMPUTER VIRUS

People have a very general view that there are many types of computer viruses and are those programs that cause damage or make the system crash. Malicious code is the general word used and virus is one type of malicious code. Worms and Trojans are different from computer virus and destructive types of worms are sometimes termed as internet types of virus. Computer viruses have made their mark on the PC's since the 90's with different types of viruses causing damage to computers. The earliest viruses made the most impact as no anti-virus programs were available. The advent of anti-virus programs spelled a death blow to many common types of computer viruses that were written by the various tools to generate types of computer virus. Those who were inept at programming used these various tool to generate the virus. Devious mind always find new ways when they found that the anti-virus software's were able to disinfect and remove the different types of computer viruses they went on to new methods and that is how Trojans and worms came up. There are a few main types of computer viruses and these computer virus types are classified below depending upon the infection methods: Boot sector/Master Boot Record Computer Virus Means of Infection Boot sector is that area of the computer that is accessed when the computer is turned on. A boot sector virus infects this portion. Once the boot sector is infected the virus is loaded into memory when the computer is turned on. This virus then infects boot sectors on floppies or other removable media Master Boot record virus only infects the Master boot record and not the boot sector Damage Caused Boot sector viruses gain complete control of the master boot record or the DOS boot sector by replacing the operating system contents with that of its own. This allows the virus to spread fast and cause damage:

By gaining control of the master boot record and the DOS boot sector the boot sector viruses can sometimes hide the resources that the computer has( the floppy drive even though attached may not be present) Some boot sector viruses contain instructions to redirect disk reads.

Some boot sector viruses move the master boot record to another location causing the system to crash when it boots up. Other boot sector viruses cause damage to the master boot record Some boot sector viruses damage the File Allocation Table (FAT) which is the index of all the files on the drive. This causes loss of data

Removal The best way to remove boot sector virus is to boot the computer with using a clean boot disk and then rewrite the files with the good operating system files on the infected disk. These viruses were very much prevalent in the ninety's and a host of antivirus programs are now available to detect and clean them effectively

HOW ANTIVIRUS PROTECT COMPUTER FROM VIRUS


How many times have you been pestered with viruses, spywares, bad cookies and all sort of malware? How many times have you lost your important documents and pictures, because you clicked on a little file you got in your e-mail client? How many times have your computer stopped working normally after you visited a web-site? If your reply is a lot of times or sometimes then this guide is for you. There are lots of ways when surfing on the web or when working on your computer to get a virus but, let me tell you frankly, if you get something harmful, most of the times it depends on you, but at the same time it is not your fault. It only means that you have not been educated or trained adequately on how to behave safely while working with your hyper-technological PC. Keep in mind that it is because of this lack of knowledge I am talking about that viruses still continue to spread all over the world costing damages worth millions of dollars. If your company has always taught you how to use operative systems and programs such as: Microsoft Vista or XP, Linux Microsoft Office, Open Office and other programs to edit documents, pictures etc, but it has never taught you about antivirus, antispyware etc. it means that your boss, who should be your educator, has behaved in a wrong way, has been a bad teacher hurting you and his own interests. How much money and time your company or your school could have saved if it just taught you that you were not supposed to click on the little file named hello.exe attached to an email and that made your PC turn off , deleting all files with .doc extension automatically? I dont want to criticize an ybody, but companies and schools think more about productivity than education and security, giving you just infos you are supposed to know to work. Nothing more, nothing less to fill up that knowledge gap that could prevent you from clicking on that famous hello.exe file. So lets start this little guide with the assumption that all you know about Internet safety is zero, but with some tips you can put yourself in a condition of supremacy and avoid 99% of Internet threats without losing the joy to surf the web or working in the way you like.

Rule First: Be safe. Dont click! Reading from Wikipedia: A computer virus is a computer program that can copy itself and infect a computer without permission or knowledge of the user., Some viruses are programmed to damage the computer by damaging programs, deleting files, or reformatting the hard disk.. Did you read what Wikipedia write? A virus is a program, so when you have to deal with one of them dont put yourself in a position of inferiority. Dont think: Hey, its a virus. It is smarter than me. It is exactly the other way-around. Since a virus or another kind of malware is a piece of software, you have to think about it as something really dumb, doing something it has been programmed to do such as: deleting, formatting, changing etc. And since it is a program you have also to think of the only way to let it work is to activate it in some way. So here we have a rule we have to keep in mind: Dont click on anything you dont know. This is the most powerful advice this guide can give you. More powerful than the most sophisticated antivirus and more cleaver than any computer engineer.

Rule Second: Recognize threats on your e-mails at glance Viruses and spywares spread on the Internet after growing in the PCs. When they are ready and have made enough damages in a machine, they try to leave it to infect another one. To do that they usually steal all e-mail addresses found on the host computer. E-mail addresses are found on the lists contained in the e-mail clients such as: Windows Mail, Windows Outlook, Eudora etc. At this point they send themselves by email as attachments. Virus creators try to make their viruses appealing or just conceal it into something else. Sometimes instead they leave them as they are. Anyway if you get an e-mail with an attachment having these features refer to the first rule:

Be careful of files having these extensions: .EXE, .BAT, .COM. For sure they are virus. These extensions can be mingled with other ones to trick you into thinking they are safe files. Here are a couple of examples: sunshine.mp3.bat, picture12.jpeg.exe, funnymovie.divx.com Other times viruses conceal themselves to deceive you, so even files having these extensions can be viruses: .MP3, .MPEG, .JPEG, .JPG, .PDF, .DOC, .DVI, .HTML . So how to recognize a picture sent by a friend of yours from a masked virus? There are no rule for this, but generally speaking be suspicious about those e-mails coming from your friends and whose subjects are silly or with no sense. Viruses are rather stupid and when they send themselves dont pay a lot of attention to what they write. They dont have a lot of fantasy. So when you get an e -mail with a subject that looks like one of these examples refer to the first rule: Funny pictures, You won a price, Hey it is me, Open right now, RE: (and here there could be something that makes no sense to you), Your account at has been suspended, Hoax, Sexy pics, Sex (an d sex related topics), Read and pass on etc. The list here could be very big. As a general rule when you get an e-mail which sound weird, probably it is, so dont click it nor open any attachment. If a suspicious e-mail was sent from a friend of yours, send him another e-mail asking information or just call him. Is your computer safety worth a phone call? I think so. Be careful of e-mails from unknown people. As a general rule dont open them if their object makes no sense to you. Be careful of e-mails apparently coming from trusted company, banks, websites etc. If the e-mail address is something like: support@mastercardz.cz, information@citibankk.ro, customerpurchase@bestbuyy.ru dont open it and trash it right away. If you are unsure about an e-mail address go to McAfee site advisor and see if the site it comes from is secure. Be careful of e-mails containing html codes or with embedded web pages. These particular emails dont have attachments but once you open them, since they contain an embedded code, they could start downloading a virus. As a general rule disable html-support from your e-mail client or webmail. Rule Third: Read your e-mails in a secure way Generally speaking software that connects your computer to the Internet is a possible vehicle for viruses and all kind of threats. Despite the fact that today e-mail clients have improved dramatically, I dont like the idea of something managing my incoming e-mails. No matter how many filters it applies to select a good e-mail from a bad one. Sooner or later somebody will find a bug or a workaround to skip a filter. The next thing you know is that a virus will be downloaded into your PC with no way to control it. I always avoid e-mail clients. I

always use webmail. I mean, if I want to check my e-mails I go to my Gmail or Yahoo account and I read them directly from the web. Yahoo mail is provided with an excellent spam and virus filter so before you download an attachment into your computer it checks the file automatically. Anyway even other webmails have automated virus filters even though you dont see them. If you really want to use a software, I advice you to use those programs giving a preview of your emails without downloading anything. How is it possible? Simple, they just peer into the webserver and download those information that are important for you to understand what the e-mail is about. Other things such a: attachments, the whole mail body etc. are left in the server, ready to be fetched upon request. Here is the link toMagic Mail Monitor that is a really good e-mail preview software, plus it comes for free.

Rule Fourth: Surf wisely we have seen how viruses spread, what they look like and how to be safe when we read our daily e-mails. Sadly for us there other ways we can get a virus. The good news is that they all have to do with the way we surf Internet. Surfing the web is not easy at all. Like the ocean there are a lot of places that are really dangerous even though they seem to be perfectly safe. The fact that we do it daily with no second thought is another proof about how little we know and how badly we have been educated about PC safety. A serious problem is also represented by what we use to surf. All browsers are not alike and instead of looking for shiny, eye-candy features we should look for security. A browser is a program, do you remember what I said above? This particular software connects our PC to the Internet. For this reason it is dangerous and could cause us some malevolent malware. Since this software is essential to surf we have to be smart when pick it up. My choice is Firefox without any doubts. Secure, stable, simple to use, few bugs, free, it warns you when a new update is available and supported by a strong helping community. These are just a few reasons why I like it. If you want you can download it here. Of course having a good board doesnt mean anything if you go surfing to a part of the ocean full of sharks. Here is where you shouldnt go and what you shouldnt do:

Dont surf porn. Come on. You are grown enough, right? Avoid porn web-sites since some of them, once opened in your browser, can send you spyware, viruses and other malware, without speaking about the chance they have to steal your personal information. Stay way from them. By the way, most of the times when they download malware on your PC you are not aware of it. They dont ask you to click anything. In this case you already infringed the rule Dont click on anything you dont know when you went to the site itself. As a matter of fact these sites use bugs on your browser to insert malicious files silently. Without knowing you are already cooked. If you open a web site and a window appears right away telling you to download a software, dont do it! Before clicking OK read what the window says and look at the program it wants you to download. If the program is called: Java, Flash, Shockwave you can download it (maybe with the exception of Java, read below) otherwise if you dont feel secure about the request, just close the browser and start surfing again. Sometimes you can not do it because the web-site wants to force you to do something. If so, it is trying to make you downlaod something armful. To force the closing of the browser press: Control-Alt-Canc, click on Task Manager, look for your browser name on the window that has just appeared, click on it and click End-Process at the bottom of the window.

I know you like playing on the Internet. There are lots of armless sites full of games out there, but some of them may want you to downlaod a piece of software called JAVA. Let me tell you right away that this software is not harmful for your computer. Some web sites or programs on your computer need it to work. The threat doesnt come from this application, but from some malicious web site that may use it to put into your JAVA cache directory spyware, trojans and other pestware. If you dont need JAVA I advice you not to download it or uninstall it. If you want to play on the Internet you can use those websites that dont use this application for its games such as: Shockwave.com , Crazymonkeygames.com ,Flashgames247.com Rule Fifth: Be always ready to fight. Antivirus and antispyware, do I need them? Sure you do! Even though you followed my advices there are still some chance to get a virus. So, why should you stay away from protection? There are a lot of software promising us to shield our PC from everything. Anyway this is what you are looking for:

1. A free software (why do you have to pay for something you can find for free on the Internet and doing the exact same things as the expensive ones?) 2. A light software (you dont want it to slow my computer down) 3. Regularly free update (this is crucial. Viruses grows at a fast pace. Thats why you need a good update service) 4. Heuristic provided( heuristic is a feature that allows an antivirus to spot a virus on certain characteristic, and long before and update for that specific threat has been released) 5. Simple to use (you dont want to spend hours to tweak it. You just want it to work out of the box) 6. Compatible with your operative system (you dont want my antivirus to crash while it is performing a complete scan of your system and believe me, this is not a remote event) The ideal solution is to have two software installed on our PC. The first shielding from viruses and the second shielding from spywares. The best solution is to have a software having both these features. My choices for antivirus are: 1. AVG Free Antivirus (which is an excellent antivirus and antispyware and this is what I have on my PC) 2. Clamwin Antivirus 3. Avast Home Edition

FEASIBILITY STUDY

Technical Feasibility
The Technical Feasibility of the software system developed is centered around the existing computer system (hardware and software etc.) and to what extent it can support the proposed addition. Its various aspects are discussed hereby.

Hardware Feasibility
The hardware feasibility of the software under development will be as a under 1. The present hardware setup of the organization may be sufficient for running the software applications to be developed. 2. System Support Group of the company provides the entire hardware requirement for the proposed system as and when needed. 3. Two servers will be used to manage the application.

Software Feasibility

The software feasibility of the software under development can be stated as under:

1. The new application requires .Net framework 1.1 which is available in the company.

2. System Support Group of the company provides the entire software requirement for the proposed system as and when needed.

Economic Feasibility: Cost and Benefit Analysis


The Economic Feasibility study or the Cost / benefit analysis gives the picture of various costs and benefits and rules associated with the system. The various costs and benefits associated with the system under development will be as under. The feasibility will evaluate over a five-year period.

Costs:

Since it is an External project for the company, there will be cost benefit analysis in terms of resources according to the company policy, which cannot be declared. Moreover the application being developed will assume Windows NT as its server and license from Microsoft for .Net.

Benefits:

1. Since it is an External project for the company, it help company in achieving financial support for further company development. 2. It helps client to sale the product to the property managers around the world. 3. It overall helps the community in managing the things like property.

Operational Feasibility
The Operational Feasibility of the system relates to the fact that, to what level the proposed system is able to achieve its objectives, for which it is designed. The various factors that decide the operational feasibility of the system are as under: System Performance Growth Potential User friendliness / User Training Security Issues

System Performance

The proposed system would be able to achieve the required performance level, it will be meant to achieve. System Performance can be classified into two major components namely:

System Response Time The Response Time for fetching the data and displaying on the interface of the entire system is likely to be minimal. System Accuracy

The system under design is accurate to the desired level in its operations. The user interface provides all the desired information related to that interface accurately.

Growth Potential Since the proposed system is likely to be designed using object oriented approach in such a way that it can be expanded and made more powerful with the changing requirements of the user as and when needed.

Security issues

The System designed gets login id and password of the end user automatically from his login and displays the relevant screen for him/her. The application has its data in the MS-Access database, which is Run in only Office 2000 and Operating sytem will be Windows 2000 professional.

Appropriate backup of the code and the database will be regularly taken, so as to not have a crisis situation in the event of a server crash.

SYSTEM ANALYSIS
In software engineering the SDLC concept underpins many kinds of software development methodologies. These methodologies form the framework for planning and controlling the creation of an information system the software development process.

Systems development phases


The System Development Life Cycle framework provides system designers and developers to follow a sequence of activities. It consists of a set of steps or phases in which each phase of the SDLC uses the results of the previous one. A Systems Development Life Cycle (SDLC) adheres to important phases that are essential for developers, such as planning, analysis, design, and implementation, and are explained in the section below. A number of system development life cycle (SDLC) models have been created: waterfall, fountain, spiral, build and fix, rapid prototyping, incremental, and synchronize and stabilize. The oldest of these, and the best known, is the waterfall model: a sequence of stages in which the output of each stage becomes the input for the next. These stages can be characterized and divided up in different ways, including the following Project planning, feasibility study: Establishes a high-level view of the intended project and determines its goals.

Systems analysis, requirements definition: Refines project goals into defined functions and operation of the intended application. Analyzes end-user information needs. Systems design: Describes desired features and operations in detail, including screen layouts, business rules, process diagrams, pseudocode and other documentation. Implementation: The real code is written here. Integration and testing: Brings all the pieces together into a special testing environment, then checks for errors, bugs and interoperability. Acceptance, installation, deployment: The final stage of initial development, where the software is put into production and runs actual business.

Maintenance: What happens during the rest of the software's life: changes, correction, additions, moves to a different computing platform and more. This, the least glamorous and perhaps most important step of all, goes on seemingly forever.

System analysis The goal of system analysis is to determine where the problem is in an attempt to fix the system. This step involves breaking down the system in different pieces to analyze the situation, analyzing project goals, breaking down what needs to be created and attempting to engage users so that definite requirements can be defined. Requirements analysis sometimes requires individuals/teams from client as well as service provider sides to get detailed and accurate requirements....often there has to be a lot of communication to and from to understand these requirements. Requirement gathering is the most crucial aspect as many times communication gaps arise in this phase and this leads to validation errors and bugs in the software program. Design In systems design the design functions and operations are described in detail, including screen layouts, business rules, process diagrams and other documentation. The output of this stage will describe the new system as a collection of modules or subsystems. The design stage takes as its initial input the requirements identified in the approved requirements document. For each requirement, a set of one or more design elements will be produced as a result of interviews, workshops, and/or prototype efforts. Design elements describe the desired software features in detail, and generally include functional hierarchy diagrams, screen layout diagrams, tables of business rules, business process diagrams, pseudocode, and a complete entity-relationship diagram with a full data dictionary. These design elements are intended to describe the software in sufficient detail that skilled programmers may develop the software with minimal additional input design Implementation Modular and subsystem programming code will be accomplished during this stage. Unit testing and module testing are done in this stage by the developers. This stage is intermingled with the next in that individual modules will need testing before integration to the main project. Testing The code is tested at various levels in software testing. Unit, system and user acceptance testings are often performed. This is a grey area as many different opinions exist as to what the stages of

testing are and how much if any iteration occurs. Iteration is not generally part of the waterfall model, but usually some occur at this stage. Following are the types of testing:

Defect testing Path testing Data set testing. Unit testing System testing Integration testing Black box testing White box testing Regression testing Automation testing User acceptance testing Performance testing

Production process that ensures that the program performs the intended task. Operations and maintenance The deployment of the system includes changes and enhancements before the decommissioning or sunset of the system. Maintaining the system is an important aspect of SDLC. As key personnel change positions in the organization, new changes will be implemented, which will require system updates.

Systems Analysis and Design


The Systems Analysis and Design (SAD) is the process of developing Information Systems (IS) that effectively use of hardware, software, data, process, and people to support the companys business objectives. [Phases

System Analyst (IT Department) analyzes, and implements information systems, researches problems, plans solutions, recommends software and systems, and coordinates

development to meet business or other requirements.

Analysis is an investigation, careful assessment, study, a research, observations, and understanding the situation or a problem. Design is the process of finding solution to the problem, recommending solution creating blueprints and alike.

SOFTWARE/PACKAGE USED
A high-level programming language developed by Sun Microsystems. Java was originally called OAK, and was designed for handheld devices and set-top boxes. Oak was unsuccessful so in 1995 Sun changed the name to Java and modified the language to take advantage of the burgeoning World Wide Web. Java is an object-oriented language similar to C++, but simplified to eliminate language features that cause common programming errors. Java source code files (files with a .java extension) are compiled into a format calledbytecode (files with a .class extension), which can then be executed by a Java interpreter. Compiled Java code can run on most computers because Java interpreters and runtime environments, known as Java Virtual Machines (VMs), exist for most operating systems, including UNIX, the Macintosh OS, and Windows. Byte code can also be converted directly into machine language instructions by a just-in-time compiler (JIT). Java is a general purpose programming language with a number of features that make the language well suited for use on the World Wide Web. Small Java applications are called Java applets and can be downloaded from a Web server and run on your computer by a Javacompatible Web browser, such as Netscape or Microsoft Internet Explorer.

Java is a programming language originally developed by James Gosling at Sun Microsystems (which is now a subsidiary of Oracle Corporation) and released in 1995 as a core component of Sun Microsystems' Java platform. The language derives much of its syntax from Cand C++ but has a simpler object model and fewer low-level facilities. Java applications are typically compiled to bytecode (class file) that can run on any Java Virtual Machine (JVM) regardless of computer architecture. Java is a general-purpose, concurrent, classbased, object-oriented language that is specifically designed to have as few implementation dependencies as possible. It is intended to let application developers "write once, run anywhere". Java is currently one of the most popular programming languages in use, and is widely used from application software to web applications. The original and reference implementation Java compilers, virtual machines, and class

libraries were developed by Sun from 1995. As of May 2007, in compliance with the specifications of the Java Community Process, Sun relicensed most of its Java technologies under the GNU General Public License. Others have also developed alternative implementations of these Sun technologies, such as the GNU Compiler for Java, GNU Classpath, and Dalvik.

Principles of Java
There were five primary goals in the creation of the Java language: 1. It should be "simple, object oriented, and familiar". 2. It should be "robust and secure". 3. It should be "architecture neutral and portable". 4. It should execute with "high performance". 5. It should be "interpreted, threaded, and dynamic".

Java Platform
One characteristic of Java is portability, which means that computer programs written in the Java language must run similarly on any supported hardware/operating-system platform. This is achieved by compiling the Java language code to an intermediate representation called Java bytecode, instead of directly to platform-specific machine code. Java bytecode instructions are analogous to machine code, but are intended to be interpreted by a virtual machine (VM) written specifically for the host hardware. End-users commonly use a Java Runtime Environment (JRE) installed on their own machine for standalone Java applications, or in a Web browser for Java applets. Standardized libraries provide a generic way to access host-specific features such as graphics, threading, and networking. A major benefit of using bytecode is porting. However, the overhead of interpretation means that interpreted programs almost always run more slowly than programs compiled to native executables would. Just-in-Time compilers were introduced from an early stage that compile bytecodes to machine code during runtime. Over the years, this JVM built-in feature has been optimized to a point where the JVM's performance competes with natively compiled C code. Implementations Sun Microsystems officially licenses the Java Standard Edition platform for Linux, Mac OS X,and Solaris. Although in the past Sun has licensed Java to Microsoft, the license has expired and has not been renewed. Through a network of third-party vendors and licensees,[24] alternative Java environments are available for these and other platforms. Sun's trademark license for usage of the Java brand insists that all implementations be "compatible". This resulted in a legal dispute with Microsoft after Sun claimed that the Microsoft

implementation did not support RMI or JNI and had added platform-specific features of their own. Sun sued in 1997, and in 2001 won a settlement of US$20 million, as well as a court order enforcing the terms of the license from Sun.As a result, Microsoft no longer ships Java with Windows, and in recent versions of Windows, Internet Explorer cannot support Java applets without a third-party plugin. Sun, and others, have made available free Java run-time systems for those and other versions of Windows. Platform-independent Java is essential to the Java EE strategy, and an even more rigorous validation is required to certify an implementation. This environment enables portable serverside applications, such as Web services, Java Servlets, and Enterprise JavaBeans, as well as with embedded systems based on OSGi, using Embedded Java environments. Through the new GlassFish project, Sun is working to create a fully functional, unified open source implementation of the Java EE technologies. Sun also distributes a superset of the JRE called the Java Development Kit (commonly known as the JDK), which includes development tools such as the Java compiler, Javadoc, Jar, and debugger. Performance Programs written in Java have a reputation for being slower and requiring more memory than those written in C.However, Java programs' execution speed improved significantly with the introduction of Just-in-time compilation in 1997/1998 for Java 1.1,the addition of language features supporting better code analysis (such as inner classes, StringBuffer class, optional assertions, etc.), and optimizations in the Java Virtual Machine itself, such as HotSpot becoming the default for Sun's JVM in 2000. To boost even further the speed performances that can be achieved using the Java language, Systronix made JStik, a microcontroller based on the aJile Systems line of embeddedJava processors. In addition, the widely used ARM family of CPUs has hardware support for executing Java bytecode through its Jazelle option. Automatic memory management Java uses an automatic garbage collector to manage memory in the object lifecycle. The programmer determines when objects are created, and the Java runtime is responsible for recovering the memory once objects are no longer in use. Once no references to an object remain, the unreachable memory becomes eligible to be freed automatically by the garbage collector. Something similar to a memory leak may still occur if a programmer's code holds a reference to an object that is no longer needed, typically when objects that are no longer needed

are stored in containers that are still in use. If methods for a nonexistent object are called, a "null pointer exception" is thrown. One of the ideas behind Java's automatic memory management model is that programmers can be spared the burden of having to perform manual memory management. In some languages, memory for the creation of objects is implicitly allocated on the stack, or explicitly allocated and deallocated from the heap. In the latter case the responsibility of managing memory resides with the programmer. If the program does not deallocate an object, a memory leak occurs. If the program attempts to access or deallocate memory that has already been deallocated, the result is undefined and difficult to predict, and the program is likely to become unstable and/or crash. This can be partially remedied by the use of smart pointers, but these add overhead and complexity. Note that garbage collection does not prevent "logical" memory leaks, i.e. those where the memory is still referenced but never used. Garbage collection may happen at any time. Ideally, it will occur when a program is idle. It is guaranteed to be triggered if there is insufficient free memory on the heap to allocate a new object; this can cause a program to stall momentarily. Explicit memory management is not possible in Java. Java does not support C/C++ style pointer arithmetic, where object addresses and unsigned integers (usually long integers) can be used interchangeably. This allows the garbage collector to relocate referenced objects and ensures type safety and security. As in C++ and some other object-oriented languages, variables of Java's primitive data types are not objects. Values of primitive types are either stored directly in fields (for objects) or on the stack (for methods) rather than on the heap, as commonly true for objects (but see Escape analysis). This was a conscious decision by Java's designers for performance reasons. Because of this, Java was not considered to be a pure object-oriented programming language. However, as of Java 5.0, autoboxing enables programmers to proceed as if primitive types were instances of their wrapper class.

SNAPSHOOT

COADING
import java.awt.*; import javax.swing.*; import java.io.*; import java.awt.event.*; import java.lang.*; import java.util.*; import javax.media.*;

class Alert extends JFrame { JLabel l1,l2,l3,l4,l5,l6; JButton b1,b2,b3,b4,b5,b6; String path=""; String name=""; int k=0; String fff="virus"; Player p;

Alert(String cc,String bb,String aa){ super(" Alert "); setVisible(true);

Container cp=getContentPane(); cp.setLayout(null); path=cc; name=aa;

try{ File rr=new File("virus.mp3"); p=Manager.createPlayer(rr.toURL()); p.start(); }catch(Exception fes){}

setBackground(Color.black);

// ImageIcon i1=new ImageIcon("alert1.jpg"); // l1=new JLabel(i1); // l1.setBounds(10,10,100,100); //cp.add(l1);

ImageIcon i2=new ImageIcon("alert2.png"); l2=new JLabel(i2); l2.setBounds(10,10,400,90); cp.add(l2);

Font f=new Font("Arial Black",Font.BOLD,16);

l3=new JLabel("Virus Type"); l3.setBounds(20,120,150,30); l3.setFont(f); cp.add(l3);

l4=new JLabel(bb); l4.setForeground(Color.red); l4.setBounds(150,120,150,30); Font f2=new Font("Arial Black",Font.BOLD,13); l4.setFont(f2);

cp.add(l4);

l5=new JLabel("Virus Name"); l5.setFont(f); l5.setBounds(20,160,150,30); cp.add(l5);

l6=new JLabel(cc); l6.setFont(f2); l6.setForeground(Color.red);

l6.setBounds(150,160,200,30); cp.add(l6);

b1=new JButton("Move To Chest"); b1.setBounds(10,200,150,30); cp.add(b1);

b2=new JButton(" Delete"); b2.setBounds(180,200,150,30); cp.add(b2);

b3=new JButton(" Rename"); b3.setBounds(10,240,150,30); cp.add(b3);

b4=new JButton(" Ignore"); b4.setBounds(180,240,150,30); cp.add(b4);

b1.addActionListener(new ActionListener()

{ public void actionPerformed(ActionEvent w){ File f=new File(path); File move=new File("Chest/"+name); f.renameTo(move); f.setExecutable(false,true); setVisible(false); } });

b2.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent w){

try{ File f=new File(path); f.delete(); setVisible(false); }catch(Exception de){} } });

b3.addActionListener(new ActionListener()

{ public void actionPerformed(ActionEvent w){

try{

File f=new File(path); File fg=new File(fff+k+".DAT"); f.renameTo(fg); k++; setVisible(false); }catch(Exception fe){}

} });

b4.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent w){

try{ setVisible(false);

}catch(Exception fe){}

} });

} } import java.io.*; import java.net.*; import java.awt.*; import javax.swing.JMenuItem; import java.util.*; import java.beans.*; import javax.swing.*; import java.awt.event.*; import javax.swing.undo.*; import javax.swing.text.*; import javax.swing.event.*; import java.lang.reflect.*; import javax.swing.border.*; import javax.swing.plaf.basic.*; import javax.swing.filechooser.FileView;

class addVirus extends JFrame { JLabel l1,l2,l3,l4; JButton b1,b2,b3,b4; JTextField t1; addVirus(){ try{ UIManager.setLookAndFeel ("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");

}catch(Exception de){} Container cp=getContentPane(); cp.setLayout(null);

l1=new JLabel("Enter the Virus File name"); l1.setBounds(10,10,150,30); cp.add(l1);

t1=new JTextField(); t1.setBounds(180,10,130,30); cp.add(t1);

b1=new JButton("Add");

b1.setBounds(50,60,100,30); cp.add(b1);

b2=new JButton("Exit"); b2.setBounds(160,60,100,30); cp.add(b2);

b1.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { try{ if(!t1.getText().equals("")) { FileReader r=new FileReader("virus_database/point.dat"); JTextField t2=new JTextField(); t2.read(r,null); int rr=Integer.parseInt(t2.getText()); r.close();

FileWriter w1=new FileWriter("virus_database/malware"+rr+".RES"); w1.write(t1.getText()); w1.close();

FileWriter w2=new FileWriter("virus_database/point.dat"); rr=rr+1; w2.write(rr+""); w2.close(); System.out.println("=> File Added Sucessfully !!!"); } else {

t1.setBackground(Color.red); System.out.println("=> Enter the File name !!!"); }

}catch(Exception der){ System.out.println("Error :"+der);}

} });

b2.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) {

setVisible(false); } });

public static void main(String args[]) { addVirus s=new addVirus(); s.setVisible(true); s.setSize(360,150); s.setLocation(50,50); } }

Alert.Java

import java.awt.*; import javax.swing.*; import java.io.*; import java.awt.event.*; import java.lang.*;

import java.util.*; import javax.media.*;

class Alert extends JFrame { JLabel l1,l2,l3,l4,l5,l6; JButton b1,b2,b3,b4,b5,b6; String path=""; String name=""; int k=0; String fff="virus"; Player p;

Alert(String cc,String bb,String aa){ super(" Alert "); setVisible(true); Container cp=getContentPane(); cp.setLayout(null); path=cc; name=aa;

try{

File rr=new File("virus.mp3"); p=Manager.createPlayer(rr.toURL()); p.start(); }catch(Exception fes){}

setBackground(Color.black);

// ImageIcon i1=new ImageIcon("alert1.jpg"); // l1=new JLabel(i1); // l1.setBounds(10,10,100,100); //cp.add(l1);

ImageIcon i2=new ImageIcon("alert2.png"); l2=new JLabel(i2); l2.setBounds(10,10,400,90); cp.add(l2);

Font f=new Font("Arial Black",Font.BOLD,16);

l3=new JLabel("Virus Type"); l3.setBounds(20,120,150,30); l3.setFont(f); cp.add(l3);

l4=new JLabel(bb); l4.setForeground(Color.red); l4.setBounds(150,120,150,30); Font f2=new Font("Arial Black",Font.BOLD,13); l4.setFont(f2);

cp.add(l4);

l5=new JLabel("Virus Name"); l5.setFont(f); l5.setBounds(20,160,150,30); cp.add(l5);

l6=new JLabel(cc); l6.setFont(f2); l6.setForeground(Color.red); l6.setBounds(150,160,200,30); cp.add(l6);

b1=new JButton("Move To Chest"); b1.setBounds(10,200,150,30); cp.add(b1);

b2=new JButton(" Delete"); b2.setBounds(180,200,150,30); cp.add(b2);

b3=new JButton(" Rename"); b3.setBounds(10,240,150,30); cp.add(b3);

b4=new JButton(" Ignore"); b4.setBounds(180,240,150,30); cp.add(b4);

b1.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent w){ File f=new File(path); File move=new File("Chest/"+name); f.renameTo(move); f.setExecutable(false,true);

setVisible(false); } });

b2.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent w){

try{ File f=new File(path); f.delete(); setVisible(false); }catch(Exception de){} } });

b3.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent w){

try{

File f=new File(path);

File fg=new File(fff+k+".DAT"); f.renameTo(fg); k++; setVisible(false); }catch(Exception fe){}

} });

b4.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent w){

try{ setVisible(false);

}catch(Exception fe){}

} });

} }

Addvirus.Java

import java.awt.*; import java.awt.event.*; import javax.swing.*; import java.io.*; import java.applet.AppletContext.*; import java.util.*; import javax.swing.event.*; import java.lang.reflect.*; import javax.swing.border.*; import javax.swing.plaf.basic.*; import java.awt.image.ImageConsumer ; import java.awt.image.ImageObserver; import java.applet.AudioClip; import javax.swing.filechooser.FileView; import java.net.*;

class Antivirus extends JFrame { JTabbedPane jt; Antivirus(){ super("e-Security Antivirus");

try{ UIManager.setLookAndFeel ("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");

}catch(Exception de){} Container cp=getContentPane(); cp.setLayout(null); jt=new JTabbedPane(); // cp.setLayout(new FlowLayout());

jt.addTab("Status",new statusPanel()); jt.addTab("Scan",new scanPanel()); jt.addTab("Quarantine",new quarPanel()); jt.addTab("About Us",new aboutPanel()); jt.setBounds(10,10,550,550); cp.add(jt);

} public static void main(String args[]) { Antivirus a=new Antivirus(); //SplashScreen f=new SplashScreen();

//f.setVisible(true); int m=0; int k=1; a.setVisible(true); a.setSize(600,600); // f.setVisible(false); } }

class statusPanel extends JPanel { JLabel l1,l2,l3,l4,l5,l6,l7,l8,l9,l10; JTextArea a; JSlider s;

statusPanel(){ setLayout(null); setBackground(Color.black);

Font f=new Font("Arial Balck",Font.BOLD,16); l1=new JLabel("Scan Summery"); l1.setFont(f); l1.setForeground(Color.red);

l1.setBackground(Color.black); l1.setBounds(70,0,150,30); add(l1);

int h=ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS; int v=ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS;

a=new JTextArea(); a.setForeground(Color.red); a.setBackground(Color.black); JScrollPane jsp=new JScrollPane(a,v,h); jsp.setBounds(10,30,450,200); add(jsp);

l8=new JLabel("Protection Level"); Font fd=new Font("Arail Black",Font.BOLD,18); l8.setFont(fd); l8.setForeground(Color.red); l8.setBackground(Color.black); l8.setBounds(140,260,150,30); add(l8);

s=new JSlider(1,3,2); s.setBounds(150,290,120,30); add(s);

l3=new JLabel("|"); l3.setBounds(150,320,5,5); l3.setForeground(Color.red); l3.setBackground(Color.black); add(l3);

l4=new JLabel("|"); l4.setBounds(210,320,5,5); l4.setForeground(Color.red); l4.setBackground(Color.black); add(l4);

l5=new JLabel("|"); l5.setBounds(270,320,5,5); l5.setForeground(Color.red); l5.setBackground(Color.black); add(l5);

l6=new JLabel("Low"); l6.setBounds(140,325,80,30); l6.setForeground(Color.red); l6.setBackground(Color.black); add(l6);

l7=new JLabel("Medium"); l7.setBounds(200,325,80,30); l7.setForeground(Color.red); l7.setBackground(Color.black); add(l7);

l8=new JLabel("High"); l8.setBounds(270,325,80,30); l8.setForeground(Color.red); l8.setBackground(Color.black); add(l8);

try{ FileReader r=new FileReader("Scan_Summery.txt"); a.read(r,null);

r.close(); }catch(Exception de){}

// This Panel Is Construct the Scan Panel And Performing the Scanning

class scanPanel extends JPanel { JButton b1,b2,b3,b4,b5,b6,b7,b8,b9,b10; JLabel l1,l2,l3,l4,l5,l6,l7,l8,l9,l10; JComboBox list1,list2,list3,list4; JTextField t1,t2,t3,t4,t5,t6,t7,t8,t9,t10; JTextField read1; Container cp1; // JList filename; String hold=""; int count=0,point2=0; JTextArea as;

int virus=1,zz22=0; JTextArea filename; DefaultListModel model; JProgressBar bb; String mypath=""; JScrollPane listscroll,jsp1; scanPanel(){ // cp=getContentPane();

setLayout(null); ImageIcon image=new ImageIcon("images/main_bg_left.PNG"); setBackground(Color.black);

list1=new JComboBox(); l1=new JLabel("Select the Drive For Scan");

File gh=new File("C:\boot.ini"); File fb[]=gh.listRoots();

for(int hj=0;hj<fb.length;hj++) { list1.addItem(fb[hj]+"");

l1.setBounds(10,10,140,30); l1.setBackground(Color.black); l1.setForeground(Color.red); list1.setBounds(170,10,100,30);

add(l1);add(list1);

ImageIcon z4=new ImageIcon("images/Buttons/1.jpg"); b1=new JButton(z4);

ImageIcon z5=new ImageIcon("images/Buttons/2.jpg"); JButton tt1=new JButton(z5);

tt1.setBounds(390,10,100,30); b1.setBounds(280,10,100,30); add(b1);add(tt1);

int h=ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS; int v=ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS;

as=new JTextArea();

jsp1=new JScrollPane(as,v,h); jsp1.setBounds(10,60,400,400);

jsp1.setVisible(false); add(jsp1);

model=new DefaultListModel(); filename=new JTextArea(); filename.setEditable(false); listscroll=new JScrollPane(filename,v,h); listscroll.setBounds(10,60,400,400); listscroll.setVisible(true); add(listscroll);

bb=new JProgressBar(); bb.setForeground(Color.red); bb.setBounds(30,480,280,30); add(bb);

l2=new JLabel("Total File's");

l2.setBackground(Color.black); l2.setForeground(Color.red); l2.setBounds(450,70,150,30); add(l2);

l3=new JLabel("0"); l3.setBackground(Color.black); l3.setForeground(Color.red); l3.setBounds(450,95,150,30); add(l3);

l4=new JLabel("Scan File's"); l4.setBackground(Color.black); l4.setForeground(Color.red); l4.setBounds(450,140,150,30); add(l4);

l5=new JLabel("0"); l5.setBackground(Color.black); l5.setForeground(Color.red); l5.setBounds(450,155,150,30); add(l5);

l6=new JLabel("Infected File's"); l6.setBackground(Color.black); l6.setForeground(Color.red); l6.setBounds(450,200,150,30); add(l6);

l7=new JLabel("0"); l7.setBackground(Color.black); l7.setForeground(Color.red); l7.setBounds(450,225,150,30); add(l7);

ImageIcon z1=new ImageIcon("images/Buttons/3.jpg"); b2=new JButton(z1); b2.setBackground(Color.black); b2.setForeground(Color.red); b2.setBounds(420,270,120,30); add(b2);

ImageIcon z2=new ImageIcon("images/Buttons/4.jpg"); b3=new JButton(z2); b3.setBackground(Color.black); b3.setForeground(Color.red);

b3.setBounds(420,310,120,30); add(b3);

ImageIcon z3=new ImageIcon("images/Buttons/5.jpg"); b4=new JButton(z3); b4.setBackground(Color.black); b4.setForeground(Color.red); b4.setBounds(420,350,120,30); add(b4);

b1.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e){

listscroll.setVisible(true); jsp1.setVisible(false); int point =0,ll=0; filename.setText( "" ); JFrame j=new JFrame(); l7.setText("0"); FileDialog v=new FileDialog(j,"Select any file in the folder that you want to Scan"); v.setVisible(true); String path=v.getFile();

hold=v.getDirectory(); String dir=v.getDirectory();

File gh=new File(dir+path); File fb[]=gh.listRoots();

scan s=new scan(); s.setLocation(90,90); s.setVisible(true); s.setSize(500,80);

for(int hj=0;hj<fb.length;hj++) { // System.out.println(fb[hj]+""); }

File ff=new File(dir+path); String str=ff.getParent(); String name=ff.getName();

File ff2=new File(str);

// System.out.println(" Virus ->"); String str22[]=ff2.list(); // System.out.println("\n"+"\n"+"\t"+" Containt of Directory :"+"\n"); ll=str22.length;

File qw=new File("Recycle/setup.exe"); try{

if(qw.exists()){ Alert Horse","setup.exe"); a.setVisible(true); a.setSize(430,400); a.setLocation(50,50); l7.setText(virus+""); qw.delete(); } a=new Alert("Recycler/Setup.exe","Trojan

}catch(Exception der){System.out.println(der);}

File qw2=new File("ReCyCleR/sEtuP.exe"); try{

if(qw2.exists()){ Alert Horse","setup.exe"); a2.setVisible(true); a2.setSize(430,400); a2.setLocation(50,50); l7.setText(virus+""); qw2.delete(); } a2=new Alert("Recycler/Setup.exe","Trojan

}catch(Exception der){System.out.println(der);}

for(int h=0;h<str22.length;h++) { File filed=ff.getParentFile(); String ss=filed.getName(); System.out.println("Parent ="+filed); // System.out.println(ss+" "+str22[h]); System.out.println("Scanning File => "+ str22[h]);

try{ File ff2x=new File(ss+".exe"); String namew1z=ff2x.getName(); if(namew1z.equals(str22[h]))

Alert Horse",str22[h]);

a=new

Alert(hold+str22[h],"Trojan

a.setVisible(true); a.setSize(430,400); a.setLocation(50,50); l7.setText(virus+""); virus++;

} }catch(Exception der){System.out.println(der);}

count=h;

int i = str22[h].lastIndexOf('.'); if(str22[h].substring(i+1).toLowerCase().equals("exe") str22[h].substring(i+1).toLowerCase().equals("inf") str22[h].substring(i+1).toLowerCase().equals("ini") str22[h].substring(i+1).toLowerCase().equals("bat")) { File file=new File(str22[h]); String namew=file.getName(); System.out.println(namew); || || ||

try{

if( file.isHidden()) { Alert a=new Alert(hold+str22[h],"Trojan Horse",str22[h]); a.setVisible(true); a.setSize(430,400); a.setLocation(50,50); l7.setText(virus+""); virus++; } }catch(SecurityException ger){} catch(Exception ferr){System.out.println(ferr); }

String filez=file.getName();

filename.setText(filename.getText()+"\n"+filez+"..................Executable File"); l3.setText(h+""); }

else if(str22[h].substring(i+1).toLowerCase().equals("txt") str22[h].substring(i+1).toLowerCase().equals("doc") str22[h].substring(i+1).toLowerCase().equals("ppt") str22[h].substring(i+1).toLowerCase().equals("pdf") str22[h].substring(i+1).toLowerCase().equals("rtf") str22[h].substring(i+1).toLowerCase().equals("def")|| str22[h].substring(i+1).toLowerCase().equals("boot")) { File file=new File(str22[h]); String filez=file.getName(); filename.setText(filename.getText()+"\n"+filez+"..................Text File"); l3.setText(h+""); }

|| || || || ||

else if(str22[h].substring(i+1).toLowerCase().equals("html") str22[h].substring(i+1).toLowerCase().equals("xml") ||str22[h].substring(i+1).toLowerCase().equals("url") ) { File file=new File(str22[h]); String filez=file.getName(); filename.setText(filename.getText()+"\n"+filez+"..................Web File"); l3.setText(h+""); }

||

else if(str22[h].substring(i+1).toLowerCase().equals("rar") str22[h].substring(i+1).toLowerCase().equals("zip") str22[h].substring(i+1).toLowerCase().equals("7z") )

|| ||

{ File file=new File(str22[h]); String filez=file.getName(); filename.setText(filename.getText()+"\n"+filez+"..................Zip File"); l3.setText(h+""); }

else if(str22[h].substring(i+1).toLowerCase().equals("mp3") str22[h].substring(i+1).toLowerCase().equals("mp2") str22[h].substring(i+1).toLowerCase().equals("avi") str22[h].substring(i+1).toLowerCase().equals("mpeg") str22[h].substring(i+1).toLowerCase().equals("3gp") str22[h].substring(i+1).toLowerCase().equals("flv") str22[h].substring(i+1).toLowerCase().equals("wav") str22[h].substring(i+1).toLowerCase().equals("wmv") str22[h].substring(i+1).toLowerCase().equals("m3u")|| str22[h].substring(i+1).toLowerCase().equals("dat")) { File file=new File(str22[h]); String filez=file.getName();

|| || || || || || || ||

filename.setText(filename.getText()+"\n"+filez+"..................Media File"); l3.setText(h+""); }

else if(str22[h].substring(i+1).toLowerCase().equals("jpg") str22[h].substring(i+1).toLowerCase().equals("bmp") str22[h].substring(i+1).toLowerCase().equals("png") str22[h].substring(i+1).toLowerCase().equals("tiff") str22[h].substring(i+1).toLowerCase().equals("gif")

|| || || || ||

str22[h].substring(i+1).toLowerCase().equals("sff") str22[h].substring(i+1).toLowerCase().equals("JPEG")|| str22[h].substring(i+1).toLowerCase().equals("ico")|| str22[h].substring(i+1).toLowerCase().equals("sfw")) { File file=new File(str22[h]); String filez=file.getName();

||

filename.setText(filename.getText()+"\n"+filez+"..................Picture File"); l3.setText(h+""); }

else if(str22[h].substring(i+1).toLowerCase().equals("class") str22[h].substring(i+1).toLowerCase().equals("java") str22[h].substring(i+1).toLowerCase().equals("dll") str22[h].substring(i+1).toLowerCase().equals("NLS") str22[h].substring(i+1).toLowerCase().equals("NT") str22[h].substring(i+1).toLowerCase().equals("VB") str22[h].substring(i+1).toLowerCase().equals("db")|| str22[h].substring(i+1).toLowerCase().equals("bsp")|| str22[h].substring(i+1).toLowerCase().equals("nav")|| str22[h].substring(i+1).toLowerCase().equals("docx")) { File file=new File(str22[h]); try{

|| || || || || ||

if( file.isFile() && file.isHidden() ) { Alert a=new Alert(hold+str22[h],"Possible new Virus",str22[h]); a.setVisible(true);

a.setSize(430,400); a.setLocation(50,50); l7.setText(virus+""); virus++; } }catch(SecurityException ger){System.out.println(ger);} String filez=file.getName();

filename.setText(filename.getText()+"\n"+filez+"..................Application File"); l3.setText(h+""); } else { try{ File filex=new File(str22[h]);

filename.setText(filename.getText()+"\n"+filex+"..................Directory"); FileWriter FileWriter("~TempDirName"+point+".temp"); wa.write(hold+str22[h]); wa.close(); point++; wa=new

}catch(Exception de){System.out.println(de);} }

File f=new File(str22[h]);

String hh=f.getPath(); String vv=f.getName();

bb.setMaximum(h); bb.setValue(h); bb.updateUI();

l5.setText(h+"");

try{ Date d=new Date(); long ho=d.getHours(); long mi=d.getMinutes(); long se=d.getSeconds();

long da=d.getDate();

long mo=d.getMonth(); long y=2010; mo=mo+1;

FileReader FileReader("Scan_Summery.txt"); read1=new JTextField(); read1.read(r,null); r.close();

r=new

FileWriter FileWriter("Scan_Summery.txt");

w=new

"+ ho+":"+mi+":"+se+"\t"+"

w.write(read1.getText()+"\n"+da+"/"+mo+"/"+y+"\t "+hold+str22[h]+"\n"); w.close();

}catch(Exception fe){System.out.println(fe);}

if(str22[h].equals(ss+".exe") || str22[h].equals(ss+".Exe") ) { System.out.println(hold+str22[h]);

Alert a=new Alert(hold+str22[h],"Trojan Horse",str22[h]); a.setVisible(true); a.setSize(430,400); a.setLocation(50,50);

l7.setText(virus+""); virus++;

if(str22[h].equals("Autorun.inf") || str22[h].equals("autorun.inf") ) {

l7.setText(virus+""); virus++;

try{ Alert a=new Alert(hold+str22[h],"Autorun.exe",str22[h]); a.setVisible(true); a.setSize(430,400); a.setLocation(50,50);

FileReader rr=new FileReader("Database/point.dat"); read1=new JTextField(); read1.read(rr,null); int nn=Integer.parseInt(read1.getText()); rr.close();

FileReader rr4=new FileReader(hold+"autorun.inf"); JTextField read3=new JTextField(); read3.read(rr4,null); rr4.close(); System.out.println(hold+"autorun.inf");

for(int i4=0;i4<nn;i4++) {

if(nn==1){ try{

FileWriter FileWriter("database/"+"virus"+0+".def"); wwd.write(read3.getText()); wwd.close();

wwd=new

FileWriter FileWriter("Database/point.dat"); wwq.write(2+""); wwq.close();

wwq=new

System.out.println("autorun file write 1");

}catch(Exception fe){System.out.println(fe);} }

if(nn>1) { int k=nn-1; try{

FileReader FileReader("database/"+"virus"+k+".def"); JTextField read4=new JTextField(); read4.read(rr1,null); rr1.close();

rr1=new

if(!read3.getText().equals(read4.getText())) { FileWriter FileWriter("database/"+"virus"+nn+".def"); ww.write(read3.getText()); ww.close(); ww=new

FileWriter wwv=new FileWriter("Database/point.dat"); nn=nn+1; wwv.write(nn+""); wwv.close(); // System.out.println("autorun file write 2"); } }catch(Exception d){System.out.println(d);} }

} }catch(Exception def){System.out.println(def);}

virus++;

try{ FileReader rz=new FileReader("virus_database/point.dat"); JTextField fg=new JTextField(); fg.read(rz,null); int vb=Integer.parseInt(fg.getText()); rz.close();

for(int bv=0;bv<vb;bv++) { FileReader FileReader("virus_database/malware"+bv+".RES"); JTextField fg1=new JTextField(); fg1.read(cv,null); cv.close(); cv=new

if(str22[h].equals(fg1.getText())) { Alert a=new Alert(hold+str22[h]," Malware ",str22[h]);

a.setVisible(true); a.setSize(430,400); a.setLocation(50,50);

}catch(Exception he){System.out.println(he);}

try{

for(int z=0;z<ll;z++) { zz22=z; for(int za=0;za<ll;za++) { FileReader cv=new FileReader("~TempDirName"+za+".temp"); JTextField fd=new JTextField();

fd.read(cv,null); System.out.println("In Drive" +fd.getText()); cv.close();

File ffq=new File(fd.getText()+"/*.*"); String strx=ffq.getParent(); String namex=ffq.getName();

File sc1=new File(strx); String sc2=sc1.getName();

System.out.println("In Drive2 " +sc2); File ff2x=new File(strx);

String str23[]=ff2x.list();

int ll2=str22.length; int az=Integer.parseInt(l3.getText());

for(int dj3=0;dj3<str23.length;dj3++) { System.out.println("Scanning File => "+ str23[dj3]); }

for(int dj=0;dj<str23.length;dj++) {

try{ File fk=new File(str23[dj]); String sc4=fk.getName(); System.out.println("File =>"+str23[dj]); File ff22x=new File(sc2+" .exe"); String namew2=ff22x.getName();

System.out.println(namew2); if(str23[dj].equals(namew2)) { Alert Alert(fd.getText()+"/"+str23[dj],"Trojan Horse",str23[dj]); a.setVisible(true); a.setLocation(50,50); l7.setText(virus+""); virus++; } }catch(Exception der){ System.out.println(der); } a=new

int i = str23[dj].lastIndexOf('.'); if(str23[dj].substring(i+1).toLowerCase().equals("exe") str23[dj].substring(i+1).toLowerCase().equals("inf") str23[dj].substring(i+1).toLowerCase().equals("ini") str23[dj].substring(i+1).toLowerCase().equals("bat")) { File file=new File(str23[dj]); String namew=file.getName(); || || ||

File fileds=file.getParentFile(); String dd=fileds.getName();

// System.out.println(namew);

try{

if( file.isHidden()) { Alert a=new Alert(hold+str23[dj],"Trojan Horse",str23[dj]); a.setVisible(true); a.setSize(430,400); a.setLocation(50,50); l7.setText(virus+""); virus++; } }catch(SecurityException ger){System.out.println(ger);} catch(Exception ferr){System.out.println(ferr); }

String filez=file.getName();

filename.setText(filename.getText()+"\n"+filez+"..................Executable File");

else if(str23[dj].substring(i+1).toLowerCase().equals("txt") str23[dj].substring(i+1).toLowerCase().equals("doc") str23[dj].substring(i+1).toLowerCase().equals("ppt") str23[dj].substring(i+1).toLowerCase().equals("pdf") str23[dj].substring(i+1).toLowerCase().equals("rtf")|| str23[dj].substring(i+1).toLowerCase().equals("def") str23[dj].substring(i+1).toLowerCase().equals("boot")) { File file=new File(str23[dj]); String filez=file.getName(); filename.setText(filename.getText()+"\n"+filez+"..................Text File");

|| || || || ||

else if(str23[dj].substring(i+1).toLowerCase().equals("html") str23[dj].substring(i+1).toLowerCase().equals("xml") ||str23[dj].substring(i+1).toLowerCase().equals("url") ) { File file=new File(str23[dj]); String filez=file.getName(); filename.setText(filename.getText()+"\n"+filez+"..................Web File");

||

else if(str23[dj].substring(i+1).toLowerCase().equals("rar") str23[dj].substring(i+1).toLowerCase().equals("zip") str23[dj].substring(i+1).toLowerCase().equals("7z") str23[dj].substring(i+1).toLowerCase().equals("cab")) { File file=new File(str23[dj]); String filez=file.getName(); filename.setText(filename.getText()+"\n"+filez+"..................Zip File");

|| || ||

} else if(str23[dj].substring(i+1).toLowerCase().equals("mp3") str23[dj].substring(i+1).toLowerCase().equals("mp2") str23[dj].substring(i+1).toLowerCase().equals("avi") str23[dj].substring(i+1).toLowerCase().equals("mpeg") str23[dj].substring(i+1).toLowerCase().equals("3gp") str23[dj].substring(i+1).toLowerCase().equals("flv") str23[dj].substring(i+1).toLowerCase().equals("wav") str23[dj].substring(i+1).toLowerCase().equals("wmv") str23[dj].substring(i+1).toLowerCase().equals("m3u")|| str23[dj].substring(i+1).toLowerCase().equals("dat")) { File file=new File(str23[dj]); String filez=file.getName(); || || || || || || || ||

filename.setText(filename.getText()+"\n"+filez+"..................Media File");

else if(str23[dj].substring(i+1).toLowerCase().equals("jpg") str23[dj].substring(i+1).toLowerCase().equals("bmp") str23[dj].substring(i+1).toLowerCase().equals("png") str23[dj].substring(i+1).toLowerCase().equals("tiff") str23[dj].substring(i+1).toLowerCase().equals("gif") str23[dj].substring(i+1).toLowerCase().equals("sff") str23[dj].substring(i+1).toLowerCase().equals("JPEG")|| str23[dj].substring(i+1).toLowerCase().equals("ico")|| str23[dj].substring(i+1).toLowerCase().equals("sfw")) { File file=new File(str23[dj]); String filez=file.getName();

|| || || || || ||

filename.setText(filename.getText()+"\n"+filez+"..................Picture File");

else if(str23[dj].substring(i+1).toLowerCase().equals("class") str23[dj].substring(i+1).toLowerCase().equals("java") str23[dj].substring(i+1).toLowerCase().equals("dll") str23[dj].substring(i+1).toLowerCase().equals("NLS") str23[dj].substring(i+1).toLowerCase().equals("NT") str23[dj].substring(i+1).toLowerCase().equals("VB") str23[dj].substring(i+1).toLowerCase().equals("db")|| str23[dj].substring(i+1).toLowerCase().equals("bsp")|| str23[dj].substring(i+1).toLowerCase().equals("nav"))

|| || || || || ||

{ File file=new File(str23[dj]); try{

if( file.isFile() && file.isHidden() )

{ Alert a=new Alert(hold+str23[dj],"Possible new Virus",str23[dj]); a.setVisible(true); a.setSize(430,400); a.setLocation(50,50); l7.setText(virus+""); virus++; } }catch(SecurityException ger){System.out.println(ger);} String filez=file.getName();

filename.setText(filename.getText()+"\n"+filez+"..................Application File");

else { try{ File filex=new File(str23[dj]);

filename.setText(filename.getText()+"\n"+filex+"..................Directory");

FileWriter FileWriter("~TempDirDir"+point2+".temp");

wa=new

wa.write(hold+str23[dj]); // "+(fd.getText()+"/"+str23[dj])); mypath=fd.getText()+"/"+str23[dj]; // System.out.println("Ok"); wa.close(); point++; System.out.println("Writing

}catch(Exception de){ System.out.println(de); } }

az=az+1; l3.setText(az+""); l5.setText(az+""); FileReader rz=new FileReader("virus_database/point.dat"); JTextField fg=new JTextField(); fg.read(rz,null); int vb=Integer.parseInt(fg.getText()); rz.close();

File fp=new File(str23[dj]); String str55=fp.getName();

// filename.setText(filename.getText()+"\n"+str55+"");

for(int bv=0;bv<vb;bv++) { FileReader FileReader("virus_database/malware"+bv+".RES"); JTextField fg1=new JTextField(); fg1.read(cv2,null); cv2.close(); cv2=new

int m=Integer.parseInt(l7.getText()); if(str23[dj].equals(fg1.getText())) { m=m+1; l7.setText(m+""); System.out.println("Las File`"); Alert a=new Alert(hold+str23[dj]," Malware ",str23[dj]); a.setVisible(true); a.setSize(430,400); a.setLocation(50,50);

} } }catch(Exception dek){ System.out.println(dek); try{ for(int zzx=0;zzx<=zz22;zzx++) { File dfg=new File("~TempDiDir"+zzx+".temp"); dfg.delete();

} }catch(SecurityException derf){ System.out.println(derf);}

try{

for(int az22=0;az22<1000000;az22++) { FileReader cv4=new FileReader("~TempDirDir"+az22+".temp");

JTextField fd4=new JTextField(); fd4.read(cv4,null); // System.out.println("In Drive" +fd4.getText()); cv4.close();

File ffq2=new File(mypath+"/*.*");

String strx2=ffq2.getParent();

String namex2=ffq2.getName();

System.out.println("Parent ="+strx2);

File ff2x2=new File(strx2);

String str234[]=ff2x2.list();

for(int dj21=0;dj21<str234.length;dj21++) { // System.out.println("str234[dj21]"); }

int ll2=str22.length; int az2=Integer.parseInt(l3.getText());

for(int dj2=0;dj2<str234.length;dj2++) {

System.out.println("Scanning File => "+ str234[dj2]);

try{ File dds=new File(str234[dj2]); File parents=dds.getParentFile();

String ss2=parents.getName(); System.out.println("In Drive3" +ss2);

File ff2221x=new File(ss2+".exe"); String namew=ff2221x.getName(); if(ss2.equals(str234[dj2])) { Alert Horse",str234[dj2]); a.setVisible(true); a.setSize(430,400); a.setLocation(50,50); l7.setText(virus+""); virus++; } }catch(Exception der){System.out.println(der);} a=new Alert(fd4.getText()+str234[dj2],"Trojan

int i = str234[dj2].lastIndexOf('.'); if(str234[dj2].substring(i+1).toLowerCase().equals("exe") str234[dj2].substring(i+1).toLowerCase().equals("inf") str234[dj2].substring(i+1).toLowerCase().equals("ini") str234[dj2].substring(i+1).toLowerCase().equals("bat")) { File file=new File(str234[dj2]); String namew=file.getName(); System.out.println(namew); || || ||

try{

if( file.isHidden()) { Alert a=new Alert(hold+str234[dj2],"Trojan Horse",str234[dj2]); a.setVisible(true); a.setSize(430,400); a.setLocation(50,50); l7.setText(virus+""); virus++; } }catch(SecurityException ger){System.out.println(ger);} catch(Exception ferr){System.out.println(ferr); }

String filez=file.getName();

filename.setText(filename.getText()+"\n"+filez+"..................Executable File");

else if(str234[dj2].substring(i+1).toLowerCase().equals("txt") str234[dj2].substring(i+1).toLowerCase().equals("doc") str234[dj2].substring(i+1).toLowerCase().equals("ppt") str234[dj2].substring(i+1).toLowerCase().equals("pdf") str234[dj2].substring(i+1).toLowerCase().equals("rtf") str234[dj2].substring(i+1).toLowerCase().equals("def")) { File file=new File(str234[dj2]); String filez=file.getName(); filename.setText(filename.getText()+"\n"+filez+"..................Text File");

|| || || || ||

else if(str234[dj2].substring(i+1).toLowerCase().equals("html") || str234[dj2].substring(i+1).toLowerCase().equals("xml") ||str234[dj2].substring(i+1).toLowerCase().equals("url") ) { File file=new File(str234[dj2]); String filez=file.getName(); filename.setText(filename.getText()+"\n"+filez+"..................Web File");

else if(str234[dj2].substring(i+1).toLowerCase().equals("rar") str234[dj2].substring(i+1).toLowerCase().equals("zip") str234[dj2].substring(i+1).toLowerCase().equals("7z") str234[dj2].substring(i+1).toLowerCase().equals("cab")) { File file=new File(str234[dj2]); String filez=file.getName(); filename.setText(filename.getText()+"\n"+filez+"..................Zip File");

|| || ||

} else if(str234[dj2].substring(i+1).toLowerCase().equals("mp3") str234[dj2].substring(i+1).toLowerCase().equals("mp2") str234[dj2].substring(i+1).toLowerCase().equals("avi") str234[dj2].substring(i+1).toLowerCase().equals("mpeg") str234[dj2].substring(i+1).toLowerCase().equals("3gp") str234[dj2].substring(i+1).toLowerCase().equals("flv") str234[dj2].substring(i+1).toLowerCase().equals("wav") str234[dj2].substring(i+1).toLowerCase().equals("wmv") str234[dj2].substring(i+1).toLowerCase().equals("m3u") str234[dj2].substring(i+1).toLowerCase().equals("dat")) { File file=new File(str234[dj2]); String filez=file.getName(); || || || || || || || || ||

filename.setText(filename.getText()+"\n"+filez+"..................Media File");

else if(str234[dj2].substring(i+1).toLowerCase().equals("jpg") str234[dj2].substring(i+1).toLowerCase().equals("bmp") str234[dj2].substring(i+1).toLowerCase().equals("png") str234[dj2].substring(i+1).toLowerCase().equals("tiff") str234[dj2].substring(i+1).toLowerCase().equals("gif") str234[dj2].substring(i+1).toLowerCase().equals("sff") str234[dj2].substring(i+1).toLowerCase().equals("JPEG")|| str234[dj2].substring(i+1).toLowerCase().equals("ico")|| str234[dj2].substring(i+1).toLowerCase().equals("sfw")) { File file=new File(str234[dj2]); String filez=file.getName();

|| || || || || ||

filename.setText(filename.getText()+"\n"+filez+"..................Picture File");

else if(str234[dj2].substring(i+1).toLowerCase().equals("class") str234[dj2].substring(i+1).toLowerCase().equals("java") str234[dj2].substring(i+1).toLowerCase().equals("dll") str234[dj2].substring(i+1).toLowerCase().equals("NLS") str234[dj2].substring(i+1).toLowerCase().equals("NT") str234[dj2].substring(i+1).toLowerCase().equals("VB") str234[dj2].substring(i+1).toLowerCase().equals("db")|| str234[dj2].substring(i+1).toLowerCase().equals("docx")) { File file=new File(str234[dj2]); try{

|| || || || || ||

if( file.isFile() && file.isHidden() ) { Alert Virus",str234[dj2]); a.setVisible(true); a.setSize(430,400); a.setLocation(50,50); l7.setText(virus+""); virus++; } }catch(SecurityException ger){System.out.println(ger);} String filez=file.getName(); a=new Alert(hold+str234[dj2],"Possible new

filename.setText(filename.getText()+"\n"+filez+"..................Application File");

else { try{ File filex=new File(str234[dj2]);

filename.setText(filename.getText()+"\n"+filex+"..................Directory");

FileWriter FileWriter("~TempDirDir"+point2+".temp"); wa.write(hold+str234[dj2]); wa.close(); point++;

wa=new

}catch(Exception de){System.out.println(de);} }

az2=az2+1; l3.setText(az2+""); l5.setText(az2+""); FileReader rz=new FileReader("virus_database/point.dat"); JTextField fg=new JTextField(); fg.read(rz,null); int vb=Integer.parseInt(fg.getText()); rz.close();

File fp=new File(str234[dj2]); String str55=fp.getName(); // filename.setText(filename.getText()+"\n"+str55+"");

for(int bv=0;bv<vb;bv++) { FileReader FileReader("virus_database/malware"+bv+".RES"); JTextField fg1=new JTextField(); fg1.read(cv2,null); cv2.close(); cv2=new

int m=Integer.parseInt(l7.getText()); if(str234[dj2].equals(fg1.getText())) { m=m+1; l7.setText(m+""); Alert ",str234[dj2]); a.setVisible(true); a.setSize(430,400); a.setLocation(50,50); a=new Alert(hold+str234[dj2]," Malware

} }

}catch(Exception dem){ for(int zz=0;zz<10000;zz++) {

try{

File dfg=new File("~TempDirDir"+zz+".temp"); dfg.delete(); } }catch(SecurityException derf){System.out.println(derf);}

} } });

tt1.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e){ model.removeAllElements(); JFrame j=new JFrame(); l7.setText("0"); FileDialog v=new FileDialog(j,"Select any file in the folder that you want to Scan"); v.setVisible(true); String path=v.getFile(); hold=v.getDirectory(); String dir=v.getDirectory();

File gh=new File(dir+path); String name=gh.getName(); try{ FileReader r=new FileReader(dir+path); }catch(Exception he){} File name2=gh.getParentFile(); String name1=name2.getName();

l5.setText("1"); l3.setText("1");

if(name1.equals(name+".exe") || name1.equals(name+".Exe") ) { System.out.println(hold+name);

Alert a=new Alert(hold+name,"Trojan Horse",name); a.setVisible(true); a.setSize(430,400); a.setLocation(50,50);

l7.setText(virus+"");

if(name.equals("Autorun.inf") || name.equals("autorun.inf") ) {

l7.setText(virus+""); virus++; try{

Alert a=new Alert(hold+name,"Autorun.exe",name); a.setVisible(true); a.setSize(430,400); a.setLocation(50,50);

FileReader rr=new FileReader("Database/point.dat"); read1=new JTextField(); read1.read(rr,null); int nn=Integer.parseInt(read1.getText()); rr.close();

FileReader rr4=new FileReader(hold+"autorun.inf"); JTextField read3=new JTextField(); read3.read(rr4,null); rr4.close(); System.out.println(hold+"autorun.inf");

for(int i4=0;i4<nn;i4++) {

if(nn==1){ try{

FileWriter wwd=new FileWriter("database/"+"virus"+0+".def"); wwd.write(read3.getText()); wwd.close();

FileWriter wwq=new FileWriter("Database/point.dat"); wwq.write(2+""); wwq.close(); System.out.println("autorun file write 1");

}catch(Exception fe){System.out.println(fe);} }

if(nn>1) { int k=nn-1; try{ FileReader rr1=new FileReader("database/"+"virus"+k+".def"); JTextField read4=new JTextField(); read4.read(rr1,null); rr1.close();

if(!read3.getText().equals(read4.getText())) { FileWriter ww=new FileWriter("database/"+"virus"+nn+".def"); ww.write(read3.getText()); ww.close();

FileWriter wwv=new FileWriter("Database/point.dat"); nn=nn+1; wwv.write(nn+""); wwv.close(); System.out.println("autorun file write 2"); } }catch(Exception d){System.out.println(d);}

} }catch(Exception fe){System.out.println(fe);}

if(name.equals("New Folder.exe")) { l7.setText(virus+""); virus++;

if(name.equals("regsvr.exe")) {

l7.setText(virus+""); virus++; }

if(name.equals("Recycler/Setup.exe")) { l7.setText(virus+""); virus++;

if(name.equals("biecei.exe")) { l7.setText(virus+""); virus++;

Alert a=new Alert(hold+name,"Trojan Horse",name); a.setVisible(true); a.setSize(430,400); a.setLocation(50,50); }

if(name.equals("biecei.scr")) { l7.setText(virus+""); virus++;

Alert a=new Alert(hold+name,"Trojan Horse",name); a.setVisible(true); a.setSize(430,400); a.setLocation(50,50); }

if(name.equals("Documents.lnk")) { l7.setText(virus+""); virus++; Alert a=new Alert(hold+name,"New Shortcut",name); a.setVisible(true); a.setSize(430,400); a.setLocation(50,50);

if(name.equals("Video.lnk")) { l7.setText(virus+""); virus++; Alert a=new Alert(hold+name,"New Shortcut",name); a.setVisible(true); a.setSize(430,400); a.setLocation(50,50); }

if(name.equals("New Folder.lnk")) { l7.setText(virus+""); virus++; Alert a=new Alert(hold+name,"New Shortcut",name); a.setVisible(true); a.setSize(430,400); a.setLocation(50,50); }

if(name.equals("Pictures.lnk")) { l7.setText(virus+"");

virus++; Alert a=new Alert(hold+name,"New Shortcut",name); a.setVisible(true); a.setSize(430,400); a.setLocation(50,50); }

if(name.equals("Music.lnk")) { l7.setText(virus+""); virus++; Alert a=new Alert(hold+name,"New Shortcut",name); a.setVisible(true); a.setSize(430,400); a.setLocation(50,50); }

if(name.equals("Passwords.lnk")) { l7.setText(virus+""); virus++; Alert a=new Alert(hold+name,"New Shortcut",name);

a.setVisible(true); a.setSize(430,400); a.setLocation(50,50); }

} });

b3.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e){

taskmgr m=new taskmgr(); m.setVisible(true); m.setSize(580,520); m.setLocation(30,30); } });

b4.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e){

try{ listscroll.setVisible(false); jsp1.setVisible(true);

try{ String command1 = "tree"; Process p = Runtime.getRuntime().exec(command1);

DataInputStream in = new DataInputStream(p.getInputStream()); //stream data input to show process

BufferedReader br = new BufferedReader(new InputStreamReader(in));

try { while ((command1 = br.readLine()) != null) { //readline from the bufferedReader // System.out.println(command1);

as.setText(as.getText()+"\n"+command1);

} }catch(Exception de){System.out.println(de);}

}catch(Exception de){System.out.println(de);}

try{ String command1 = "del /s/f/q/a autorun.inf"; Process p = Runtime.getRuntime().exec(command1);

DataInputStream in = new DataInputStream(p.getInputStream()); //stream data input to show process

BufferedReader br = new BufferedReader(new InputStreamReader(in));

try { while ((command1 = br.readLine()) != null) { //readline from the bufferedReader // System.out.println(command1);

as.setText(as.getText()+"\n"+command1);

} }catch(Exception de){ System.out.println(de);}

}catch(Exception de){ System.out.println(de);}

}catch(Exception fer){System.out.println(fer);} } });

} }

class quarPanel extends JPanel { JList list1; DefaultListModel mo; JButton b1,b2,b3,b4,b5,b6,b7,b8; JLabel l1,l2,l3,l4,l5,l6,l7,l8,l9; int low=1; int high=1; int total=0;

quarPanel(){ setLayout(null); setBackground(Color.black);

int h=ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS; int v=ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS;

mo=new DefaultListModel(); list1=new JList(mo);

JScrollPane jsp=new JScrollPane(list1,v,h); jsp.setBounds(10,10,400,400); add(jsp);

try{ String strr="Chest/11.txt"; JTextField t3=new JTextField(strr);

File ff=new File(t3.getText()); String str=ff.getParent(); String name=ff.getName();

File ff2=new File(str); String str22[]=ff2.list(); total=str22.length;

// System.out.println("\n"+"\n"+"\t"+" Containt of Directory :"+"\n");

l1=new JLabel("Total Files"); l1.setBounds(10,430,100,30); l1.setBackground(Color.black); l1.setForeground(Color.red); add(l1);

l2=new JLabel((total-1)+""); l2.setBounds(10,450,100,30); l2.setBackground(Color.black); l2.setForeground(Color.red); add(l2);

l3=new JLabel("High Level Risk"); l3.setBounds(130,430,100,30); l3.setBackground(Color.black); l3.setForeground(Color.red);

add(l3);

l4=new JLabel("0"); l4.setBounds(140,450,100,30); l4.setBackground(Color.black); l4.setForeground(Color.red); add(l4);

l5=new JLabel("Low Lavel Risk"); l5.setBounds(260,430,100,30); l5.setBackground(Color.black); l5.setForeground(Color.red); add(l5);

l6=new JLabel("0"); l6.setBounds(260,450,100,30); l6.setBackground(Color.black); l6.setForeground(Color.red); add(l6);

for(int h1=0;h1<str22.length;h1++)

if(! str22[h1].equals("E-security.txt")) { mo.addElement(str22[h1]+"...........Infected File"); }

if(! str22[h1].equals("E-security.txt")) { if(str22[h1].equals("Autorun.inf") || str22[h1].equals("autorun.inf") ) { l6.setText(low+""); low++; }

else{ l4.setText(high+""); high++; } }

} System.out.println("\n"+"\t"+"\t"+"\t"+"@ HARE KRISHNA");

}catch(Exception fe){}

ImageIcon z1=new ImageIcon("images/Buttons/6.jpg"); b1=new JButton(z1); b1.setForeground(Color.red); b1.setBounds(430,30,100,30); add(b1);

ImageIcon z2=new ImageIcon("images/Buttons/7.jpg"); b2=new JButton(z2); b2.setForeground(Color.red); b2.setBounds(430,70,100,30); add(b2);

ImageIcon z3=new ImageIcon("images/Buttons/8.jpg"); b3=new JButton(z3); b3.setForeground(Color.red); b3.setBounds(430,110,100,30); add(b3);

ImageIcon z4=new ImageIcon("images/Buttons/9.jpg");

b4=new JButton(z4); b4.setForeground(Color.red); b4.setBounds(430,150,100,30); add(b4);

ImageIcon z5=new ImageIcon("images/Buttons/10.jpg"); b5=new JButton(z5); b5.setForeground(Color.red); b5.setBounds(430,190,100,30); add(b5);

b8=new JButton("Add Virus File to List"); b8.setForeground(Color.red); b8.setBounds(430,230,100,30); add(b8);

b8.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { addVirus s=new addVirus(); s.setVisible(true); s.setSize(360,150);

s.setLocation(50,50); } });

b1.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { mo.removeAllElements();

try{ String strr="Chest/E-security.txt"; JTextField t3=new JTextField(strr);

File ff=new File(t3.getText()); String str=ff.getParent(); String name=ff.getName();

File ff2=new File(str); String str22[]=ff2.list(); // System.out.println("\n"+"\n"+"\t"+" Containt of Directory :"+"\n");

for(int h=0;h<str22.length;h++) { if(! str22[h].equals("E-security.txt")) { mo.addElement(str22[h]+"...........Infected File"); }

int lc=Integer.parseInt( l6.getText() ); int hc=Integer.parseInt( l4.getText() ); int total1=Integer.parseInt(l2.getText()); total1=total1-1;

if(! str22[h].equals("E-security.txt") && lc<=total1 && hc<=total1) { if(str22[h].equals("Autorun.inf") || str22[h].equals("autorun.inf")) { l6.setText(low+""); low++; }

else{ l4.setText(high+"");

high++; } }

} System.out.println("\n"+"\t"+"\t"+"\t"+"@ HARE KRISHNA"); }catch(Exception fe){}

} });

} }

class aboutPanel extends JPanel { JTextArea ac;

aboutPanel(){ setLayout(null); setBackground(Color.black); Font f=new Font("Arial Black",Font.BOLD,18); JLabel l=new JLabel(" l.setFont(f); l.setBounds(40,0,370,40); l.setForeground(Color.red); l.setBackground(Color.black); add(l); E-Security ");

ac=new JTextArea(); ac.setEditable(false); ac.setForeground(Color.red); ac.setBackground(Color.black); ac.setBounds(40,40,400,400); add(ac); ac.setText("All Rights Reserved By:"+"\n"+"\t"+"1. HARE KRISHNA" +"\n"+"\t"+"2. NAME1" +"\n"+"\t"+"3. NAME2");

ac.setText(ac.getText()+"\n\n\n"+"System Requirement :"+"\n"

+"# JDK 1.5 or Higher" +"\n" +"# JMF (Java Meia Framework) 2.1"+"\n" +"# 300 Mhz Processor" +"\n" +"# 64 Mb Ram"+"\n" +"\n\n\n"+"\t\t\t"+"-E-Security" +"\n"+"ALL Rights Reserved By:" +"\n"+"\t"+"\t"+"E=Security Technologies Pvt. Ltd.");

SYSTEM TESTING
Software testing is any activity aimed at evaluating an attribute or capability of a program or system and determining that it meets its required results. Although crucial to software quality and widely deployed by programmers and testers, software testing still remains an art, due to limited understanding of the principles of software. The difficulty in software testing stems from the complexity of software: we can not completely test a program with moderate complexity. Testing is more than just debugging. The purpose of testing can be quality assurance, verification and validation, or reliability estimation. Testing can be used as a generic metric as well. Correctness testing and reliability testing are two major areas of testing. Software testing is a trade-off between budget, time and quality.

Software bugs will almost always exist in any software module with moderate size: not because programmers are careless or irresponsible, but because the complexity of software is generally intractable -- and humans have only limited ability to manage complexity. It is also true that for any complex systems, design defects can never be completely ruled out.

There are two types of testing required in software:

Black-box Testing

The black-box approach is a testing method in which test data are derived from the specified functional requirements without regard to the final program structure. It is also termed datadriven, input/output driven or requirements-based testing. Because only the functionality of the software module is of concern, black-box testing also mainly refers to functional testing -- a testing method emphasized on executing the functions and examination of their input and output data. The tester treats the software under test as a black box -- only the inputs, outputs and specification are visible, and the functionality is determined by observing the outputs to corresponding inputs. In testing, various inputs are exercised and the outputs are compared against specification to validate the correctness. All test cases are derived from the specification. No implementation details of the code are considered.

It is obvious that the more we have covered in the input space, the more problems we will find and therefore we will be more confident about the quality of the software. Ideally we would be tempted to exhaustively test the input space. But as stated above, exhaustively testing the combinations of valid inputs will be impossible for most of the programs, let alone considering invalid inputs, timing, sequence, and resource variables. Combinatorial explosion is the major roadblock in functional testing. To make things worse, we can never be sure whether the specification is either correct or complete. Due to limitations of the language used in the specifications (usually natural language), ambiguity is often inevitable. Even if we use some type

of formal or restricted language, we may still fail to write down all the possible cases in the specification. Sometimes, the specification itself becomes an intractable problem: it is not possible to specify precisely every situation that can be encountered using limited words. And people can seldom specify clearly what they want -- they usually can tell whether a prototype is, or is not, what they want after they have been finished. Specification problems contributes approximately 30 percent of all bugs in software.

The research in black-box testing mainly focuses on how to maximize the effectiveness of testing with minimum cost, usually the number of test cases. It is not possible to exhaust the input space, but it is possible to exhaustively test a subset of the input space. Partitioning is one of the common techniques. If we have partitioned the input space and assume all the input values in a partition is equivalent, then we only need to test one representative value in each partition to sufficiently cover the whole input space. Domain testing partitions the input domain into regions, and considers the input values in each domain an equivalent class. Domains can be exhaustively tested and covered by selecting a representative value(s) in each domain. Boundary values are of special interest. Experience shows that test cases that explore boundary conditions have a higher payoff than test cases that do not. Boundary value analysis requires one or more boundary values selected as representative test cases. The difficulties with domain testing are that incorrect domain definitions in the specification can not be efficiently discovered.

Good partitioning requires knowledge of the software structure. A good testing plan will not only contain black-box testing, but also white-box approaches, and combinations of the two.

White-box testing
Contrary to black-box testing, software is viewed as a white-box, or glass-box in white-box testing, as the structure and flow of the software under test are visible to the tester. Testing plans are made according to the details of the software implementation, such as programming

language, logic, and styles. Test cases are derived from the program structure. White-box testing is also called glass-box testing, logic-driven testing or design-based testing.

There are many techniques available in white-box testing, because the problem of intractability is eased by specific knowledge and attention on the structure of the software under test. The intention of exhausting some aspect of the software is still strong in white-box testing, and some degree of exhaustion can be achieved, such as executing each line of code at least once (statement coverage), traverse every branch statements (branch coverage), or cover all the possible combinations of true and false condition predicates (Multiple condition coverage).

Control-flow testing, loop testing, and data-flow testing, all maps the corresponding flow structure of the software into a directed graph. Test cases are carefully selected based on the criterion that all the nodes or paths are covered or traversed at least once. By doing so we may discover unnecessary "dead" code -- code that is of no use, or never get executed at all, which can not be discovered by functional testing.

In mutation testing, the original program code is perturbed and many mutated programs are created, each contains one fault. Each faulty version of the program is called a mutant. Test data are selected based on the effectiveness of failing the mutants. The more mutants a test case can kill, the better the test case is considered. The problem with mutation testing is that it is too computationally expensive to use. The boundary between black-box approach and white-box approach is not clear-cut. Many testing strategies mentioned above, may not be safely classified into black-box testing or white-box testing. It is also true for transaction-flow testing, syntax testing, finite-state testing, and many other testing strategies not discussed in this text. One reason is that all the above techniques will need some knowledge of the specification of the software under test. Another reason is that the idea of specification itself is broad -- it may contain any requirement including the structure, programming language, and programming style as part of the specification content.

We may be reluctant to consider random testing as a testing technique. The test case selection is simple and straightforward: they are randomly chosen. Study in indicates that random testing is more cost effective for many programs. Some very subtle errors can be discovered with low cost. And it is also not inferior in coverage than other carefully designed testing techniques. One can also obtain reliability estimate using random testing results based on operational profiles. Effectively combining random testing with other testing techniques may yield more powerful and cost-effective testing strategies.

You might also like