ezzetabi Posted May 18, 2004 Posted May 18, 2004 (edited) As trids command I post a link to the 448 bytes cypher, IDEA:http://www.cypherspace.org/adam/rsa/idea.htmlAnd also a short example with a code that uses it.It is intended that you already FILEINSTALL() the program with the name of IDEA.COM$pass = "what you want";Max 128 chars $filename = "c:\this is an example\e.txt";The file to encrypt $mode = "+";or "-" usually + is used for encrypt, - for decrypt but it can be vice versa. Run(@comspec & " /c echo " & $pass & "|idea.com " & $mode & " " & FileGetShortName($filename),"",@sw_hide) Edited May 18, 2004 by ezzetabi
ezzetabi Posted May 18, 2004 Author Posted May 18, 2004 (edited) Since this program crypt the file "on-the-place" it may be also used for secure deletion. Like this way: expandcollapse popup$FILENAME = "C:\this is a\example\do you see.txt" $TIMES = 100;higher means more secure ;The real program... ;Step 1 - crypt/decrypt the file to prevent readability of the content. For $C = 1 To $TIMES $PASS = Int(Random(5, 101)) ;The pass can be long 5 - 100 chars $PASS = _RandomText($PASS) ;and it is a random sequence of maiusc or minusc letters (see the func) If Random() < .5 Then ;as Random() result Idea may decryp or crypt $MODE = "+" Else $MODE = "-" EndIf Run(@ComSpec & " /c echo " & $PASS & "|idea.com " & $MODE & " " & _ FileGetShortName($FILENAME), "", @SW_HIDE) ;(de)cryption it self Next ;Step 2 dividing filename and path For $C = StringLen($FILENAME) To 0 Step - 1 If StringMid($FILENAME, $C, 1) == "\" Then $FILE = StringTrimLeft($FILENAME, $C) $FOLDER = StringLeft($FILENAME, $C);Now ($folder & $file) is the full path ExitLoop EndIf Next ;Step 3 rename the file in order to avoid readability of the name. For $C = 1 To $TIMES * 2 $NEWNAME = _RandomText(Int(Random(10,41))) FileMove($FOLDER & $FILE, $FOLDER & $NEWNAME, 0) $FILE = $NEWNAME Next ;Step 4 deletion of the strangely named wastes. FileDelete($FOLDER & $FILE) Exit Func _RandomText($N) ;$n is the lenght of string. If $N < 1 Then Return -1 Local $COUNTER, $ALPHA, $RESULT For $COUNTER = 1 To $N If Random() < 0.5 Then $ALPHA = Chr(Random(Asc("A"), Asc("Z") + 1)) Else $ALPHA = Chr(Random(Asc("a"), Asc("z") + 1)) EndIf $RESULT = $RESULT & $ALPHA Next Return $RESULT EndFunc ;==>_RandomText Edited May 19, 2004 by ezzetabi
ezzetabi Posted May 20, 2004 Author Posted May 20, 2004 Crypt and secure deletion are really so unimportant topic that none answers or comment?
FifthLobe Posted February 11, 2006 Posted February 11, 2006 wow, this is nice! I'm gonna use this sometime soon, so thanks for this post!
andyswarbs Posted February 11, 2006 Posted February 11, 2006 I'm gonna get my head round this. Licensing.au3Extended _Max & _Min_MsgBoxExitVarious extensions to _GuiCtrl...Run Dos programs output into an array etc (Updated 19-Feb-06)Extensions to Array library, primarily in two dimensions (updated 20-Feb-06)Version dependency calculator, _IsVer1GEVer2User Management, answering some domain questions (updated 19-Feb-06, various bugfixes and new functions added)Extensions to registry manipulation, including a recursive search & replaceDelimited string library (updated 19-Feb-03, added _DelimListSort)String library extensionsTerminal Server supportFile libraryCommand line parser (added 18-Feb-06)(UDF homepage) (Scit4Au3 UserCallTips added 21-Feb-06)
Micha1405 Posted February 11, 2006 Posted February 11, 2006 (edited) This is a great Tool ! Edited February 11, 2006 by Micha1405 My TrayToolBar
masvil Posted February 12, 2006 Posted February 12, 2006 ezzetabi made a nice find. In the while no encryption plugin neither dllcall went out Anyone know about a tiny command line tool that make compression too?
masvil Posted February 18, 2006 Posted February 18, 2006 http://www.tinyapps.org/file.htmlGood ones in "Archives & Compression" section.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now