hacker


Ingresar con nombre de usuario, contraseña y duración de la sesión
| Portal Hacker | Editorial | Descargas | Ezine |
Inicio Ayuda Ingresar Registrarse
07 de Octubre de 2008, 09:18:51
Noticias: Caracteres maximos de las firmas
Para ver este enlace Registrate o Inicia Sesion
> leer

+  Foros pOrtal Hacker
|-+  Programacion
| |-+  Programación en general
| | |-+  Batch
| | | |-+  Código Abierto (Moderadores: HolyKnight, PyXOLo)
| | | | |-+  Snapshot by RockoX! 1.1
0 Usuarios y 1 Visitante están viendo este tema. « anterior próximo »
Páginas: [1] Ir Abajo Imprimir
Autor Tema: Snapshot by RockoX! 1.1  (Leído 100 veces)
RockoX
NZ2
**
Desconectado Desconectado

Mensajes: 491


Ay que aprender a reirnos de nosotros mismos.


Ver Perfil
« : 06 de Junio de 2008, 08:28:37 »

Aqui les dejo un batch que hice que sirve para capturar la pantalla del escritorio

Por ahora tiene soporte para guardar la imagen en 4 extensiones, .bmp, .jpg, .gif, y .png.
Y solo sirve para Windows en Español, con idioma ingles aun no lo concreto.

El code en su mayoria usa comandos Nircmd, asi que descarguenselo :

Para ver este enlace Registrate o Inicia Sesion
Y descompriman el ejecutable nircmd.exe en %windir%\system32

Capturas :



En gran parte del code, deje comentarios para entender lo que iva haciendo.

Code :


Código:
@echo off
::Por ahora solo esta disponible el funcionamiento en Español
::Code by RockoX!
TITLE -----------------------------------------Snapshot by RockoX! 1.1----------------------------------------------
color 0a
::Variables que nos permiten el ahorro de codigo en el resto del programa.
set TitleWindowEs=Dibujo
set TitleWindowEn=untitled
set a=nircmd
::Aseguramiento de Lenguaje, para los ititles de Nircmd, ya que en español es Dibujo, y en ingles es untitled
::Con la etiqueta SoLenguaje
:SOLenguaje
cls
echo                 ÿÍÍÍÍÍÍÍÍÍÍÍÍÍ»                 ÿÍÍÍÍÍÍÍÍÍÍÍÍ»           
echo                  º 1.-Espanol º                  º 2.-Ingles º             
echo                 ÿÍÍÍÍÍÍÍÍÍÍÍÍͼ                 ÿÍÍÍÍÍÍÍÍÍÍÍͼ       
echo.           
echo.
echo                    ÿÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ                           
echo                          Idioma del Sistema Operativo                                   
echo                    ÿÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ                     
echo.
set /p Lenguaje=Teclee el numero de las opciones dadas :

::Un IF por si el usuario solo da enter sin introducir nada
if ["%Lenguaje%"]==[""] (
cls
echo.
echo                               No has puesto nada!
pause>nul
goto :SOLenguaje
)
::Un if para ir a la etiqueta que escribe el code para sistemas en Espanol
if %lenguaje%==1 (
goto CodeEs
)
::Un if para ir a la etiqueta que escribe el code en sistemas en Ingles
if %Lenguaje%==2 (
goto CodeEn
)
::Un If por si el usuario escribe un numero mayor a 2
if %Lenguaje% GTR 2 (
goto :SOLenguaje
)
::Un If por si el usuario escribe un numero menor a 1
if %Lenguaje% LSS 1 (
goto :SOLenguaje
)

::Generacion de la imagen y pegado en el mspaint.exe para SO´s en Espanol
::La variable de Lenguaje debe ser "TitleWindowEs"
:CodeEs
cls
%a% mutesysvolume 0
cd %homedrive%\
echo sendkey ctrl down > script.txt
echo sendkey v down >> script.txt
%a% wait 1000
%a% win min alltop
start %a%.exe sendkey 0x2C press
%a% wait 1000
%a% execmd start mspaint.exe
%a% wait 500
%a% win trans ititle "%TitleWindowEs%" 220
%a% wait 300
%a% win activate ititle "%TitleWindowEs%"
%a% wait 1000
%a% script "script.txt"
%a% wait 300
::Escondemos la ventana y la transparentamos a 1º
%a% win hide ititle "%TitleWindowEs%"
%a% wait 1000
%a% win activate ititle "Snapshot by RockoX!"
%a% wait 10
%a% sendkey ctrl press
goto :MakeImage


::Generacion de la imagen y pegado en el mspaint.exe para SO´s en Ingles
::La variable de Lenguaje debe ser "TitleWindowEn"
:CodeEn
cls
echo Estoy en CodeEn
pause>nul
exit
cd \
echo sendkey ctrl down > script.txt
echo sendkey v down >> script.txt
%a% wait 1000
%a% win min alltop
start %a%.exe sendkey 0x2C press
%a% wait 1000
%a% execmd start mspaint.exe
%a% wait 300
%a% win trans ititle "%TitleWindowEn%" 1
%a% win trans ititle "%TitleWindowEn%"
%a% win activate ititle "%TitleWindowsEn%"
%a% wait 1000
%a% script "script.txt"
%a% wait 1000
%a% win hide ititle "%TitleWindowEn%"
%a% wait 3000
%a% win show ititle "%TitleWindowEn%"
%a% win activate ititle "Snapshot by RockoX!"
goto :MakeImage
::Agregar la variable TitleWindowEn a los ititles

:MakeImage
cls
echo.
TITLE Snapshot by RockoX!
::Bug detectado en Nircmd, ya que cuando son usados los Sendekeys el sistema queda atrofiado, hasta que se
::teclee la tecla enter, o alguna combinacion usando la Tecla CTRL.
echo Advertencia : Si usted no puede escribir correctamente, teclee la tecla CTRL y prosiga con las indicaciones.
echo.
set /p name=Teclee el nombre con el que se guardara la imagen :
if ["%name%"]==[""] (
cls
echo                               No has puesto nada!
pause>nul
goto :MakeImage
)
set name2=%name: =_%
echo %name2% > NameImage.txt

:Extension
cls
echo  ÿÍÍÍÍÍÍÍÍÍÍÍ»        ÿÍÍÍÍÍÍÍÍÍÍÍ»        ÿÍÍÍÍÍÍÍÍÍÍÍ»       ÿÍÍÍÍÍÍÍÍÍÍÍ»
echo   º 1.- .BMP º         º 2.- .JPG º         º 3.- .GIF º        º 4.- .PNG º
echo  ÿÍÍÍÍÍÍÍÍÍÍͼ        ÿÍÍÍÍÍÍÍÍÍÍͼ        ÿÍÍÍÍÍÍÍÍÍÍͼ       ÿÍÍÍÍÍÍÍÍÍÍͼ
echo.
set /p opcion=Teclee el numero de las opciones dadas :
if ["%opcion%"]==[""] (
cls
echo                              No has puesto nada!
pause>nul
goto Extension
)
if %opcion%==1 (
goto bmp
)
if %opcion%==2 (
goto jpg
)
if %opcion%==3 (
goto gif
)
if %opcion%==4 (
goto png
)
if %opcion% LSS 1 (
goto :Error
)
if %opcion% GTR 4 (
goto :Error
)

::Etiqueta que marca error si el usuario teclea algo incorrecto.
:Error
cls
echo Revise sus opciones con cuidado!
pause>nul
goto extension


::Etiqueta que guarda la imagen extension .bmp
:bmp
cls
%a% dlg "mspaint.exe" "Guardar como" settext 1148 "%name2%"
%a% wait 100
%a% win trans ititle "Guardar como" 2
%a% win show ititle "%TitleWindowEs%"
%a% wait 100
%a% win trans ititle "Guardar como" 2
%a% wait 100
%a% win activate ititle "%TitleWindowEs%"
%a% win close ititle "%TitleWindowEs%"
%a% wait 90
%a% sendkey enter press
%a% wait 90
::La combinacion de teclas Shift + Tabulador, que luego sera ejecutada dos veces,para pasar a "Documentos Recientes"
echo sendkey shift down > Sendkeys.txt
::Tecla "Tabulador"
echo sendkey 0x09 down >> Sendkeys.txt
::Tecla de direccion "Abajo"
echo sendkey 0x28 press > Sendkey2.txt
::Combinacion de teclas ALT + G, para simular Guardar.
echo sendkey alt down > sendkey3.txt
echo sendkey 0x47 down >> sendkey3.txt
::Linea que esconde la ventana durante el proceso de los Sendkeys
%a% win trans ititle "Guardar como" 2
%a% win activate ititle "Guardar como"
%a% dlg "mspaint.exe" "Guardar como" settext 1148 "%name2%"
%a% wait 100
%a% script "Sendkeys.txt"
%a% script "Sendkeys.txt"
%a% wait 90
%a% script "Sendkey2.txt"
%a% wait 1000
%a% sendkey enter press
%a% wait 1000
%a% script "sendkeys.txt"
%a% script "sendkeys.txt"
%a% script "sendkeys.txt"
%a% script "sendkeys.txt"
%a% sendkey enter press
%a% execmd for %%x in (NameImage.txt, script.txt, Sendkey2.txt, sendkey3.txt, Sendkeys.txt) do (del /f /q %%x)
%a% execmd if exist "~$folder.desktop$\%name2%.bmp (
cls
%a% qboxcom "Desea ver la imagen capturada ? " "Snapshot by RockoX! 1.1" execmd call "%homedrive%%homepath%\Escritorio\%name2%.bmp"
::Hasta aqui termina el code!
%a% wait 30
%a% win hide ititle "%TitleWindowEs%"
%a% win hide ititle "Snapshot by RockoX!"
%a% wait 50
%a% sendkey shift press
%a% sendkey 0x09 press
%a% sendkey 0x28 press
%a% sendkey alt press
%a% wait 100
%a% win show ititle "%TitleWindowEs%"
%a% win show ititle "Snapshot by RockoX!"
goto :SOLenguaje
)


:jpg
::Y empezamos con la extension .jpg
cls
%a% dlg "mspaint.exe" "Guardar como" settext 1148 "%name2%"
%a% wait 100
%a% win trans ititle "Guardar como" 2
%a% win show ititle "%TitleWindowEs%"
%a% wait 100
%a% win trans ititle "Guardar como" 2
%a% wait 100
%a% win activate ititle "%TitleWindowEs%"
%a% win close ititle "%TitleWindowEs%"
%a% wait 90
%a% sendkey enter press
%a% wait 100
%a% win activate ititle "Guardar como"
%a% wait 100
%a% win trans ititle "Guardar como" 2
%a% wait 100
%a% win trans ititle "%TitleWindowEs%" 2
%a% wait 100
%a% dlg "mspaint.exe" "Guardar como" settext 1148 "%name2%"
%a% wait 100
%a% sendkey 0x09 press
%a% wait 100
echo sendkey 0x27 press > up.txt
%a% wait 100
%a% script "up.txt"
%a% script "up.txt"
%a% sendkey enter press
::La combinacion de teclas Shift + Tabulador, que luego sera ejecutada dos veces,para pasar a "Documentos Recientes"
echo sendkey shift down > ShiftTabulador.txt
::Tecla "Tabulador"
echo sendkey 0x09 down >> ShiftTabulador.txt
::Tecla de direccion "Abajo"
echo sendkey 0x28 press > ShiftTabulador2.txt
%a% wait 100
%a% script "ShiftTabulador.txt"
%a% wait 90
%a% script "ShiftTabulador.txt"
%a% wait 90
%a% script "ShiftTabulador.txt"
%a% wait 90
%a% sendkey 0x28 press
%a% wait 90
%a% sendkey enter press
%a% wait 90
%a% script "ShiftTabulador.txt"
%a% script "ShiftTabulador.txt"
%a% script "ShiftTabulador.txt"
%a% script "ShiftTabulador.txt"
%a% wait 90
%a% sendkey enter press
%a% wait 90
%a% execmd for %%x in (NameImage.txt, script.txt, ShiftTabulador.txt, ShiftTabulador2.txt, up.txt) do (del /f /q %%x)
%a% execmd if exist "~$folder.desktop$\%name2%.bmp (
cls
%a% qboxcom "Desea ver la imagen capturada ? " "Snapshot by RockoX! 1.1" execmd call "%homedrive%%homepath%\Escritorio\%name2%.jpg"
::Hasta aqui termina el code!
%a% wait 30
%a% win hide ititle "%TitleWindowEs%"
%a% win hide ititle "Snapshot by RockoX!"
%a% wait 50
%a% sendkey shift press
%a% sendkey 0x09 press
%a% sendkey 0x28 press
%a% sendkey alt press
%a% wait 100
%a% win show ititle "%TitleWindowEs%"
%a% win show ititle "Snapshot by RockoX!"
goto :SOLenguaje
)


:gif
::Code que guarda la imagen en extension .gif
cls
%a% dlg "mspaint.exe" "Guardar como" settext 1148 "%name2%"
%a% wait 100
%a% win trans ititle "Guardar como" 2
%a% win show ititle "%TitleWindowEs%"
%a% wait 100
%a% win trans ititle "Guardar como" 2
%a% wait 100
%a% win activate ititle "%TitleWindowEs%"
%a% win close ititle "%TitleWindowEs%"
%a% wait 90
%a% sendkey enter press
%a% wait 100
%a% win activate ititle "Guardar como"
%a% wait 100
%a% win trans ititle "Guardar como" 2
%a% wait 100
%a% win trans ititle "%TitleWindowEs%" 2
%a% wait 100
%a% dlg "mspaint.exe" "Guardar como" settext 1148 "%name2%"
%a% wait 100
echo sendkey shift down > Sendkeys.txt
::Tecla "Tabulador"
echo sendkey 0x09 down >> Sendkeys.txt
::Tecla de direccion "Abajo"
echo sendkey 0x28 press > Sendkey2.txt
::Combinacion de teclas ALT + G, para simular Guardar.
echo sendkey alt down > sendkey3.txt
echo sendkey 0x47 down >> sendkey3.txt
%a% wait 100
%a% script "Sendkeys.txt"
%a% script "Sendkeys.txt"
%a% wait 90
%a% script "Sendkey2.txt"
%a% wait 100
%a% sendkey enter press
%a% wait 100
%a% sendkey 0x09 press
%a% wait 50
%a% sendkey 0x09 press
%a% wait 90
%a% wait 100
%a% sendkey 0x09 press
%a% wait 50
%a% sendkey 0x09 press
%a% wait 50
%a% sendkey 0x09 press
%a% wait 90
%a% sendkey 0x28 press
%a% sendkey 0x28 press
%a% sendkey 0x28 press
%a% wait 90
%a% sendkey enter press
%a% wait 90
%a% sendkey enter press
%a% wait 90
%a% sendkey enter press
%a% execmd for %%x in (script.txt,NameImage.txt, Sendkey2.txt, sendkey3.txt, Sendkeys.txt) do (del /f /q %%x)
%a% execmd if exist "~$folder.desktop$\%name2%.gif (
cls
%a% qboxcom "Desea ver la imagen capturada ? " "Snapshot by RockoX! 1.1" execmd call "%homedrive%%homepath%\Escritorio\%name2%.gif"
::Hasta aqui termina el code!
%a% wait 50
%a% wait 30
%a% win hide ititle "%TitleWindowEs%"
%a% win hide ititle "Snapshot by RockoX!"
%a% wait 50
%a% sendkey shift press
%a% sendkey 0x09 press
%a% sendkey 0x28 press
%a% sendkey alt press
%a% wait 100
%a% win show ititle "%TitleWindowEs%"
%a% win show ititle "Snapshot by RockoX!"
goto :SOLenguaje

:png
::Code que guarda la imagen en extension .png
cls
%a% dlg "mspaint.exe" "Guardar como" settext 1148 "%name2%"
%a% wait 100
%a% win trans ititle "Guardar como" 2
%a% win show ititle "%TitleWindowEs%"
%a% wait 100
%a% win trans ititle "Guardar como" 2
%a% wait 100
%a% win activate ititle "%TitleWindowEs%"
%a% win close ititle "%TitleWindowEs%"
%a% wait 90
%a% sendkey enter press
%a% wait 100
%a% win activate ititle "Guardar como"
%a% wait 100
%a% win trans ititle "Guardar como" 2
%a% wait 100
%a% win trans ititle "%TitleWindowEs%" 2
%a% wait 100
%a% dlg "mspaint.exe" "Guardar como" settext 1148 "%name2%"
%a% wait 100
echo sendkey shift down > Sendkeys.txt
::Tecla "Tabulador"
echo sendkey 0x09 down >> Sendkeys.txt
::Tecla de direccion "Abajo"
echo sendkey 0x28 press > Sendkey2.txt
::Combinacion de teclas ALT + G, para simular Guardar.
echo sendkey alt down > sendkey3.txt
echo sendkey 0x47 down >> sendkey3.txt
%a% wait 100
%a% script "Sendkeys.txt"
%a% script "Sendkeys.txt"
%a% wait 90
%a% script "Sendkey2.txt"
%a% wait 100
%a% sendkey enter press
%a% wait 100
%a% sendkey 0x09 press
%a% wait 50
%a% sendkey 0x09 press
%a% wait 90
%a% wait 100
%a% sendkey 0x09 press
%a% wait 50
%a% sendkey 0x09 press
%a% wait 50
%a% sendkey 0x09 press
%a% wait 90
%a% sendkey 0x28 press
%a% sendkey 0x28 press
%a% sendkey 0x28 press
%a% sendkey 0x28 press
%a% sendkey 0x28 press
%a% wait 90
%a% sendkey enter press
%a% wait 90
%a% sendkey enter press
%a% execmd for %%x in (script.txt) do (del /f /q %%x)
%a% execmd if exist "~$folder.desktop$\%name2%.png (
cls
%a% qboxcom "Desea ver la imagen capturada ? " "Snapshot by RockoX! 1.1" execmd call "%homedrive%%homepath%\Escritorio\%name2%.png"
::Hasta aqui termina el code!
%a% wait 30
%a% win hide ititle "%TitleWindowEs%"
%a% win hide ititle "Snapshot by RockoX!"
%a% wait 50
%a% sendkey shift press
%a% sendkey 0x09 press
%a% sendkey 0x28 press
%a% sendkey alt press
%a% wait 100
%a% win show ititle "%TitleWindowEs%"
%a% win show ititle "Snapshot by RockoX!"
goto :SOLenguaje

Saludos!
« Última modificación: 10 de Junio de 2008, 03:14:18 por RockoX » En línea

Open Source -
Join us now and share the software
Páginas: [1] Ir Arriba Imprimir 
« anterior próximo »
Ir a:  


Ingresar con nombre de usuario, contraseña y duración de la sesión

Powered by SMF 1.1.6 | SMF © 2006-2008, Simple Machines LLC hacker

Juegos gratis - Articulos PHP - Juegos - Trucos - Letras - Juegos - Juegos Online