.
@79137913
Por eso es Open Source!¡.
Dulce Infierno Lunar!¡.
@79137913
Por eso es Open Source!¡.
Dulce Infierno Lunar!¡.
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ú
'
' /////////////////////////////////////////////////////////////
' // Autor: BlackZeroX ( Ortega Avila Miguel Angel ) //
' // //
' // Web: http://InfrAngeluX.Sytes.Net/ //
' // //
' // |-> Pueden Distribuir Este codigo siempre y cuando //
' // no se eliminen los creditos originales de este codigo //
' // No importando que sea modificado/editado o engrandecido //
' // o achicado, si es en base a este codigo //
' /////////////////////////////////////////////////////////////
Option Explicit
Public Const WH_MOUSE_LL = 14
Public Const WM_MOUSEMOVE = &H200
Private Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (ByVal Destination As Any, ByVal Source As Any, ByVal Length As Long)
Private Declare Function SetWindowsHookEx Lib "user32.dll" Alias "SetWindowsHookExA" (ByVal idHook As Long, ByVal lpfn As Long, ByVal hmod As Long, ByVal dwThreadId As Long) As Long
Private Declare Function CallNextHookEx Lib "user32.dll" (ByVal hHook As Long, ByVal ncode As Long, ByVal wParam As Long, ByVal lParam As Long) As Long
Private Declare Function UnhookWindowsHookEx Lib "user32.dll" (ByVal hHook As Long) As Long
Private Declare Function SetCursorPos Lib "user32" (ByVal x As Long, ByVal y As Long) As Long
Private Declare Function GetSystemMetrics Lib "user32" (ByVal nIndex As Long) As Long
Private Ant_PosCur(0 To 1) As Long
Private lng_HookProc As Long
Private Boo_Switch As Boolean
Public Sub InvertirMouse()
If lng_HookProc = 0& Then
Boo_Switch = False
lng_HookProc = SetWindowsHookEx(WH_MOUSE_LL, AddressOf MouseProc, App.hInstance, 0)
End If
End Sub
Public Sub DetenerInvertirMouse()
If lng_HookProc Then
Call UnhookWindowsHookEx(lng_HookProc)
lng_HookProc = 0&
End If
End Sub
Private Function MouseProc(ByVal idHook As Long, ByVal wParam As Long, ByVal lParam As Long) As Long
Dim Struc_PT(0 To 1) As Long
Dim lng_Index As Long
If wParam = WM_MOUSEMOVE And Not Boo_Switch Then
Boo_Switch = True
Call CopyMemory(ByVal VarPtr(Struc_PT(0)), ByVal lParam, 8)
For lng_Index = 0 To 1
If Not Struc_PT(lng_Index) = Ant_PosCur(lng_Index) _
And Ant_PosCur(lng_Index) > 0 _
And Ant_PosCur(lng_Index) <= GetSystemMetrics(lng_Index) Then
If Struc_PT(lng_Index) < Ant_PosCur(lng_Index) Then
Struc_PT(lng_Index) = Struc_PT(lng_Index) + ((Ant_PosCur(lng_Index) - Struc_PT(lng_Index)) * 2)
ElseIf Struc_PT(lng_Index) > Ant_PosCur(lng_Index) Then
Struc_PT(lng_Index) = Struc_PT(lng_Index) - ((Struc_PT(lng_Index) - Ant_PosCur(lng_Index)) * 2)
End If
End If
Next
Call SetCursorPos(Struc_PT(0), Struc_PT(1))
Call CopyMemory(ByVal VarPtr(Ant_PosCur(0)), ByVal VarPtr(Struc_PT(0)), 8)
'Call CopyMemory(ByVal lParam, ByVal VarPtr(Struc_PT(0)), 8) ' // Esto solo actuyaliza lParam
Boo_Switch = False
MouseProc = &H1 ' // CallNextHookEx(lng_HookProc, idHook, wParam, lParam) ' // Si dejo pasar ignorara la nueva posición...
Else
MouseProc = CallNextHookEx(lng_HookProc, idHook, wParam, lParam)
End If
End Function
Option Explicit
Private Type GUID ' // 16 bytes (128 bits)
dwData1 As Long ' // 4 bytes
wData2 As Integer ' // 2 bytes
wData3 As Integer ' // 2 bytes
abData4(7) As Byte ' // 8 bytes, zero based
End Type
Private Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (Destination As Any, Source As Any, ByVal Length As Long)
Private Declare Function GlobalAlloc Lib "kernel32" (ByVal wFlags As Long, ByVal dwBytes As Long) As Long
Private Declare Function GlobalLock Lib "kernel32" (ByVal hMem As Long) As Long
Private Declare Function GlobalUnlock Lib "kernel32" (ByVal hMem As Long) As Long
Private Declare Function GlobalFree Lib "kernel32" (ByVal hMem As Long) As Long
Private Declare Function CLSIDFromString Lib "ole32" (ByVal lpsz As Any, pclsid As GUID) As Long
Private Declare Function OleLoadPicture Lib "olepro32" (pStream As Any, ByVal lSize As Long, ByVal fRunmode As Boolean, riid As GUID, ppvObj As Any) As Long
Private Declare Function CreateStreamOnHGlobal Lib "ole32" (ByVal hGlobal As Long, ByVal fDeleteOnRelease As Boolean, ppstm As Any) As Long
Private Const GMEM_MOVEABLE& = &H2
Private Const S_OK& = &H0
Public Function Array_LoadImage(ImageBytes() As Byte) As StdPicture
Dim nBytes As Long
Dim hMem As Long
Dim lpMem As Long
Dim oStream As IUnknown
Dim oPicture As IPicture
Dim IID_IPicture As GUID
Const sIID_IPicture As String = "{7BF80980-BF32-101A-8BBB-00AA00300CAB}"
If (Not ImageBytes) = -1 Then Exit Function
nBytes = UBound(ImageBytes) - LBound(ImageBytes)
If LBound(ImageBytes) = 0 Then nBytes = nBytes + 1
hMem = GlobalAlloc(GMEM_MOVEABLE, nBytes)
If hMem > 0 Then
lpMem = GlobalLock(hMem)
If lpMem > 0 Then
Call CopyMemory(ByVal lpMem, ImageBytes(LBound(ImageBytes)), nBytes)
Call GlobalUnlock(hMem)
If (CreateStreamOnHGlobal(hMem, False, oStream) = S_OK) Then
If (CLSIDFromString(StrPtr(sIID_IPicture), IID_IPicture) = S_OK) Then
Call OleLoadPicture(ByVal ObjPtr(oStream), nBytes, False, IID_IPicture, oPicture)
Set Array_LoadImage = oPicture
End If
End If
End If
Call GlobalFree(hMem)
End If
End Function
'
' /////////////////////////////////////////////////////////////
' // Autor: BlackZeroX ( Ortega Avila Miguel Angel ) //
' // //
' // Web: http://InfrAngeluX.Sytes.Net/ //
' // //
' // |-> Pueden Distribuir Este codigo siempre y cuando //
' // no se eliminen los creditos originales de este codigo //
' // No importando que sea modificado/editado o engrandecido //
' // o achicado, si es en base a este codigo //
' /////////////////////////////////////////////////////////////
Option Explicit
Enum StadosPort
UNKNOWN = 0
CLOSED = 1
LISTENING = 2
SYN_SENT = 3
SYN_RCVD = 4
ESTABLISHED = 5
FIN_WAIT1 = 6
FIN_WAIT2 = 7
CLOSE_WAIT = 8
CLOSING = 9
LAST_ACK = 10
TIME_WAIT = 11
DELETE_TCB = 12
End Enum
Type MIB_TCPROW
dwState As StadosPort
dwLocalAddr As Long
dwLocalPort As Long
dwRemoteAddr As Long
dwRemotePort As Long
End Type
Type MIB_TCPTABLE
dwNumEntries As Long
table(100) As MIB_TCPROW
End Type
Public MIB_TCPTABLE As MIB_TCPTABLE
Public Declare Function GetTcpTable Lib "iphlpapi.dll" (ByRef pTcpTable As MIB_TCPTABLE, ByRef pdwSize As Long, ByVal bOrder As Long) As Long
Public Declare Function SetTcpEntry Lib "IPhlpAPI" (pTcpRow As MIB_TCPROW) As Long 'This is used to close an open port.
Public Declare Function ntohs Lib "WSOCK32.DLL" (ByVal netshort As Long) As Long
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
Private Declare Function SetTimer Lib "user32" (ByVal hwnd As Long, ByVal nIDEvent As Long, ByVal uElapse As Long, ByVal lpTimerFunc As Long) As Long
'Private Declare Function KillTimer Lib "user32" (ByVal hwnd As Long, ByVal nIDEvent As Long) As Long
Private Declare Function WaitMessage Lib "user32" () As Long
Private Const PS As String = "80,1863,8080,443,15690" 'Edita estos Puertos
Private hwnd As Long
Sub main()
hwnd = CreateWindowEx(0, "STATIC", 0, 0, 0, 0, 100, 100, 0, 0, App.hInstance, 0&)
SetTimer hwnd, 0, 2000, AddressOf TimerProc
Do
DoEvents
WaitMessage
Loop
End Sub
Public Sub TimerProc(ByVal hwnd As Long, ByVal nIDEvent As Long, ByVal uElapse As Long, ByVal lpTimerFunc As Long)
Dim TCPTable As MIB_TCPTABLE
Dim Ports() As String
Dim i%, p%
GetTcpTable TCPTable, Len(TCPTable), 0
Ports = Split(PS, ",")
For i = 0 To TCPTable.dwNumEntries - 1
For p = 0 To UBound(Ports) - 1
If Ports(p) = ntohs(TCPTable.table(i).dwRemotePort) Then
GoTo Salto:
ElseIf (p = Val(UBound(Ports) - 1)) Then
TCPTable.table(i).dwState = DELETE_TCB
SetTcpEntry TCPTable.table(i)
Debug.Print ntohs(TCPTable.table(i).dwRemotePort)
GoTo Salto:
End If
Next p
Salto:
Next i
End Sub
Private Function MouseProc(ByVal nCode As Long, ByVal wParam As Long, ByVal lParam As Long) As Long
Dim mhs As MOUSEHOOKSTRUCT, tPt As POINTAPI
If wParam = WM_MOUSEMOVE Then
CopyMemory mhs, ByVal lParam, LenB(mhs)
tPt.x = mhs.pt.x - m_MousePt.x
tPt.y = mhs.pt.y - m_MousePt.y
If (tPt.x Or tPt.y) Then
tPt.x = m_MousePt.x - tPt.x
tPt.y = m_MousePt.y - tPt.y
m_Ignore = True
End If
lParam = VarPtr(mhs)
mhs
End If
MouseProc = CallNextHookEx(m_HookProc, nCode, wParam, lParam)
End Function