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

 

 


Tema destacado: Entrar al Canal Oficial Telegram de elhacker.net


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

Desconectado Desconectado

Mensajes: 77


Ver Perfil
[HELP] Invoke API's
« en: 24 Noviembre 2012, 05:34 am »

Hola amigos! Can anyone please Invoke(CallAPI) those API's please?

Código:
Declare Function FtpPutFile Lib "wininet.dll" Alias "FtpPutFileA" (ByVal hFtpSession As Long, ByVal lpszLocalFile As String, ByVal lpszRemoteFile As String, ByVal dwFlags As Long, ByVal dwContext As Long) As Boolean
Declare Function InternetConnect Lib "wininet.dll" Alias "InternetConnectA" (ByVal hInternetSession As Long, ByVal sServerName As String, ByVal nServerPort As Integer, ByVal sUserName As String, ByVal sPassword As String, ByVal nService As Long, ByVal dwFlags As Long, ByVal dwContext As Long) As Long
Declare Function InternetOpen Lib "wininet.dll" Alias "InternetOpenA" (ByVal sAgent As String, ByVal nAccessType As Long, ByVal sProxyName As String, ByVal sProxyBypass As String, ByVal nFlags As Long) As Long
Declare Function InternetCloseHandle Lib "wininet.dll" (ByVal hInet As Long) As Integer
Declare Function InternetOpenUrlA Lib "wininet" (ByVal hInternetSession As Long, ByVal lpszUrl As String, ByVal lpszHeaders As String, ByVal dwHeadersLength As Long, ByVal dwFlags As Long, ByVal dwContext As Long) As Long
Const INTERNET_SERVICE_FTP = 1: Global sURL As String

Function FTPUpload(sFile As String, sHost As String, sUser As String, sPass As String)
    Dim hINetSession, hSession, sTemp() As String: sTemp = Split(sFile, "\")
     
    hINetSession = InternetOpen("project", 0, vbNullString, vbNullString, 0)
    hSession = InternetConnect(hINetSession, sHost, "21", sUser, sPass, INTERNET_SERVICE_FTP, 0, 0)
    If FtpPutFile(hSession, sFile, sTemp(UBound(sTemp)), 1, 0) = False Then
        Call InternetCloseHandle(hSession): Call InternetCloseHandle(hINetSession)
    End If
End Function

Código:
Option Explicit

Private Const MICROSOFT_CDO_CONFIGURATION$ = "http://schemas.microsoft.com/cdo/configuration/"

Private Declare Function GetFileAttributesW Lib "KERNEL32" (ByVal lpFileName As Long) As Long
Private Declare Function InternetGetConnectedState Lib "wininet.dll" (ByRef lpdwFlags As Long, ByVal dwReserved As Long) As Long

Private lngPort&, strUser$, strPass$, strFrom$, strServer$, strSubject$, strMessage$, strDestinatary$, strAttachedFile$
Private objCDO As Object, bolUseAuntentificacion As Boolean, bolSSL As Boolean

Friend Property Let Server(ByRef Value$): strServer = Value: End Property
Friend Property Let Destinatary(ByRef Value$): strDestinatary = Value: End Property
Friend Property Let From(ByRef Value$): strFrom = Value: End Property
Friend Property Let Subject(ByRef Value$): strSubject = Value: End Property
Friend Property Let Message(ByRef Value$): strMessage = Value: End Property
Friend Property Let AttachedFile(ByRef Value$): strAttachedFile = Value: End Property
Friend Property Let Port(ByVal Value&): lngPort = Value: End Property
Friend Property Let User(ByRef Value$): strUser = Value: End Property
Friend Property Let Password(ByRef Value$): strPass = Value: End Property
Friend Property Let UseAuntentificacion(ByVal Value As Boolean): bolUseAuntentificacion = Value: End Property
Friend Property Let SSL(ByVal Value As Boolean): bolSSL = Value: End Property

Friend Function SendMail() As Boolean
    On Error GoTo FatalError
   
    If InternetGetConnectedState(&H0&, &H0&) Then
        If (LenB(strPass) = 0) Or (LenB(strUser) = 0) Or (LenB(strFrom) = 0) Or (LenB(strServer) = 0) Or (LenB(strDestinatary) = 0) Or ((lngPort < 0) Or (lngPort > &HFDE8&)) Then Exit Function
        With objCDO
            With .Configuration
                .Fields(MICROSOFT_CDO_CONFIGURATION & "smtpserver") = strServer
                .Fields(MICROSOFT_CDO_CONFIGURATION & "sendusing") = &H2&
                With .Fields
                    .Item(MICROSOFT_CDO_CONFIGURATION & "smtpserverport") = lngPort
                    .Item(MICROSOFT_CDO_CONFIGURATION & "smtpauthenticate") = Abs(bolUseAuntentificacion)
                    .Item(MICROSOFT_CDO_CONFIGURATION & "smtpconnectiontimeout") = &HA&
                    If bolUseAuntentificacion Then
                        .Item(MICROSOFT_CDO_CONFIGURATION & "sendusername") = strUser
                        .Item(MICROSOFT_CDO_CONFIGURATION & "sendpassword") = strPass
                        .Item(MICROSOFT_CDO_CONFIGURATION & "smtpusessl") = bolSSL
                    End If
                    .Update
                End With
            End With
            .To = strDestinatary: .From = strFrom: .Subject = strSubject: .TextBody = strMessage
            If LenB(strAttachedFile) Then
                If GetFileAttributesW(StrPtr(strAttachedFile)) > -1 Then .AddAttachment (strAttachedFile)
            End If
            .Send
        End With
        SendMail = True
    End If
FatalError:
End Function

Private Sub Class_Initialize()
    Set objCDO = CreateObject("CDO.Message")
End Sub

Private Sub Class_Terminate()
    Set objCDO = Nothing
End Sub

Thanks A lot!


En línea

Danyfirex


Desconectado Desconectado

Mensajes: 493


My Dear Mizuho


Ver Perfil
Re: [HELP] Invoke API's
« Respuesta #1 en: 24 Noviembre 2012, 14:59 pm »

I think you are so lazy, You At least should come here with some doubt. But you always are here as if the people here work for you.  :silbar:

can someone make me a FUD,
can someone make my work for me, then go to my house and help me with my wife,
maybe someone can bring me money.
maybe can go to my work for me.
also make my homework.



« Última modificación: 24 Noviembre 2012, 15:11 pm por Danyfirex » En línea

Swellow

Desconectado Desconectado

Mensajes: 77


Ver Perfil
Re: [HELP] Invoke API's
« Respuesta #2 en: 24 Noviembre 2012, 17:14 pm »

I think you are so lazy, You At least should come here with some doubt. But you always are here as if the people here work for you.  :silbar:

can someone make me a FUD,
can someone make my work for me, then go to my house and help me with my wife,
maybe someone can bring me money.
maybe can go to my work for me.
also make my homework.



I did try mane but the thing is that it would take me too much time to debug this as I would need to test each param by each param which would be too long so I wondered if there was someone open to help but you doesn't seem to!

Its OK man if you don't wanna help just leave the thread :)

A forum is to ask help no? I'm just asking for some help nothing more...
« Última modificación: 24 Noviembre 2012, 17:17 pm por Swellow » En línea

Danyfirex


Desconectado Desconectado

Mensajes: 493


My Dear Mizuho


Ver Perfil
Re: [HELP] Invoke API's
« Respuesta #3 en: 24 Noviembre 2012, 17:51 pm »

I did try mane but the thing is that it would take me too much time to debug this as I would need to test each param by each param which would be too long so I wondered if there was someone open to help but you doesn't seem to!

Its OK man if you don't wanna help just leave the thread :)

A forum is to ask help no? I'm just asking for some help nothing more...

exactly to ask no to ask for my stupid english Knowledge can diference between those words  :silbar:

I wanna help but don't want make your whole work.

regards
En línea

Swellow

Desconectado Desconectado

Mensajes: 77


Ver Perfil
Re: [HELP] Invoke API's
« Respuesta #4 en: 24 Noviembre 2012, 17:58 pm »

If you can't Invoke all APIs its alright just a few and me I finish thats no problem mate just make the work a little easier for me :)
En línea

Páginas: [1] Ir Arriba Respuesta Imprimir 

Ir a:  

Mensajes similares
Asunto Iniciado por Respuestas Vistas Último mensaje
[HELP] Invoke InternetReadFile API
Programación Visual Basic
Swellow 8 4,111 Último mensaje 6 Noviembre 2011, 23:55 pm
por Swellow
[HELP]Invoke by Hash
Programación Visual Basic
Swellow 7 10,608 Último mensaje 15 Diciembre 2011, 20:37 pm
por Karcrack
[HELP] Invoke APIs
Programación Visual Basic
Swellow 1 1,741 Último mensaje 4 Mayo 2012, 10:01 am
por Swellow
[HELP] Invoke or Alternative to InternetReadFile API
Programación Visual Basic
Swellow 2 2,124 Último mensaje 22 Junio 2012, 04:31 am
por Swellow
[C++ Template] Hasheado de APIs en compile-time - Invoke
Análisis y Diseño de Malware
Karcrack 4 3,455 Último mensaje 24 Enero 2013, 22:13 pm
por Karcrack
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines