{"id":358,"date":"2010-02-05T10:32:54","date_gmt":"2010-02-05T07:32:54","guid":{"rendered":"http:\/\/www.notsayfam.com\/?p=358"},"modified":"2010-02-05T10:33:21","modified_gmt":"2010-02-05T07:33:21","slug":"vb-net-remote-registry-ile-bilgisayarin-urun-anahtarini-bulmak","status":"publish","type":"post","link":"https:\/\/www.notsayfam.com\/?p=358","title":{"rendered":"Vb.net remote registry ile bilgisayar\u0131n \u00fcr\u00fcn anahtar\u0131n\u0131 bulmak"},"content":{"rendered":"<p>vb.net envanter program\u0131 i\u00e7in gerekli olabilecek bir par\u00e7a.<br \/>\n<code>Imports Microsoft.Win32<br \/>\nPublic Class Form1<br \/>\n    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click<br \/>\n        MsgBox(GetXPKey(TextBox1.Text))<br \/>\n    End Sub<br \/>\n    Public Function GetXPKey(ByVal hostorip As String) As String<br \/>\n        Dim MyReg As RegistryKey = RegistryKey.OpenRemoteBaseKey(RegistryHive.LocalMachine, hostorip)<br \/>\n        Dim MyRegKey As RegistryKey<br \/>\n        MyRegKey = MyReg.OpenSubKey(\"Software\\Microsoft\\Windows NT\\currentVersion\", True)<br \/>\n        Dim bytDPID() As Byte = MyRegKey.GetValue(\"DigitalProductID\")<br \/>\n        MyRegKey.Close()<br \/>\n        Dim bytKey(14) As Byte<br \/>\n        Array.Copy(bytDPID, 52, bytKey, 0, 15)<br \/>\n        Dim strChar As String = \"BCDFGHJKMPQRTVWXY2346789\"<br \/>\n        Dim strKey As String = \"\"<br \/>\n        For j As Integer = 0 To 24<br \/>\n            Dim nCur As Short = 0<br \/>\n            For i As Integer = 14 To 0 Step -1<br \/>\n                nCur = CShort(nCur * 256 Xor bytKey(i))<br \/>\n                bytKey(i) = CByte(Int(nCur \/ 24))<br \/>\n                nCur = CShort(nCur Mod 24)<br \/>\n            Next<br \/>\n            strKey = strChar.Substring(nCur, 1) & strKey<br \/>\n        Next<br \/>\n        For i As Integer = 4 To 1 Step -1<br \/>\n            strKey = strKey.Insert(i * 5, \"-\")<br \/>\n        Next<br \/>\n        Return strKey<br \/>\n    End Function<br \/>\nEnd Class<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>vb.net kullanarak uzaktaki bilgisayar\u0131n \u00fcr\u00fcn anahtar\u0131n\u0131 almak, get remote computer product key using remote registry<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11,13],"tags":[],"class_list":["post-358","post","type-post","status-publish","format-standard","hentry","category-programlama","category-vb-net"],"_links":{"self":[{"href":"https:\/\/www.notsayfam.com\/index.php?rest_route=\/wp\/v2\/posts\/358","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.notsayfam.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.notsayfam.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.notsayfam.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.notsayfam.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=358"}],"version-history":[{"count":3,"href":"https:\/\/www.notsayfam.com\/index.php?rest_route=\/wp\/v2\/posts\/358\/revisions"}],"predecessor-version":[{"id":361,"href":"https:\/\/www.notsayfam.com\/index.php?rest_route=\/wp\/v2\/posts\/358\/revisions\/361"}],"wp:attachment":[{"href":"https:\/\/www.notsayfam.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=358"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.notsayfam.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=358"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.notsayfam.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=358"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}