查看單個文章
舊 2006-08-15, 01:08 PM   #2 (permalink)
mini
管理版主
 
mini 的頭像
榮譽勳章
UID - 4144
在線等級: 級別:97 | 在線時長:9806小時 | 升級還需:190小時級別:97 | 在線時長:9806小時 | 升級還需:190小時級別:97 | 在線時長:9806小時 | 升級還需:190小時級別:97 | 在線時長:9806小時 | 升級還需:190小時級別:97 | 在線時長:9806小時 | 升級還需:190小時級別:97 | 在線時長:9806小時 | 升級還需:190小時級別:97 | 在線時長:9806小時 | 升級還需:190小時
註冊日期: 2002-12-07
文章: 13315
精華: 0
現金: 26369 金幣
資產: 3024229 金幣
預設

個人是第一次聽過
不過想想的確辦的到
比如搜尋視窗 Softice 關鍵字
最簡單就是用 winAPI : FindWindow

如真的是這個方法反反制Softice
那只要改 Softice 的視窗標題即可
用資源修改軟體開啟Softice再改名稱即可
※如果 Softice 主程式有經過加殼加密 那就要先脫殼了

當然還有其他方法
寫一段程式來改 Softice的視窗標題即可
VB 是這麼寫的
Dim hwnd As Long
hwnd = FindWindow(vbNullString, "Softice xxxxx")
Me.Caption = hwnd & "這是Softice的視窗編號"
SetWindowText hwnd, "XX 我要變變變"

上面的 "Softice xxxxx" 必須一模一樣
當然也可以只要找到視窗標題內有 Softice關鍵字就作用的方法
試寫了一下 "軟體偵測系統是否存在Softice而使軟體無法執行" 之功能

以下加在 Private Sub Form_Load() 裡即可
語法:
Dim hCurrentWindow As Long
Dim buff As String * 255
Dim strText As String

hCurrentWindow = GetWindow(Me.hwnd, GW_HWNDFIRST)
Do While hCurrentWindow <> 0
     If ((GetWindowText(hCurrentWindow, buff, 255) > 0) And IsWindowVisible(hCurrentWindow)) Then
          strText = Replace(buff, Chr$(0), vbNullString, 1, -1, vbBinaryCompare)
          If InStr(1, strText, "Softice", vbTextCompare) = 1 Then End
     End If
     hCurrentWindow = GetWindow(hCurrentWindow, GW_HWNDNEXT)
Loop
需要用到的 winAPI宣告 (開一個 .bas 放進去)
語法:
Option Explicit

Public Declare Function FindWindow Lib "user32" Alias "FindWindowA" ( _
    ByVal lpClassName As String, _
    ByVal lpWindowName As String) As Long
Public Declare Function IsWindowVisible Lib "user32" (ByVal hwnd As Long) As Long
Public Declare Function GetWindowText Lib "user32" Alias "GetWindowTextA" ( _
    ByVal hwnd As Long, _
    ByVal lpString As String, _
    ByVal cch As Long) As Long
Public Declare Function SetWindowText Lib "user32" Alias "SetWindowTextA" ( _
    ByVal hwnd As Long, _
    ByVal lpString As String) As Long
Public Declare Function GetWindow Lib "user32" ( _
    ByVal hwnd As Long, _
    ByVal wCmd As Long) As Long
Global Const GW_HWNDFIRST = 0
Global Const GW_HWNDNEXT = 2

此帖於 2006-08-15 02:44 PM 被 mini 編輯.
mini 目前離線  
送花文章: 2007, 收花文章: 7984 篇, 收花: 26785 次
回覆時引用此帖