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

 

 


Tema destacado: Curso de javascript por TickTack


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

Desconectado Desconectado

Mensajes: 194


Programmer


Ver Perfil WWW
Function FileCreate [VB6]
« en: 22 Enero 2010, 17:53 pm »

Código:
'Coded By The Swash at 22/01/2010
'Web: http://Infrangelux.sytes.net & www.Indetectables.net
'Function to create file, replace Open,Put,Close
'Thx to BlackZeroX
Option Explicit
Public Function FileCreate(ByVal sPath As String, ByVal sInfo As String) As Long
Dim sObj      As Object
Dim sCreate   As Object
 
 If Len(sInfo) > 0 Then
 MsgBox Len(sInfo)
  Set sObj = CreateObject("Scripting.FileSystemObject")
  If Not sObj Is Nothing Then
   Set sCreate = sObj.CreateTextFile(sPath, True)
   sCreate.Write sInfo
   sCreate.Close
  End If
  Set sObj = Nothing
 FileCreate = 1
 End If
 
End Function

Uso:

Código:
Private Sub Command1_Click()
Dim sFile As String

 Open "C:\x.exe" For Binary Access Read As #1
  sFile = String(FileLen("C:\x.exe"), " ")
  Get #1, , sFile
 Close #1
 
 If FileCreate("c:\xd.exe", sFile) = 1 Then MsgBox "Done"
 
End Sub

Salu2  :smile:


En línea

Páginas: [1] Ir Arriba Respuesta Imprimir 

Ir a:  

Mensajes similares
Asunto Iniciado por Respuestas Vistas Último mensaje
[C] PEFileSize function
Programación C/C++
The Swash 4 2,776 Último mensaje 27 Enero 2011, 01:16 am
por The Swash
[Delphi] PEFileSize function
Programación General
Khronos14 1 1,966 Último mensaje 25 Enero 2011, 17:53 pm
por The Swash
Function(Crear Matriz) C++
Programación C/C++
NecBalaam 5 6,757 Último mensaje 23 Agosto 2011, 04:57 am
por NecBalaam
API TerminateProcess function « 1 2 »
Programación C/C++
Dark Invader 12 6,503 Último mensaje 11 Octubre 2011, 05:51 am
por Karman
Function Driver y FDO
Análisis y Diseño de Malware
wachi 0 1,640 Último mensaje 9 Abril 2012, 22:20 pm
por wachi
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines