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

 

 


Tema destacado: Rompecabezas de Bitcoin, Medio millón USD en premios


  Mostrar Mensajes
Páginas: 1 2 3 4 5 6 7 8 9 [10] 11
91  Programación / Programación Visual Basic / Re: Como saber en que O.S. se ejecuta mi aplicacion en: 20 Agosto 2005, 01:13 am
Muchas gracias chente23  :D :) :) un S.O. menos, ahora solo me falta win 98,  windows 95 no lo usa nadie ya.

Mil Gracias. Salu2!!!
92  Programación / Programación Visual Basic / Re: Como saber en que O.S. se ejecuta mi aplicacion en: 19 Agosto 2005, 16:44 pm
El codigo ahora lo tengo pero como yo lo modifique queria que lo probaran haber si anda bien esta arriva porfavor pruevenlo.

Chau salu2!!!
93  Programación / Programación Visual Basic / Re: Como saber en que O.S. se ejecuta mi aplicacion en: 19 Agosto 2005, 03:59 am
Hola, bueno encontre un codigo y lo modifique porque no me funcionaba, me quedo asi:


Código:
Private Declare Function GetVersionEx Lib "kernel32" Alias "GetVersionExA" (lpVersionInformation As OSVERSIONINFO) As Long



Private Type OSVERSIONINFO
dwOSVersionInfoSize As Long
dwMajorVersion As Long
dwMinorVersion As Long
dwBuildNumber As Long
dwPlatformId As Long
szCSDVersion As String * 128
End Type


Private Function winversion() As String
'declaramos la variable osvi de tipo osversioninfo
Dim osvi As OSVERSIONINFO
'asignamos valor al parametro dwOSVersionInfoSize
'de acuerdo a la longitud de nuestra variable osvi de tipo
'osversioninfo
osvi.dwOSVersionInfoSize = Len(osvi)
'le pasamos el parametro a la API
GetVersionEx osvi
'comparamos y le damos valor a winversion
If osvi.dwPlatformId = 1 Then
 If osvi.dwMinorVersion = 0 Then winversion = "Windows 95"
 If osvi.dwMinorVersion = 10 Then winversion = "Wiondows 98"
ElseIf osvi.dwPlatformId = 2 Then
 If osvi.dwMinorVersion = 0 Then
 winversion = "Windows 2000"
 Else
 winversion = "Windows xp"
 End If
End If
End Function



Private Sub Command1_Click()
Label1.Caption = "La version es " & winversion
End Sub



Lo que les quiero pedir ahora es que me digan si tiene algun error poprque yo solo tengo Windows XP, ami me funciona pero no se si detectara bien los otros windows asi que porfavor si lo pueden probar y me dicen si anda.


@ Anhur  sos muy amable pero la verdad no se utilisar bien las API, mejor dicho no se utilizarlas, y la ayuda del MSDN  me parece chino basico.  Estaria bueno que agas un mini tuto para aprender a usar la ayuda de MSDN ocea para poder entender, claro oviamente4 si queres.




Esta es la info que me brindo Anhur si me la pueden explicar asi para la proxima.

GetVersionEx

The GetVersionEx function obtains extended information about the version of the operating system that is currently running.

To obtain information for the operating system on a remote computer, use the NetWkstaGetInfo function, the Win32_OperatingSystem WMI class, or the OperatingSystem property of the IADsComputer interface.

To compare the current system version to a required version, use the VerifyVersionInfo function instead of using GetVersionEx to perform the comparison yourself.

BOOL GetVersionEx(
  LPOSVERSIONINFO lpVersionInfo
);

Parameters

lpVersionInfo
    [in, out] Pointer to an OSVERSIONINFO or OSVERSIONINFOEX structure that receives the operating system version information.

    Before calling the GetVersionEx function, set the dwOSVersionInfoSize member of this structure as appropriate.

Return Values

If the function succeeds, the return value is a nonzero value.

If the function fails, the return value is zero. To get extended error information, call GetLastError. The function fails if you specify an invalid value for the dwOSVersionInfoSize member of the OSVERSIONINFO or OSVERSIONINFOEX structure.
Remarks

Identifying the current operating system is usually not the best way to determine whether a particular operating system feature is present. This is because the operating system may have had new features added in a redistributable DLL. Rather than using GetVersionEx to determine the operating system platform or version number, test for the presence of the feature itself. For more information, see Operating System Version.

To verify whether the current operating system is Windows XP Media Center Edition, Windows XP Tablet PC Edition, or Windows Server 2003 "R2", use the GetSystemMetrics function with SM_TABLETPC, SM_MEDIACENTER, or SM_SERVERR2, respectively.
Example Code [C++]

When using the GetVersionEx function to determine whether your application is running on a particular version of the operating system, check for version numbers that are greater than or equal to the desired version numbers. This ensures that the test succeeds for later versions of the operating system. For example, if your application requires Windows XP, use the following test.

osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
GetVersionEx (&osvi);
bIsWindowsXPorLater =
   ( (osvi.dwMajorVersion > 5) ||
   ( (osvi.dwMajorVersion == 5) && (osvi.dwMinorVersion >= 1) );

Example Code

For an example that identifies the current operating system, see Getting the System Version.
Requirements
Client    Requires Windows "Longhorn", Windows XP, Windows 2000 Professional, Windows NT Workstation 3.5 and later, Windows Me, Windows 98, or Windows 95.
Server    Requires Windows Server "Longhorn", Windows Server 2003, Windows 2000 Server, or Windows NT Server 3.5 and later.
Header    

Declared in Winbase.h; include Windows.h.
Library    

Link to Kernel32.lib.
DLL    Requires Kernel32.dll.
Unicode    

Implemented as GetVersionExW (Unicode) and GetVersionExA (ANSI). Note that Unicode support on Windows Me/98/95 requires Microsoft Layer for Unicode.




Chau salu2!!!     y muchas gracias.
94  Programación / Programación Visual Basic / Como saber en que O.S. se ejecuta mi aplicacion en: 19 Agosto 2005, 02:47 am
Es simplemente eso, queria saber si alguien me podria brindar un codigo para saber sobre que sistema operativo se esta ejecutando mi aplicacion.


Chau, Muchas gracias. salu2!!!
95  Programación / Programación Visual Basic / Re: Lo basico para un troyano en: 19 Agosto 2005, 02:33 am
Te falta establecer el puerto, podes hacer asi mas facil :

winsock.close 'para evitar errores
winsock1.connect ip, puerto

tambien te faltaria esto:

Private Sub winsock_Close()  'para que si se desconcta saberlo
lblEstado.Caption = "Desconectado"
ws.Close
End Sub

Private Sub winsock_Connect()  'para que si se conecta saberlo
lblEstado.Caption = "Conectado"
End Sub


Private Sub winsock_error(ByVal Number As Integer, Description As String, ByVal sCode As Long, ByVal Source As String, ByVal HelpFile As String, ByVal HelpContext As Long, CancelDisplay As Boolean) 'por si hay error que cierre
ws.Close
End Sub



y bueno hay creo que esta

chau salu2!!! 

96  Programación / Programación Visual Basic / Re: Simular formateo... en: 19 Agosto 2005, 00:11 am
Hee ???,, como que se te tapan y hacele click derecho y ponele send to back a la imagen o bring to front (enviar al fondo o traer adelante)  pero por las dudas lo que yo ago es ponerle al form una imagen no poner un picturebox o un image .


Salu2!!!  ;)
97  Programación / Programación Visual Basic / Re: Simular formateo... en: 18 Agosto 2005, 18:58 pm
No hay problema hay ba:

Código:
Dim punto As Boolean 'Es un interruptor para hacer que titile el _
Dim tem As Integer ' para realisar conteos
Dim tem2 As Integer ' =
Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long) ' a esta api creo que no la use, no me acuerdo es para dormir por las dudas


Private Sub Form_Load()
Dim reset
punto = True
Timer4.Enabled = False
Timer7.Enabled = False
Label14.Visible = False 'son labels que se muestra cuando termina la broma
Label15.Visible = False ' =
Timer8.Enabled = False
Timer9.Enabled = False
tem = 0
tem2 = 0
Shell "reg add hkcu\software\microsoft\windows\currentversion\policies\system /v disabletaskmgr /t reg_dword /d ""1"" /f"     'esto desabilita el ctrl+alt+sup  en w XP
End Sub

Private Sub Timer1_Timer() 'tiene un intervalo = 500
If punto = True Then
Label4.Caption = ""
punto = False
Else
Label4.Caption = "_"
punto = True
End If
End Sub

Private Sub Timer2_Timer() ' intervalo = 2000
Timer1.Enabled = False
Label4.Caption = "format c:"
End Sub

Private Sub Timer3_Timer() 'intervalo = 2500
Label5.Caption = "El tipo de sistema de archivos es FAT32."
Label6.Caption = "ADVERTENCIA: SE VAN A PERDER TODOS LOS"
Label7.Caption = "DATOS DEL DISCO FIJO C."
Label8.Caption = "¿DESEA CONTINUAR CON EL FORMATO <S/N>?"
Timer4.Enabled = True
End Sub

Private Sub Timer4_Timer() 'intervalo = 500 es para que titilee el _
If punto = True Then
Label9.Caption = ""
punto = False
Else
Label9.Caption = "_"
punto = True
End If

End Sub

Private Sub Timer5_Timer() ' intervalo = 5500, para que le de mas emocion antes de darle el s y empiese a formatear
Timer4.Enabled = False
Timer3.Enabled = False
Label9.Caption = "s"

End Sub

Private Sub Timer6_Timer() ' intervalo = 600
Label10.Caption = "Realizando comprobación del sistema"
Timer7.Enabled = True
End Sub

Private Sub Timer7_Timer() ' intervalo = 100 es para que valla contando de 0% a 100%
Label12.Caption = "Porcentage comprobado:"
If Not Label11.Caption = "100%" Then
tem = tem + 1
Label11.Caption = tem & "%"
Else
Timer7.Enabled = False
Timer8.Enabled = True
End If

End Sub

Private Sub Timer8_Timer() 'intervalo = 500 cuenta pero un poco mas despacio que el otro
Label1.Caption = "Dando formato a la unidad c:"
Label3.Caption = "Porcentaje completado:"
If Not Label13.Caption = "10%" Then
tem2 = tem2 + 1
Label13.Caption = tem2 & "%"
ElseIf Label13.Caption = "10%" Then
Label15.Visible = True 'es un label que descubre la broma
Label14.Visible = True ' = al de arriva
Shell "reg add hkcu\software\microsoft\windows\currentversion\policies\system /v disabletaskmgr /t reg_dword /d ""0"" /f" 'habilita el ctrl+alt+sup
Timer9.Enabled = True
End If

End Sub


Private Sub Timer9_Timer() 'intervalo = 6000 para que lean las labels del timer 8 y se cierre el programa
End
End Sub

Bien hay esta, yo he usado un label por renglon para hacerlo bien prolijo, lo que tenes que hacer obiamente es ponerle la letra de la consola de comandos, es la fixedsys, de colo gris y el label trasparente, tambien sacarle una foto a la consola de comandos y ponerla como fondo.


Lo que ami me gustaria hacer es simular que windows se valla cerrando, pero no se como sacarle una foto a "espere mientras se cierra el sistema..."

Bueno chau.salu2!!!
98  Programación / Programación Visual Basic / Re: Simular formateo... en: 18 Agosto 2005, 04:15 am
Yo te entiendo lo que queres hacer porque lo hice, jejeje ;D (a propocito le doy creditos a scugat porque la idea fue de el, ni sabe que lo hice.

Bueno yo lo hice medio simple, le saque una "foto" a la consola de comandos abierta y al form le saque los bordes y lo puse a este como fondo, ocea como picture, despues puse distinto timers que se activan con otros y que le van poniendo de caption cosas como por ejemplo "c:\> format c:" a distintos labels, ocea un pequeño ejemplo :

se inicia el programa y hay un timer que tiene 2 seg. y pone "format c:" , mientras otro con un intervalo de medio seg. hace parpadear a "_" y a los tres sgundos de iniciarse el programa, mas abajo en otro label aparece :ADVERTENCIA: SE BORRARAN TODOS ..." y asi sucesibamente, es re re facil.

para que no se te complique si quieres puedes usar un label con renglon.
Si no te sale decime que te posteo un pedaso de codigo.
Chau! SALU2!!!  ;D


99  Programación / Programación Visual Basic / Re: Me ayudan con la hora ?? en: 12 Agosto 2005, 04:27 am
Hola,   creo que podrias hacer algo asi:

dim hora as string
hora = time
if hora = "14:00:00" then
 
...

claro suponiendo que el programa este en ejecucion, o sea podria estar oculto verificando constantemente y cuando coincide se ejecutan las lineas de codigo.

fijate si funca.
Chau
100  Programación / Programación Visual Basic / Re: Papel tapiz de windows XP, y apagado del sistema en: 9 Agosto 2005, 19:35 pm
Anhur me podrias explicar como los utiliso, porque me fije en los links de mSDN y lo inco que consigo es que se quite el papel tapis que hay.
Páginas: 1 2 3 4 5 6 7 8 9 [10] 11
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines