Zum Inhalt wechseln

Als Gast hast du nur eingeschränkten Zugriff!


Anmelden 

Benutzerkonto erstellen

Du bist nicht angemeldet und hast somit nur einen sehr eingeschränkten Zugriff auf die Features unserer Community.
Um vollen Zugriff zu erlangen musst du dir einen Account erstellen. Der Vorgang sollte nicht länger als 1 Minute dauern.

  • Antworte auf Themen oder erstelle deine eigenen.
  • Schalte dir alle Downloads mit Highspeed & ohne Wartezeit frei.
  • Erhalte Zugriff auf alle Bereiche und entdecke interessante Inhalte.
  • Tausche dich mich anderen Usern in der Shoutbox oder via PN aus.
 

   

Foto

[TUT] Windows CD key auslesen

- - - - -

  • Bitte melde dich an um zu Antworten
5 Antworten in diesem Thema

#1
kotzbroedchen

kotzbroedchen

    Script Kiddie

  • Members
  • PIPPIPPIPPIP
  • Likes
    7
  • 37 Beiträge
  • 7 Bedankt
Mit den hier nachstehenden Zeilen ist es möglich den Windows key auszulesen.

Editor auf und reinkopiert:

Set WshShell = CreateObject("WScript.Shell")
MsgBox ConvertToKey(WshShell.RegRead("HKLMSOFTWAREMicrosoftWindows NTCurrentVersionDigitalProductId"))

Function ConvertToKey(Key)
Const KeyOffset = 52
i = 28
Chars = "BCDFGHJKMPQRTVWXY2346789"
Do
Cur = 0
x = 14
Do
Cur = Cur * 256
Cur = Key(x + KeyOffset) + Cur
Key(x + KeyOffset) = (Cur 24) And 255
Cur = Cur Mod 24
x = x -1
Loop While x >= 0
i = i -1
KeyOutput = Mid(Chars, Cur + 1, 1) & KeyOutput
If (((29 - i) Mod 6) = 0) And (i <> -1) Then
i = i -1
KeyOutput = "-" & KeyOutput
End If
Loop While i >= 0
ConvertToKey = KeyOutput
End Function




Abgespeichert und die .txt Datei in .vbs umbenannt.

fertig
  • will, Xenio und Cube gefällt das
Das ist keine Lüge sondern eine sachzwangreduzierte Ehrlichkeit

Thanked by 1 Member:
Jar3d

#2
Jar3d

Jar3d

    Noob

  • Members
  • PIPPIP
  • Likes
    2
  • 13 Beiträge
  • 0 Bedankt
  • Windows, Linux
Super, vielen Dank für den Code. Als interessierter Coder finde ich es immer spannend Codes von anderen zu analysieren.
Funktioniert bei mir übrigens einwandfrei.

Grüße,

Jar3d

#3
Blackfox

Blackfox

    Lamer

  • Banned
  • PIPPIPPIP
  • Likes
    2
  • 16 Beiträge
  • 1 Bedankt
Hier das ganze mal modern in VB.net

Imports Microsoft.Win32
Imports System

Public Class Key
    Private Sub Key_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
	    'Ließt den Namen des Betriebssystems und den Produktschlüssel aus.
	    MsgBox("Betriebssystem: " & My.Computer.Info.OSFullName & " Key: " & WindowsCDKey.ToString, MsgBoxStyle.Information, "Informationen:")
    End Sub
#Region "Read Key"
    ''' Reads the Windows CD key from the registry and returns it as string separated by '-' chars.
    Public Shared ReadOnly Property WindowsCDKey() As String
	    Get
		    Dim rKey As RegistryKey = Registry.LocalMachine.OpenSubKey("SOFTWARE\Microsoft\Windows NT\CurrentVersion")
		    Dim rpk As Byte() = DirectCast(rKey.GetValue("DigitalProductId", New Byte(-1) {}), Byte())
		    Dim strKey As String = ""
		    Const iRPKOffset As Integer = 52
		    Const strPossibleChars As String = "BCDFGHJKMPQRTVWXY2346789"
		    Dim i As Integer = 28
		    Do
			    Dim lAccu As Long = 0
			    Dim j As Integer = 14
			    Do
				    lAccu *= 256
				    lAccu += Convert.ToInt64(rpk(iRPKOffset + j))
				    rpk(iRPKOffset + j) = Convert.ToByte(Convert.ToInt64(Math.Floor(CSng(lAccu) / 24.0F)) And Convert.ToInt64(255))
				    lAccu = lAccu Mod 24
				    j -= 1
			    Loop While j >= 0
			    i -= 1
			    strKey = strPossibleChars(CInt(lAccu)).ToString() & strKey
			    If (0 = ((29 - i) Mod 6)) AndAlso (-1 <> i) Then
				    i -= 1
				    strKey = "-" & strKey
			    End If
		    Loop While i >= 0
		    Return strKey
	    End Get
    End Property

    ''' Reads the Windows CD key from the registry and returns it as string array.
    '''
    Public Shared ReadOnly Property WindowsCDKeyParts() As String()
	    Get
		    Dim strKeyParts As String() = WindowsCDKey.Split("-"c)
		    Return strKeyParts
	    End Get
    End Property
#End Region
End Class

Bearbeitet von Blackfox, 05 December 2014 - 17:32 Uhr.


#4
nibble nibble

nibble nibble

    Pentester

  • Premium Member
  • Likes
    32
  • 101 Beiträge
  • 24 Bedankt

Mit den hier nachstehenden Zeilen ist es möglich den Windows key auszulesen.

Editor auf und reinkopiert:

Set WshShell = CreateObject("WScript.Shell")
MsgBox ConvertToKey(WshShell.RegRead("HKLMSOFTWAREMicrosoftWindows NTCurrentVersionDigitalProductId"))

Function ConvertToKey(Key)
Const KeyOffset = 52
i = 28
Chars = "BCDFGHJKMPQRTVWXY2346789"
Do
Cur = 0
x = 14
Do
Cur = Cur * 256
Cur = Key(x + KeyOffset) + Cur
Key(x + KeyOffset) = (Cur 24) And 255
Cur = Cur Mod 24
x = x -1
Loop While x >= 0
i = i -1
KeyOutput = Mid(Chars, Cur + 1, 1) & KeyOutput
If (((29 - i) Mod 6) = 0) And (i <> -1) Then
i = i -1
KeyOutput = "-" & KeyOutput
End If
Loop While i >= 0
ConvertToKey = KeyOutput
End Function




Abgespeichert und die .txt Datei in .vbs umbenannt.

fertig


Bei mir geht es nur wenn ich Zeile 30 so schreibe
"KeyInput(x + KeyOffset) = (Cur \ 24) And 255" Ohne ""
System Win7 64bit.
%0|%0

#5
Blackhook

Blackhook

    Pentester

  • Premium Member
  • Likes
    22
  • 106 Beiträge
  • 50 Bedankt
  • Android
  • Windows
Hier noch Mal funktionierende Versionbei Windows 8.1 64 bit

Set WshShell = CreateObject("WScript.Shell")
MsgBox ConvertToKey(WshShell.RegRead("HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\DigitalProductId"))

Function ConvertToKey(Key)
Const KeyOffset = 52
i = 28
Chars = "BCDFGHJKMPQRTVWXY2346789"
Do
Cur = 0
x = 14
Do
Cur = Cur * 256
Cur = Key(x + KeyOffset) + Cur
Key(x + KeyOffset) = (Cur \ 24) And 255
Cur = Cur Mod 24
x = x -1
Loop While x >= 0
i = i -1
KeyOutput = Mid(Chars, Cur + 1, 1) & KeyOutput
If (((29 - i) Mod 6) = 0) And (i <> -1) Then
i = i -1
KeyOutput = "-" & KeyOutput
End If
Loop While i >= 0
ConvertToKey = KeyOutput
End Function

Ich bin ein Trottel


Thanked by 1 Member:
X3RT0

#6
smc2014

smc2014

    Moderator

  • Moderator
  • Likes
    343
  • 576 Beiträge
  • 239 Bedankt
  • Spender
  • Android [root]
  • Windows, Linux
Habe mal alle Shells ausprobiert:

Also der von Croco geteilte Shell, funktioniert auch einwandfrei unter WINDOWS 7 64bit.

Bei NibbleNibble bekomm ich ein "Typenkonflikt:KeyInput" wobei auch zu achten ist das die MsgBox Zeile folgendermaßen aussieht:
MsgBox ConvertToKey(WshShell.RegRead("HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\DigitalProductId"))


LG



  Thema Forum Themenstarter Statistik Letzter Beitrag

Besucher die dieses Thema lesen:

Mitglieder: , Gäste: , unsichtbare Mitglieder:


This topic has been visited by 78 user(s)


    , .:dodo:., 4cyberstudios, acidvirus23, Alpha63, Amphe1337, Arrina, aVitamin, b.giuseppe74, Benutzer, BioLord2013, Blackfox, Blackhook, BlackZetsu, bleiregen22, blue_eyed_devil, Caruso, cayra, Ch!ller, christjames, classics, cooky1, core, corkscrew, Cube, Dr. p0rk, DramaModz1234, dusa, eckhau, Eester, Emalik Xantier, EvilB6, FakeKeyUser, Framerater, FullMetall, Gerald, H2Olli, hackEmcee, Haksor, hofnarr, Husti_nett, Imperial, izibitzi, Jar3d, Julius K9, Julius-K9, Juri, kalixa, kennydark, kotzbroedchen, lion., lolorollo, Lyrix, Mantrayana, Minimax, Mk3E, most_uniQue, nibble nibble, Nissan300zx, oreagel, PaulaAbdul, paulaner, pdr0, pechpilz, peppi200, Phesii, phoenixx592, r00t, romiro, Skylinerz, smc2014, Streetboz, TheSector, Unkiii, will, X3RT0, Xenio, Zero-X
Die besten Hacking Tools zum downloaden : Released, Leaked, Cracked. Größte deutschsprachige Hacker Sammlung.