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

 

 


Tema destacado: Estamos en la red social de Mastodon


  Mostrar Mensajes
Páginas: 1 ... 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 [31] 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
301  Programación / Programación Visual Basic / Re: Reiniciar y Apagar Windows en: 8 Enero 2007, 06:04 am
Disculpen el code que postie no va a funcionar porque le falta una parte... Escribo en un post nuevo xq si modifico no le va a avisar a los que hayan usado este code. Agreguen esto al modulo:

Código:
Public Type LUID
   UsedPart As Long
   IgnoredForNowHigh32BitPart As Long
End Type


Sancho.Mazorka    :P
302  Programación / Programación Visual Basic / Re: Reiniciar y Apagar Windows en: 7 Enero 2007, 22:09 pm
No veo el notepad, si no que veo en la barra de tareas que dice "Sin titulo - Bloc de Notas"   :S

PD: como se llama ese cuadradito donde dice "Sin titulo - Bloc de Notas" en la barra de tareas, ...tarea ?

Sancho.Mazorka   :P
303  Programación / Programación Visual Basic / Re: Reiniciar y Apagar Windows en: 6 Enero 2007, 21:30 pm
Si se eso, pero a mi no me sirve, lo veo igual :S  pero no veo la ventana, solo veo la ventanita minimiza...


Sancho.Mazorka     :P
304  Programación / Programación Visual Basic / Re: Opinen de aplicacion cliente/servidor en: 5 Enero 2007, 16:14 pm
Aja muy bueno, si no me equivoco es un troyano eso, pero de donde lo bajamos o solo nos lo estas mostrando ? ah otra cosa, tenes IP dinamica seguro es al pedo ocultar la IP  :P


Sancho.Mazorka    :P
305  Programación / Programación Visual Basic / Re: Reiniciar y Apagar Windows en: 5 Enero 2007, 16:03 pm
EON pense en eso tmb pero si keres hacer algo discreto sin que se note la presencia del programa conviene usar todas esas funciones, ya que con la consola se ve el proceso y el cartelito, aunque le pongas -t 0 .


Sancho.Mazorka     :P
306  Programación / Programación Visual Basic / Re: Reiniciar y Apagar Windows en: 5 Enero 2007, 05:59 am
Si lo queres poner en un Form a los Public cambialos por Private.

Modulo:
Código:
'API
Public Declare Function ExitWindowsEx Lib "user32" (ByVal uFlags As Long, ByVal dwReserved As Long) As Long

'TIPOS DE PRIVILEGIOS
Public Type TOKEN_PRIVILEGES
   PrivilegeCount As Long
   TheLuid As LUID
   Attributes As Long
End Type

'TIPOS PARA APGAR LA PC
Public Enum EnumExitWindows
   WE_LOGOFF = 0
   WE_SHUTDOWN = 1
   WE_REBOOT = 2
   WE_POWEROFF = 8
End Enum

' + + + + + | PERMISOS | + + + + + '
Public Sub AdjustToken()
Const TOKEN_ADJUST_PRIVILEGES = &H20
Const TOKEN_QUERY = &H8
Const SE_PRIVILEGE_ENABLED = &H2
Dim hdlProcessHandle As Long
Dim hdlTokenHandle As Long
Dim tmpLuid As LUID
Dim tkp As TOKEN_PRIVILEGES
Dim tkpNewButIgnored As TOKEN_PRIVILEGES
Dim lBufferNeeded As Long
hdlProcessHandle = GetCurrentProcess()
OpenProcessToken hdlProcessHandle, (TOKEN_ADJUST_PRIVILEGES Or _
TOKEN_QUERY), hdlTokenHandle
LookupPrivilegeValue "", "SeShutdownPrivilege", tmpLuid
tkp.PrivilegeCount = 1
tkp.TheLuid = tmpLuid
tkp.Attributes = SE_PRIVILEGE_ENABLED
AdjustTokenPrivileges hdlTokenHandle, False, _
tkp, Len(tkpNewButIgnored), tkpNewButIgnored, lBufferNeeded
End Sub

' + + + + + | APAGAR, REINICIAR, CERRAR SESION, SUSPENDER PC | + + + + + '
Public Sub ExitWindows(ByVal aOption As EnumExitWindows)
AdjustToken
   Select Case aOption
      Case EnumExitWindows.WE_LOGOFF
         ExitWindowsEx (EnumExitWindows.WE_LOGOFF Or EWX_FORCE), &HFFFF
      Case EnumExitWindows.WE_REBOOT
         ExitWindowsEx (EnumExitWindows.WE_SHUTDOWN Or EWX_FORCE Or EnumExitWindows.WE_REBOOT), &HFFFF
      Case EnumExitWindows.WE_SHUTDOWN
         ExitWindowsEx (EnumExitWindows.WE_SHUTDOWN Or EWX_FORCE), &HFFFF
      Case EnumExitWindows.WE_POWEROFF
         ExitWindowsEx (EnumExitWindows.WE_POWEROFF Or EWX_FORCE), &HFFFF
   End Select
End Sub

Para llamar a los diferentes eventos de shutdown:
Código:
ExitWindows WE_SHUTDOWN 'Apagar
ExitWindows WE_REBOOT 'Reiniciar
ExitWindows WE_LOGOFF 'Cierra sesion
ExitWindows WE_POWEROFF 'Suspende

Bueno x lo menos te hice buscar algo de lo que necesitabas, me dio cosa no darte el code  ;)
La proxima busca, xq yo lo sake de aca a este code.

Sancho.Mazorka     :P
307  Programación / Programación Visual Basic / Re: Make easy 1.0.83 (3/1/07) en: 5 Enero 2007, 05:32 am
Que fumas seibur ?
No se para que te molestas en avisarnos si hasta que no nos des una prueba de confianza no lo vamos a usar  :P


Sancho.Mazorka    :P
308  Programación / Programación Visual Basic / Re: Reiniciar y Apagar Windows en: 5 Enero 2007, 02:58 am
Man casi nunca hago esto! pero BUSCA en este foro ya se hablo de esto!  En la parte de troyanos hay mucho!


Sancho.Mazorka    :P
309  Programación / Programación Visual Basic / Re: Guia Como hacer para mover el mouse y hacer click en: 4 Enero 2007, 18:39 pm
El error fue provocado xq los parentesis se usan solo cuando se usa una variable de verificacion Ej:
Código:
Ret = SetCursorPos(X, Y)
Si no iria asi Ej:
Código:
SetCursorPos X, Y

Pero tambien hay otro error ahi, una variable no va dentro de comillas, y no pueden ser letras en el SetCursorPos.
[ Talvez que uds le pusieron las comillas en modo de demostracion ]

Topaz_34 mira cuando pones:
 Public delante de una Variable, Api o Constante debe ir en un Modulo si o si y lo puede utilizar cualquier Form o Modulo u otro Objeto.
 Private solo el Modulo o Form u otro Objeto que contenga esa Variable, Api o Constante podra utilizarlas
 Si no le pones Public o Private osea que queda directamente Declare, tiene que ir en un Modulo y funciona igual que si fuese Public.

Las unicas constantes que no conozco son estas, las otras si xq ya he utilizado el SetCursorPos y el Mouse_Event:  :huh:

Código:
Const WHEEL_DELTA = 120 ' Cuando se suelta la rueda ?
Const XBUTTON1 = &H1 ' ... ?
Const XBUTTON2 = &H2 ' ... ?
Const MOUSEEVENTF_WHEEL = &H80 ' Cuando se apreta la rueda ?

Alguien me diria que evento harian.... X favor!

Muchas gracias y Salu2


Sancho.Mazorka    :P
310  Programación / Programación Visual Basic / Re: Problemas para borrar un archivo en: 2 Enero 2007, 20:16 pm
Piojento tiene razon no funciona el:
Kill Ruta & Archivo
asi que no sigan rompiendo las bolas, como 12 personas deben haber puesto lo mismo, fijate esto lo sake de la Api-Guide esperemos que te sirva

Código:
'This program needs a Dialog box, named CDBox1
'  (To add the Common Dialog Box to your tools menu, go to Project->Components (or press CTRL-T)
'   and select Microsoft Common Dialog control)
Private Type FILETIME
    dwLowDateTime As Long
    dwHighDateTime As Long
End Type
Private Type SHFILEOPSTRUCT
    hWnd As Long
    wFunc As Long
    pFrom As String
    pTo As String
    fFlags As Integer
    fAborted As Boolean
    hNameMaps As Long
    sProgress As String
End Type
Private Type SYSTEMTIME
    wYear As Integer
    wMonth As Integer
    wDayOfWeek As Integer
    wDay As Integer
    wHour As Integer
    wMinute As Integer
    wSecond As Integer
    wMilliseconds As Integer
End Type
Private Const GENERIC_WRITE = &H40000000
Private Const OPEN_EXISTING = 3
Private Const FILE_SHARE_READ = &H1
Private Const FILE_SHARE_WRITE = &H2
Private Const FO_DELETE = &H3
Private Declare Function CopyFile Lib "kernel32" Alias "CopyFileA" (ByVal lpExistingFileName As String, ByVal lpNewFileName As String, ByVal bFailIfExists As Long) As Long
Private Declare Function CreateDirectory Lib "kernel32" Alias "CreateDirectoryA" (ByVal lpPathName As String, lpSecurityAttributes As Long) As Long
Private Declare Function DeleteFile Lib "kernel32" Alias "DeleteFileA" (ByVal lpFileName As String) As Long
Private Declare Function GetFileSize Lib "kernel32" (ByVal hFile As Long, lpFileSizeHigh As Long) As Long
Private Declare Function GetFileTime Lib "kernel32" (ByVal hFile As Long, lpCreationTime As FILETIME, lpLastAccessTime As FILETIME, lpLastWriteTime As FILETIME) As Long
Private Declare Function MoveFile Lib "kernel32" Alias "MoveFileA" (ByVal lpExistingFileName As String, ByVal lpNewFileName As String) As Long
Private Declare Function CreateFile Lib "kernel32" Alias "CreateFileA" (ByVal lpFileName As String, ByVal dwDesiredAccess As Long, ByVal dwShareMode As Long, lpSecurityAttributes As Long, ByVal dwCreationDisposition As Long, ByVal dwFlagsAndAttributes As Long, ByVal hTemplateFile As Long) As Long
Private Declare Function CloseHandle Lib "kernel32" (ByVal hObject As Long) As Long
Private Declare Function SHFileOperation Lib "shell32.dll" Alias "SHFileOperationA" (lpFileOp As SHFILEOPSTRUCT) As Long
Private Declare Function FileTimeToSystemTime Lib "kernel32" (lpFileTime As FILETIME, lpSystemTime As SYSTEMTIME) As Long
Private Declare Function FileTimeToLocalFileTime Lib "kernel32" (lpFileTime As FILETIME, lpLocalFileTime As FILETIME) As Long
Private Sub Form_Load()
    'KPD-Team 1998
    'URL: http://www.allapi.net/
    'E-Mail: KPDTeam@Allapi.net
    Dim lngHandle As Long, SHDirOp As SHFILEOPSTRUCT, lngLong As Long
    Dim Ft1 As FILETIME, Ft2 As FILETIME, SysTime As SYSTEMTIME
    'Set the dialog's title
    CDBox.DialogTitle = "Choose a file ..."
    'Raise an error when the user pressed cancel
    CDBox.CancelError = True
    'Show the 'Open File'-dialog
    CDBox.ShowOpen
    'Create a new directory
    CreateDirectory "C:\KPD-Team", ByVal &H0
    'Copy the selected file to our new directory
    CopyFile CDBox.filename, "C:\KPD-Team\" + CDBox.FileTitle, 0
    'Rename the file
    MoveFile "C:\KPD-Team\" + CDBox.FileTitle, "C:\KPD-Team\test.kpd"
    'Open the file
    lngHandle = CreateFile("C:\KPD-Team\test.kpd", GENERIC_WRITE, FILE_SHARE_READ Or FILE_SHARE_WRITE, ByVal 0&, OPEN_EXISTING, 0, 0)
    'Get the file's size
    MsgBox "The size of the selected file is" + Str$(GetFileSize(lngHandle, lngLong)) + " bytes."
    'Get the fil's time
    GetFileTime lngHandle, Ft1, Ft1, Ft2
    'Convert the file time to the local file time
    FileTimeToLocalFileTime Ft2, Ft1
    'Convert the file time to system file time
    FileTimeToSystemTime Ft1, SysTime
    MsgBox "The selected file was created on" + Str$(SysTime.wMonth) + "/" + LTrim(Str$(SysTime.wDay)) + "/" + LTrim(Str$(SysTime.wYear))
    'Close the file
    CloseHandle lngHandle
    'Delete the file
    DeleteFile "C:\KPD-Team\test.kpd"
    With SHDirOp
        .wFunc = FO_DELETE
        .pFrom = "C:\KPD-Team"
    End With
    'Delete the directory
    SHFileOperation SHDirOp
    End
End Sub

Si no kieres borrar el archivo x VB, bajate el Ashampoo AntiSpyware, tiene unas opciones para borrar ese tipo de archivos "inborrables", tiene 3 modos de borrado:

Estandar: 3 pasos de reescritura, puede recuperarse en un laboratorio de recuperacion.
DoD 5220.22-M: 7 pasos de reescritura, dificiles de restaurar.
Metodo Gutmann: 35 pasos de reescritura, imposible de restaurar.


Sancho.Mazorka    :P
Páginas: 1 ... 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 [31] 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines