Domination & Submission. St. Petersburg

, ! .


»  Domination & Submission. St. Petersburg »  » Soft&Hard »  Windows 8.1, 8, 7, Vista.


Windows 8.1, 8, 7, Vista.

1 3 3

1

http://s9.uploads.ru/t/fPAL9.jpg
, , . , ? , . , , 899, :). , Windows. , Windows 8.1 8. .
:
1) Windows VBScript.
2) Windows PowerShell.

Windows VBScript.
1) . WindowsKey ( ).
http://s9.uploads.ru/t/UcBwG.png
2) ( ). :
Set WshShell = CreateObject("WScript.Shell")
regKey = "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\"
DigitalProductId = WshShell.RegRead(regKey & "DigitalProductId")
Win8ProductName = "Windows Product Name: " & WshShell.RegRead(regKey & "ProductName") & vbNewLine
Win8ProductID = "Windows Product ID: " & WshShell.RegRead(regKey & "ProductID") & vbNewLine
Win8ProductKey = ConvertToKey(DigitalProductId)
strProductKey ="Windows 8 Key: " & Win8ProductKey
Win8ProductID = Win8ProductName & Win8ProductID & strProductKey
MsgBox(Win8ProductKey)
MsgBox(Win8ProductID)
Function ConvertToKey(regKey)
Const KeyOffset = 52
isWin8 = (regKey(66) \ 6) And 1
regKey(66) = (regKey(66) And &HF7) Or ((isWin8 And 2) * 4)
j = 24
Chars = "BCDFGHJKMPQRTVWXY2346789"
Do
Cur = 0
y = 14
Do
Cur = Cur * 256
Cur = regKey(y + KeyOffset) + Cur
regKey(y + KeyOffset) = (Cur \ 24)
Cur = Cur Mod 24
y = y -1
Loop While y >= 0
j = j -1
winKeyOutput = Mid(Chars, Cur + 1, 1) & winKeyOutput
Last = Cur
Loop While j >= 0
If (isWin8 = 1) Then
keypart1 = Mid(winKeyOutput, 2, Last)
insert = "N"
winKeyOutput = Replace(winKeyOutput, keypart1, keypart1 & insert, 2, 1, 0)
If Last = 0 Then winKeyOutput = insert & winKeyOutput
End If
a = Mid(winKeyOutput, 1, 5)
b = Mid(winKeyOutput, 6, 5)
c = Mid(winKeyOutput, 11, 5)
d = Mid(winKeyOutput, 16, 5)
e = Mid(winKeyOutput, 21, 5)
ConvertToKey = a & "-" & b & "-" & c & "-" & d & "-" & e
End Function
.
http://s9.uploads.ru/t/I3mc1.png
3) .vbs.
http://s9.uploads.ru/t/Wen7A.png
4) . .
http://s8.uploads.ru/t/ax7P3.png
.
http://s8.uploads.ru/t/Q8y6v.png
, : WindowsKey.vbs

2

Windows PowerShell.
PowerShell. .
1) module ( : module.ps1).
http://s9.uploads.ru/t/C5GUs.png
2) :
<pre escaped="true" lang="powershell">## Windows
## PowerShell 2.0 ( Windows)
Function Get-WindowsProduct {
## Windows , .
param ($Targets = [System.Net.Dns]::GetHostName())
function PIDDecoderFromRegistry($digitalProductId) {
New-Variable -Name base24 -Value 'BCDFGHJKMPQRTVWXY2346789' ## -Option Const ## <24> Windows Office
New-Variable -Name decodeStringLength -Value 24 ## -Option Const ##
New-Variable -Name decodeLength -Value 14 ## -Option Const ## ( )
New-Variable -Name decodedKey -Value ([System.String]::Empty) ##
## , N ( Windows 8 Office 15)
$containsN = ($digitalProductId[$decodeLength] / 8) -bAnd 1 ## ($digitalProductId[$decodeLength] -shr 3) -bAnd 1 ## PS 4.0
$digitalProductId[$decodeLength] = [System.Byte]($digitalProductId[$decodeLength] -bAnd [System.Convert]::ToByte('F7', 16)) ## 247
##
for ($i = $decodeStringLength; $i -ge 0; $i--)
{
$digitMapIndex = 0
for ($j = $decodeLength; $j -ge 0; $j--)
{
$digitMapIndex = $digitMapIndex * 256 -bXor $digitalProductId[$j] ## $digitMapIndex -shl 8 -bXor $digitalProductId[$j] ## PS 4.0
$digitalProductId[$j] = [System.Math]::Truncate($digitMapIndex / $base24.Length)
$digitMapIndex = $digitMapIndex % $base24.Length
}
$decodedKey = $decodedKey.Insert(0, $base24[$digitMapIndex])
}
## N
if ([System.Boolean]$containsN)
{
$firstLetterIndex = 0
for ($index = 0; $index -lt $decodeStringLength; $index++)
{
if ($decodedKey[0] -ne $base24[$index]) {continue}
$firstLetterIndex = $index
break
}
$keyWithN = $decodedKey
$keyWithN = $keyWithN.Remove(0, 1)
$keyWithN = $keyWithN.Substring(0, $firstLetterIndex) + 'N' + $keyWithN.Remove(0, $firstLetterIndex)
$decodedKey = $keyWithN;
}
$returnValue = $decodedKey
##
for ($t = 20; $t -ge 5; $t -= 5)
{
$returnValue = $returnValue.Insert($t, '-')
}
return $returnValue
}
## Main
New-Variable -Name hklm -Value 2147483650 ## -Option Const
New-Variable -Name regPath -Value 'Software\Microsoft\Windows NT\CurrentVersion' ## -Option Const
New-Variable -Name regValue -Value 'DigitalProductId' ## -Option Const
Foreach ($target in $Targets) {
$win32os = $null
$wmi = [WMIClass]"\\$target\root\default:stdRegProv"
$binArray = $wmi.GetBinaryValue($hklm,$regPath,$regValue).uValue[52..66]
$win32os = Get-WmiObject -Class 'Win32_OperatingSystem' -ComputerName $target
$product = New-Object -TypeName System.Object
##
$product | Add-Member -MemberType 'NoteProperty' -Name 'Computer' -Value $target
$product | Add-Member -MemberType 'NoteProperty' -Name 'Caption' -Value $win32os.Caption
$product | Add-Member -MemberType 'NoteProperty' -Name 'CSDVersion' -Value $win32os.CSDVersion
$product | Add-Member -MemberType 'NoteProperty' -Name 'OSArch' -Value $win32os.OSArchitecture
$product | Add-Member -MemberType 'NoteProperty' -Name 'BuildNumber' -Value $win32os.BuildNumber
$product | Add-Member -MemberType 'NoteProperty' -Name 'RegisteredTo' -Value $win32os.RegisteredUser
$product | Add-Member -MemberType 'NoteProperty' -Name 'ProductID' -Value $win32os.SerialNumber
$product | Add-Member -MemberType 'NoteProperty' -Name 'ProductKey' -Value (PIDDecoderFromRegistry($binArray))
Write-Output $product
}
} ## End Get-WindowsProduct
.
http://s8.uploads.ru/t/zdn8a.png
3) .ps1
http://s8.uploads.ru/t/9lt6A.png
4) . Windows 8 8.1 () , cmd.exe ( ).
http://s8.uploads.ru/t/NkSVD.png
4) PowerShell powershell. PS.
http://s9.uploads.ru/t/nSaXR.png
5) , :
Set-ExecutionPolicy RemoteSigned
Enter.
http://s9.uploads.ru/t/0mM87.png
6) , :
Import-Module "*___*"
Import-Module D:\Windows key\module.ps1″ Enter.
, , :
http://s8.uploads.ru/t/vytA0.png
:
http://s8.uploads.ru/t/cXQDC.png
PowerShell ISE. , .
http://s8.uploads.ru/t/WEzIT.png
.
http://s8.uploads.ru/t/G3CQK.png
7) :
Get-WindowsProduct
.
http://s9.uploads.ru/t/zMLNV.png

PowerShell Windows 7 .
, : moduleWin7.ps1

3


»  Domination & Submission. St. Petersburg »  » Soft&Hard »  Windows 8.1, 8, 7, Vista.


|