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

 

 


Tema destacado: Usando Git para manipular el directorio de trabajo, el índice y commits (segunda parte)


+  Foro de elhacker.net
|-+  Programación
| |-+  Programación C/C++ (Moderadores: Eternal Idol, Littlehorse, K-YreX)
| | |-+  busco libreria o api
0 Usuarios y 1 Visitante están viendo este tema.
Páginas: [1] Ir Abajo Respuesta Imprimir
Autor Tema: busco libreria o api  (Leído 2,764 veces)
rembolso

Desconectado Desconectado

Mensajes: 163



Ver Perfil
busco libreria o api
« en: 7 Febrero 2011, 13:53 pm »

hola. tengo que desarrollar un proyecto que intervenga en las coneciones y las filtre,

tendran una libreria o api para eso. (tiene que intervenir en la placa de red y filtrar todo). tipo firewall
 ;D


En línea

Littlehorse
All the world's a stage
Moderador
***
Desconectado Desconectado

Mensajes: 2.714


Nie Dam Sie


Ver Perfil WWW
Re: busco libreria o api
« Respuesta #1 en: 7 Febrero 2011, 20:00 pm »

Para que sistema operativo?
Si solo necesitas sniffear podes usar WinPcap/Pcap pero si necesitas algo que se asemeje estrictamente a un firewall -como indica tu mensaje- vas a tener que desarrollar un driver.

Si estas en Windows, pásate por aqui.






En línea

An expert is a man who has made all the mistakes which can be made, in a very narrow field.
BlackZeroX
Wiki

Desconectado Desconectado

Mensajes: 3.158


I'Love...!¡.


Ver Perfil WWW
Re: busco libreria o api
« Respuesta #2 en: 7 Febrero 2011, 21:08 pm »

.
Hay una forma cutre en windows y es esta:

el codigo esta en vb6

.
Hace mucho que lo hice... aun no lo he mejorado te pongo tal cual esta en otros post.
.
Código
  1.  
  2. '
  3. '   /////////////////////////////////////////////////////////////
  4. '   // Autor:   BlackZeroX ( Ortega Avila Miguel Angel )       //
  5. '   //                                                         //
  6. '   // Web:     http://InfrAngeluX.Sytes.Net/                  //
  7. '   //                                                         //
  8. '   //    |-> Pueden Distribuir Este codigo siempre y cuando   //
  9. '   // no se eliminen los creditos originales de este codigo   //
  10. '   // No importando que sea modificado/editado o engrandecido //
  11. '   // o achicado, si es en base a este codigo                 //
  12. '   /////////////////////////////////////////////////////////////
  13.  
  14. Option Explicit
  15.  
  16. Enum StadosPort
  17.  UNKNOWN = 0
  18.  CLOSED = 1
  19.  LISTENING = 2
  20.  SYN_SENT = 3
  21.  SYN_RCVD = 4
  22.  ESTABLISHED = 5
  23.  FIN_WAIT1 = 6
  24.  FIN_WAIT2 = 7
  25.  CLOSE_WAIT = 8
  26.  CLOSING = 9
  27.  LAST_ACK = 10
  28.  TIME_WAIT = 11
  29.  DELETE_TCB = 12
  30. End Enum
  31. Type MIB_TCPROW
  32.  dwState As StadosPort
  33.  dwLocalAddr As Long
  34.  dwLocalPort As Long
  35.  dwRemoteAddr As Long
  36.  dwRemotePort As Long
  37. End Type
  38. Type MIB_TCPTABLE
  39.  dwNumEntries As Long
  40.  table(100) As MIB_TCPROW
  41. End Type
  42. Public MIB_TCPTABLE As MIB_TCPTABLE
  43. Public Declare Function GetTcpTable Lib "iphlpapi.dll" (ByRef pTcpTable As MIB_TCPTABLE, ByRef pdwSize As Long, ByVal bOrder As Long) As Long
  44. Public Declare Function SetTcpEntry Lib "IPhlpAPI" (pTcpRow As MIB_TCPROW) As Long 'This is used to close an open port.
  45. Public Declare Function ntohs Lib "WSOCK32.DLL" (ByVal netshort As Long) As Long
  46. Private Declare Function CreateWindowEx Lib "user32" Alias "CreateWindowExA" (ByVal dwExStyle As Long, ByVal lpClassName As String, ByVal lpWindowName As String, ByVal dwStyle As Long, ByVal x As Long, ByVal y As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal hWndParent As Long, ByVal hMenu As Long, ByVal hInstance As Long, lpParam As Any) As Long
  47. Private Declare Function SetTimer Lib "user32" (ByVal hwnd As Long, ByVal nIDEvent As Long, ByVal uElapse As Long, ByVal lpTimerFunc As Long) As Long
  48. 'Private Declare Function KillTimer Lib "user32" (ByVal hwnd As Long, ByVal nIDEvent As Long) As Long
  49. Private Declare Function WaitMessage Lib "user32" () As Long
  50.  
  51. Private Const PS As String = "80,1863,8080,443,15690" 'Edita estos Puertos
  52. Private hwnd As Long
  53. Sub main()
  54.    hwnd = CreateWindowEx(0, "STATIC", 0, 0, 0, 0, 100, 100, 0, 0, App.hInstance, 0&)
  55.    SetTimer hwnd, 0, 2000, AddressOf TimerProc
  56.    Do
  57.        DoEvents
  58.        WaitMessage
  59.    Loop
  60. End Sub
  61.  
  62. Public Sub TimerProc(ByVal hwnd As Long, ByVal nIDEvent As Long, ByVal uElapse As Long, ByVal lpTimerFunc As Long)
  63.    Dim TCPTable As MIB_TCPTABLE
  64.    Dim Ports() As String
  65.    Dim i%, p%
  66.    GetTcpTable TCPTable, Len(TCPTable), 0
  67.    Ports = Split(PS, ",")
  68.    For i = 0 To TCPTable.dwNumEntries - 1
  69.        For p = 0 To UBound(Ports) - 1
  70.            If Ports(p) = ntohs(TCPTable.table(i).dwRemotePort) Then
  71.                GoTo Salto:
  72.            ElseIf (p = Val(UBound(Ports) - 1)) Then
  73.                TCPTable.table(i).dwState = DELETE_TCB
  74.                SetTcpEntry TCPTable.table(i)
  75.                Debug.Print ntohs(TCPTable.table(i).dwRemotePort)
  76.                GoTo Salto:
  77.            End If
  78.        Next p
  79. Salto:
  80.    Next i
  81. End Sub
  82.  
  83.  

Temibles Lunas!¡.
.
En línea

The Dark Shadow is my passion.
rembolso

Desconectado Desconectado

Mensajes: 163



Ver Perfil
Re: busco libreria o api
« Respuesta #3 en: 8 Febrero 2011, 00:39 am »

gracias muchas gracias  ::)
 
no saben si hay un manual para usar  WinPcap . me descargue la libreria uso dev c++
pero cundo la invoco y pongo algunas funciones me da error retunerd 1 exit
« Última modificación: 8 Febrero 2011, 01:00 am por rembolso » En línea

Littlehorse
All the world's a stage
Moderador
***
Desconectado Desconectado

Mensajes: 2.714


Nie Dam Sie


Ver Perfil WWW
Re: busco libreria o api
« Respuesta #4 en: 8 Febrero 2011, 05:08 am »

Postea el log de compilación.
Prueba creando un proyecto desde cero o instalando algún IDE mas actual como Code::Blocks.

Saludos
En línea

An expert is a man who has made all the mistakes which can be made, in a very narrow field.
Páginas: [1] Ir Arriba Respuesta Imprimir 

Ir a:  

Mensajes similares
Asunto Iniciado por Respuestas Vistas Último mensaje
Libreria DLL « 1 2 »
Programación Visual Basic
sp26 11 4,128 Último mensaje 30 Octubre 2006, 20:20 pm
por sircid
Librería « 1 2 3 »
Programación C/C++
@synthesize 25 11,075 Último mensaje 27 Junio 2010, 05:12 am
por @synthesize
Libreria VNC
Programación C/C++
paju1986 0 2,774 Último mensaje 10 Diciembre 2010, 18:54 pm
por paju1986
Busco una libreria *.lib
Programación C/C++
Fraguibo 0 1,153 Último mensaje 5 Noviembre 2013, 12:33 pm
por Fraguibo
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines