明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 1882|回复: 7

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

[复制链接]
发表于 2007-2-6 13:55:00 | 显示全部楼层 |阅读模式

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

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?注册

x
发表于 2007-2-6 14:52:00 | 显示全部楼层

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

 楼主| 发表于 2007-2-6 16:10:00 | 显示全部楼层
大哥你能给我密码吗?I服了YOU OR THANK YOU
 楼主| 发表于 2007-2-6 16:56:00 | 显示全部楼层

下面有一个是VB写的获取硬盘序列号的代码:

Private Declare Function GetVolumeInformation Lib "kernel32.dll" Alias _
    "GetVolumeInformationA" (ByVal lpRootPathName As String, _
    ByVal lpVolumeNameBuffer As String, ByVal nVolumeNameSize As Integer, _
    lpVolumeSerialNumber As Long, lpMaximumComponentLength As Long, _
    lpFileSystemFlags As Long, ByVal lpFileSystemNameBuffer As String, _
    ByVal nFileSystemNameSize As Long) As Long

Private Sub Command1_Click()
  Dim mySerial As Long
  Dim mylong As Long
  mystr = String$(255, Chr$(0))
  mytype = String$(255, Chr$(0))
  If Right(Text1.Text, 1) <> "\" Then Text1.Text = Text1.Text & "\"
  sRoot = Text1.Text                                   '设定盘名
  mylong = GetVolumeInformation(sRoot, mystr, Len(mystr), mySerial, 0, 0, mytype, Len(mytype))
  Text2.Text = mySerial                                'TEXT2 存放盘序列号
End Sub

Private Sub Command3_Click()
  End
End Sub

发表于 2007-2-6 17:00:00 | 显示全部楼层
是一样的
发表于 2007-2-7 09:10:00 | 显示全部楼层

这个论坛就有。自己搜下我的贴子。

发表于 2007-2-13 09:22:00 | 显示全部楼层
没看明白
发表于 2007-3-13 01:09:00 | 显示全部楼层
本帖最后由 作者 于 2007-3-13 1:10:42 编辑

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

H××兄更胜一筹

您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|CAD论坛|CAD教程|CAD下载|联系我们|关于明经|明经通道 ( 粤ICP备05003914号 )  
©2000-2023 明经通道 版权所有 本站代码,在未取得本站及作者授权的情况下,不得用于商业用途

GMT+8, 2024-11-26 16:50 , Processed in 0.184599 second(s), 24 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表