Menú

Mostrar Mensajes

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ú

Mensajes - Karcrack

#1271
Código (vb) [Seleccionar]
Option Explicit
'---------------------------------------------------------------------------------------
' Module    : mNativeGetDrives
' Author    : Karcrack
' Date      : 09/09/2009
' Purpose   : Alternative to GetLogicalDrives/GetLogicalDriveStrings/GetDriveType
'               using NATIVE APIs!!!!
' Thanks    : SkyWeb -> Tester =P
' ChangeLog :
'           - First release                                             090909
'           - Improved, now with structure and added NtGetDriveType     100909
'---------------------------------------------------------------------------------------

'NTDLL
Private Declare Function NtQueryInformationProcess Lib "NTDLL" (ByVal hProcess As Long, ByVal ProcessInformationClass As Long, ProcessInformation As Any, ByVal ProcessInformationLength As Long, ReturnLength As Long) As Long

Private Type PROCESS_DEVICEMAP_INFORMATION
    DriveMap                As Long
    DriveType(1 To 32)      As Byte
End Type

Private Const ProcessDeviceMap = 23

Public Function NtGetLogicalDrives() As Long
    Dim tPDC                    As PROCESS_DEVICEMAP_INFORMATION
   
    If NtQueryInformationProcess(-1, ProcessDeviceMap, tPDC, Len(tPDC), ByVal 0&) = 0 Then
        NtGetLogicalDrives = tPDC.DriveMap
    End If
End Function

Public Function NtGetLogicalDrivesStrings() As String
    Dim lUnits                  As Long
    Dim i                       As Long
   
    lUnits = NtGetLogicalDrives
   
    For i = 0 To 25
        If lUnits And 2 ^ i Then
            NtGetLogicalDrivesStrings = NtGetLogicalDrivesStrings & Chr$(Asc("A") + i) & ":\" & Chr$(0)
        End If
    Next i
End Function

Public Function NtGetDriveType(ByVal nDrive As String) As Long
    Dim tPDC                    As PROCESS_DEVICEMAP_INFORMATION
    Dim lNumb                   As Long
   
    If NtQueryInformationProcess(-1, ProcessDeviceMap, tPDC, Len(tPDC), ByVal 0&) = 0 Then
        lNumb = Asc(Left$(UCase$(nDrive), 1)) - Asc("A")
        If Not lNumb > 31 Then
            NtGetDriveType = tPDC.DriveType(lNumb + 1)
        End If
    End If
End Function


Un ejemplo de uso aqui:
http://www.advancevb.com.ar/wp-content/2009/09/mNativeGetVersion.zip

Saludos ::)
#1272
Cita de: YST en  7 Septiembre 2009, 20:06 PM
Muy buen code ;)

Tienes una memoria que la quisiera yo ya ni me acordaba que te habia mencionado la idea de que emdiante Mutex se podia bloquear el taskmngr :D

Saludos
jajaja... cuantos años hace de eso? :xD :xD

No me acordaba ni que eras tu el que me comento lo del mutex :xD... Me acuerdo cuando lo intente... con Mutex no funciona solo.... hay que hacer lo de la ventana ::)
#1273
Metodo similar a este:
http://foro.elhacker.net/programacion_vb/src_deshabilitar_taskmgr_nuevo_metodo-t266708.0.html
Código (vb) [Seleccionar]
Option Explicit
'---------------------------------------------------------------------------------------
' Module    : mKillRegedit
' Author    : Karcrack
' Now$      : 07/09/09 17:25
' Used for? : Disable Regedit
' TestedOn  : Windows XP SP3
'---------------------------------------------------------------------------------------

'USER32
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, ByRef lpParam As Any) As Long
Private Declare Function RegisterClass Lib "USER32" Alias "RegisterClassA" (ByRef Class As WNDCLASS) As Long
Private Declare Function DefWindowProc Lib "USER32" Alias "DefWindowProcA" (ByVal Hwnd As Long, ByVal msg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long

Private Type WNDCLASS
   style           As Long
   lpfnwndproc     As Long
   cbClsextra      As Long
   cbWndExtra2     As Long
   hInstance       As Long
   hIcon           As Long
   hCursor         As Long
   hbrBackground   As Long
   lpszMenuName    As String
   lpszClassName   As String
End Type

Public Sub DisableRegedit()
   Dim tWC     As WNDCLASS
 
   With tWC
       .style = &H6008
       .hInstance = App.hInstance
       .lpfnwndproc = GetPtr(AddressOf WndProc)
       .lpszMenuName = "#103"
       .lpszClassName = "RegEdit_RegEdit"
   End With
 
   If RegisterClass(tWC) Then
       Call CreateWindowEx(&H40000, "RegEdit_RegEdit", vbNullString, ByVal 0&, 0, 0, 0, 0, 0, 0, App.hInstance, ByVal 0&)
   End If
End Sub

Private Function WndProc(ByVal Hwnd As Long, ByVal uMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long
   WndProc = DefWindowProc(Hwnd, uMsg, wParam, lParam)
End Function

Private Function GetPtr(ByVal lPtr As Long) As Long
   GetPtr = lPtr
End Function


Saludos ;)



MOD: Se me olvidaba! Para ejecutar multiples instancias del Regedit pueden hacer esto:
regedit -m
Con lo que se saltarian esta 'deshabilitacion' :xD
#1274
Programación Visual Basic / Re: Una alludita?
7 Septiembre 2009, 17:45 PM
Alguien puede bloquear el tema por favor?

El tema esta resuelto hace tiempo...
#1275
Código (vb) [Seleccionar]
Option Explicit
'---------------------------------------------------------------------------------------
' Module    : mKillTaskMgr
' Author    : Karcrack
' Now$      : 07/09/09 16:03
' Used for? : Disable TaskMgr
' Tested On : Windows XP, Windows Vista, Windows 7
' Thanks    : SkyWeb -> Support and Test (W$ Seven & Vista)
'---------------------------------------------------------------------------------------

'KERNEL32
Private Declare Function CreateMutexW Lib "KERNEL32" (ByRef lpMutexAttributes As Long, ByVal bInitialOwner As Long, ByVal lpuName As Long) As Long
Private Declare Function FreeLibrary Lib "KERNEL32" (ByVal hLibModule As Long) As Long
Private Declare Function LoadLibrary Lib "KERNEL32" Alias "LoadLibraryA" (ByVal lpLibFileName As String) As Long
'USER32
Private Declare Function SetWindowLong Lib "USER32" Alias "SetWindowLongA" (ByVal Hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong 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, ByRef lpParam As Any) As Long
Private Declare Function LoadString Lib "USER32" Alias "LoadStringA" (ByVal hInstance As Long, ByVal wID As Long, ByVal lpBuffer As String, ByVal nBufferMax As Long) As Long
Private Declare Function CallWindowProc Lib "USER32" Alias "CallWindowProcA" (ByVal lpPrevWndFunc As Long, ByVal Hwnd As Long, ByVal msg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long

Private lpPrev      As Long

Public Sub DisableTaskMgr()
    Call CreateMutexW(ByVal 0&, False, StrPtr("NTShell Taskman Startup Mutex"))                         'Windows XP
    Call CreateMutexW(ByVal 0&, False, StrPtr("Local\TASKMGR.879e4d63-6c0e-4544-97f2-1244bd3f6de0"))    'Windows 7
    Call CreateMutexW(ByVal 0&, False, StrPtr("Local\NTShell Taskman Startup Mutex"))                   'Windows Vista
    lpPrev = SetWindowLong(CreateWindowEx(&H40000, "#32770", GetTaskWinName, ByVal 0&, 0, 0, 0, 0, 0, 0, App.hInstance, ByVal 0&), (-4), AddressOf WndProc)
End Sub

Private Function GetTaskWinName() As String
    Dim hInst       As Long
    Dim sTMP        As String * 256
   
    hInst = LoadLibrary(Environ$("SYSTEMROOT") & "\SYSTEM32\TaskMgr.exe")
    If hInst Then
        GetTaskWinName = Left$(sTMP, LoadString(hInst, &H2713, sTMP, Len(sTMP)))
        Call FreeLibrary(hInst)
    End If
End Function

Private Function WndProc(ByVal Hwnd As Long, ByVal uMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long
    If uMsg = &H40B Then
        WndProc = &H40B
    Else
        WndProc = CallWindowProc(lpPrev, Hwnd, uMsg, wParam, lParam)
    End If
End Function


El codigo habla por si solo :P

Solo funciona mientras nuestro proceso continue activo...

Saludos ;)
#1276
Debug.Print ":-X"
:-X

Antes de hacer esto asegurate de tener la ventana de Inmediato visible... ([CTRL] + [G])
#1277
System.WinDir

Me suena a .NET :-X

Que tiene que ver que sea un nombre que una IP? Simplemente resuelve el Dominio.. :-\
http://allapi.mentalis.org/apilist/gethostbyname.shtml
http://msdn.microsoft.com/en-us/library/ms738524%28VS.85%29.aspx


MOD: Te he hecho una funcion:
Código (vb) [Seleccionar]
Option Explicit

Private Declare Function WSACleanup Lib "WSOCK32" () As Long
Private Declare Function WSAStartup Lib "WSOCK32" (ByVal wVersionRequired As Long, lpWSADATA As Any) As Long
Private Declare Function gethostbyname Lib "WSOCK32" (ByVal szHost As String) As Long
Private Declare Sub CopyMemory Lib "KERNEL32" Alias "RtlMoveMemory" (ByRef Destination As Any, ByRef Source As Any, ByVal Length As Long)

Private Type HOSTENT
    hName                       As Long
    hAliases                    As Long
    hAddrType                   As Integer
    hLen                        As Integer
    hAddrList                   As Long
End Type

Public Function GetIP(ByVal sHost As String) As String
    Dim WSAD(&H18E) As Byte
    Dim lpHost      As Long
    Dim HOST        As HOSTENT
    Dim dwIP        As Long
    Dim tIP()       As Byte
    Dim i           As Long
   
    If (WSAStartup(1, WSAD(0)) = 0) Then
        lpHost = gethostbyname(sHost)
        If lpHost Then
            Call CopyMemory(HOST, ByVal lpHost&, Len(HOST))
            Call CopyMemory(dwIP, ByVal HOST.hAddrList&, &H4)
            ReDim tIP(1 To HOST.hLen)
            Call CopyMemory(tIP(1), ByVal dwIP&, HOST.hLen)
            For i = 1 To HOST.hLen
                GetIP = GetIP & tIP(i) & "."
            Next i
            GetIP = Left$(GetIP, Len(GetIP) - 1)
        End If
        Call WSACleanup
    End If
End Function
#1278
Programación Visual Basic / Re: Una alludita?
5 Septiembre 2009, 11:57 AM
VERSION 5.00
Begin VB.Form frmMain
  BorderStyle     =   1  'Fixed Single
  Caption         =   "A Very Very Simple Encryption /Decryption"
  ClientHeight    =   3750
  ClientLeft      =   45
  ClientTop       =   330
  ClientWidth     =   5355
  Icon            =   "frmMain.frx":0000
  LinkTopic       =   "Form1"
  MaxButton       =   0   'False
  ScaleHeight     =   3750
  ScaleWidth      =   5355
  StartUpPosition =   1  'CenterOwner
  Begin VB.CommandButton Command4
     Caption         =   "About"
     Height          =   375
     Left            =   3720
     TabIndex        =   11
     Top             =   2640
     Width           =   1215
  End
  Begin VB.CommandButton Command3
     Caption         =   "Clear All"
     Height          =   375
     Left            =   2520
     TabIndex        =   5
     Top             =   2640
     Width           =   1215
  End
  Begin VB.TextBox Text3
     Height          =   975
     Left            =   2640
     MultiLine       =   -1  'True
     ScrollBars      =   2  'Vertical
     TabIndex        =   4
     Top             =   360
     Width           =   2535
  End
  Begin VB.CommandButton Command2
     Caption         =   "Decrypt"
     Height          =   375
     Left            =   1320
     TabIndex        =   3
     Top             =   2640
     Width           =   1215
  End
  Begin VB.CommandButton Command1
     Caption         =   "Encrypt"
     Height          =   375
     Left            =   120
     TabIndex        =   2
     Top             =   2640
     Width           =   1215
  End
  Begin VB.TextBox Text2
     Height          =   855
     Left            =   120
     MultiLine       =   -1  'True
     ScrollBars      =   2  'Vertical
     TabIndex        =   1
     Top             =   1680
     Width           =   2415
  End
  Begin VB.TextBox Text1
     Height          =   975
     Left            =   120
     MultiLine       =   -1  'True
     ScrollBars      =   2  'Vertical
     TabIndex        =   0
     Top             =   360
     Width           =   2415
  End
  Begin VB.Label Label5
     Caption         =   "PEACE , NO WAR SAVE PALESTINE"
     BeginProperty Font
        Name            =   "MS Sans Serif"
        Size            =   8.25
        Charset         =   0
        Weight          =   700
        Underline       =   0   'False
        Italic          =   0   'False
        Strikethrough   =   0   'False
     EndProperty
     Height          =   375
     Left            =   1080
     TabIndex        =   10
     Top             =   3240
     Width           =   3495
  End
  Begin VB.Label Label4
     Caption         =   "www.bajaklaut.tk                    www.softgra.tk                           softgra@hehe.com              Vote Me !!"
     Height          =   975
     Left            =   2760
     TabIndex        =   9
     Top             =   1560
     Width           =   2295
  End
  Begin VB.Label Label3
     Caption         =   "Decryption Result"
     Height          =   495
     Left            =   2640
     TabIndex        =   8
     Top             =   120
     Width           =   2295
  End
  Begin VB.Label Label2
     Caption         =   "Cipher Text (Encryption Result)"
     Height          =   495
     Left            =   120
     TabIndex        =   7
     Top             =   1440
     Width           =   2295
  End
  Begin VB.Label Label1
     Caption         =   "Clear Text"
     Height          =   495
     Left            =   120
     TabIndex        =   6
     Top             =   120
     Width           =   1695
  End
End
Attribute VB_Name = "frmMain"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim i, a As Integer
Dim result As String

Private Sub Command1_Click()
For i = 1 To Len(Text1.Text)
result = Asc(Mid(Text1.Text, i, 1))
Text2.Text = Chr(result + 3) + Text2.Text
Next i
End Sub

Private Sub Command2_Click()
For i = 1 To Len(Text2.Text)
result = Asc(Mid(Text2.Text, i, 1))
Text3.Text = Chr(result - 3) + Text3.Text
Next i
End Sub

Private Sub Command3_Click()
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
End Sub

Private Sub Command4_Click()
'frmAbout.Show
End Sub

http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=47667&lngWId=1

Crea un fichero *.frm y desde el Bloc De Notas pega lo de arriba... lo abres con el VB y solucionado...

Utiliza un crifrado Caesar... Muy simple...
#1279
Abril negro / Re: Proyecto Metamorph
5 Septiembre 2009, 11:31 AM
Todavia no hay una fecha establecida tcjunior...

Mirate estos manuales para modificar la IAT manualemente:
http://ricardonarvaja.info/WEB/CURSO%20NUEVO/TEORIAS%20NUMERADAS/201-300/253-IMPORT%20TABLES%20A%20MANO%20(parte%201).rar
http://ricardonarvaja.info/WEB/CURSO%20NUEVO/TEORIAS%20NUMERADAS/201-300/254-IMPORT%20TABLES%20A%20MANO%20(parte%202).rar
http://ricardonarvaja.info/WEB/CURSO%20NUEVO/TEORIAS%20NUMERADAS/201-300/255-IMPORT%20TABLES%20A%20MANO%20(parte%203).rar
http://ricardonarvaja.info/WEB/CURSO%20NUEVO/TEORIAS%20NUMERADAS/201-300/256-IMPORT%20TABLES%20A%20MANO%20(parte%204).rar
http://ricardonarvaja.info/WEB/CURSO%20NUEVO/TEORIAS%20NUMERADAS/1001-1100/1029-Importando%20funciones%20a%20mano_PARTE%20I_por%20Solid.rar
http://ricardonarvaja.info/WEB/CURSO%20NUEVO/TEORIAS%20NUMERADAS/1001-1100/1030-Importando%20funciones%20a%20mano_PARTE%20II_por%20Solid.rar


Saludos :D
#1280
Felicidades, y que puedas estar al mando del foro mummumumuuuuuuchos años mas ;D :xD


Happy Birthday Mr. el-brujo!! ♪♫♫♪♪