archai2 Posted March 31, 2006 Share Posted March 31, 2006 (edited) I found this nice and useful utility for file encryption:http://bcrypt.sourceforge.net/but I can't figure out how to use STDIN/STDOUT to send the passphrase in. Can anybody help?EDIT: File uploaded.UPDATED (working script) bcrypt.au3 http://bcrypt.sourceforge.net/bcrypt-1.1.zip Edited April 5, 2006 by archai2 Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted March 31, 2006 Moderators Share Posted March 31, 2006 Not that these are blowfish encryptions, but they may be useful too you:http://www.autoitscript.com/forum/index.php?showtopic=17392http://www.autoitscript.com/forum/index.php?showtopic=13286 Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Nuffilein805 Posted March 31, 2006 Share Posted March 31, 2006 Not that these are blowfish encryptions, but they may be useful too you:http://www.autoitscript.com/forum/index.php?showtopic=17392http://www.autoitscript.com/forum/index.php?showtopic=13286wow, you are referring to me, thx my little chatmy little encryption toolmy little hidermy unsafe clickbot Link to comment Share on other sites More sharing options...
RazerM Posted March 31, 2006 Share Posted March 31, 2006 check out my file encryption udf, its in my signature My Programs:AInstall - Create a standalone installer for your programUnit Converter - Converts Length, Area, Volume, Weight, Temperature and Pressure to different unitsBinary Clock - Hours, minutes and seconds have 10 columns each to display timeAutoIt Editor - Code Editor with Syntax Highlighting.Laserix Editor & Player - Create, Edit and Play Laserix LevelsLyric Syncer - Create and use Synchronised Lyrics.Connect 4 - 2 Player Connect 4 Game (Local or Online!, Formatted Chat!!)MD5, SHA-1, SHA-256, Tiger and Whirlpool Hash Finder - Dictionary and Brute Force FindCool Text Client - Create Rendered ImageMy UDF's:GUI Enhance - Enhance your GUIs visually.IDEA File Encryption - Encrypt and decrypt files easily! File Rename - Rename files easilyRC4 Text Encryption - Encrypt text using the RC4 AlgorithmPrime Number - Check if a number is primeString Remove - remove lots of strings at onceProgress Bar - made easySound UDF - Play, Pause, Resume, Seek and Stop. Link to comment Share on other sites More sharing options...
archai2 Posted March 31, 2006 Author Share Posted March 31, 2006 check out my file encryption udf, its in my signatureYour EncryptOr is a very nice job. What type of encryption does the encrypt.com?I think it would a great tool if you add some license free strong algorithm like, perhaps blowfish. Link to comment Share on other sites More sharing options...
RazerM Posted March 31, 2006 Share Posted March 31, 2006 (edited) it uses IDEA encryption, did u see my udf below encrypt0r(uses the same encryption but you can implement in your own program Edited March 31, 2006 by RazerM My Programs:AInstall - Create a standalone installer for your programUnit Converter - Converts Length, Area, Volume, Weight, Temperature and Pressure to different unitsBinary Clock - Hours, minutes and seconds have 10 columns each to display timeAutoIt Editor - Code Editor with Syntax Highlighting.Laserix Editor & Player - Create, Edit and Play Laserix LevelsLyric Syncer - Create and use Synchronised Lyrics.Connect 4 - 2 Player Connect 4 Game (Local or Online!, Formatted Chat!!)MD5, SHA-1, SHA-256, Tiger and Whirlpool Hash Finder - Dictionary and Brute Force FindCool Text Client - Create Rendered ImageMy UDF's:GUI Enhance - Enhance your GUIs visually.IDEA File Encryption - Encrypt and decrypt files easily! File Rename - Rename files easilyRC4 Text Encryption - Encrypt text using the RC4 AlgorithmPrime Number - Check if a number is primeString Remove - remove lots of strings at onceProgress Bar - made easySound UDF - Play, Pause, Resume, Seek and Stop. Link to comment Share on other sites More sharing options...
archai2 Posted March 31, 2006 Author Share Posted March 31, 2006 it uses IDEA encryption, did u see my udf below encrypt0r(uses the same encryption but you can implement in your own programYes, I tested it.What makes bcrypt interesting is that it is license free and the inclusion of file compression and secure deletion.IDEA - according Wikipedia:The cipher is patented in a number of countries but is freely available for non-commercial use. Link to comment Share on other sites More sharing options...
RazerM Posted March 31, 2006 Share Posted March 31, 2006 i am not selling my program so it isn't commercial use My Programs:AInstall - Create a standalone installer for your programUnit Converter - Converts Length, Area, Volume, Weight, Temperature and Pressure to different unitsBinary Clock - Hours, minutes and seconds have 10 columns each to display timeAutoIt Editor - Code Editor with Syntax Highlighting.Laserix Editor & Player - Create, Edit and Play Laserix LevelsLyric Syncer - Create and use Synchronised Lyrics.Connect 4 - 2 Player Connect 4 Game (Local or Online!, Formatted Chat!!)MD5, SHA-1, SHA-256, Tiger and Whirlpool Hash Finder - Dictionary and Brute Force FindCool Text Client - Create Rendered ImageMy UDF's:GUI Enhance - Enhance your GUIs visually.IDEA File Encryption - Encrypt and decrypt files easily! File Rename - Rename files easilyRC4 Text Encryption - Encrypt text using the RC4 AlgorithmPrime Number - Check if a number is primeString Remove - remove lots of strings at onceProgress Bar - made easySound UDF - Play, Pause, Resume, Seek and Stop. Link to comment Share on other sites More sharing options...
archai2 Posted March 31, 2006 Author Share Posted March 31, 2006 (edited) i am not selling my program so it isn't commercial useWhat I meant is that if I create an executable using this algorithm, and this is used in any commercial environment, end user has to be warned that he needs to acquire the corresponding license. So I prefer to start with license free software like blowfish and zlib. [edit] I tested the encryption of a 34.5 Mb access.mdb database w/default parameters on a P4 @2.4MHz Encryption took roughly 5 secs. ending in a 9.6 Mb encrypted file. De-encryption to original file took roughly 2 secs. (Comparison: I compressed the original file w/Winzip9 w/default settings: 4 secs. - 9.7 Mb decompression: 3 sec.) [/edit] Edited April 2, 2006 by archai2 Link to comment Share on other sites More sharing options...
archai2 Posted April 4, 2006 Author Share Posted April 4, 2006 (edited) Finally got this working in precarious condition.As said in my first post I can't figure out the correct usage of STDIN/STDOUT; TODO: (Pre-alpha working condition); Correct usage of STDIN/STDOUT/STDERR; Add usage of -o command switch ; - Great for loading encrypted files to a variable without writing to disk (i.e. bank/credit card info)... but this can only be done 'with a little help of my friends...' -- You can find the script on my first post. -- Edited April 5, 2006 by archai2 Link to comment Share on other sites More sharing options...
Uten Posted April 5, 2006 Share Posted April 5, 2006 Nope, I'm sorry. Just wasted to much time on this But now it just occured to me that I think I have read that stdin and stdout is detached by @comspec or somthing like that.So, if you realy want this I think you have to consult Mx63.dll, and posts by nfwu on the topic. Please keep your sig. small! Use the help file. Search the forum. Then ask unresolved questions :) Script plugin demo, Simple Trace udf, TrayMenuEx udf, IOChatter demo, freebasic multithreaded dll sample, PostMessage, Aspell, Code profiling Link to comment Share on other sites More sharing options...
nfwu Posted April 5, 2006 Share Posted April 5, 2006 Returns whatever it gets from STDOUT. If any error, returns "" and sets @error. Func _BcryptToStdout($sFileList, $sPassPhrase, $iCompress = 0, $iOverwrite = 3) If Not FileExists(@ScriptDir & "\bcrypt.exe") Or Not FileExists(@ScriptDir & "\zlib.dll") Then SetError(1) Return "" ElseIf StringLen($sPassPhrase) < 8 Or StringLen($sPassPhrase) > 56 Then Return (-2) SetError(2) Return "" EndIf Local $sParams = "" If $iCompress <> 0 Then $sParams &= " -c" If IsNumber($iOverwrite) And $iOverwrite <> 3 Then $sParams &= " -s" & $iOverwrite Local $sCMD = @ComSpec & " /C " & '"' & @ScriptDir & "\bcrypt.exe" & '"' & $sParams & ' ' & $sFileList & '' Local $hPID = Run($sCMD, @ScriptDir, @SW_HIDE, 1 + 2 + 4) StdinWrite($hPID, $sPassPhrase & @CRLF & $sPassPhrase & @CRLF) Local $m_data = "" while @error = 0 $m_data = $m_data & StdoutRead($hPID, -1) wend Return $m_data EndFunc ;==>_Bcrypt #) TwitterOut of date stuff:Scripts: Sudoku Solver | Webserver | 3D library (Pure AutoIt) | Wood's GadgetsUDFs: _WoodUniqueID() | _DialogEditIni() | _Console*() | _GetIPConfigData() | _URLEncode/Decode() Link to comment Share on other sites More sharing options...
Uten Posted April 5, 2006 Share Posted April 5, 2006 Returns whatever it gets from STDOUT. If any error, returns "" and sets @error. Local $hPID = Run($sCMD, @ScriptDir, @SW_HIDE, 1 + 2 + 4) StdinWrite($hPID, $sPassPhrase & @CRLF & $sPassPhrase & @CRLF) Local $m_data = "" while @error = 0 $m_data = $m_data & StdoutRead($hPID, -1) wend Return $m_data #) Problem is there is nothing to be read on StdoutRead. I think bcrypt is "by design" not script friendly. If it was this should work bcrypt Test.txt < passphrase.txt Where passphrase.txt is a two line file with the password in it. Please keep your sig. small! Use the help file. Search the forum. Then ask unresolved questions :) Script plugin demo, Simple Trace udf, TrayMenuEx udf, IOChatter demo, freebasic multithreaded dll sample, PostMessage, Aspell, Code profiling Link to comment Share on other sites More sharing options...
archai2 Posted April 5, 2006 Author Share Posted April 5, 2006 Thank you @all of you who tried this out.@nfwu Thank you for pointing me the solution to get the stream out. With your indications I rewrote the script. Please note there is a limitation in size when streaming output.-- Updated script for download in my first post -- Link to comment Share on other sites More sharing options...
Uten Posted April 5, 2006 Share Posted April 5, 2006 Now I just have to figure out why it did not work with my setup I fear the night will be to short Please keep your sig. small! Use the help file. Search the forum. Then ask unresolved questions :) Script plugin demo, Simple Trace udf, TrayMenuEx udf, IOChatter demo, freebasic multithreaded dll sample, PostMessage, Aspell, Code profiling Link to comment Share on other sites More sharing options...
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