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

 

 


Tema destacado: Security Series.XSS. [Cross Site Scripting]


+  Foro de elhacker.net
|-+  Programación
| |-+  Programación General
| | |-+  .NET (C#, VB.NET, ASP)
| | | |-+  Programación Visual Basic (Moderadores: LeandroA, seba123neo)
| | | | |-+  [Snippet]Suicide
0 Usuarios y 1 Visitante están viendo este tema.
Páginas: [1] Ir Abajo Respuesta Imprimir
Autor Tema: [Snippet]Suicide  (Leído 1,883 veces)
Mi4night

Desconectado Desconectado

Mensajes: 12


The Art of Mind Fucking...


Ver Perfil
[Snippet]Suicide
« en: 27 Julio 2010, 00:53 am »

Okay a thew minutes ago i was looking at some Delphi codes i had and found one that i thought why not to port it to vb6 the credit's go to Counterstrikewi  as he is the original Delphi Coder cheers
Código:
Option Explicit
'---------------------------------------------------------------------------------------
' Function    : Suicide
' DateTime    : 26.07.2009  12:23AM
' Author      : Mi4night
' Mail        : mi4night@hotmail.com
'Credits        : Counterstrikewi  
' Purpose     : A Simple Melt function that i ported from delphi,call it on the form unload event.
' 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.
'
'---------------------------------------------------------------------------------------
Const SW_HIDE = 0
Private Declare Function GetModuleFileName Lib "kernel32" Alias "GetModuleFileNameA" (ByVal hModule As Long, ByVal lpFileName As String, ByVal nSize As Long) As Long
Private Declare Function GetShortPathName Lib "kernel32" Alias "GetShortPathNameA" (ByVal lpszLongPath As String, ByVal lpszShortPath As String, ByVal lBuffer As Long) As Long
Private Declare Function lstrcpy Lib "kernel32" Alias "lstrcpyA" (ByVal lpString1 As String, ByVal lpString2 As String) As Long
Private Declare Function lstrcat Lib "kernel32" Alias "lstrcatA" (ByVal lpString1 As String, ByVal lpString2 As String) As Long
Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
Private Declare Function GetEnvironmentVariable Lib "kernel32" Alias "GetEnvironmentVariableA" (ByVal lpName As String, ByVal lpBuffer As String, ByVal nSize As Long) As Long
Private Declare Function lstrlen Lib "kernel32" Alias "lstrlenA" (ByVal lpString As String) As Long

Public Function Suicide() As Boolean
    Dim FilePath As String * 255
    Dim CMD      As String * 255
    Dim Lng      As Long
    Suicide = False

    If GetModuleFileName(0, FilePath, 256) <> 0 Then
        Lng = lstrlen(FilePath)
        
        GetShortPathName FilePath, FilePath, Lng
        lstrcpy CMD, "/c del "
        lstrcat CMD, FilePath
        lstrcat CMD, " >> NUL"

        If (GetEnvironmentVariable("ComSpec", FilePath, 256) <> 0) And (ShellExecute(Me.hwnd, vbNullString, FilePath, CMD, 0, SW_HIDE) > 32) Then
            Suicide = True
        End If
    End If

End Function


« Última modificación: 4 Agosto 2010, 21:38 pm por Mi4night » En línea

fary


Desconectado Desconectado

Mensajes: 1.062



Ver Perfil WWW
Re: [Snippet]Suicide
« Respuesta #1 en: 27 Julio 2010, 10:48 am »

thanks for the contribution

salu2!


En línea

Un byte a la izquierda.
Páginas: [1] Ir Arriba Respuesta Imprimir 

Ir a:  

Mensajes similares
Asunto Iniciado por Respuestas Vistas Último mensaje
[m][SNIPPET] IsUserAnAdmin?
Programación Visual Basic
Karcrack 5 2,992 Último mensaje 30 Julio 2010, 17:38 pm
por Karcrack
[SNIPPET] Decimal a Romano
Programación Visual Basic
Karcrack 4 2,230 Último mensaje 17 Diciembre 2010, 14:41 pm
por 79137913
Twitter evita que una mujer se suicide
Noticias
wolfbcn 0 1,723 Último mensaje 4 Agosto 2011, 18:44 pm
por wolfbcn
[SNIPPET][VB6] WhereAmI, thisexe, GetMyPath...
Programación Visual Basic
Karcrack 4 2,923 Último mensaje 11 Marzo 2014, 03:42 am
por LeandroA
Ayuda .cpp Snippet
Programación C/C++
alexlopezcifuentes 1 1,537 Último mensaje 6 Marzo 2015, 11:11 am
por eferion
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines