Toon posts:

Windows 10 keycode achterhalen?

Pagina: 1
Acties:

Vraag


Acties:
  • 0 Henk 'm!

Verwijderd

Topicstarter
Beste dames en heren,

Ik heb een Windows 10 Home desktop. Op mijn desktop zou ik graag ubuntu-mate willen installeren alleen wil ik voor de zekerheid mijn windows keycode opslaan zodat, mocht er ooit iets tegenzitten of ik wil het terug draaien, dit nog mogelijk is.

Dus mijn vraag, is het mogelijk om je Windows keycode ergens te achterhalen?
Alvast bedankt.

Met vriendelijke groet,

Alle reacties


Acties:
  • +1 Henk 'm!

  • Microkid
  • Registratie: Augustus 2000
  • Nu online

Microkid

Frontpage Admin / Moderator PW/VA

Smile

4800Wp zonnestroom met Enphase
Life's a waste of time. Time's a waste of life. Get wasted all the time and you'll have the time of your life.


Acties:
  • 0 Henk 'm!

  • Batch
  • Registratie: Mei 2014
  • Laatst online: 04-07 09:43
Met ProduKey kan dat.

https://www.nirsoft.net/utils/product_cd_key_viewer.html

Scroll helemaal naar beneden voor de download link.

Acties:
  • +1 Henk 'm!

Verwijderd

Topicstarter
Google doet het perfect, dit had ik ook al gevonden. Echter kan ik me herinneren dat dit vroeger gewoon in Windows zelf gezien kon worden in plaats van via een tool te downloaden die ik niet 100% vertrouw.

Acties:
  • 0 Henk 'm!

  • Speedmaster
  • Registratie: Juli 2005
  • Laatst online: 23:18

Speedmaster

Make my day...

En toch is dit bij uitstek de beste tool om je code te achterhalen

Acties:
  • 0 Henk 'm!

  • Squ1zZy
  • Registratie: April 2011
  • Niet online
+1 voor het niet vertrouwen van een tool. Ik ga eens kijken of het anders kan.

Edit: Gevonden in VBS, maar wil het in PowerShell hebben :P

VBScript:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
Option Explicit  
 
Dim objshell,path,DigitalID, Result  
Set objshell = CreateObject("WScript.Shell") 
'Set registry key path 
Path = "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\" 
'Registry key value 
DigitalID = objshell.RegRead(Path & "DigitalProductId") 
Dim ProductName,ProductID,ProductKey,ProductData 
'Get ProductName, ProductID, ProductKey 
ProductName = "Product Name: " & objshell.RegRead(Path & "ProductName") 
ProductID = "Product ID: " & objshell.RegRead(Path & "ProductID") 
ProductKey = "Installed Key: " & ConvertToKey(DigitalID)  
ProductData = ProductName  & vbNewLine & ProductID  & vbNewLine & ProductKey 
'Show messbox if save to a file  
If vbYes = MsgBox(ProductData  & vblf & vblf & "Save to a file?", vbYesNo + vbQuestion, "BackUp Windows Key Information") then 
   Save ProductData  
End If 
 
 
 
'Convert binary to chars 
Function ConvertToKey(Key) 
    Const KeyOffset = 52 
    Dim isWin8, Maps, i, j, Current, KeyOutput, Last, keypart1, insert 
    'Check if OS is Windows 8 
    isWin8 = (Key(66) \ 6) And 1 
    Key(66) = (Key(66) And &HF7) Or ((isWin8 And 2) * 4) 
    i = 24 
    Maps = "BCDFGHJKMPQRTVWXY2346789" 
    Do 
           Current= 0 
        j = 14 
        Do 
           Current = Current* 256 
           Current = Key(j + KeyOffset) + Current 
           Key(j + KeyOffset) = (Current \ 24) 
           Current=Current Mod 24 
            j = j -1 
        Loop While j >= 0 
        i = i -1 
        KeyOutput = Mid(Maps,Current+ 1, 1) & KeyOutput 
        Last = Current 
    Loop While i >= 0  
     
    If (isWin8 = 1) Then 
        keypart1 = Mid(KeyOutput, 2, Last) 
        insert = "N" 
        KeyOutput = Replace(KeyOutput, keypart1, keypart1 & insert, 2, 1, 0) 
        If Last = 0 Then KeyOutput = insert & KeyOutput 
    End If     
     
 
    ConvertToKey = Mid(KeyOutput, 1, 5) & "-" & Mid(KeyOutput, 6, 5) & "-" & Mid(KeyOutput, 11, 5) & "-" & Mid(KeyOutput, 16, 5) & "-" & Mid(KeyOutput, 21, 5) 
    
     
End Function 
'Save data to a file 
Function Save(Data) 
    Dim fso, fName, txt,objshell,UserName 
    Set objshell = CreateObject("wscript.shell") 
    'Get current user name  
    UserName = objshell.ExpandEnvironmentStrings("%UserName%")  
    'Create a text file on desktop  
    fName = "C:\Users\" & UserName & "\Desktop\WindowsKeyInfo.txt" 
    Set fso = CreateObject("Scripting.FileSystemObject") 
    Set txt = fso.CreateTextFile(fName) 
    txt.Writeline Data 
    txt.Close 
End Function

[ Voor 92% gewijzigd door Squ1zZy op 24-07-2018 22:02 ]


Acties:
  • 0 Henk 'm!

  • Microkid
  • Registratie: Augustus 2000
  • Nu online

Microkid

Frontpage Admin / Moderator PW/VA

Smile

code:
1
powershell "(Get-WmiObject -query ‘select * from SoftwareLicensingService’).OA3xOriginalProductKey"

4800Wp zonnestroom met Enphase
Life's a waste of time. Time's a waste of life. Get wasted all the time and you'll have the time of your life.


Acties:
  • 0 Henk 'm!

  • Squ1zZy
  • Registratie: April 2011
  • Niet online
Microkid schreef op dinsdag 24 juli 2018 @ 22:57:
code:
1
powershell "(Get-WmiObject -query ‘select * from SoftwareLicensingService’).OA3xOriginalProductKey"
Werkt niet op Windows 10 ;)

Het moet trouwens zijn:

PowerShell:
1
(Get-WmiObject -query "select * from SoftwareLicensingService").OA3xOriginalProductKey

Acties:
  • 0 Henk 'm!

Verwijderd

Squ1zZy schreef op dinsdag 24 juli 2018 @ 21:24:
+1 voor het niet vertrouwen van een tool. Ik ga eens kijken of het anders kan.

Edit: Gevonden in VBS, maar wil het in PowerShell hebben :P

VBScript:
1
Option Explicit  
Waarom zou TS dan wel een (voor de meeste lezers, willekeurig) script van een forum vertrouwen?

Voor hetzelfde geld heb jij ook kwaad in de zin. >:)

Acties:
  • +2 Henk 'm!

  • DarkSide
  • Registratie: Oktober 2000
  • Laatst online: 21:39

DarkSide

theres no place like ::1

Waarom moeilijk doen.
Gewoon weer windows installeren en hij activeert vanzelf.
Mijn code weet ik ook niet.

There are 10 kinds of people in this world..... Those who know binary. And those who don't.


Acties:
  • 0 Henk 'm!

  • CaDje
  • Registratie: December 2002
  • Laatst online: 26-09 14:32

CaDje

Framedrops for life

Tegenwoordig zegt de key niet meer zoveel. Microsoft maakt bij je eerste activatie een sleutel aan dat gekoppeld is aan je hardware (moederbord voornamelijk). Als je windows opnieuw installeert op hetzelfde systeem is het niet nodig om je product key in te voeren, Microsoft herkent de hardware combinatie en zal Windows automatisch activeren.

Acties:
  • +1 Henk 'm!

  • Stoelpoot
  • Registratie: September 2012
  • Niet online
Verwijderd schreef op woensdag 25 juli 2018 @ 09:29:
[...]


Waarom zou TS dan wel een (voor de meeste lezers, willekeurig) script van een forum vertrouwen?

Voor hetzelfde geld heb jij ook kwaad in de zin. >:)
Omdat TS zelf het script kan lezen en controleren op problemen. Met enig technisch inzicht zoals de meeste mensen op Tweakers, is VBS makkelijk te filteren op onveilige zaken.

Acties:
  • 0 Henk 'm!

Verwijderd

Stoelpoot schreef op woensdag 25 juli 2018 @ 09:51:
[...]


Omdat TS zelf het script kan lezen en controleren op problemen. Met enig technisch inzicht zoals de meeste mensen op Tweakers, is VBS makkelijk te filteren op onveilige zaken.
Met alle respect voor TS, maar 8 van de 10 stellen juist een vraag hier op Tweakers omdat ze zelf wat minder technisch/IT onderlegt/etc zijn.

Acties:
  • +2 Henk 'm!

  • Squ1zZy
  • Registratie: April 2011
  • Niet online
Omdat ik het een interessante vraag vond en het helemaal eens ben met het feit dat men moet opletten met het downloaden van "tools", heb ik een PowerShell script geschreven. Dit is getest op Windows 10 Pro 1803. Misschien dat iemand anders het script nog wilt testen?

Ik ben het eens met @Stoelpoot dat een script velen malen veiliger is. Als men op tweakers vraagt of een tool veilig gedownload kan worden is voor een goede analyse een static en dynamic analysis nodig wat ik betwijfel of iemand dat hier doet. Een script is door iedereen te lezen en kan vele malen makkelijker beoordeeld worden. Het posten van een script en vragen "Kan dit kwaad?" is dan afdoende.

Mochten er nog vragen of opmerkingen zijn dan hoor ik dat graag :+

Tweakers zou tweakers niet zijn als ze zelf niet iets bouwen. Dus Hierbij het script:
PowerShell:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
<#
.SYNOPSIS
  This script will get the Windows product key

.DESCRIPTION
  This script will get the Windows product key from the value 'DigitalProductId' located in the registry
  HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\DigitalProductId

.PARAMETERS
  None

.INPUTS
  None

.OUTPUTS
  None

.NOTES
  Version:        0.1
  Author:         Me
  Creation Date:  07/25/2018
  Purpose/Change: Initial script development (Tested on Windows 10 Pro 1803)

.EXAMPLE
  .\getProductKey.ps1
#>

#------------------------------------------[Initialisations]---------------------------------------

$scriptName = $myInvocation.MyCommand.Name

#-------------------------------------------[Declarations]-----------------------------------------

$key = "Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\"
$digitalProductId = (Get-ItemProperty -Path $key).DigitalProductId
$isWin8 = $digitalProductId[66] / 6 -band 1
$digitalProductId[66] = $digitalProductId[66] -band 247 -or ($isWin8 -band 2) * 4
$productName = (Get-ItemProperty -Path $key).ProductName
$productId = (Get-ItemProperty -Path $key).ProductId
$maps = "BCDFGHJKMPQRTVWXY2346789"

$keyOffset = 52
$i = 24

#--------------------------------------------[Functions]-------------------------------------------

Function RR-getProductKey {
  Try {
    Do {
      $j = 14
      $current = 0
      Do {
        $current = $current * 256
        $current = $digitalProductId[$j + $keyOffset] + $current
        $round = $digitalProductId[$j + $keyOffset] = ($current / 24)
        $round = [math]::floor($round)
        $digitalProductId[$j + $keyOffset] = $round
        $current = $current % 24
        $j--
      } While ($j -ge 0)
      $i--
      $keyOutput = $maps.Substring($current++, 1) + $keyOutput
      $last = $current
      $last--
    } While ($i -ge 0)

    if($isWin8 = 1) {
      $keypart1 = $keyOutput.Substring(1, $last)
      $insert = "N"
      $replace = $keypart1 + $insert
      $keyOutput = $keyOutput.Replace("$keypart1", "$replace")
      if($last = 0) {
        $keyOutput = $insert + $keyOutput
      }
    }

    $productKey = $keyOutput.Substring(1, 5) + "-" + $keyOutput.Substring(6, 5) + "-" + $keyOutput.Substring(11, 5) + "-" + $keyOutput.Substring(16, 5) + "-" + $keyOutput.Substring(21, 5)

    Write-Host " Product Name:" $productName
    Write-Host " Product Id:" $productId
    Write-Host " Product Key:" $productKey
  }
  catch {
    Write-Host $_.Exception.Message
  }
}

#--------------------------------------------[Execution]-------------------------------------------

$startDate = Get-Date -format MM-dd-yyyy_HH:mm:ss
Write-Host "Starting $scriptName at $startDate" -ForegroundColor Green

RR-getProductKey

$stopDate = Get-Date -format MM-dd-yyyy_HH:mm:ss
Write-Host "Stopped $scriptName at $startDate" -ForegroundColor Green

[ Voor 6% gewijzigd door Squ1zZy op 26-07-2018 15:58 ]

Pagina: 1