Underc0de

Programación Scripting => Otros lenguajes Scripting => Mensaje iniciado por: 79137913 en Abril 18, 2018, 12:39:08 PM

Título: [VBS] ScreenCapture (Req FireFox/Chrome y permisos de admin)(FUD)
Publicado por: 79137913 en Abril 18, 2018, 12:39:08 PM
HOLA!!!

ATENCION: Requiere Firefox / Chrome y ser ejecutado con permisos de admin.

Código (vb) [Seleccionar]
'FUNCIONA SOLO SI LA PC POSEE FIREFOX/CHROME(CON CHROME CAMBIANDO LA LINEA DONDE DICE "FIREFOX.EXE" POR "CHROME.EXE")

Call ScreenShot("c:\web.html","c:\a.html")

Function ScreenShot(WebUrl, Output)
    With CreateObject("Word.Basic")
        .SendKeys "{1068}"
    End With
    Set objFSO = CreateObject("Scripting.FileSystemObject")
    Set objFile = objFSO.CreateTextFile(WebUrl, True)
    objFile.Write "<script>function handlepaste () {myimage = ImageGrab.grabclipboard();}</script><body onload='handlepaste()'></body><div id='div' contenteditable='true' onpaste='handlepaste()'>Paste</div>" & vbCrLf
    objFile.Close
    On Error Resume Next
        CreateObject("Scripting.FileSystemObject").DeleteFile "c:\a.html"
    On Error GoTo 0
    Set wshshell = wscript.CreateObject("WScript.Shell")
    'antes de aca se podria poner una instruccion para que cerrara el proceso del Firefox
        wshshell.run "firefox.exe -Height 1 -Width 1 " & WebUrl 'Abre firefox en tama�o 1x1 
            wscript.sleep 5000
        wshshell.SendKeys ("{TAB}") 'entra a la web
            wscript.sleep 500
        wshshell.SendKeys ("+{INSERT}") 'pega el screenshot
            wscript.sleep 1000
        wshshell.SendKeys ("^s") 'guarda la pagina
            wscript.sleep 500
        wshshell.SendKeys (Output) 'pone el path
            wscript.sleep 1000
        wshshell.SendKeys ("{ENTER}") 'confirma el guardado
    'aca se podria matar a la ventana del firefox abierta para no dejar rastos.
End Function


GRACIAS POR LEER!!!
Título: Re:[VBS] ScreenCapture (Req FireFox/Chrome y permisos de admin)(FUD)
Publicado por: NyxKazuya en Abril 21, 2018, 12:12:53 AM
alguna solución?
https://i.imgur.com/LBdiiHA.png
Título: Re:[VBS] ScreenCapture (Req FireFox/Chrome y permisos de admin)(FUD)
Publicado por: 79137913 en Abril 23, 2018, 08:06:34 AM
HOLA!!!

@NyxKazuya (https://underc0de.org/foro/index.php?action=profile;u=3516) debes ejecutar esto como administrador.

GRACIAS POR LEER!!!