您的位置:程序门 -> delphi -> windows sdk/api



如何关闭冰刃(有效判断窗口标题是否为冰刃)


[收藏此页] [打印本页]选择字色:背景色:字体:[][][]


如何关闭冰刃(有效判断窗口标题是否为冰刃)[已结贴,结贴人:jzcdelphi]
发表于:2008-01-05 10:16:37 楼主
如题   ,代码测试过,给分。
发表于:2008-01-05 14:23:441楼 得分:0
什么兵刃?
发表于:2008-01-05 16:41:262楼 得分:0
百度一下,你就知道了!
发表于:2008-01-05 16:54:293楼 得分:0
那个标题是随机数值.
发表于:2008-01-05 17:05:094楼 得分:0
不知道...
发表于:2008-01-05 17:20:045楼 得分:0
标题是随机的,这我知道
标题取到后,如何判断它是不是冰刃,并要准确,这点不太好弄
首先它的标题中有字符,有数字
我看了一下,大概它的标题有两大段,前面的是字符,后面的是16进制数组。
如果单纯地判断标题中,有字符,有   数字,就关闭的话,可能会误关闭一些程序。
集思广议吧
发表于:2008-01-07 08:33:016楼 得分:0
根据窗口特有的按钮或者其它判断
发表于:2008-01-07 09:05:397楼 得分:0
即使找到了它的窗口,你也是关不掉它的
它用了进程保护方法保护自己不被其它程序关掉,任务管理器也关不掉它

单发wm_close消息到它的主窗口,会弹出是否关闭的对话框,可以试试再找这个对话框给那个确定按钮发消息
发表于:2008-01-07 09:16:098楼 得分:0
冰刃1.22的主窗口可视控件结构(标题   -   类名):
kgmbsr144082   -   zehqsymfs(可变)
├(空)   -   afxmdiframe42s
│├(空)   -   afxwnd42s
││├(空)   -   systreeview32
││└(空)   -   systreeview32
│└(空)   -   afxmdiframe42s
│   ├(空)   -   static
│   │└icesword   -   button
│   └(空)   -   syslistview32
│     └(空)   -   sysheader32
├     -   msctls_statusbar32
│└zeh   -   afx:400000:1000
├(空)   -   afxcontrolbar42s
│├(空)   -   toolbarwindow32
││└(空)   -   button
│└菜单栏   -   toolbarwindow32
├(空)   -   afxcontrolbar42s
├(空)   -   afxcontrolbar42s
└(空)   -   afxcontrolbar42s
由于主窗口的类名和标题每次启动都不同,所以用findwindow基本没办法
可以试试枚举所有顶层窗口,然后用findwindowex看看顶层窗口是否有上面的子窗口
发表于:2008-01-07 15:39:529楼 得分:0
单发wm_close消息到它的主窗口,会弹出是否关闭的对话框,可以试试再找这个对话框给那个确定按钮发消息
我也想这样
但不能有效判断冰刃的窗口,或说我不太会。
以前,好像听说过熊猫病毒是利用枚举冰刃的作者名称来判断,然后发wm
└(空)       -       syslistview32  
│           └(空)       -       sysheader32  
作者名称好像是和sysheader32   有关
谁能写出代码?
发表于:2008-01-10 09:55:0310楼 得分:0
自己顶一下吧
发表于:2008-01-11 12:17:1311楼 得分:0
那个是十六进制数值,由gettickcount()取得的。  
发表于:2008-01-11 12:34:5312楼 得分:0
gettickcount能不能给出代码?
及它的用法?
发表于:2008-01-11 21:48:2313楼 得分:0
tick   :=   gettickcount();
发表于:2008-01-11 23:42:1514楼 得分:0
高手们,请给出代码
发表于:2008-01-11 23:45:3615楼 得分:0

tick       :=       gettickcount();
这个不是计时用的吗?
发表于:2008-01-12 11:40:4016楼 得分:0
高手都在哪儿啊?
发表于:2008-01-12 14:24:5617楼 得分:50
冰刃icesword   1.22   简介
        icesword是一斩断黑手的利刃(所以取这土名,有点搞e,呵呵)。它适用于windows   2000/xp/2003/vista操作系统,用于查探系统中的幕后黑手(木马后门)并作出处理,当然使用它需要用户有一些操作系统的知识。
        在对软件做讲解之前,首先说明第一注意事项   :此程序运行时不要激活内核调试器(如softice),否则系统可能即刻崩溃。另外使用前请保存好您的数据,以防万一未知的bug带来损失。

处理这类问题风险很大。我机器上不喜欢装这种软件。
7楼已经说出方法。模拟确认一下关闭对话框就成了。

参考如下代码:
delphi(pascal) code
uses tlhelp32; type tmainwindow = packed record processid: thandle; mainwindow: thandle; end; pmainwindow = ^tmainwindow; function ismainwindow(ahandle: thandle): boolean; begin result := (getwindow(ahandle, gw_owner) = 0) and (iswindowvisible(ahandle)); end; { ismainwindow } function ffindmainwindow(hwnd: thandle; lparam: pmainwindow): bool; stdcall; var vprocessid: thandle; begin getwindowthreadprocessid(hwnd, vprocessid); if (lparam^.processid = vprocessid) and ismainwindow(hwnd) then begin lparam^.mainwindow := hwnd; result := false; end else result := true; end; function findmainwindow(aprocessid: thandle): thandle; var vmainwindow: tmainwindow; begin vmainwindow.processid := aprocessid; vmainwindow.mainwindow := 0; enumwindows(@ffindmainwindow, integer(@vmainwindow)); result := vmainwindow.mainwindow; end; { findmainwindow } procedure tform1.button1click(sender: tobject); var vsnapshot: thandle; vprocessentry32: tprocessentry32; vhandle: thandle; begin vsnapshot := createtoolhelp32snapshot(th32cs_snapprocess, 0); vprocessentry32.dwsize := sizeof(tprocessentry32); if process32first(vsnapshot, vprocessentry32) then repeat if sametext('icesword.exe', vprocessentry32.szexefile) then begin vhandle := findmainwindow(vprocessentry32.th32processid); // 查询进程的主窗体 if vhandle <> 0 then begin postmessage(vhandle, wm_close, 0, 0); // 发送关闭消息 sleep(100); // 等待对话框出现 vhandle := findwindow('#32770', 'icesword'); if vhandle <> 0 then begin vhandle := findwindowex(vhandle, 0, 'button', nil); sendmessage(vhandle, wm_lbuttondown, 0, 0); sendmessage(vhandle, wm_lbuttonup, 0, 0); ///...点击按钮两次 sendmessage(vhandle, wm_lbuttondown, 0, 0); sendmessage(vhandle, wm_lbuttonup, 0, 0); end; end; break; end; until not process32next(vsnapshot, vprocessentry32); closehandle(vsnapshot); end;



人的精力有限,不可能涉及所有的领域。
能帮忙就帮,不能帮也没办法。以后别发那么多消息给我,很烦的。
发表于:2008-01-12 14:34:0418楼 得分:0
我测试一下啊,偶像
发表于:2008-01-12 14:55:4619楼 得分:0
测试通过
我昨天弄了大半夜,都没弄好的,你一会就能写好
能随心所欲到这种地步,有点让人羡慕和妒忌


快速检索

最新资讯
热门点击