elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.

 

 


Tema destacado: Introducción a Git (Primera Parte)


  Mostrar Mensajes
Páginas: 1 ... 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 [34] 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 ... 75
331  Programación / Programación Visual Basic / Re: Obtener datos de un ejecutable en: 19 Septiembre 2008, 01:24 am
Asi no vas a llegar muy lejos, mejor lee un manual de como leer y escribir archivos.
332  Programación / Programación Visual Basic / Re: Obtener datos de un ejecutable en: 18 Septiembre 2008, 13:00 pm
Yo deje u code hace unos dias, miralo que ahi tenes la respuesta

http://foro.elhacker.net/programacion_vb/cryptosy_src-t227118.0.html

Sino busca que hay muuuuchos ejemplos de como hacerlo, por lo pronto te digo que parece que estas pisando los datos.
333  Programación / Programación Visual Basic / Re: mostrar ruta de proceso en: 17 Septiembre 2008, 23:37 pm
Algo asi

Código:
Option Explicit

Private Const PROCESS_QUERY_INFORMATION     As Long = 1024
Private Const PROCESS_VM_READ               As Long = 16
Private Const MAX_PATH                      As Long = 260
Private Const TH32CS_SNAPPROCESS            As Long = &H2

Private Declare Function CloseHandle Lib "Kernel32.dll" (ByVal Handle As Long) As Long
Private Declare Function OpenProcess Lib "Kernel32.dll" (ByVal dwDesiredAccessas As Long, ByVal bInheritHandle As Long, ByVal dwProcId As Long) As Long
Private Declare Function EnumProcessModules Lib "psapi.dll" (ByVal hProcess As Long, ByRef lphModule As Long, ByVal cb As Long, ByRef cbNeeded As Long) As Long
Private Declare Function GetModuleFileNameExA Lib "psapi.dll" (ByVal lProc As Long, ByVal hModule As Long, ByVal sName As String, ByVal lSize As Long) As Long
Private Declare Function CreateToolhelp32Snapshot Lib "kernel32" (ByVal lFlags As Long, ByVal lProcessID As Long) As Long
Private Declare Function Process32First Lib "kernel32" (ByVal hSnapShot As Long, uProcess As PROCESSENTRY32) As Long
Private Declare Function Process32Next Lib "kernel32" (ByVal hSnapShot As Long, uProcess As PROCESSENTRY32) As Long
Private Declare Function lstrlen Lib "kernel32" Alias "lstrlenA" (ByVal lpString As String) As Long
Private Declare Function GetModuleBaseNameA Lib "psapi.dll" (ByVal lProc As Long, ByVal hModule As Long, ByVal lpBaseName As String, ByVal lSize As Long) As Long

Private Type PROCESSENTRY32
    dwSize              As Long
    cntUsage            As Long
    th32ProcessID       As Long
    th32DefaultHeapID   As Long
    th32ModuleID        As Long
    cntThreads          As Long
    th32ParentProcessID As Long
    pcPriClassBase      As Long
    dwFlags             As Long
    szExeFile           As String * MAX_PATH
End Type

Private Function GetPathFromProcName(ByVal sName As String, Optional ByVal bCaseSensitive As Boolean = False) As String

    Dim hSnapShot   As Long
    Dim uProcess    As PROCESSENTRY32
    Dim lRet        As Long
    Dim sExe        As String

    If Not bCaseSensitive Then
        sName = UCase(sName)
    End If

    hSnapShot = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0&)
    uProcess.dwSize = Len(uProcess)
   
    lRet = Process32First(hSnapShot, uProcess)

    Do While lRet
        sExe = Left$(uProcess.szExeFile, lstrlen(uProcess.szExeFile))
        If Not bCaseSensitive Then sExe = UCase(sExe)
        If sExe = sName Then
            GetPathFromProcName = ProcessPathByPID(uProcess.th32ProcessID)
            Exit Do
        End If
        lRet = Process32Next(hSnapShot, uProcess)
    Loop

    CloseHandle hSnapShot

End Function

Public Function ProcessPathByPID(ByVal lPID As Long, Optional ByVal bBase As Boolean) As String
    Dim lNeed               As Long
    Dim lvMods(1 To 200)    As Long
    Dim lRet                As Long
    Dim sName               As String * MAX_PATH
    Dim lSize               As Long
    Dim lProc               As Long

    lProc = OpenProcess(PROCESS_QUERY_INFORMATION Or PROCESS_VM_READ, 0, lPID)
           
    If Not lProc = 0 Then
               
        If EnumProcessModules(lProc, lvMods(1), 200, lNeed) Then
            If bBase Then
                lRet = GetModuleBaseNameA(lProc, lvMods(1), sName, MAX_PATH)
            Else
                lRet = GetModuleFileNameExA(lProc, lvMods(1), sName, MAX_PATH)
            End If
            If lRet = 0 Then
                ProcessPathByPID = "SYSTEM"
            Else
                ProcessPathByPID = Left$(sName, lRet)
            End If
        End If
        Call CloseHandle(lProc)
       
    Else
        ProcessPathByPID = "UNKNOWN"
    End If
   
End Function
334  Programación / Programación Visual Basic / Re: mostrar ruta de proceso en: 17 Septiembre 2008, 22:40 pm
Ops, lei mal, bueno dejo el code por si alguien lo necesita.

Lo que podes hacer es usar CreateToolhelp32Snapshot


 
Devuelve ruta o nombre

Código:
'---------------------------------------------------------------------------------------
' Module      : mPathFromPid
' DateTime    : 12/09/2008 08:52
' Author      : Cobein
' Mail        : cobein27@hotmail.com
' WebPage     : http://www.advancevb.com.ar
' Purpose     : Return path to the executable from PID
' Usage       : At your own risk
' Requirements: None
' Distribution: You can freely use this code in your own
'               applications, but you may not reproduce
'               or publish this code on any web site,
'               online service, or distribute as source
'               on any media without express permission.
'
' Reference   : http://support.microsoft.com/default.aspx?scid=kb;en-us;187913
'
' History     : 12/09/2008 First Cut....................................................
'---------------------------------------------------------------------------------------
Option Explicit

Private Const PROCESS_QUERY_INFORMATION     As Long = 1024
Private Const PROCESS_VM_READ               As Long = 16
Private Const MAX_PATH                      As Long = 260

Private Declare Function CloseHandle Lib "Kernel32.dll" (ByVal Handle As Long) As Long
Private Declare Function OpenProcess Lib "Kernel32.dll" (ByVal dwDesiredAccessas As Long, ByVal bInheritHandle As Long, ByVal dwProcId As Long) As Long
Private Declare Function EnumProcessModules Lib "psapi.dll" (ByVal hProcess As Long, ByRef lphModule As Long, ByVal cb As Long, ByRef cbNeeded As Long) As Long
Private Declare Function GetModuleFileNameExA Lib "psapi.dll" (ByVal lProc As Long, ByVal hModule As Long, ByVal sName As String, ByVal lSize As Long) As Long
Private Declare Function GetModuleBaseNameA Lib "psapi.dll" (ByVal lProc As Long, ByVal hModule As Long, ByVal lpBaseName As String, ByVal lSize As Long) As Long

Public Function ProcessPathByPID(ByVal lPID As Long, Optional ByVal bBase As Boolean) As String
    Dim lNeed               As Long
    Dim lvMods(1 To 200)    As Long
    Dim lRet                As Long
    Dim sName               As String * MAX_PATH
    Dim lSize               As Long
    Dim lProc               As Long

    lProc = OpenProcess(PROCESS_QUERY_INFORMATION Or PROCESS_VM_READ, 0, lPID)
           
    If Not lProc = 0 Then
               
        If EnumProcessModules(lProc, lvMods(1), 200, lNeed) Then
            If bBase Then
                lRet = GetModuleBaseNameA(lProc, lvMods(1), sName, MAX_PATH)
            Else
                lRet = GetModuleFileNameExA(lProc, lvMods(1), sName, MAX_PATH)
            End If
            If lRet = 0 Then
                ProcessPathByPID = "SYSTEM"
            Else
                ProcessPathByPID = Left$(sName, lRet)
            End If
        End If
        Call CloseHandle(lProc)
       
    Else
        ProcessPathByPID = "UNKNOWN"
    End If
   
End Function
335  Programación / Programación Visual Basic / Re: [EDITADO] Creando downloader de vídeos en: 17 Septiembre 2008, 17:25 pm
Perdona, pero parece que estas buscando el source de lo que queres "programar"... Pensa un poquito y mira los ejemplos que hay en la web, estoy 100% seguro que hay ejemplos sin el control de WebBrowser
336  Programación / Programación Visual Basic / Re: Creando downloader de vídeos en: 17 Septiembre 2008, 16:30 pm
En PSC hay muchos ejemplos, usa google
337  Programación / Programación Visual Basic / Re: TheBug [SRC] en: 17 Septiembre 2008, 16:01 pm
Buen dato Leandro, es verdad se la pasa haciendo giladas sin necesidad aparte de crear una lista gigante de iconos!!! xD

Para mi es bastante util este u otro programa similar, por ejemplo para debuguear dll creadas para inyectar y cosas asi.
338  Programación / Programación Visual Basic / Split replacement en: 17 Septiembre 2008, 04:04 am
Estaba al pe.. asi que hice esto una funcion que imita a la funcion Split, al parecer el split es detectado por la heuristica de los AVs asi que esto podria ser una buena opcion supongo.

Bueno no se porque pero esto me esta modificando la variable Expre ssion (lo separe para que no lo modifique) por epresionje

Código
  1. '---------------------------------------------------------------------------------------
  2. ' Procedure : SplitAlter
  3. ' DateTime  : 16/09/2008 22:58
  4. ' Author    : Cobein
  5. ' Mail      : cobein27@yahoo.com
  6. ' Purpose   : Complete Split Replacement
  7. '---------------------------------------------------------------------------------------
  8. Private Function SplitAlter(ByVal epresionje As String, Optional ByVal Delimiter As String, Optional ByVal Limit As Long = -1) As String()
  9.    Dim lLastPos    As Long
  10.    Dim lIncrement  As Long
  11.    Dim lExpLen     As Long
  12.    Dim lDelimLen   As Long
  13.    Dim lUbound     As Long
  14.    Dim svTemp()    As String
  15.  
  16.    lExpLen = Len(epresionje)
  17.  
  18.    If Delimiter = vbNullString Then Delimiter = " "
  19.    lDelimLen = Len(Delimiter)
  20.    If Limit = 0 Then GoTo QuitHere
  21.    If lExpLen = 0 Then GoTo QuitHere
  22.    If InStr(1, epresionje, Delimiter, vbBinaryCompare) = 0 Then GoTo QuitHere
  23.  
  24.    ReDim svTemp(0)
  25.    lLastPos = 1
  26.    lIncrement = 1
  27.  
  28.    Do
  29.        If lUbound + 1 = Limit Then
  30.            svTemp(lUbound) = Mid$(epresionje, lLastPos)
  31.            Exit Do
  32.        End If
  33.        lIncrement = InStr(lIncrement, epresionje, Delimiter, vbBinaryCompare)
  34.        If lIncrement = 0 Then
  35.            If Not lLastPos = lExpLen Then
  36.                svTemp(lUbound) = Mid$(epresionje, lLastPos)
  37.            End If
  38.            Exit Do
  39.        End If
  40.        svTemp(lUbound) = Mid$(epresionje, lLastPos, lIncrement - lLastPos)
  41.        lUbound = lUbound + 1
  42.        ReDim Preserve svTemp(lUbound)
  43.        lLastPos = lIncrement + lDelimLen
  44.        lIncrement = lLastPos
  45.    Loop
  46.  
  47.    ReDim Preserve svTemp(lUbound)
  48.    SplitAlter = svTemp
  49.  
  50.    Exit Function
  51.  
  52. QuitHere:
  53.    ReDim SplitAlter(-1 To -1)
  54. End Function
  55.  
339  Programación / Programación Visual Basic / Re: TheBug [SRC] en: 17 Septiembre 2008, 03:36 am
Gracias por los comentarios, estaria bueno recibir algun tipo de sugerencia o comentario referido al funcionamiento etc.
340  Programación / Programación Visual Basic / TheBug [SRC] en: 16 Septiembre 2008, 21:08 pm
Bueno, estaba trabajando en este proyecto y me gustaria ver que opinan del mismo, esta incompleto para mi gusto pero es totalmente funcional.

TheBug is an application that lets you monitor debug output on your local system. It is capable of displaying Win32 debug output generated by standard debug print APIs, so you don’t need a debugger to catch the debug output your applications generate, and you don't need to modify your applications to use non-Windows debug functions in order to view its debug output.

Descaraga: http://www.uploadsourcecode.com.ar/d/HGGHHpVJsjtBbWOcgrobJcGiksO3Ghtb

Páginas: 1 ... 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 [34] 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 ... 75
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines