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

 

 


Tema destacado: (TUTORIAL) Aprende a emular Sentinel Dongle By Yapis


+  Foro de elhacker.net
|-+  Programación
| |-+  Scripting
| | |-+  Script para sacar la licencia de windows
0 Usuarios y 1 Visitante están viendo este tema.
Páginas: [1] Ir Abajo Respuesta Imprimir
Autor Tema: Script para sacar la licencia de windows  (Leído 3,836 veces)
wokamon

Desconectado Desconectado

Mensajes: 3


Ver Perfil
Script para sacar la licencia de windows
« en: 30 Septiembre 2019, 14:55 pm »

Muy buenas,

He encontrado un script que te da la licencia de windows ejecutándolo, pero me gustaría que el documento que se genera al final, se pudiera enviar directamente a un correo, como lo podria haceR?

Código
  1. Option Explicit
  2.  
  3. Dim objshell,path,DigitalID, Result, strComputerName, strUserName
  4. Set objshell = CreateObject("WScript.Shell")
  5. strComputerName = objshell.ExpandEnvironmentStrings( "%COMPUTERNAME%" )
  6. strUserName = objshell.ExpandEnvironmentStrings( "%USERNAME%" )
  7. 'WScript.Echo "Computer Name: " & strComputerName
  8. 'Set registry key path
  9. Path = "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\"
  10. 'Registry key value
  11. DigitalID = objshell.RegRead(Path & "DigitalProductId")
  12. Dim ProductName,ProductID,ProductKey,ProductData, ComputerName, USERNAME
  13. 'Get ProductName, ProductID, ProductKey
  14. USERNAME= "User Name: " & strUserName
  15. ComputerName= "Computer Name: " & strComputerName
  16. ProductName = "Product Name: " & objshell.RegRead(Path & "ProductName")
  17. ProductID = "Product ID: " & objshell.RegRead(Path & "ProductID")
  18. ProductKey = "Installed Key: " & ConvertToKey(DigitalID)
  19. ProductData = ProductName  & vbNewLine & ProductID  & vbNewLine & ProductKey & vblf &  ComputerName & vblf & username
  20. 'Show messbox if save to a file
  21. If vbYes = MsgBox(ProductData & vblf & vblf & vblf &"Save to a file?", vbYesNo + vbQuestion, "BackUp Windows Key Information") then
  22.   Save ProductData
  23. End If
  24.  
  25.  
  26.  
  27. 'Convert binary to chars
  28. Function ConvertToKey(Key)
  29.    Const KeyOffset = 52
  30.    Dim isWin8, Maps, i, j, Current, KeyOutput, Last, keypart1, insert
  31.    'Check if OS is Windows 8
  32.    isWin8 = (Key(66) \ 6) And 1
  33.    Key(66) = (Key(66) And &HF7) Or ((isWin8 And 2) * 4)
  34.    i = 24
  35.    Maps = "BCDFGHJKMPQRTVWXY2346789"
  36.    Do
  37.       Current= 0
  38.        j = 14
  39.        Do
  40.           Current = Current* 256
  41.           Current = Key(j + KeyOffset) + Current
  42.           Key(j + KeyOffset) = (Current \ 24)
  43.           Current=Current Mod 24
  44.            j = j -1
  45.        Loop While j >= 0
  46.        i = i -1
  47.        KeyOutput = Mid(Maps,Current+ 1, 1) & KeyOutput
  48.        Last = Current
  49.    Loop While i >= 0
  50.    keypart1 = Mid(KeyOutput, 2, Last)
  51.    insert = "N"
  52.    KeyOutput = Replace(KeyOutput, keypart1, keypart1 & insert, 2, 1, 0)
  53.    If Last = 0 Then KeyOutput = insert & KeyOutput
  54.    ConvertToKey = Mid(KeyOutput, 1, 5) & "-" & Mid(KeyOutput, 6, 5) & "-" & Mid(KeyOutput, 11, 5) & "-" & Mid(KeyOutput, 16, 5) & "-" & Mid(KeyOutput, 21, 5)
  55.  
  56.  
  57. End Function
  58. 'Save data to a file
  59. Function Save(Data)
  60.    Dim fso, fName, txt,objshell,UserName
  61.    Set objshell = CreateObject("wscript.shell")
  62. 'Get current user name
  63.    UserName = objshell.ExpandEnvironmentStrings("%UserName%")
  64.    'Create a text file on desktop
  65.    fName = "C:\Users\" & UserName & "\Desktop\WindowsKeyInfo.txt"
  66.    Set fso = CreateObject("Scripting.FileSystemObject")
  67.    Set txt = fso.CreateTextFile(fName)
  68.    txt.Writeline Data
  69.    txt.Close
  70. End Function
  71.  
  72.  

Muchas GRacias


« Última modificación: 30 Septiembre 2019, 15:56 pm por wokamon » En línea

Monkeykiller_vb

Desconectado Desconectado

Mensajes: 25



Ver Perfil
Re: Script para sacar la licencia de windows
« Respuesta #1 en: 10 Octubre 2019, 03:43 am »

Prueba subiendo el resultado por la URL de una página PHP, que envíe la info a un correo


En línea

Atte.
Páginas: [1] Ir Arriba Respuesta Imprimir 

Ir a:  

Mensajes similares
Asunto Iniciado por Respuestas Vistas Último mensaje
[BATCH]Script simple para sacar raices cuadradas exactas
Scripting
onixes001 1 9,439 Último mensaje 23 Marzo 2009, 07:02 am
por bolivianito
script para sacar emails de paginas webs [python] [v3.0] « 1 2 3 »
Scripting
Kase 21 21,471 Último mensaje 25 Febrero 2014, 14:54 pm
por Afterlife
[Ayuda] licencia trial over script
Scripting
thirma 0 1,584 Último mensaje 18 Febrero 2016, 16:26 pm
por thirma
script para sacar tamaño directorios
Scripting
cristiansbd95 3 2,895 Último mensaje 15 Noviembre 2018, 19:02 pm
por tincopasan
Sanchez tendrá que pedir la licencia de obras al PP para sacar a Franco.
Foro Libre
@XSStringManolo 0 2,174 Último mensaje 24 Junio 2019, 05:33 am
por @XSStringManolo
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines