-
关注Ta
-
- 注册时间 2008-08-27
- 最后登录 2017-06-24
-
- 发帖2706
- 在线181小时
- 精华0
- DB0
- 威望600
- 保证金0
- 桃子0
- 鲜花0
- 鸡蛋0
-
访问TA的空间加好友用道具
╪o其實⒈ 個秂⑧孤單 想1.個人caí孤單﹏oοΟ ⺌
|
[ post]VB 从零开始编外挂(一) -------------------------------------------------------------------------------------------------------------------------------------------------------- 需要VB API函数: FindWindow ←寻找窗口列表中第一个符合指定条件的顶级窗口 GetWindowThreadProcessId ←获取与指定窗口关联在一起的一个进程和线程标识符 -------------------------------------------------------------------------------------------------------------------------------------------------------- 相关API声明: FindWindow ↓ Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long GetWindowThreadProcessId ↓ Private Declare Function GetWindowThreadProcessId Lib "user32" (ByVal hwnd As Long, lpdwProcessId As Long) As Long -------------------------------------------------------------------------------------------------------------------------------------------------------- 需要的控件:Label、Timer -------------------------------------------------------------------------------------------------------------------------------------------------------- 自定义函数: Dim hwnd As Long -------------------------------------------------------------------------------------------------------------------------------------------------------- 源代码: Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long Private Declare Function GetWindowThreadProcessId Lib "user32" (ByVal hwnd As Long, lpdwProcessId As Long)As Long Private Sub Timer1_Timer() Dim hwnd As Long' 储存 FindWindow 函数返回的句柄 hwnd = FindWindow(vbNullString, "Windows Media Player")' 取得进程标识符 '只要把Windows Media Player换成游戏的名称就可了! If hwnd = 0 Then Label1.Caption = "游戏未运行" Else Label1.Caption = "游戏已运行" End If End Sub VB 从零开始编外挂(二) -------------------------------------------------------------------------------------------------------------------------------------------------------- 相信大家,在制作游戏外挂的时候,都会用到FPE、金山游侠、GE修改器、Game Master8.0等等这些软件,但是如今的网络游戏基本上都加了NP,下面来了解一下NP。知己知彼,百战不殆嘛! 什么是nProtect? nProtect是设计用于保护个人电脑终端不被病毒和黑客程序感染的新概念的基于网络的反黑客和反病毒的工具。他帮助确保所有输入个人电脑终端的信息在网络上不落入黑客手中。在最终用户在执行电子贸易时,可以通过将nProtect配置在那些提供电子商务、进口贸易,电子贸易的金融机构的网站上,来提高安全等级。nProtect怎样工作?nProtect是一种基于服务器端的解决方案并且当那些需要保护的任何网络应用被运行时而自动启动。nProtect被载入内存,所以最终用户不需要安装任何应用程序,只要nProtect启动,就开始拒绝黑客工具和病毒的入侵! -------------------------------------------------------------------------------------------------------------------------------------------------------- 下面介绍它如何工作: 用户登陆时nProtect自动启动。 浏览器确认和自动安装安全模块到用户的个人电脑。扫描黑客工具和病毒通知用户目前的安全状态如果有黑客工具和病毒尝试删除在被入侵时端驻留内存来锁定黑客工具直到电脑或者nProtect关闭。 可恶的韩国人,把这个加进了网络游戏。我只能说:“呸!” -------------------------------------------------------------------------------------------------------------------------------------------------------- 下面讲讲躲过NP的扫描的几个方法: 一、FPE篇 台湾人开发的东西,哎。出名了的,没办法谁叫它这么好呢! 1.先装一个FPE把,呵呵←这个是废话! 2.不要把安装程序删除,按照:开始→运行→regedit→HEKY_LOCAL_MACHINE→SOFTWARE →jaw→FPE 打开!(问:有什么用? 答:修改呀!) 3.运行FPE,然后在搜索里面输入 'jaw'(一定要家'')一般是6个地址,然后全部都选中输入: 313131c313131(意思就是111,两边多输入31就是1111!)不要关FPE!(关了就完了!) 4.修改注册表,把注册表里面的jaw、FPE(FPE的是全改)关闭FPE出现对话框。(什么鸟语不认识!呵呵) 5.将现在FPE的文件夹修改为1112000(原来是FPE2000撒),把FPE.exe修改为111.exe 6.然后重新安装一次FPE也把那个DLL文件复制到你修改过的FPE文件目录下!(呵呵!) 7.开FPE进游戏里面乱来拉!哈哈 -------------------------------------------------------------------------------------------------------------------------------------------------------- 二、任务管理器篇 比尔·盖茨那崽儿设计的东西,还可以在这上面派上用场!(问:是什么东西?答WINDOWS自带的撒!呵呵!) 1.首先用快捷键Ctrl+Alt+Delete/.打开任务管理器 2.查看进程,一般好点的网络游戏会出现多的进程。你就杀了就行了! 3.没有多的进程怎么办?BIN这个是大多数网络游戏都有的把,官方的登陆器和私服的登陆器一样的,都是调用BIN进入游戏。登陆器打开后,更新完毕。点击运行游戏,间隔几秒杀掉登陆器的进程(这个要看你自己的计算机配置如何了,可能是2秒、可能是10秒!反正不超过15秒)这样就可以闭屏NP拉! 呵呵又可以乱来了! -------------------------------------------------------------------------------------------------------------------------------------------------------- 三、直接篇 直接篇说白了就不用任何东西!怎么做?跟着我眼镜来撒! 《封神榜》知道把?(答:不知道!反答:去死!)它的保护是有的,官方都已经公布了 但是有些人说《封神榜》没NP,(注意:NP现在就是保护的代名词了!)别听那些人的! 首先,运行登陆器(更新的那个)进入游戏。关闭用登陆器进入的游戏马上运行Game.exe 呵呵,没NP了。FPE等东西可以乱来了。魔法叠加、免负重等等都可以实现! 还有一种就是DAT文件或者BIN文件直接修改为EXE。呵呵! -------------------------------------------------------------------------------------------------------------------------------------------------------- 四、编程篇(VB、VC、DELPHI等等!) 怎么办呢?呵呵,我不懂怎么编VC和DELPHI的。***我就喜欢VB怎么着? VB可以简单的实现虚拟nProtect的消息发送。具体的就不说了! 一句话虚拟nProtect消息(你不等于没说嘛!)-_-!呵呵这个嘛......! 代码就不写了,麻烦。就像用WPE这些发包一样的原理 VB 从零开始编外挂(三) -------------------------------------------------------------------------------------------------------------------------------------------------------- 躲避了NP的扫描现在就可以模拟了! -------------------------------------------------------------------------------------------------------------------------------------------------------- 需要VB API函数: keybd_event ←函数模拟了键盘行动 -------------------------------------------------------------------------------------------------------------------------------------------------------- 相关API声明: keybd_event ↓ Private Declare Sub keybd_event Lib "user32" (ByVal bVk As Byte, ByVal Scan As Byte, ByVal dwFlags As Long, ByVal dwExtraInfo As Long) -------------------------------------------------------------------------------------------------------------------------------------------------------- 需要的控件:Timer(interval不为空) -------------------------------------------------------------------------------------------------------------------------------------------------------- 代码: Private Declare Sub keybd_event Lib "user32" (ByVal bVk As Byte, ByVal Scan As Byte, ByVal dwFlags As Long, ByVal dwExtraInfo As Long) Private Sub Timer1_Timer() Call keybd_event(82, 0, 0, 0) '模拟按下"R"键 End Sub -------------------------------------------------------------------------------------------------------------------------------------------------------- 其它模拟: 方法一: AppActivate sTitle SendKeys "5" 方法二: AppActivate sTitle SendKeys vbKey5 方法三: SendMessage Hwnd, WM_KEYDOWN, vbKey5, 0& SendMessage Hwnd, WM_KEYUP, vbKey5, 0& 方法四: AppActivate sTitle keybd_event 53, 0, 0, 0 keybd_event 53, 0, KEYEVENTF_KEYUP, 0 方法五: PostMessage lHwnd, WM_KEYDOWN, vbKey5, 0& PostMessage lHwnd, WM_KEYUP, vbKey5, 0& -------------------------------------------------------------------------------------------------------------------------------------------------------- VB 从零开始编外挂(四) -------------------------------------------------------------------------------------------------------------------------------------------------------- 添加快捷键 -------------------------------------------------------------------------------------------------------------------------------------------------------- 需要VB API函数: GetAsyncKeyState ←判断函数调用时指定虚拟键的状态 -------------------------------------------------------------------------------------------------------------------------------------------------------- 相关API声明: GetAsyncKeyState ↓ Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vkey As Long) As Integer Private Function MyHotKey(vKeyCode) As Boolean -------------------------------------------------------------------------------------------------------------------------------------------------------- 需要的控件:Timer(interval不为空) -------------------------------------------------------------------------------------------------------------------------------------------------------- 代码: Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vkey As Long) As Integer Private Function MyHotKey(vKeyCode) As Boolean MyHotKey = (GetAsyncKeyState(vKeyCode) < 0) End Function '然后在循环中或Timer的Timer事件中检测: Private Sub Timer1_Timer() If MyHotKey(vbKeyA) And vbKeyControl Then 'ctrl+A End '关闭 End If '其中vbkeyA是键盘〃A〃的常数,其他键可按F1查得。 End Sub -------------------------------------------------------------------------------------------------------------------------------------------------------- 其它方法: 比如按下"ctrl+A"就退出! '可以设置Form的KeyPreview属性为True,然后在Form_KeyDown事件中添加代码: Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = Asc("A") And Shift = vbCtrlMask Then unload me '如果ctrl+A键被按下就退出 End Sub -------------------------------------------------------------------------------------------------------------------------------------------------------- VB 从零开始编外挂(五) -------------------------------------------------------------------------------------------------------------------------------------------------------- 前边谈了模拟键盘,下面说说模拟鼠标。 -------------------------------------------------------------------------------------------------------------------------------------------------------- 需要VB API函数: mouse_event ←模拟一次鼠标事件 -------------------------------------------------------------------------------------------------------------------------------------------------------- 相关API声明: mouse_event ↓ Private Declare Sub mouse_event Lib "user32" ( ByVal dwFlags As Long, ByVal dx As Long, ByVal dy As Long, ByVal cButtons As Long, ByVal dwExtraInfo As Long ) -------------------------------------------------------------------------------------------------------------------------------------------------------- 定义变量: Const MOUSEEVENTF_LEFTDOWN = &H2 Const MOUSEEVENTF_LEFTUP = &H4 Const MOUSEEVENTF_MIDDLEDOWN = &H20 Const MOUSEEVENTF_MIDDLEUP = &H40 Const MOUSEEVENTF_MOVE = &H1 Const MOUSEEVENTF_ABSOLUTE = &H8000 Const MOUSEEVENTF_RIhoudaoTDOWN = &H8 Const MOUSEEVENTF_RIhoudaoTUP = &H10 -------------------------------------------------------------------------------------------------------------------------------------------------------- MOUSEEVENTF_LEFTDOWN'鼠标左键按下 MOUSEEVENTF_LEFTUP'鼠标松开 MOUSEEVENTF_RIhoudaoTDOWN '鼠标右键按下 MOUSEEVENTF_RIhoudaoTUP'鼠标右键松开 -------------------------------------------------------------------------------------------------------------------------------------------------------- 代码: Private Declare Sub mouse_event Lib "user32" ( ByVal dwFlags As Long, ByVal dx As Long, ByVal dy As Long, ByVal cButtons As Long, ByVal dwExtraInfo As Long ) Const MOUSEEVENTF_LEFTDOWN = &H2 Const MOUSEEVENTF_LEFTUP = &H4 Const MOUSEEVENTF_MIDDLEDOWN = &H20 Const MOUSEEVENTF_MIDDLEUP = &H40 Const MOUSEEVENTF_MOVE = &H1 Const MOUSEEVENTF_ABSOLUTE = &H8000 Const MOUSEEVENTF_RIhoudaoTDOWN = &H8 Const MOUSEEVENTF_RIhoudaoTUP = &H10 '这里是 鼠标左键按下 和松开两个事件的组合即一次单击 mouse_event MOUSEEVENTF_LEFTDOWN Or MOUSEEVENTF_LEFTUP, 0, 0, 0, 0 '模拟鼠标右键单击事件 mouse_event MOUSEEVENTF_RIhoudaoTDOWN Or MOUSEEVENTF_RIhoudaoTUP, 0, 0, 0, 0 '两次连续的鼠标左键单击事件 构成一次鼠标双击事件 mouse_event MOUSEEVENTF_LEFTDOWN Or MOUSEEVENTF_LEFTUP, 0, 0, 0, 0 mouse_event MOUSEEVENTF_LEFTDOWN Or MOUSEEVENTF_LEFTUP, 0, 0, 0, 0 -------------------------------------------------------------------------------------------------------------------------------------------------------- VB 从零开始编外挂(六) -------------------------------------------------------------------------------------------------------------------------------------------------------- 应用实战 -------------------------------------------------------------------------------------------------------------------------------------------------------- 需要VB API函数: FindWindow GetWindowThreadProcessId OpenProcess ReadProcessMemory CloseHandle -------------------------------------------------------------------------------------------------------------------------------------------------------- 相关API声明: FindWindow ↓ Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long GetWindowThreadProcessId ↓ Private Declare Function GetWindowThreadProcessId Lib "user32" (ByVal hwnd As Long, lpdwProcessId As Long) As Long OpenProcess ↓ Private Declare Function OpenProcess Lib "kernel32" (ByVal dwDesiredAccess As Long, ByVal bInheritHandle As Long, ByVal dwProcessId As Long) As Long ReadProcessMemory ↓ Private Declare Function ReadProcessMemory Lib "kernel32" (ByVal hProcess As Long, ByVal lpBaseAddress As Any, ByVal lpBuffer As Any, ByVal nSize As Long, lpNumberOfBytesWritten As Long) As Long CloseHandle ↓ Private Declare Function CloseHandle Lib "kernel32" (ByVal hObject As Long) As Long GetCurrentProcess ↓ Private Declare Function GetCurrentProcess Lib "kernel32" () As Long -------------------------------------------------------------------------------------------------------------------------------------------------------- 需要的控件:Label、Timer(interval不为空)、Text -------------------------------------------------------------------------------------------------------------------------------------------------------- 定义函数: Dim SetHp As Integer ' 定义设定的体力值 Dim SetMp As Integer ' 定义设定的魔法值 Dim NowHp As Long ' 定义目前的体力值 Dim NowMp As Long ' 定义目前的魔法值 Dim MaxHp As Long ' 定义角色的最高体力值 Dim MaxMp As Long ' 定义角色的最高魔法值 Dim DiZhi As Long '定义内存地址函数 Dim hwnd As Long ' 储存 FindWindow 函数返回的句柄 -------------------------------------------------------------------------------------------------------------------------------------------------------- 代码: Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long Private Declare Function GetWindowThreadProcessId Lib "user32" (ByVal hwnd As Long, lpdwProcessId As Long) As Long Private Declare Function OpenProcess Lib "kernel32" (ByVal dwDesiredAccess As Long, ByVal bInheritHandle As Long, ByVal dwProcessId As Long) As Long Private Declare Function ReadProcessMemory Lib "kernel32" (ByVal hProcess As Long, ByVal lpBaseAddress As Any, ByVal lpBuffer As Any, ByVal nSize As Long, lpNumberOfBytesWritten As Long) As Long Private Declare Function CloseHandle Lib "kernel32" (ByVal hObject As Long) As Long Private Declare Function GetCurrentProcess Lib "kernel32" () As Long Dim SetHp As Integer ' 定义设定的体力值 Dim SetMp As Integer ' 定义设定的魔法值 Dim NowHp As Long ' 定义目前的体力值 Dim NowMp As Long ' 定义目前的魔法值 Dim MaxHp As Long ' 定义角色的最高体力值 Dim MaxMp As Long ' 定义角色的最高魔法值 Dim DiZhi As Long '定义内存地址函数 Private Function ncnr(lpADDress As Long) As Integer ' 声明一些需要的变量 Dim hwnd As Long ' 储存 FindWindow 函数返回的句柄 Dim pid As Long ' 储存进程标识符( Process Id ) Dim pHandle As Long ' 储存进程句柄 hwnd = FindWindow(vbNullString, "封神榜·网络版") ' 取得进程标识符 GetWindowThreadProcessId hwnd, pid ' 使用进程标识符取得进程句柄 pHandle = OpenProcess(PROCESS_ALL_ACCESS, False, pid) ' 在内存地址中读取数据 ReadProcessMemory pHandle, lpADDress, ByVal VarPtr(ncnr), 4, 0& ' 关闭进程句柄 CloseHandle hProcess End Function Const STANDARD_RIhoudaoTS_REQUIRED = &HF0000 Const SYNCHRONIZE = &H100000 Const SPECIFIC_RIhoudaoTS_ALL = &HFFFF Const STANDARD_RIhoudaoTS_ALL = &H1F0000 Const PROCESS_ALL_ACCESS = STANDARD_RIhoudaoTS_REQUIRED Or SYNCHRONIZE Or &HFFF Const PROCESS_VM_OPERATION = &H8& Const PROCESS_VM_READ = &H10& Const PROCESS_VM_WRITE = &H20& Private Sub Form_Load() ' 体力:07F68F3 这里替换你所搜索到的地址 魔法:07F6860 同前 DiZhi = &H07F68F3 Timer1.Enabled = True Timer2.Enabled = False Timer3.Enabled = False End Sub Private Sub Timer1_Timer() Dim hwnd As Long hwnd = FindWindow(vbNullString, "封神榜·网络版") If hwnd = 0 Then Label12.Caption = "游戏未加载" Timer1.Enabled = True Timer2.Enabled = False Timer3.Enabled = False Exit Sub End If Label12.Caption = "游戏已加载" SetHp = Text1.Text ' 获取设定的体力值 SetMp = Text2.Text ' 获取设定的魔法值 NowHp = ncnr(DiZhi) ' 获取当前的体力值 NowMp = ncnr(DiZhi + 12) ' 获取当前的魔法值 MaxHp = ncnr(DiZhi + 4) ' 获取角色的最高体力值 MaxMp = ncnr(DiZhi + 16) ' 获取角色的最高魔法值 Label3.Caption = Str(NowHp) + "/" + Str(MaxHp) ' 显示角色体力值状态 Label4.Caption = Str(NowMp) + "/" + Str(MaxMp) ' 显示角色魔法值状态 If Check1.Value Then Timer2.Enabled = True Else Timer2.Enabled = False End If If Check2.Value Then Timer3.Enabled = True Else Timer3.Enabled = False End If End Sub Private Sub Timer2_Timer() ' 体力值小于设定值按下数字键1 If (NowHp) < SetHp Then SendKeys "1" End If End Sub Private Sub Timer3_Timer() ' 魔法值小于设定值按下数字键2 If (NowMp) < SetMp Then SendKeys "2" End If End Sub -------------------------------------------------------------------------------------------------------------------------------------------------------- 软件截图: -------------------------------------------------------------------------------------------------------------------------------------------------------- VB 从零开始编外挂(七) -------------------------------------------------------------------------------------------------------------------------------------------------------- 钩子:喜欢外挂的人都知道,很多外挂都是在游戏当中才能呼出。这个就用到了钩子 N多人说:“哎,VB做钩子想都别想!去学C语言吧!”只要大家遇到这种人,就别理会他。 可以说他是个好。在实现钩子方面VB可能没有VC快,但是也不像那种人说的“想都别想” C语言,我最近几天看了看。{ } ;这些太多了。脑袋也大了!可能那些学C语言的人是接触电脑 编程的时候就学的它吧!但是呢,我接触电脑学的就是VB。没办法我爱它! -------------------------------------------------------------------------------------------------------------------------------------------------------- 好了下面介绍简单的钩子吧! -------------------------------------------------------------------------------------------------------------------------------------------------------- SetWindowsHookEx定义如下: Declare Function SetWindow [/post] 斑竹给个辛苦分哈![ 此贴被00251在2008-11-04 21:29重新编辑 ]
|