秘密行動
(潜水中)
UID: 39244
- Gender: M
日 | 一 | 二 | 三 | 四 | 五 | 六 |
|
| | | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | |
|
第一期 Batch File 教學 — 初階防盜
發佈日期:2012/01/27 發佈者:秘密行動 (C.A.S.)
第一次在此發教學,又是第一篇文章,可能頗為失準,在此首先道歉 ......
我不會在此說 Basic Command,因為不想在這浪費時間 ......
說回正題,初階防盜的功能是防止外人修改批次檔名稱
(不過轉來有甚麼用 ...... 沒有人會將整個 BAT 給人吧)
大家應該使用各軟件來將 批次檔(BAT) 轉換為 應用程式(EXE),
以防止給他人修改,但這並不算防盜,因為現時已有軟件能反編了。
這此初階防盜十分簡單,可說是菜鳥也懂! ^^
初階防盜寫法如下 (Example):
:: if not exist (如果沒有)
:: exit (離開)
:: 即是如果目錄找不到 Test.exe 檔案,就會離開
if not exist Test.exe exit
=========================================
若你檔案在某資料夾內,那怎樣寫?很簡單,再來看看例子:
:: 例子:C:\\User\Administrator\Test_File\Test.exe (Test.exe 位置)
:: 例子:C:\\User\Batch_Files_01.bat (批次檔位置)
if not exist Administrator\Test_File\Test.exe exit
但如果我的批次檔不在目標範圍內,那怎辦?
:: 例子:C:\\User\Administrator\Test_File\Test.exe (Test.exe 位置)
:: 例子:D:\\Admin\Batch_Files_01.bat (批次檔位置)
if not exist C:\\User\Administrator\Test_File\Test.exe exit
=========================================
我想更多檔案,那又怎辦?
:: 例子:C:\\User\Administrator\Test_File_1\Test1.exe (Test1.exe 位置)
:: 例子:C:\\User\Administrator\Test_File_2\Test2.exe (Test2.exe 位置)
:: 例子:C:\\User\Administrator\Test_File_3\Test3.exe (Test3.exe 位置)
:: 例子:D:\\Admin\Batch_Files_01.bat (批次檔位置)
if not exist C:\\User\Administrator\Test_File_1\Test1.exe (
if not exist C:\\User\Administrator\Test_File_1\Test2.exe (
if not exist C:\\User\Administrator\Test_File_1\Test3.exe (
exit
)
)
)
!.!緊記多少括號 【(】,就要在最後加回多少【)】!.!
=========================================
那麼別人一旦將你的批次檔名稱更改,當他更改名稱後再開啟卻發現批次檔就會自動關閉了。
(來源:http://covert-activity.blogspot.com/2012/01/batch-file.html#more) [即是自已]
=========================================
下期預告:第二期 Half-Life 教學 — 如何在 HL1 創建自定義MOD
[ 本帖最後由 秘密行動 於 2012-1-29 12:25 AM 編輯 ]
|
贊助網站
|
|