|
[调查]这里的delphi程序员多吗?
如果在争论时能举出可信的例子,从争论中能学到自己不明白的东西,我非常愿意争下去。 反之,如果只是一味胡说,让自己觉得自己不能输掉,就没有意思了。 .NET里有和语言和文化有关的设置,在CLR里,请你认真地看一看。.NET 1.0/1.1/2里都是一致的,都是涉及到语言的处理,只是一个从英语mapping到其它语种的问题,但底层的东西是不变的。 “机械码表”,那电子表呢? “运行它要付出代价就是 效率低下,占用极高,极高的消耗电能不利于环保和节能” 如何低?占用率多少?和谁比?只要你打开计算机就会耗电,和你运行什么没有太大关系。 “另外,我不是 代码劳工” 作老板玩儿生意的,不会来这里,在这里的,99%都是劳工。你不是劳工,难道是混混? |
|
[调查]这里的delphi程序员多吗?
首先我承认自己还是半桶水,但永远都有人晃的比我响。 还是请你回答我原来提出的问题。 0。你反反复复提到数学基础,请问到底需要什么样的基础?我举了几个我能想得到的,也请你举几个例子出来。指针的理解和处理到底需要多高深的数学?当然微积分和递归论等等肯定是不用了。请你举出一个和指针有关的、除了加减乘除还有其它运算的例子,如果汇编语言支持的话。我可是真的不知道,虚心向你学习。 指针是一个概念,在汇编语言和六、七十年代面向过程的语言里到处都是。既然“在CPU指令集里没有这个东西”,“它是”如何“随编译器创造出来的”?造出来又怎么能用? class,就是面向对象的程序设计,难道就是为了玩指针吗?C里面最不安全的就是指针,C++的一个主要设计目标就是要尽量屏蔽指针(pointer)的负面影响,这就是引用(reference)出现的原因。Java干脆就把指针给灭了。C#的指针比如IntPtr是设计的一个败笔,当然反正只在Windows上用,但微软也是建议少用。 C: int CallMe( int * param ) C++: int CallMe( int & param ) 面向对象的程序设计的一个主要目的就是让你我的程序更安全、更稳定。指针是很容易出错的玩意儿,我的架构师,你如何解释它“在高级语言中主要的作用是为了玩 class”? 1。我终于理解了你的意思!当然不管是普通程序还是驱动程序都是编译器编译出来的,只是你改换了概念,你原来的意思是在virtual machine里运行驱动程序,比如用Java或者VB写的驱动。我非常想向你学习这个技术。 2。在下不才,没有写过编译器,不理解“只要将4f的。。。”,我只知道现在大部分的编译器是基于3NF的。以我的理解,你是做过编译器、至少是看过编译器内部结构的大师了。甭管多简单的编译器,都要实现一个text parser,都要用到有限状态自动机(finite state machine),设计时都要做状态图的优化。请举出一个优化算法的例子。别抄课本啊,那个算法是过时的。 “连实现思路都不用;说白了,大师玩的是编译器手脚,代码苦力玩的是语言规则”。大师也是人,也要从幼儿园开始学习加减乘除,然后才是微积分和数理逻辑。既然数理逻辑等等都不在话下,加减乘除就更应该是基本功了。如果大师可以玩编译器,却连1+2*3=?的指针运算都不会了,恐怕得去看医生了。 语言规则,就是我们理解编译原理的加减乘除。 3。IDE就不说了,甭管好不好,用它的人比你我想象的要多得多。敢情你是不用IDE的,那你是如何编译你的C/C++程序的?能否发个makefile让我们大家学习学习? 而且,我们谁 不 是代码苦力?看来你不是了。敢问大师何处高就? 4。计算机这行当里,从来就没有“标准语言”,只有“语言标准”,是各个公司协调妥协的结果,而且从来就是谁的拳头大,谁的声音就大。不服?我们大家就等着你编出一个更好的语言呢。 VC++不是100%的ANSI C++ compatible,Borland就做到了吗?gcc呢?没有一家是百分百的遵循标准。 5。我建议我们还是先看两本.NET编程和CLR原理等等的书再来做下一步的讨论吧。 而且,依我的理解,如果你能上传一个你的C#/VB.NET/managed VC++程序,证明你确实知道.NET是干嘛的,我可以和你探讨如何在你体会到的“噩梦”里,插入一段能改变你的心情的小插曲。 |
|
[求助]怎样使用native API啊?
http://undocumented.ntinternals.net/ |
|
[调查]这里的delphi程序员多吗?
Ivanov, 建议你还是多虚心学习一些东西吧,真的不想回这个帖子。 0。数学好,只是在编程时对程序的逻辑结构有更清晰的理解,只是充分条件,不是必要条件。数学好对设计大型软件系统的数学模型和结构优化会有很大帮助,但程序编写的好完全是另外一回事。 指针只是一个索引,好比你信箱上的编号,和数学没有太多必然的联系,只需要小学文化程度的加减乘除,你说呢? 照你的理解,那数学系的人程序是编得最好的,世上的编程高手和黑客也大都是数学系毕业的。问问数学系的教授吧,如何用数学模型描述判断你按下了键盘上的一个键。然后看看键盘里面EEPROM里的汇编代码是如何处理的,很简单。 数学基础。。。什么样的数学基础?请你列出来。不同的运用方向可以用到不同的数学知识。比如逆向工程,需要什么? 加解密:编码理论,线性代数,线性逻辑(我是菜鸟,还有更多,比如编译原理,不少PE Packer都用到了有限状态自动机) 压缩解压缩:概率论,编码和信息论 程序理解:包括编译原理 还有最基本的,数据结构 1。ring 0是什么意思?kernel mode。Java和VB的程序一般在什么地方运行?ring3,就是user mode。而且Java是在它的JVM里,VB也是PCode解释执行的,都还不是native code。你如何运行于ring 0?有运行于ring 0级别的virtual machine吗? 而且就是JVM,它本身很多部分就是用C写的,01年我们用J2ME时,就是如此,还不是C++,当然是bug成堆。你什么时候见到过有人用Java和VB写驱动程序的? 2。你用过gcc吗?gcc不是Macromedia flash,你如何写它的插件?而且编译器都是platform-depedent,都是运行于ring3的普通程序。 而且ring0和ring3是Intel系列的微处理器的概念,PowerPC/Zilog/MicroChip/Motorola等等等等微处理器上都不同。更详细的信息可参考 http://en.wikipedia.org/wiki/X86_assembly_language。 3。IDE的好处是极大地方便了人们的使用。如果你用过早期的编译器,需要自己手工设定各种编译选项,你就会体会到IDE的好处了。当然这完全是个人偏好,很多Linux fans喜欢DIY,那也没有理由影响别人用IDE。 4。语言是工具,但标准语言永远只是一个标准,实际上是无法用的。比如thread,C++标准里有吗?Windows上就和Linux/UNIX不同,你编程序还就得和操作系统结合起来,不然你说如何做。 5。.NET是干嘛的?铺天盖地的书,你挑一本好好看看吧。 还是thread处理,单处理器和多核处理器上有何不同?hyper-threading和multi-core的区别到底在哪里?操作系统对它们的支持是怎样的?.NET里是如何处理的?如何同步和避免死锁? 如果你觉得新的东西太多,学不过来,“.net简直就是全世界程序员的噩梦”,那你就得好好想想,什么东西是不变或者变化不大的?然后认真学好它。 |
|
[求助]请问如何得到win32系统服务的列表
win32 API: OpenSCManager(... EnumServicesStatusExW(... Check MSDN, your best friend. |
|
|
|
[调查]这里的delphi程序员多吗?
算我一个,从Delphi1开始,但还是菜鸟一只。 Delphi还有它的活力,这完全取决于你想干嘛。 IDAPro v5不还是用Delphi6编写的吗?看看它的目录下,*.bpl就明白了。一般来讲奇数版本一般要比偶数版本的稳定,但datarescue的作者还是不在乎。而且用过DOS老版本的Borland产品的人都知道,从Turbo PASCAL 4开始有一个Turbo Vision的界面软件包,后来turbo C++/Borland C++也都有它。IDAPro里有对应的win32 console的版本,界面就是标准的Turbo Vision,用起来像是老的DOS程序,其实就是标准的PE文件,查查它的PE header就知道。 编程语言只是一个工具,各有千秋,关键是你想干什么。 |
|
[原创]Windows系统程序设计之内存映射
MSDN: To guard against an access violation, use structured exception handling to protect any code that writes to or reads from a memory mapped view. For more information, see Reading and Writing From a File View. To have a mapping with executable permissions, an application must call CreateFileMapping with either PAGE_EXECUTE_READWRITE or PAGE_EXECUTE_READ, and then call MapViewOfFile with FILE_MAP_EXECUTE | FILE_MAP_WRITE or FILE_MAP_EXECUTE | FILE_MAP_READ. Example: DWORD dwLength; __try { dwLength = *((LPDWORD) lpMapAddress); } __except(GetExceptionCode()==EXCEPTION_IN_PAGE_ERROR ? EXCEPTION_EXECUTE_HANDLER : EXCEPTION_CONTINUE_SEARCH) { // Failed to read from the view. } __try { *((LPDWORD) lpMapAddress) = dwLength; } __except (GetExceptionCode() == EXCEPTION_IN_PAGE_ERROR ? EXCEPTION_EXECUTE_HANDLER : EXCEPTION_CONTINUE_SEARCH) { // Failed to write to the view. } |
|
[原创]Windows系统程序设计之系统服务
关键是如何调试,这才是难点,因为它们和普通的程序不同。如何写service的例子程序上google一查有很多,请多介绍相关的调试排错技巧。 |
|
接着讲和DLL与代码插入有关的几点看法
我感觉不能patch一些和同步有关的API,比如WaitForSingleObject(Ex) / WaitForMultipleObjects(Ex),否则会死锁的可能原因是: 在我们的thread要patch那些API时,系统会自动产生一个锁来保证对内存的写访问是线性化的(serializable),而这个锁本身就会调用比如说WaitForSingleObject(Ex),从而造成死锁。毕竟看不到Windows的源程序,只能猜了。 |
|
接着讲和DLL与代码插入有关的几点看法
1。你用debugger看过你的detours过的程序吗?我没有注意到微软的程序用这些指令来“填充”API。我看到的就是一个JUMP,干嘛要填这些指令?不明白你的问题。 2。Win32 API是没有,但是记住API patching是不仅仅局限于Windows的API的,如果你有dbghelp.dll和你的程序的pdb符号文件,你可以甚至调试你自己的内部函数。小于5 bytes的函数是一个极端情况 3。你可以做呀,只是这样你想达到什么效果?让该API完全失效? |
|
对DllMain编程的几点说明:what you can do, and what you CANNOT do
请看我的下一个帖子。没办法,回帖不会加分,请各位体谅。 |
|
关于ring3进入ring0. 朋友们都进来看看啊.
Entering the kernel without a driver and getting interrupt information from APIC: http://www.codeproject.com/system/soviet_kernel_hack.asp 干吗不多做做winXP/2003下的事情呢?win9x/me根本就没有多少安全保护机制,连微软都不支持它们了。去www.rootkit.com看看,连hackdefender的作者都没有兴趣开发win9x下的rootkit,不值得费那个劲。 |
|
对DllMain编程的几点说明:what you can do, and what you CANNOT do
多看看MSDN,这其实是最好的信息来源,上面的很大一部分就是从中而来。 |
|
win64编写的软件用什么来调试怎么破解?
SoftICE好像不支持64bit,而且compuware不继续做它了。 |
|
win64编写的软件用什么来调试怎么破解?
http://www.microsoft.com/whdc/devtools/debugging/install64bit.mspx http://www.microsoft.com/whdc/devtools/debugging/default.mspx |
|
[原创]Windows系统程序设计之插入DLL和挂接API
1。一般的方法使用CreateRemoteThread()在目标进程中创建一个thread,让该thread来LoadLibrary(你的DLL)。 到目前为止我在网上看到的该方法的实现代码都基本上雷同,一个共同的大前提是假定在你的process和目标process里,LoadLibrary(A/W)的entry point是一样的。因为LoadLibraryA/LoadLibraryW是kernel32.dll输出的,而该DLL一般而言在不同的进程的virtual memory space里是在同样的地方(不同的Windows版本倒是有可能不同),不太会被rebase。所以看看你自己的进程里LoadLibrary的起始地址,就可以假定目标进程的LoadLibrary也是同样的起始地址。 2。用GetProcAddress()可以得到API的起始地址。但kernel32.dll是可以被rebase的,如果你的进程或者目标进程里的该DLL ImageBase变了,你的代码插入程序不会有事情,创建的远程线程倒是会垮掉。 3。这里作者的代码,比如(5)封装HOOK API入口地址覆盖到CFEAHook类,是有bug的。你怎么知道要patch的函数入口点的头5个字节一定是一个指令?万一它的第一个指令是1个到4个字节呢?你要使你的方法尽量通用化,就不能作这个假定。可以参考微软的Detours (http://research.microsoft.com/sn/detours/),看看它的entry point patching是如何做的。 4。API hook(SetWindowsHookEx):该方法的前提是进程有UI,或者说有user32.DLL。对Console program是白搭。 5。Hook的方法很多,可以参考 http://www.codeproject.com/system/hooksys.asp 6。原文: “2、 存在的难点 由于IAT信息是在可执行文件初始化时经过PE加载器改写的,而不是原本的磁盘文件中的数据。问题就在这里,什么时候才是对IAT进行操作的最佳时机?PE加载器对IAT部分的改写是在什么时候完成的?如果仅仅创建挂起的进程,此时的加载器是否写入IAT信息?“ PE加载器在创建一个进程的时候,CreateProcess(...,CREATE_SUSPENDED, ...),它会遍历程序的import table,把相关的DLL加载进来,更新IAT,然后先是运行该DLL的CRTDllMain(),接着是它的DllMain()。如果该DLL依赖其它的DLL,就先载入其它的DLL,有些类似C++里对象的创建,先做父类的工作(constructor),然后是子类。IAT就是这个时候更新的。一直等到主要的thread context等等资源分配完毕,然后PE Loader就ResumeThread(你的主线程的threadid)。到这个时候DLL里的export table基本上没有用了,因为主程序的IAT里已经有了具体的地址。以后程序运行过程中也不会去看DLL的Export Table,直接到Import Table里去查去了,然后jump。 |
|
Windows系统程序设计之DLL基础
DLLMain()只是DLL在系统里注册的一个CallBack函数,其实不是一个DLL的entry point;真正的entry point是__CRTDllMain()。 可以参考 http://blogs.msdn.com/oldnewthing/archive/2004/01/27/63401.aspx 很好的一篇文章。 |
操作理由
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 }}
勋章
兑换勋章
证书
证书查询 >
能力值