网管联盟 | 网管论坛 | 网管u家 | 网管博客 | 网管软件 | 网管求职 | 小游戏 | 网管搜索 | 网管原创 | 网管聚合 | 网管读摘 | 网管焦点 | 世界素材 | 会员投稿 | 会员中心 
中国网管联盟
Windows Linux Cisco 网络技术 数据库 黑客攻防 DotNet Java PHP 认证 新闻资讯 服务器 存储资讯 网络设备 网管学堂 技术专题 焦点 网吧频道
 当前位置: > bitsCN.com > 网络攻防 > 黑客技术 > 系列教程 > 《加密解密技术内幕》 完全用VB进行ASM编程的示例  

《加密解密技术内幕》 完全用VB进行ASM编程的示例

2008-04-09  作者:bitsCN整理  来源:中国网管联盟  点评 投稿 收藏

下面的例子完全用VB进行ASM编程的示例,本例获得CPU ID.

 

工程文件分为一个form1.frm 和一个模块module1.bas

 

----------------------form1.frm的源文件---------------------

 

VERSION 5.00

Begin VB.form form1  

  Caption         =   "form1"

  ClientHeight    =   1965

  ClientLeft      =   60

  ClientTop       =   345

  ClientWidth     =   3105

  LinkTopic       =   "form1"

  ScaleHeight     =   1965

  ScaleWidth      =   3105

  StartUpPosition =   2  ’Bildschirmmitte

  Begin VB.CommandButton Command1  

     Caption         =   "Get CPU Name" 网管u家u.bitsCN.com

     Height          =   495

     Left            =   840

     TabIndex        =   0

     Top             =   315

     Width           =   1425

  End

  Begin VB.Label Label2  

     Alignment       =   2  ’Zentriert

     AutoSize        =   -1  ’True

     BeginProperty Font  

        Name            =   "MS Sans Serif"

        Size            =   9.75

        Charset         =   0

中国网管联盟bitsCN.com



        Weight          =   400

        Underline       =   0   ’False

        Italic          =   0   ’False

        Strikethrough   =   0   ’False

     EndProperty

     Height          =   240

     Left            =   1515

     TabIndex        =   2

     Top             =   1065

     Width           =   60

  End

  Begin VB.Label Label1  

     Alignment       =   2  ’Zentriert 网管bitscn_com

     AutoSize        =   -1  ’True

     BeginProperty Font  

        Name            =   "Arial"

        Size            =   12

        Charset         =   0

        Weight          =   700

        Underline       =   0   ’False

        Italic          =   0   ’False

        Strikethrough   =   0   ’False

     EndProperty

     Height          =   285

     Left            =   1515
网管u家u.bitscn@com


     TabIndex        =   1

     Top             =   1350

     Width           =   75

  End

End

Attribute VB_Name = "form1"

Attribute VB_GlobalNameSpace = False

Attribute VB_Creatable = False

Attribute VB_PredeclaredId = True

Attribute VB_Exposed = False

Option Explicit

 

Private Sub Command1_MouseDown(Button As Integer, Shift As Integer, x As Single, Y As Single)

 

   Label1 = ""

   Label2 = ""

 

End Sub

 

Private Sub Command1_Click()

   

   Label1 = GetCpuName() & " CPU"
网管u家u.bitscn@com


   Label2 = "You have a" & IIf(InStr("AEIOU", Left$(Label1, 1)), "n", "")

 

End Sub

------------------------------end---------------------------------

 

 

 

下面是modu1e.bas的源代码

 

----------------------module1.bas的源文件--------------------------

Option Explicit



’This shows how to incorporate machine code into VB

’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’

’The example fills the array with a few machine instructions and then copies

’them to a procedure address. The modified procedure is then called thru

’CallWindowProc. The result of this specific machine code is your CPU Vendor Name.



TAGs
 上一篇:《加密解密技术内幕》在Visual C++中使用内联汇编2   下一篇:《加密解密技术内幕》 COM 原理与应用
《加密解密技术内幕》 完全用VB进行ASM编程的示例 评论:
loading.. 评论加载中…
评论:请自觉遵守互联网相关政策法规,评论不得超过250字。

验证码: 注册用户
本类热门排行:
最新推荐文章:
网管论坛交流: