|
Mostrar Temas
|
Páginas: [1] 2
|
1
|
Seguridad Informática / Nivel Web / inyeccion sql?????
|
en: 3 Julio 2009, 21:05 pm
|
tengo un problema al intentar una inyeccion sql tengo los nombres de las tablas pero estoy barado en lo siguiente.
'union select @@version --
y me manda lo siguiente: "All queries in an SQL statement containing a UNION operator must have an equal number of expressions in their target lists", entonces lo que prosigue por supuesto es igualar el numero de expresiones que solicita, y voy agregando uno por uno hasta llegar al indicado:
'union select @@version,1,1,1,1,1,1 --
igual me dice que necesito igual el numero de expresiones pero ya he intentado con demasiados 1 jejejej y la verdad no se que hacer, hubiese algun otro metodo de obtener esa info ok gracias.
ahhh es por fines educativos por supuesto...
|
|
|
2
|
Programación / PHP / problema funcion date???
|
en: 5 Mayo 2009, 02:09 am
|
al tratar de imprimir sobre el navegador la fecha me sale el siguiente error he buscado info al respecto y me sugieren que debo editar el php.ini he introducir el pais en mi caso es bolivia. pero igual no me funciona...
el error es este:
Strict Standards: date() [function.date]: It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Halifax' for '-4.0/no DST' instead in C:\AppServ\www\orden.php on line 12 4th May,21:59
la version del appserv que estoy usando es:
AppServ 2.6.0 -Apache 2.2.8 -PHP 6.0.0-dev -MySQL 6.0.4-alpha -phpMyAdmin-2.10.3
|
|
|
3
|
Programación / Programación Visual Basic / reemplazar procesos??
|
en: 5 Marzo 2009, 05:00 am
|
hola amigos haber si alguno de ustedes me pudiese dar una ayudita estoy con un problemita es que tengo una tarea de programacion la cual me pidieron programar un editor de texto como el notepad y ademas de esto pudiese reemplazarlo ya lo he programado pero lo que no puedo hacer es reemplazarlo ya que hay un proceso el winlogon.exe que no me lo permite cada ves que lo sobreescribo me devuelve el fichero original..
|
|
|
4
|
Programación / Programación Visual Basic / Redimensionar imagen????
|
en: 19 Septiembre 2008, 23:01 pm
|
Hola q tal amigos de este foro, bueno tengo un pequeño problema con el manejo de imagenes en vb, lo que quiero hacer es que mediante un picture box cargar una imagen pero es muy grande asi que quisiera redimensionarla para poder enviarla por correo.
|
|
|
5
|
Programación / Programación Visual Basic / global hooks??????
|
en: 30 Mayo 2008, 18:03 pm
|
pues amigos sigo con el problema que me ha dado dolores de cabeza esto de los hooks aqui un nuevo code que todavia no puedo hacer que funcione. 'form Private Sub Command1_Click() Hook End Sub
Private Sub Form_Unload(Cancel As Integer) NonHook End Sub
'module Option Explicit Declare Function SetWindowsHookEx Lib "user32" Alias "SetWindowsHookExA" _ (ByVal idHook As Long, _ ByVal lpfn As Long, _ ByVal hmod As Long, _ ByVal dwThreadId As Long) As Long Declare Function UnhookWindowsHookEx Lib "user32" _ (ByVal hHook As Long) As Long
Declare Function LoadLibrary Lib "kernel32" Alias "LoadLibraryA" _ (ByVal lpLibFileName As String) As Long
Declare Function GetProcAddress Lib "kernel32" _ (ByVal hModule As Long, ByVal lpProcName As String) As Long Declare Function FreeLibrary Lib "kernel32" (ByVal hLibModule As Long) As Long Public Const WH_CBT = 5 Public Const WH_SHELL As Long = 10 Public hHook As Long
Public Sub Hook() Dim hHookDLL As Long Dim pHookFunction As Long hHookDLL = LoadLibrary("hk.dll") If hHookDLL = 0 Then End End If pHookFunction = GetProcAddress(hHookDLL, "HookFunction") hHook = SetWindowsHookEx(WH_CBT, pHookFunction, hHookDLL, 0) FreeLibrary (hHookDLL) End Sub
Public Sub NonHook() Dim suc As Long If hHook <> 0 Then suc = UnhookWindowsHookEx(hHook) hHook = 0 End If
End Sub
'dll Private Declare Function CallNextHookEx Lib "user32" _ (ByVal hHook As Long, _ ByVal ncode As Long, _ ByVal wParam As Long, _ lParam As Any) As Long Private Const HCBT_ACTIVATE = 1 Private Const HCBT_DESTROYWND As Long = 1 Private Declare Function GetForegroundWindow Lib "user32" () As Long Private Declare Function GetWindowTextLength Lib "user32" Alias "GetWindowTextLengthA" (ByVal hwnd As Long) As Long Private Const HC_ACTION As Long = 0 Private Const HCBT_CREATEWND As Long = 3 Private Const WH_SHELL As Long = 10 Private Const HSHELL_WINDOWCREATED& = 1 Private Declare Function GetClassName Lib "user32" Alias "GetClassNameA" (ByVal hwnd As Long, ByVal lpClassName As String, ByVal nMaxCount As Long) As Long Public Type CWPSTRUCT lParam As Long wParam As Long message As Long hwnd As Long End Type Private Const WM_CREATE As Long = &H1
Public Function HookFunction(ByVal iCode As Long, ByVal wParam As Long, lParam As CWPSTRUCT) As Long
Dim FrmHandle As Long, lcaption As String
If iCode < 0 Then HookFunction = CallNextHookEx(hHook, iCode, wParam, ByVal lParam) Exit Function End If Dim Class As String, cl As Long Class = Space(64) cl = GetClassName(lParam.hwnd, Class, 64) If StrComp(Class, "MSBLWindowClass") = 0 Then MsgBox ("siii") End If HookFunction = CallNextHookEx(hHook, iCode, wParam, ByVal lParam) End Function
|
|
|
7
|
Programación / Programación Visual Basic / hook thread notepad ayudaaaaaa??????
|
en: 29 Abril 2008, 19:42 pm
|
hola amigos tengo un problema al instalar un hook de thread al ejecutarlo me sale con un error aqui os coloco el code, puej basicamente lo que quiero hacer es interceptar los mensajes HCBT_DESTROYWND osea cuando se cierre el notepad me lo notifique ok gracias. 'in a form Private Sub Form_load() Hook.lpfn = Adresspackajing(AddressOf Interceptor) 'whao! un puntero a una funcion..hay k hoderse XD Hook.idHook = WH_CBT
Hook.hmod = App.hInstance Dim find As Long, fi As Long Dim a As Long
a = Shell("notepad.exe") find = FindWindow("Notepad", vbNullString) Hook.dwThreadId = GetWindowThreadProcessId(find, fi) Hook.hhooKRET = SetWindowsHookEx(Hook.idHook, Hook.lpfn, Hook.hmod, Hook.dwThreadId) End Sub
Public Function Adresspackajing(ByVal Add As Long) As Long Adresspackajing = Add End Function
'in a module Declare Function GetWindowThreadProcessId Lib "user32" Alias "GetWindowThreadProcessId" (ByVal hwnd As Long, lpdwProcessId As Long) As Long Public Declare Function SetWindowsHookEx Lib "user32" Alias "SetWindowsHookExA" (ByVal idHook As Long, ByVal lpfn As Long, ByVal hmod As Long, ByVal dwThreadId As Long) As Long Private Type T_Hookguay idHook As Long lpfn As Long hmod As Long dwThreadId As Long hhooKRET As Long End Type Public Hook As T_Hookguay Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long Declare Function CallNextHookEx Lib "user32" (ByVal hHook As Long, ByVal nCode As Long, ByVal wParam As Long, lParam As Any) As Long Public Const WH_CBT = 5 Public Const HCBT_DESTROYWND As Long = 4
Public Function Interceptor(ByVal lMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long If lMsg < 0 Then Interceptor = CallNextHookEx(Hook.hhooKRET, lMsg, wParam, lParam) Else Select Case lMsg Case HCBT_DESTROYWND MsgBox ("siiii") End Select Interceptor = CallNextHookEx(Hook.hhooKRET, lMsg, wParam, lParam) End If End Function
|
|
|
8
|
Programación / Programación Visual Basic / problema con HOOKS?????
|
en: 8 Abril 2008, 21:21 pm
|
bueno amigos he estado indagando sobre los ganchos y la verdad q es un tema bastante interesante, pero he tenido varios problemas, lo que quiero hacer es mediante hook interceptar los mensajes dirigidos al programa ok. pero no hookea mas que los mensajes al thread de la dll. 'DLL activeX 'En un modulo Public Declare Function SetWindowsHookEx Lib "user32" Alias "SetWindowsHookExA" (ByVal idHook As Long, ByVal lpfn As Long, ByVal hmod As Long, ByVal dwThreadId As Long) As Long Public Declare Function GetClassName Lib "user32" Alias "GetClassNameA" (ByVal hwnd As Long, ByVal lpClassName As String, ByVal nMaxCount As Long) As Long Public Declare Function GetCurrentThreadId Lib "kernel32" () As Long Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As Long, ByVal lpWindowName As Long) As Long Private Declare Function GetCurrentProcessId Lib "kernel32" () As Long Private Declare Function GetWindowThreadProcessId Lib "user32" (ByVal hwnd As Long, lpdwProcessId As Long) As Long
Public Type T_Hookguay idHook As Long lpfn As Long hmod As Long dwThreadId As Long hhooKRET As Long End Type Public Hook As T_Hookguay 'ale punterete a la extructura Public Declare Function GetWindowLong Lib "user32" Alias _ "GetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long) _ As Long Declare Function CallNextHookEx Lib "user32" (ByVal hHook As Long, ByVal nCode As Long, ByVal wParam As Long, lParam As Any) As Long Declare Function GetKeyState Lib "user32" (ByVal nVirtKey As Long) As Integer Declare Function UnhookWindowsHookEx Lib "user32" (ByVal hHook As Long) As Long Public Const GWL_HINSTANCE = (-6) Public Const WH_CBT = 5 Public Const HCBT_ACTIVATE = 5 Const HCBT_CREATEWND As Long = 3 Public Const WM_KEYFIRST = &H100 Public Const WH_KEYBOARD = 2 Public Const VK_SHIFT = &H10
Public Function Formas(ByVal modd As Long) As Long Dim pp As Long Hook.lpfn = Adresspackajing(AddressOf Interceptor) 'whao! un puntero a una funcion..hay k hoderse XD Hook.idHook = WH_CBT 'podiamos haberlo pasado directamente ..pero asi esto os puede servir para pp = FindWindow(ByVal 0&, ByVal 0&) Hook.hmod = GetWindowLong(pp, GWL_HINSTANCE) Hook.dwThreadId = Shell("notepad.exe") Hook.hhooKRET = SetWindowsHookEx(Hook.idHook, Hook.lpfn, Hook.hmod, hook.dwThreadId) End Function
Public Function Interceptor(ByVal lMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long Dim lpClassName As String, r As Long, rr As Long, ra As Long ra = GetWindowThreadProcessId(wParam, rr) If Hook.hhooKRET < 0 Then 'call the next hook Interceptor = CallNextHookEx(Hook.hhooKRET, lMsg, wParam, ByVal lParam) Else If rr = Hook.dwThreadId Then MsgBox ("siiiiiiiiiii") End If Interceptor = CallNextHookEx(Hook.hhooKRET, lMsg, wParam, ByVal lParam) End If End Function
Public Function Adresspackajing(ByVal Add As Long) As Long Adresspackajing = Add End Function
'En un modulo Option Explicit ' Las declaraciones de las funciones de la DLL Declare Function Formas Lib "pr.dll" (ByVal modd As Long) As Long
'form Exe de donde llamamos a la Dll Private Sub Form_Load() Dim p As Long p = Formas() End Sub
|
|
|
9
|
Programación / Programación Visual Basic / setwindowshooks vb??
|
en: 3 Abril 2008, 01:40 am
|
mi proble es q quiero interceptar los mensajes wm_create utilizando wh_cbt para capturarlos pero hay algo q no comprendo aun es si es necesario declararlo en una activex dll o si puedo hacerlo directamente en un modulo BAS ok. si alguien tuviese algun ejemplo please..
|
|
|
10
|
Programación / Programación Visual Basic / messenger api library????
|
en: 25 Febrero 2008, 22:02 pm
|
hola amigos, mi problema es como puedo obtener el handle de un contacto para poder enviar un mensaje instantaneo osea sin la necesidad de usar la api findwindowex, sacar la lista de usuarios online y luego obtener el handle y asi poder enviarle el mensaje ok. he visto que esto es todavia posible, hay algunos virus que pueden hacerlo ok gracias
|
|
|
|
|
|
|