文檔金喜正規買球>>VMProtect用戶手冊>>代碼保護軟件VMProtect用戶手冊之內置腳本的使用(1)
代碼保護軟件VMProtect用戶手冊之內置腳本的使用(1)
VMProtect是一種很可靠的工具,可以保護應用程序代碼免受分析和破解,但只有在應用程序內保護機制正確構建且沒有可能破壞整個保護的嚴重錯誤的情況下,才能實現最好的效果。
之前對主窗口進行了介紹,接下來我們將對VMProtect中強大的內置腳本的使用進行介紹,希望對您有所幫助。
VMProtect具有內置的強大腳本語言LUA,極大地增強了VMProtect在每個保護階段的默認保護功能。LUA語法非常類似于JavaScript,但與之不同的是,LUA不包含顯式類。不過,腳本語言允許輕松地實現類、繼承和事件等面向對象的編程機制。
對于如何使用腳本語言,可以進行以下三類的介紹:
- 類
- 內置功能
- 事件
第一部分:類
VMProtect中內置的腳本語言LUA是面向對象的:它在語法,意識形態和實現方面與JavaScript非常相似。腳本語言包括提供基本功能的標準類和提供對應用程序保護功能的訪問的專用類。
▲核心
項目選擇:
enum ProjectOption { None, Pack, ImportProtection, MemoryProtection, ResourceProtection, CheckDebugger, CheckKernelDebugger, CheckVirtualMachine, StripFixups, StripDebugInfo, DebugMode }
使用VMProtect核心的類:
class Core { public: string projectFileName();//返回項目的名稱 void saveProject(); //保存項目 string inputFileName(); //返回當前項目的源文件的名稱 string outputFileName(); //返回當前項目的輸出文件的名稱 void setOutputFileName(string name); //設置當前項目的輸出文件的名稱 string watermarkName(); //返回當前項目水印的名稱 void setWatermarkName(string name); //設置當前項目的水印名稱 int options(); //返回當前項目的選項 void setOptions(int options); //設置當前項目的選項 string vmSectionName(); //返回當前項目的VM段名稱 void setVMSectionName(); //設置當前項目的VM段名稱 Licenses licenses(); //返回當前項目的許可證列表 Files files(); //返回當前項目的文件列表 Watermarks watermarks(); //返回水印列表 PEFile/MacFile inputFile(); //返回源文件 PEFile/MacFile outputFile();//返回輸出文件 PEArchitecture/MacArchitecture inputArchitecture(); //返回源架構 PEArchitecture/MacArchitecture outputArchitecture();//返回輸出架構 };
▲水印
用于處理水印列表的類:
class Watermarks { public: Watermark item(int index); //返回帶有給定索引的水印 int count(); //返回列表中的一些水印 Watermark itemByName(string name);//返回帶有給定名稱的水印 }
使用水印的類:
class Watermark {public: string name(); //返回水印的名稱 string value();//返回水印的值 bool blocked();//返回“Blocked”屬性 void setBlocked(bool value); //設置“Blocked”屬性}
▲許可證
用于處理許可證列表的類:
class Licenses { public: int keyLength(); //返回鍵的長度 string publicExp(); //返回公共指數 string privateExp(); //返回私有指數 string modulus(); //返回模量 License item(int index); // 返回具有給定索引的許可證 int count(); //返回列表中的許可證數量 }
使用許可證的類:
class License { public: string date(string format = "%c"); //返回許可證的日期 string customerName(); //返回許可證所有者的名稱 string customerEmail(); //返回許可證所有者的電子郵件 string orderRef();//返回購買許可證的訂單id string comments();//返回許可的注釋 string serialNumber(); //返回許可證的序列號 bool blocked(); //返回“Blocked”屬性 void setBlocked(bool value); //設置“Blocked”屬性 }
▲文件
用于處理文件列表的類:
class Files { public: File item(int index); // 返回具有給定索引的文件 int count(); //返回列表中的文件數量 }
使用文件的類:
class File { public: string name(); //返回文件的名稱 string fileName(); //返回文件名 int options(); //返回選項 void setName(string name);//設置文件的名稱 void setFileName(string name);//設置文件的文件名 void setOptions();//設置選項 }
- 持續更新中 -
VMProtect正版授權專享在線訂購特享超低價格!還不趕緊加入你的訂購清單?>>更多詳情可點擊咨詢購買
掃描關注“慧聚IT”微信公眾號,及時獲取最新動態及最新資訊
