|
|
|
[求助]WinID
另外,我查了下MSDN,找到了classname的其它一些,资料,比如 Class Description ComboLBox The class for the list box contained in a combo box. DDEMLEvent Windows NT/Windows 2000/Windows XP: The class for Dynamic Data Exchange Management Library (DDEML) events. Message Windows 2000/Windows XP: The class for a message-only window. #32768 The class for a menu. #32769 The class for the desktop window. #32770 The class for a dialog box. #32771 The class for the task switch window. #32772 Windows NT/Windows 2000/Windows XP: The class for icon titles. 原文链接:http://msdn.microsoft.com/en-us/library/ms633574(VS.85).aspx |
|
[求助]WinID
是一本老书了,英文原名我看了一下,叫《Windows 95 : A Developer's Guide》,我看的是侯捷做译序的繁体版本,叫《Windows95程式设计指南》,译者叫李书良,在繁体版第101页中讲到了#32770这个类。 此书有正版的PDF电子档提供下载。可以到侯捷老师的网站上去找。繁体书看得很慢,不过正好有时间多思考了。 http://jjhou.csdn.net/ 不知道为什么,我访问这个页面总出现乱码,需要手动设置页面编码为简体中文。 |
|
[求助]CPU为什么不多做些寄存器呢
1.做操作系统底层是离不开汇编的。但ARM的汇编很好掌握。 2.ARM的AT&T汇编相比x86的AT&T汇编要稍微容易掌握一点。 3.即使不会AT&T,GNU的工具集里也有支持ARM手册中给出的官方汇编格式的汇编器的。 4.而且,也不一定非要用Linux下的开发工具。Win平台很多工具是使用GNU工具链的,通过适当的配置就可以交叉编译到ARM-Linux。 |
|
[求助]请高手帮分析一下蓝屏的原因所在。
看WinDBG的信息,可能的情况有: 1.安装了新的磁盘控制器 2.对系统分析进行过重分析(或分区调整) 3.启动分区的文件系统被破坏。 照调试器的指示,你看一下f79fb524地址处的字符串是什么,可能会有帮助。 |
|
[讨论]VC2008开发软件移植问题
注意targetver.h中对系统最低版本的配置。 |
|
[求助]CPU为什么不多做些寄存器呢
寄存器越多,当然对于提高性能就越有好处。 MIPS处理器最初设计为32个通用寄存器。至于现在发展到什么情况我没有关注过。 目前最流行的嵌入式处理器ARM,逻辑上有16个通用寄存器,外加程序计数器和状态寄存器。而由于一部分寄存器是分栏的(处理不同模式下对应不同的物理寄存器),实际上有37个物理寄存器。 安腾处理器构有多达127(128,其中r0为常数0)个整数处理器,128个浮点寄存器,以及64个判断寄存器(1位的,可以理解为标志位寄存器),8个转移寄存器。 除去上面这些普通寄存器,还有像控制寄存器、分区寄存器、缓冲管理寄存器、中断寄存器、性能监控寄存器等等许多组(不是个,是组)系统寄存器。 但安腾是高端机的,与80x86只能十分有限地“兼容”(实际上并不兼容,需要进行处理器状态切换,而且切换后也只能执行80x86指令集的一个子集)。 80x86之所以没有再增加寄存器,就如MIK所说,指令结构中用来编码寄存器的域只有3个位,所以只能有8个通用寄存器。 而x64增加了用REX前缀扩展了指令的编码,所以x64结构可以使用16个通用寄存器。 6楼狐狸说寄存器多了难以分析,但至少在我来说,做ARM的东西时比X86的东西要容易。做过Linux和uCOS-II,ARM的代码很简单,而x86(uCos-II发布版本带有一个8086的示例)反而没有ARM简单。 由于x86没有足够多的寄存器,所以通常使用内存操作数,而寄存器常常只用来做“暂存器”。 但有了足够多的寄存器后,分析一个函数,几乎所有的变量和参数都是寄存器,所以汇编语言看起来跟高级语言没什么区别了已经。 |
|
[求助]WinID
今天看书时看到了这个,特补充一下。 "#32770"其实是一个匿名窗口类,且它的Atom值是32770,但没有对应的字符串类名称。这是一个系统内建的类。它就是标准Win32对话框的窗口类。 所有Win32的对话框,其窗口类都是它,比如DialogBoxParam(),CreateDialog()等。另外,,MessageBox()弹出的消息框的窗口类也是它,用Spy++一看便知。 所以对于3楼贴出的代码,便明了了。你所查看到的是AboutDialog的类,自然是#32770无疑,而且不你图中的WinID也已经标名,这是个Dialog(Spy++同样也会提示)。而你自己用RegisterClassEx()注册的窗口类并通过CreateWindowEx()所创建的窗口,是程序的主窗口,而不是AboutDailog。用工具查看主窗口便得。 |
|
[讨论]MIPS Simulator
龙芯其实就是实现了MIPS的体系结构,当然不包括其中有知识产权保护的指令系统。 关于MIPS为什么拿来教学,一方面,MIPS的基本指令集的设计堪称经典,甚至有一些偏激的人认为MIPS才是真正的RISC机器(不是我的观点)。 另一方面,MIPS体系结构,它的基本构成部分的知识产权是开放的,所以用它来教学,不会带来任何法律上的问题。而且,不仅是教学,连商业化都是开放的,所以龙芯可以采用MIPS的构架了不用面对任何知识产权方面的问题(说是这么说,实际上龙芯开发初期,MIPS的原公司曾与龙芯组进行过一些交流,但大的方面是没问题的)。 关于它的指令系统,在很多教学情景下,所展示的精简版的示例,我们上CPU设计原理课程时老师就是用一个精简了的MIPS作为示例,所谓精简,是指比如只包括基本整数指令、分支指令等的结构。 它有多简单?它的控制逻辑状态机,可以用状态图来画出来,直接用逻辑门、触发器等搭出来!连硬件描述语言都不用。 MIPS的机器,如果不考虑后来增加的一些功能,比如非对齐地址内存的访问(这正是MIPS所享有专利保护的内容之一)等,而只考虑基本的指令集,包括条件转移在内,在一条转自延迟槽的条件下,可以真正做到流水线不断流! 当然这也是当初设计MIPS系统时的初衷,所以为此目的,设计者不得不舍弃了很多不符合流水执行要求的指令,比如我们在INTEL体系中最常见的堆栈操作,在MIPS中是没有的,原因就在于堆栈操作不满足流水执行的要求。 正是由于MIPS是极端的“精简”指令集,而设计得实在也是真好,所以成为经典而被几乎所有的教科书所采用。 对于MIPS原型的设计的得与失,其实在领域内部一直都有不同意见,有人就认为它过于追求概念上的“RISC”而舍弃了不该舍弃的东西,而另一些人则认为既然叫RISC,就要真正的"RISK",舍去的那些功能带来的损失小于简洁设计带来的提升。各持书己见,但结论并不重要。至少在教学这一块,MIPS确实是当之无愧的最佳范例,就像Minix操作系统一样。 顺便提一下,龙芯是完整实现了MIPS基础指令系统的“MIPS兼容的”的能用CPU,但不等于说就是一个“翻版MIPS”,它在MIPS的基础上是增加了自主的技术在里面的。好比AMD是兼容I386系列的处理器,但它有自主的如3dNow、AMD64等技术。 龙芯的网站,有兴趣的人可以关注一下。 www.loongson.cn PS.中国文化中的“龙”,不应该被翻译成英文"Dragon",因为其文化内涵差异过于大,现在正在推广Loong这个说法。 唉,扯远了。本人可能要把“逆向”放一放了,精力有限,有正事要做。这一贴就当是水贴了。不说了,睡了。 |
|
[求助]想问下,会破解软件,必须要先会做软件吗?
我不完全同意。 不理解软件,逆向最多是入门水平,想要进阶几乎不可能。 你要是把所谓“爆破”、"Patch"或明码的内存注册机作为是学会破解的标准,那么不学软件也可以。 但是如果要想能够做到算法重现、功能增强、挖掘漏洞及BUG修补,没有软件的基础是相当不可能的事了。 |
|
|
|
[求助]CryptCATAdminCalcHashFromFileHandle 函数
RING3下的函数不能从RING0调用,况且这个函数是和文件句柄有关的,也就是必须在特定进程的环境下才可以运行,更加不可能从驱动(无进程概念)调用了。 你必须想其它的办法。 如果在RING0中找不到对应的服务,那么也许只能自己实现一个这样的函数了。 |
|
[求助]有关Debug Api 的问题
int3断点引发调试异常,你的调试器应该处理异常。 异常不处理,程序还如何运行? 再一说,你在API入口处放int3,程序有可能会检测的。 而且,如果你不特别处理,程序只要检测IsDebuggerPresent()就可以知道自己被调试了。 |
|
[求助]不同OS的二进制代码的问题
补充一下,在Linux下用ld就可以链接成windows的pe格式,不需要用Windows下的MinGW的。 |
|
[求助]不同OS的二进制代码的问题
这段代码不是不调用库,而是只调用标准库printf(),而这个函数在不同平台下都提供 所以,对这段程序执行cc -c main.c 输出main.o 你把这个main.o拿到windows下,用MinGW或Cygwin中的ld,使用合适的参数,可以将它连接成为一个windows下的exe程序(控制台)。 而你在windows下用cl /c main.c生成main.obj,同样可以用ld连接到不同的库上。 原理是,虽然obj和o文件格式不一样,但编译器生成的main()函数的代码,大致是一样的,类似于 _main: push offset const_string ;指向数据区的数据 call 00000000 ;占位,需要链接器重定位(注意,不是加载重定位) add esp, 4 xor eax, eax retn 区别只是不同的文,用不同的格式存储而已。而GNU的ld可以识别各种格式,从而处理其中的地址重定位。至于输出什么格式,则取决于传递的参数了。 |
|
[求助]不同OS的二进制代码的问题
单说代码,当然在同样的CPU下是一样的。 不同的在于,程序要执行,就必须被操作系统正确地加载。而操作系统加载一个程序,不是光有个代码就够了的,还需要其它一些信息,这些信息在不同的系统上是不同的,或者说至少格式是不同的。 另一方面,程序运行时要调用到库函数,而不同的操作系统上以不同方式提供这些库,比如C运行时库,在Linux上提供的是glibc,以elf共享库格式提供;在windows上是msvcr,以PE格式提供(DLL)。 不同的操作系统要求链接器以不同的方式将用户程序与操作系统提供的库相链接,所以最终的二进制文件不可以“跨平台”,不过使用模拟器除外,如Linuxg下的wine。 虽然如此,但是在一定程度上,还是可以做到“二进制兼容”的。如果你写了一段程序,只使用了标准的库,比如printf(),而没有使用平台特定的库函数,比如CreateFileA(),那么编译好的目标文件是可以在不同的平台上链接的。只要你的链接器支持对应的文件格式。 虽然Windows平台最终的执行文件必须是PE格式,但目标文件并没有规定必须是COFF的OBJ文件,可以是ELF格式甚至A.OUT格式。GNU的链接器ld具有将ELF格式的.o目标文件与COFF格式的.lib库相链接而产生一个PE文件的能力。 同样,在Linux平台下,也可以将COFF格式的.obj目标文件与ELF格式的.o或.so共享库进行连接链接生成ELF执行文件的。 可以找GNU强大的Binutil的文档来看一下。不得不佩服GNU真是太强大了。 |
|
|
|
[求助]WinID
请看关于WNDCLASSEX结构中关于lpszClassName的说明。 lpszClassName Pointer to a null-terminated string or is an atom. If this parameter is an atom, it must be a class atom created by a previous call to the RegisterClass or RegisterClassEx function. The atom must be in the low-order word of lpszClassName; the high-order word must be zero. If lpszClassName is a string, it specifies the window class name. The class name can be any name registered with RegisterClass or RegisterClassEx, or any of the predefined control-class names. The maximum length for lpszClassName is 256. If lpszClassName is greater than the maximum length, the RegisterClassEx function will fail. 以及CreateWindow()函数关于lpClassName参数的说明。 lpClassName [in] Pointer to a null-terminated string or a class atom created by a previous call to the RegisterClass or RegisterClassEx function. The atom must be in the low-order word of lpClassName; the high-order word must be zero. If lpClassName is a string, it specifies the window class name. The class name can be any name registered with RegisterClass or RegisterClassEx, provided that the module that registers the class is also the module that creates the window. The class name can also be any of the predefined system class names. 你的WinID我没用过,我一般只用Spy++。 你贴出的代码中又没给出ClassName的内容,看看是不是代码就定义成ClassName ascii “#32770”了。 |
操作理由
RANk
{{ user_info.golds == '' ? 0 : user_info.golds }}
雪币
{{ experience }}
课程经验
{{ score }}
学习收益
{{study_duration_fmt}}
学习时长
基本信息
荣誉称号:
{{ honorary_title }}
能力排名:
No.{{ rank_num }}
等 级:
LV{{ rank_lv-100 }}
活跃值:
在线值:
浏览人数:{{ visits }}
最近活跃:{{ last_active_time }}
注册时间:{{ user_info.create_date_jsonfmt }}
勋章
兑换勋章
证书
证书查询 >
能力值