2015年5月28日 星期四

利用AxCrypt自動對檔案加密

 

  最近因為備份資料庫的東西需要做異地備份,但是又被挑戰有沒有加密,如果資料被拿走怎麼辦,好吧,就去找了一個可以加密的軟體,找到的加密軟體為AxCrypt
http://www.axantum.com/AxCrypt/Downloads.html 下載網址
我覺得這個還不錯的是可以做成自解加密檔
然後另外一個就是可以用command line的方式執行,官網也有詳細的參數可以參考

加密成程式的加密格式
"%ProgramFiles%\Axantum\AxCrypt\AxCrypt.exe" -e -k "加密的密碼" -z 要加密的檔案 
缺點是一定要安裝這套加密軟體,不然無法解密
前面的%ProgramFiles%為環境變數,echo出來會是c:\Program Files,安裝完軟體預設會是在這個路徑下
-e為定義所要加密的檔案
-k為要加密的密碼
-z為加密檔案

加密成自解加密檔
"%ProgramFiles%\Axantum\AxCrypt\AxCrypt.exe"  -k "加密的密碼" -j 要加密的檔案
缺點會多增加一個檔案,會多佔用硬碟空間
-j為加密為exe自解檔

詳細參數
-i [.ext]InstallSet all registry values to default. Set the extension to associate with AxCrypt - default is .axx.
-pPsp testTest for the need to install psapi.dll. Only relevant on NT. If return code is 0, no need. This is an installation helper function only.
-uUninstallClear all registry values.
-xeXitEnd the resident server process, if loaded.
-lLicenseStart the license manager dialog.
-b tagBatch idDefine a tag, or batch id, to be used with subsequent pass phrases. These pass phrases will only be used when the same tag is specified in future calls to AxCrypt. The batch id is a decimal non-zero positive 32-bit signed integer. Odd values are reserved for internal use. If no -b option is given, saved pass phrases are 'global'. All tagged pass phrases are saved until cleared with -t.
-fToggle Fast modeWill modify certain operations to execute fast, rather than safe and/or secure. There is no guaranteed effect. Initially off.
-cToggle Copy-only flagCauses subsequent -d and -z to retain the originals. May be combined with -f for fast copy without wiping of temporaries. Initially off.
-gToggle ignore encrypted flagIf set, attempted encryption of already encrypted files will do nothing. Initially off.
-nOutput NameDefines a file name to be used as output instead of default for the next -z or -d.
-mToggle recurse flagIf set, causes subsequent wild card file names to search into sub-directories. Initially off.
-eEncryption pass phrase definitionSubsequent -a or -k options on this invocation define the default encryption key instead of one of possibly many decryption keys. The -b option may be used to define pass phrases with limited context.
-aAdd pass phrasePrompt for a pass phrase using the AxCrypt standard safe dialogues. -b and -e may be used as modifiers.
-k "pass phrase"Cache pass phraseCache the given pass phrase, quotes are recommended. The pass phrase is case-sensitive. -b and -e may be used as modifiers. Note that there are restrictions for what passphrases may be used in the AxCrypt dialogs - these are not enforced here! See below for allowed characters in passphrases.
-O "Path2Exe"Set Open ExecutableModify a subsequent -o (Open for edit) to use the specified executable instead of the automatic association by extension.
-zencryptEncrypt (and if useful compress) the given file(s) with either the current default encryption key, or with one that is prompted for. The originals are wiped. -b, -c, -g, -f and -n may be used as modifiers.
-Jself-decrypt encryptEncrypt (and if useful compress) and copy the given file(s) with either the current default encryption key, or with one that is prompted for to a self-decrypting executable archive. -b, -g and -n may be used as modifier. Default is to ignore files that already are self-decrypting.
-Kmake Key-fileGenerate and store a Key-file in the given folder, or directly to the given full path-name.
-dDecryptDecompress and decrypt the given file(s) with either a cached key, or with one that is prompted for. -b, -c, -f and -n may be used as modifiers.
-oOpenOpen the given file(s) with the appropriate application after temporary decryption and decompression. If they are modified after application exit, they are re-encrypted with the same pass phrase. -b may be used as modifier.
-v noverride wipe passesSets an override of the number of passes for wipe for the remainder of the command line. See -V for more info.
-V nwipe passesSets the global persistent default number of wipe passes when overwriting, 1-7. Default if not set is 1. The full set of 7 passes will overwrite in the following sequence: random, ones, zeroes, random, zeroes, ones, random. If less are specified only the last n passes are performed. Thus, -V 3 corresponds to the DoD 5220.22-M standard for sanitizing data on fixed hard disks.
-wWipeWipe the given files and delete. Show a confirmation warning first.
-swipe SilentWipe the given files and delete, but do not ask for confirmation.
-qQuery pass phrase cacheReturn exit code 0 if all files given have pass phrases in the cache already. -b may be used as modifier.
-hAnonymous renameRenames the given file(s) to anonymous names. The original names will be restored on decryption.
-tClear pass phrase cacheClear the internal pass phrase cache. If -b is given, only pass phrases associated with that tag are affected, otherwise all are removed, tagged and un-tagged alike.

by Johnny

沒有留言:

張貼留言