ngeqt521 发表于 2007-2-6 13:55:00

[求助]手上有个被加密的VBA文件那位大哥可否帮忙解开

<p>我用Office Key or Advanced VBA Password Recovery PRO or VBA Password Bypasser这三个都解不开,这是一家台湾公司写的读取硬盘序列号的小程序</p>

fjfhgdwfn 发表于 2007-2-6 14:52:00

<p>Declare Function GetVolumeinformation Lib "Kernel32.dll" Alias "GetVolumeInformationA" (ByVal _<br/>&nbsp;&nbsp;&nbsp;&nbsp; lpRootPathName As String, ByVal lpVolumeNameBuffer As _<br/>&nbsp;&nbsp;&nbsp;&nbsp; String, ByVal nVolumeNameSize As Integer, _<br/>&nbsp;&nbsp;&nbsp;&nbsp; lpVolumeSerialNumber As Long, lpMaximumComponentLength _<br/>&nbsp;&nbsp;&nbsp;&nbsp; As Long, lpFileSystemFlags As Long, ByVal _<br/>&nbsp;&nbsp;&nbsp;&nbsp; lpFileSystemNameBuffer As String, ByVal _<br/>&nbsp;&nbsp;&nbsp;&nbsp; nFileSystemNameSize As Long) As Long<br/>&nbsp;&nbsp;&nbsp;&nbsp; <br/>&nbsp;&nbsp;&nbsp;&nbsp; Function GetSerialNumber(strDrive As String) As Long<br/>&nbsp;&nbsp;&nbsp;&nbsp; <br/>&nbsp;&nbsp;&nbsp;&nbsp; Dim SerialNum As Long<br/>&nbsp;&nbsp;&nbsp;&nbsp; <br/>&nbsp;&nbsp;&nbsp;&nbsp; Dim Res As Long<br/>&nbsp;&nbsp;&nbsp;&nbsp; Dim Temp1 As String<br/>&nbsp;&nbsp;&nbsp;&nbsp; Dim Temp2 As String<br/>&nbsp;&nbsp;&nbsp;&nbsp; <br/>&nbsp;&nbsp;&nbsp;&nbsp; Temp1 = String$(255, Chr$(0))<br/>&nbsp;&nbsp;&nbsp;&nbsp; Temp2 = String$(255, Chr$(0))<br/>&nbsp;&nbsp;&nbsp;&nbsp; <br/>&nbsp;&nbsp;&nbsp;&nbsp; Res = GetVolumeinformation(strDrive, Temp1, _<br/>&nbsp;&nbsp;&nbsp;&nbsp; Len(Temp1), SerialNum, 0, 0, Temp2, Len(Temp2))<br/>&nbsp;&nbsp;&nbsp;&nbsp; <br/>&nbsp;&nbsp;&nbsp;&nbsp; GetSerialNumber = SerialNum<br/>&nbsp;&nbsp;&nbsp;&nbsp; <br/>&nbsp;&nbsp;&nbsp;&nbsp; End Function<br/>&nbsp;&nbsp;&nbsp;&nbsp; <br/>&nbsp;&nbsp;&nbsp;&nbsp; Sub GetNum()<br/>&nbsp;&nbsp;&nbsp;&nbsp; Dim DNum As String<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; DNum = GetSerialNumber("C:\")<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ThisDrawing.SetVariable "USERS1", DNum<br/>&nbsp;&nbsp;&nbsp;&nbsp; End Sub</p><p></p>

ngeqt521 发表于 2007-2-6 16:10:00

大哥你能给我密码吗?I服了YOU OR THANK YOU

ngeqt521 发表于 2007-2-6 16:56:00

<p>下面有一个是VB写的获取硬盘序列号的代码:</p><p>Private Declare Function GetVolumeInformation Lib "kernel32.dll" Alias _<br/>&nbsp;&nbsp;&nbsp; "GetVolumeInformationA" (ByVal lpRootPathName As String, _<br/>&nbsp;&nbsp;&nbsp; ByVal lpVolumeNameBuffer As String, ByVal nVolumeNameSize As Integer, _<br/>&nbsp;&nbsp;&nbsp; lpVolumeSerialNumber As Long, lpMaximumComponentLength As Long, _<br/>&nbsp;&nbsp;&nbsp; lpFileSystemFlags As Long, ByVal lpFileSystemNameBuffer As String, _<br/>&nbsp;&nbsp;&nbsp; ByVal nFileSystemNameSize As Long) As Long</p><p>Private Sub Command1_Click()<br/>&nbsp; Dim mySerial As Long<br/>&nbsp; Dim mylong As Long<br/>&nbsp; mystr = String$(255, Chr$(0))<br/>&nbsp; mytype = String$(255, Chr$(0))<br/>&nbsp; If Right(Text1.Text, 1) &lt;&gt; "\" Then Text1.Text = Text1.Text &amp; "\"<br/>&nbsp; sRoot = Text1.Text&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; '设定盘名<br/>&nbsp; mylong = GetVolumeInformation(sRoot, mystr, Len(mystr), mySerial, 0, 0, mytype, Len(mytype))<br/>&nbsp; Text2.Text = mySerial&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'TEXT2 存放盘序列号<br/>End Sub</p><p>Private Sub Command3_Click()<br/>&nbsp; End<br/>End Sub</p><p></p>

wyj7485 发表于 2007-2-6 17:00:00

是一样的

fjfhgdwfn 发表于 2007-2-7 09:10:00

<p>这个论坛就有。自己搜下我的贴子。</p>

xcajcj 发表于 2007-2-13 09:22:00

没看明白

玄冰草 发表于 2007-3-13 01:09:00

本帖最后由 作者 于 2007-3-13 1:10:42 编辑 <br /><br /> <p>Declare Function GetVolumeinformation Lib "Kernel32.dll" Alias "GetVolumeInformationA" (ByVal _<br/>&nbsp;&nbsp;&nbsp;&nbsp; lpRootPathName As String, ByVal lpVolumeNameBuffer As _<br/>&nbsp;&nbsp;&nbsp;&nbsp; String, ByVal nVolumeNameSize As Integer, _<br/>&nbsp;&nbsp;&nbsp;&nbsp; lpVolumeSerialNumber As Long, lpMaximumComponentLength _<br/>&nbsp;&nbsp;&nbsp;&nbsp; As Long, lpFileSystemFlags As Long, ByVal _<br/>&nbsp;&nbsp;&nbsp;&nbsp; lpFileSystemNameBuffer As String, ByVal _<br/>&nbsp;&nbsp;&nbsp;&nbsp; nFileSystemNameSize As Long) As Long<br/>&nbsp;&nbsp;&nbsp;&nbsp; <br/>&nbsp;&nbsp;&nbsp;&nbsp; Function GetSerialNumber(strDrive As String) As Long<br/>&nbsp;&nbsp;&nbsp;&nbsp; <br/>&nbsp;&nbsp;&nbsp;&nbsp; Dim SerialNum As Long<br/>&nbsp;&nbsp;&nbsp;&nbsp; <br/>&nbsp;&nbsp;&nbsp;&nbsp; Dim Res As Long<br/>&nbsp;&nbsp;&nbsp;&nbsp; Dim Temp1 As String<br/>&nbsp;&nbsp;&nbsp;&nbsp; Dim Temp2 As String<br/>&nbsp;&nbsp;&nbsp;&nbsp; <br/>&nbsp;&nbsp;&nbsp;&nbsp; Temp1 = String$(255, Chr$(0))<br/>&nbsp;&nbsp;&nbsp;&nbsp; Temp2 = String$(255, Chr$(0))<br/>&nbsp;&nbsp;&nbsp;&nbsp; <br/>&nbsp;&nbsp;&nbsp;&nbsp; Res = GetVolumeinformation(strDrive, Temp1, _<br/>&nbsp;&nbsp;&nbsp;&nbsp; Len(Temp1), SerialNum, 0, 0, Temp2, Len(Temp2))<br/>&nbsp;&nbsp;&nbsp;&nbsp; <br/>&nbsp;&nbsp;&nbsp;&nbsp; GetSerialNumber = SerialNum<br/>&nbsp;&nbsp;&nbsp;&nbsp; <br/>&nbsp;&nbsp;&nbsp;&nbsp; End Function<br/>&nbsp;&nbsp;&nbsp;&nbsp; <br/>&nbsp;&nbsp;&nbsp;&nbsp; Sub GetNum()<br/>&nbsp;&nbsp;&nbsp;&nbsp; Dim DNum As String<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; DNum = GetSerialNumber("C:\")<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ThisDrawing.SetVariable "USERS1", DNum<br/>&nbsp;&nbsp;&nbsp;&nbsp; End Sub</p><p>H××兄更胜一筹</p>
页: [1]
查看完整版本: [求助]手上有个被加密的VBA文件那位大哥可否帮忙解开