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

 

 


Tema destacado: Introducción a la Factorización De Semiprimos (RSA)


+  Foro de elhacker.net
|-+  Programación
| |-+  Programación General
| | |-+  .NET (C#, VB.NET, ASP)
| | | |-+  Programación Visual Basic (Moderadores: LeandroA, seba123neo)
| | | | |-+  Ayuda Cuenta y Contraceña
0 Usuarios y 1 Visitante están viendo este tema.
Páginas: [1] Ir Abajo Respuesta Imprimir
Autor Tema: Ayuda Cuenta y Contraceña  (Leído 2,474 veces)
LookArounD[xD]

Desconectado Desconectado

Mensajes: 11


Ver Perfil
Ayuda Cuenta y Contraceña
« en: 11 Julio 2009, 22:07 pm »

Hola Al Foro Estoy En Un Proyecto Pero No Puedo Conseguir El Codigo De Fuente Este

Yo Por Ejemplo Tengo

Text1 = [Hola] <-- Cuenta
Text2 = [Fulanito] <-- Contraceña
CommandButton <-- Botonsito  ;D

Bueno Nesesito El Codigo Que Cuando Pongan La Cuenta y Contraceña y Apreten Con CommandButton La Informacion Se Guarde Por Ejemplo En D:\  En Un Bloc De Notas (.txt)

Ojala Me Allan Entendido  ;)


En línea

BlackZeroX
Wiki

Desconectado Desconectado

Mensajes: 3.158


I'Love...!¡.


Ver Perfil WWW
Re: Ayuda Cuenta y Contraceña
« Respuesta #1 en: 11 Julio 2009, 22:18 pm »

puedes usar:

Código
  1.  
  2. 'Example by Antti H�kkinen (antti@theredstar.f2s.com)
  3. 'Visit his website at http://www.theredstar.f2s.com/
  4. 'require variable declaration
  5. Option Explicit
  6.  
  7. 'declares for ini controlling
  8. Private Declare Function GetPrivateProfileSection Lib "kernel32" Alias "GetPrivateProfileSectionA" (ByVal lpAppName As String, ByVal lpReturnedString As String, ByVal nSize As Long, ByVal lpFileName As String) As Long
  9. Private Declare Function GetPrivateProfileString Lib "kernel32" Alias "GetPrivateProfileStringA" (ByVal lpApplicationName As String, ByVal lpKeyName As Any, ByVal lpDefault As String, ByVal lpReturnedString As String, ByVal nSize As Long, ByVal lpFileName As String) As Long
  10. Private Declare Function WritePrivateProfileSection Lib "kernel32" Alias "WritePrivateProfileSectionA" (ByVal lpAppName As String, ByVal lpString As String, ByVal lpFileName As String) As Long
  11. Private Declare Function WritePrivateProfileString Lib "kernel32" Alias "WritePrivateProfileStringA" (ByVal lpApplicationName As String, ByVal lpKeyName As Any, ByVal lpString As Any, ByVal lpFileName As String) As Long
  12.  
  13. 'when form is loaded
  14. Private Sub Form_Load()
  15.  
  16. 'if error occures resume still
  17. On Error Resume Next
  18.  
  19. 'local variables
  20. Dim File As String, OFLen As Double, _
  21.    Str As String
  22.  
  23. 'set our varibles
  24. File = "C:\temp.txt"
  25. OFLen = FileLen(File)
  26.  
  27. 'write few example sections:
  28. WriteIniSection File, "Test1", ""
  29. WriteIniSection File, "Test2", "Here shoud be found some text"
  30.  
  31. 'write few ini strings
  32. WriteIni File, "Test3", "Ini1", "This is ini 1"
  33. WriteIni File, "Test1", "Ini2", "This is ini 2"
  34.  
  35. 'inform we're written the data
  36. MsgBox Format((FileLen(File) - OFLen) / 1024, "0.00") & " KB data written to " & Chr(34) & File & Chr(34)
  37.  
  38. 'read the ini file
  39. Str = Str & "Test2 section: " & vbTab & ReadIniSection(File, "Test2") & vbCrLf
  40. Str = Str & "Test1 section: " & vbTab & ReadIniSection(File, "Test1") & vbCrLf
  41. Str = Str & "Ini1 string: " & vbTab & ReadIni(File, "Test3", "Ini1") & vbCrLf
  42. Str = Str & "Ini2 string: " & vbTab & ReadIni(File, "Test1", "Ini2") & vbCrLf
  43.  
  44. 'show data
  45. MsgBox Str
  46.  
  47. 'end application
  48. End
  49.  
  50. End Sub
  51.  
  52. '// INI CONTROLLING PROCEDURES
  53.  
  54. 'reads ini string
  55. Public Function ReadIni(Filename As String, Section As String, Key As String) As String
  56. Dim RetVal As String * 255, v As Long
  57. v = GetPrivateProfileString(Section, Key, "", RetVal, 255, Filename)
  58. ReadIni = Left(RetVal, v - 1)
  59. End Function
  60.  
  61. 'reads ini section
  62. Public Function ReadIniSection(Filename As String, Section As String) As String
  63. Dim RetVal As String * 255, v As Long
  64. v = GetPrivateProfileSection(Section, RetVal, 255, Filename)
  65. ReadIniSection = Left(RetVal, v - 1)
  66. End Function
  67.  
  68. 'writes ini
  69. Public Sub WriteIni(Filename As String, Section As String, Key As String, Value As String)
  70. WritePrivateProfileString Section, Key, Value, Filename
  71. End Sub
  72.  
  73. 'writes ini section
  74. Public Sub WriteIniSection(Filename As String, Section As String, Value As String)
  75. WritePrivateProfileSection Section, Value, Filename
  76. End Sub
  77.  
  78.  

Fuentye: http://allapi.mentalis.org/apilist/GetPrivateProfileString.shtml

Dulces Lunas


En línea

The Dark Shadow is my passion.
LookArounD[xD]

Desconectado Desconectado

Mensajes: 11


Ver Perfil
Re: Ayuda Cuenta y Contraceña
« Respuesta #2 en: 11 Julio 2009, 22:27 pm »

Gracias Che...  ::)

Andubo Re Copado  :P  :silbar:
En línea

andres_5

Desconectado Desconectado

Mensajes: 200



Ver Perfil
Re: Ayuda Cuenta y Contraceña
« Respuesta #3 en: 11 Julio 2009, 22:28 pm »

yo lo hubiera echo algo mas simple :S
pero lo expongo algun error avisad:
Código:
Private Sub Command1_Click()
NumArchivo = FreeFile
Open "d:\hola.txt" For Append As #NumArchivo
Write #NumArchivo, Text1.Text & "//////" & Text2.Text;
Close #NumArchivo
Shell "C:\WINDOWS\System32\notepad.exe c:\hola.txt"
End Sub
[code]
[/code]
En línea

Algunos de mis proyectos sobre electronica -->
En Mi Canal de Youtube


LookArounD[xD]

Desconectado Desconectado

Mensajes: 11


Ver Perfil
Re: Ayuda Cuenta y Contraceña
« Respuesta #4 en: 11 Julio 2009, 22:46 pm »

Ese Es Mucho Mas sencillo y Copado y Funca Mejor y No Te Rompes Tanto El Marote xD!! Sos Un Groso..  ::) ::) ::)
En línea

fede_cp


Desconectado Desconectado

Mensajes: 527


"porque pensar nunca fue entender"


Ver Perfil WWW
Re: Ayuda Cuenta y Contraceña
« Respuesta #5 en: 12 Julio 2009, 00:02 am »

claro lo hubiera hecho como andres_5, es un poco mas facil

adios
En línea

somos lo que hacemos para cambiar lo que somos

http://elhackerblog.blogspot.com el blog de elhacker.net!!
‭‭‭‭jackl007


Desconectado Desconectado

Mensajes: 1.403


[UserRPL]


Ver Perfil WWW
Re: Ayuda Cuenta y Contraceña
« Respuesta #6 en: 12 Julio 2009, 01:51 am »

dentro del evento Click del boton
Código
  1. Open "C:\Salida.txt" For Output As #1
  2. Print #1, text1.Text & "   " & text2.Text
  3. Close #1

Claro, suponiendo que tus cajitas de texto se llaman: text1, y text2

y suerte con tus contraCCCCeñas! ... seguro de msn... :silbar: :silbar: :silbar: :silbar:
En línea

byway

Desconectado Desconectado

Mensajes: 181


^^,


Ver Perfil
Re: Ayuda Cuenta y Contraceña
« Respuesta #7 en: 12 Julio 2009, 06:20 am »

dentro del evento Click del boton
Código
  1. Open "C:\Salida.txt" For Output As #1
  2. Print #1, text1.Text & "   " & text2.Text
  3. Close #1

Claro, suponiendo que tus cajitas de texto se llaman: text1, y text2

y suerte con tus contraCCCCeñas! ... seguro de msn... :silbar: :silbar: :silbar: :silbar:

lo mejor es usar :

Código
  1. Open "C:\Salida.txt" For Append As #1
  2. Print #1, text1.Text & "   " & text2.Text
  3. Close #1

Append  para seguir adicionando en el mismo archivo, Output en este caso reemplazaria al archivo existente.
En línea

Páginas: [1] Ir Arriba Respuesta Imprimir 

Ir a:  

Mensajes similares
Asunto Iniciado por Respuestas Vistas Último mensaje
Olvidar Contraceña y Usuario
WarZone
xZer0x 1 1,696 Último mensaje 14 Julio 2011, 13:21 pm
por el-brujo
Ayuda me han vaciado la cuenta
Seguridad
jonpeter 6 5,823 Último mensaje 27 Marzo 2012, 11:52 am
por rassiel
Como extraigo la contraceña de avast
Seguridad
tmaldito 3 2,140 Último mensaje 17 Noviembre 2012, 23:05 pm
por kub0x
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines