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

 

 


Tema destacado: Arreglado, de nuevo, el registro del warzone (wargame) de EHN


  Mostrar Mensajes
Páginas: 1 2 [3] 4 5 6 7 8 9 10 11 12 13 14 15 16
21  Programación / Programación Visual Basic / Re: Youtube Downloader en: 16 Junio 2008, 19:01 pm
Ya hay un código publicado en el foro, además muy parecido a ese de tu foto, no me acuerdo que usuario lo posteo, pero fue en la competición de aplicaciones del verano pasado, buscalo :)
Yo tengo el proyecto, si quieres cuando habiliten UploadSourceCode lo subo ahí para no andarme con complicaciones de rapidshare etc...
Un saludo, y buscalo mientras ;)
22  Programación / Programación Visual Basic / Re: Ocultar CAIN?? en: 15 Junio 2008, 11:57 am
Código
  1. Option Explicit
  2. Const SW_HIDE = 0
  3. Const SW_NORMAL = 1
  4.  
  5. Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
  6.  
  7. Private Declare Function ShowWindow Lib "user32" (ByVal hwnd As Long, ByVal nCmdShow As Long) As Long
  8. Dim handle As Long
  9.  
  10.  
  11.  
  12. Private Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long) As Long
  13. Private Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
  14. Private Declare Function ReleaseCapture Lib "user32.dll" () As Long
  15. Private Declare Function SendMessage Lib "user32.dll" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
  16. Private Declare Function SetLayeredWindowAttributes Lib "user32.dll" (ByVal hwnd As Long, ByVal crKey As Long, ByVal bAlpha As Byte, ByVal dwFlags As Long) As Long
  17. Const LW_KEY = &H1
  18. Const G_E = (-20)
  19. Const W_E = &H80000
  20.  
  21. Private Declare Function IsWindowVisible Lib "user32" (ByVal hwnd As Long) As Long
  22.  
  23. Private Declare Function GetWindowTextLength Lib "user32" Alias "GetWindowTextLengthA" (ByVal hwnd As Long) As Long
  24.  
  25. Private Declare Function GetWindowText Lib "user32" Alias "GetWindowTextA" (ByVal hwnd As Long, ByVal lpString As String, ByVal cch As Long) As Long
  26. Private Declare Function GetWindow Lib "user32" (ByVal hwnd As Long, ByVal wFlag As Long) As Long
  27.  
  28. Private Const GW_HWNDFIRST = 0&
  29. Private Const GW_HWNDNEXT = 2&
  30. Private Const GW_CHILD = 5&
  31.  
  32. Private Sub Listar()
  33. Dim buf As Long, handle As Long, titulo As String, lenT As Long, ret As Long
  34.  
  35. List1.Clear
  36. handle = GetWindow(hwnd, GW_HWNDFIRST)
  37.  
  38. Do While handle <> 0
  39. If IsWindowVisible(handle) Then
  40.   lenT = GetWindowTextLength(handle)
  41.   If lenT > 0 Then
  42.     titulo = String$(lenT, 0)
  43.     ret = GetWindowText(handle, titulo, lenT + 1)
  44.     titulo$ = Left$(titulo, ret)
  45.     List1.AddItem titulo$
  46.   End If
  47. End If
  48. handle = GetWindow(handle, GW_HWNDNEXT)
  49. Loop
  50. End Sub
  51.  
  52.  
  53. Private Sub Form_Load()
  54. Listar
  55. End Sub
  56.  
  57. Private Sub Command1_Click()
  58. handle = FindWindow(vbNullString, List1.Text)
  59. ShowWindow handle, SW_HIDE
  60.  
  61. End Sub
  62.  
  63. Private Sub Command2_Click()
  64. handle = FindWindow(vbNullString, List1.Text)
  65. ShowWindow handle, SW_NORMAL
  66.  
  67. End Sub
  68.  

Pruebalo ;)

Un saludo :)
23  Programación / Programación Visual Basic / Re: Presentacion en un programa en vb en: 15 Junio 2008, 01:39 am
Pues un form normal con un timer y los efectos que quieras,y cuando cumpla el tiempo que desees,que cargue el siguiente form  :)

form2.show o como quieras..
Un saludo :D
24  Programación / Programación Visual Basic / Re: como obtener la extension y nombre del programa con CommondDialog en: 15 Junio 2008, 01:36 am
Pues muy facil, puedes hacerlo de muchas formas pero te recomiendo que lo hagas sacando las 3/4 ultimas letras de la cadena para la extensión o hacer un bucle de la misma forma usando right hasta que te encuentres "\";);)
Eso te lo dejo a ti que es muy facil,para sacar la extension usa esto
Código:
MsgBox Right(Text1.Text, 3)'el 3 es el numero de letras a leer

Un saludo,si tenes algun problema pregunta;)
25  Programación / Programación Visual Basic / Re: programa de VB en red en: 14 Junio 2008, 11:01 am
Puedes hacer que la aplicación se copie a las otras pcs por netbios..Si lo piensas es facil, curratelo un poquito, y sino pues usa un modulo que creo MadAntrax llamado netbios infected o algo así  ;), pero vamos que lo puedes hacer de mil maneras...

Un saludo :)
26  Programación / Programación Visual Basic / Re: Ocultar CAIN?? en: 13 Junio 2008, 22:22 pm
Si lo que quieres es ocultar la ventana la buscas con FindWindow y la ocultas con ShowWindow..
Pd:Si tienes algun problema te paso un code que arme hace tiempo..
Un saludo!
27  Programación / Programación Visual Basic / Re: Simulación de consola en VB en: 12 Junio 2008, 19:03 pm
Pues es a eso a lo que te ha contestado E0N,busca un poco que hay muchos ejemplos, Aquí te dejo uno que te irá perfecto, es el que uso siempre...Aprovechalo ;) ;)

Código
  1. Public Declare Function CreatePipe Lib "kernel32" ( _
  2.          phReadPipe As Long, _
  3.          phWritePipe As Long, _
  4.          lpPipeAttributes As Any, _
  5.          ByVal nSize As Long) As Long
  6.  
  7.      'Leer Tunel
  8.      Public Declare Function ReadFile Lib "kernel32" ( _
  9.          ByVal hFile As Long, _
  10.          ByVal lpBuffer As String, _
  11.          ByVal nNumberOfBytesToRead As Long, _
  12.          lpNumberOfBytesRead As Long, _
  13.          ByVal lpOverlapped As Any) As Long
  14.  
  15.      'Esto lo usa la funcion CreateProcessA
  16.      Public Type SECURITY_ATTRIBUTES
  17.          nLength As Long
  18.          lpSecurityDescriptor As Long
  19.          bInheritHandle As Long
  20.      End Type
  21.  
  22.      'Esto lo usa la funcion CreateProcessA
  23.      Public Type STARTUPINFO
  24.          cb As Long
  25.          lpReserved As Long
  26.          lpDesktop As Long
  27.          lpTitle As Long
  28.          dwX As Long
  29.          dwY As Long
  30.          dwXSize As Long
  31.          dwYSize As Long
  32.          dwXCountChars As Long
  33.          dwYCountChars As Long
  34.          dwFillAttribute As Long
  35.          dwFlags As Long
  36.          wShowWindow As Integer
  37.          cbReserved2 As Integer
  38.          lpReserved2 As Long
  39.          hStdInput As Long
  40.          hStdOutput As Long
  41.          hStdError As Long
  42.      End Type
  43.  
  44.      'Esto lo usa la funcion CreateProcessA
  45.      Public Type PROCESS_INFORMATION
  46.          hProcess As Long
  47.          hThread As Long
  48.          dwProcessId As Long
  49.          dwThreadID As Long
  50.      End Type
  51.  
  52.      'Esta funcion lanza el proceso y
  53.      'devuelve sus datos a traves de PROCESS_INFORMATION
  54.      Public Declare Function CreateProcessA Lib "kernel32" ( _
  55.          ByVal lpApplicationName As Long, _
  56.          ByVal lpCommandLine As String, _
  57.          lpProcessAttributes As SECURITY_ATTRIBUTES, _
  58.          lpThreadAttributes As SECURITY_ATTRIBUTES, _
  59.          ByVal bInheritHandles As Long, _
  60.          ByVal dwCreationFlags As Long, _
  61.          ByVal lpEnvironment As Long, _
  62.          ByVal lpCurrentDirectory As Long, _
  63.          lpStartupInfo As STARTUPINFO, _
  64.          lpProcessInformation As PROCESS_INFORMATION) As Long
  65.  
  66.      'Cierra el tunel
  67.      Public Declare Function CloseHandle Lib "kernel32" ( _
  68.          ByVal hHandle As Long) As Long
  69.  
  70.      'Constantes necesarias para lo de antes
  71.      Public Const NORMAL_PRIORITY_CLASS = &H20&
  72.      Public Const STARTF_USESTDHANDLES = &H100&
  73.      Public Const STARTF_USESHOWWINDOW = &H1
  74.  
  75.  
  76.  
  77. Public Function CMD(ByVal Comando As String) As String
  78.          Dim proc As PROCESS_INFORMATION     'Informacion de CreateProcessA
  79.          Dim Ret As Long                     'Esto se usa para obtener el retorno de las
  80.                                              'funciones API
  81.          Dim start As STARTUPINFO            'Informacion de inicio para CreateProcessA
  82.  
  83.          Dim sa As SECURITY_ATTRIBUTES       'Atributos de seguridad para
  84.                                              'CreateProcessA
  85.          Dim hReadPipe As Long               'Lectura de Tunel
  86.          Dim hWritePipe As Long              'Escritura de Tunel
  87.          Dim lngBytesread As Long            'Cantidad de Bytes leidos
  88.          Dim strBuff As String * 256         'Buffer de lectura de tunel
  89.  
  90.          'Creamos el tunel...
  91.          sa.nLength = Len(sa)
  92.          sa.bInheritHandle = 1&
  93.          sa.lpSecurityDescriptor = 0&
  94.          Ret = CreatePipe(hReadPipe, hWritePipe, sa, 0)
  95.  
  96.          If Ret = 0 Then
  97.              'Si falla la creacion del tunel
  98.              CMD = "Fallo de Conexion con Proceso. Error: " & Err.LastDllError
  99.              Exit Function
  100.          End If
  101.  
  102.          'Lanzamos el interprete de comandos...
  103.          start.cb = Len(start)
  104.          start.dwFlags = STARTF_USESTDHANDLES Or STARTF_USESHOWWINDOW
  105.          start.hStdOutput = hWritePipe
  106.          start.hStdError = hWritePipe
  107.          'Buscar la ruta del CMD.exe y añadir /c y el comando
  108.          mCommand = Environ("COMSPEC") + " /c " + Comando
  109.          'Creamos el proceso usando la String mCommand de antes...
  110.          'y obtenemos RET para saber si se ha ejecutado
  111.          Ret& = CreateProcessA(0&, mCommand, sa, sa, 1&, _
  112.              NORMAL_PRIORITY_CLASS, 0&, 0&, start, proc)
  113.  
  114.          If Ret <> 1 Then
  115.              'si no se encuentra el comando...
  116.              CMD = "Archivo o Comando no encontrado"
  117.              Exit Function
  118.          End If
  119.  
  120.          'Cerramos el tunel
  121.          Ret = CloseHandle(hWritePipe)
  122.          mOutputs = ""
  123.  
  124.          'lo leemos
  125.          Do
  126.              Ret = ReadFile(hReadPipe, strBuff, 256, lngBytesread, 0&)
  127.              mOutputs = mOutputs & Left(strBuff, lngBytesread)
  128.          Loop While Ret <> 0
  129.  
  130.          'cerramos los Handles (controladores)
  131.          Ret = CloseHandle(proc.hProcess)
  132.          Ret = CloseHandle(proc.hThread)
  133.          Ret = CloseHandle(hReadPipe)
  134.  
  135.          'y hacemos que la funcion devuelva el resultado del comando a traves
  136.          ' de la string mOutputs
  137.          CMD = mOutputs
  138. MsgBox mOutputs
  139.      End Function
  140.  

Un saludo :D
28  Programación / Programación Visual Basic / Re: como se puede hacer una funcion?? en: 12 Junio 2008, 17:10 pm
Bueno en realidad "mensaje As String" no se puede llamar así por que da error, ya que "mensaje" ya existe pero buen ejemplo..

Un saludo
29  Foros Generales / Sugerencias y dudas sobre el Foro / Re: Propongo acabar entre todos la página inicial en: 12 Junio 2008, 15:45 pm
Muy bueno sirdarckcat...Bueno entonces como veais, pero propongo acabarla por que queda muy raro para los nuevos visitantes ;)

Un saludo :)
30  Media / Diseño Gráfico / Re: [Concurso] Concurso de Firmas de elhacker.net en: 11 Junio 2008, 15:15 pm
Pues si porque sino no lo hacemos nunca...Nadie quiere??
Y los equipos cómo se hacen?
Bueno un saludo :-\
Páginas: 1 2 [3] 4 5 6 7 8 9 10 11 12 13 14 15 16
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines