Development
: K-Meleon Forum
K-Meleon development related discussions.
Goto:
Forum List
•
Message List
•
Search
•
Log In
Your Name:
Subject:
Help information
BBcode help
Smileys help
[quote=JamesD] Has anyone used a command line encryption program from the KM macrolanguage? I have been trying to get MySecret http://www.di-mgt.com.au/mysecret.html to encrypt one file without any luck. I have created a folder named Secur_Paste in my user macro folder and placed the MySecret.exe and it Readme.txt files there. I have an almost completed application which will be of no use unless I can encrypt the data file. The following is not my application, but only a test script to find the correct way to build the exec() statement. [code] # K-Meleon Macros (http://kmeleon.sourceforge.net/wiki/index.php?id=MacroLanguage) # # ---------- Snippet.kmm # ---------- Located in KM 1.5.3 --------------- # ---------- code testing # # Dependencies : main.kmm # Resources : - # Preferences : - # Version : - # -------------------------------------------------------------------------------- _Snippet_RunCode{ $_Snippet_Choice = prompt("Enter 'E' to encrypt or 'D' to decrypt", "CHOICE"); if ($_Snippet_Choice == "E") { macros(_Snippet_Encrypt); } if ($_Snippet_Choice == "D") { macros(_Snippet_Decrypt); } } _Snippet_Encrypt { #$_Snippet_Crypt_Path=getfolder(UserMacroFolder)."\\Secur_Paste\\MySecret.exe"; $_Snippet_SwitchM1 = "-e -n -p "; # a space required between -p and the passphrase $_Snippet_SwitchM2 = "DEYOUNG"; # must have quotes if includes spaces $_Snippet_SwitchM3 = " readme.txt readme.ecm"; $_Snippet_SwitchM = $_Snippet_SwitchM1."\"".$_Snippet_SwitchM2."\"".$_Snippet_SwitchM3 ; alert( $_Snippet_SwitchM , "$_Snippet_SwitchM DEBUG", INFO); exec("\"".getfolder(UserMacroFolder)."\\Secur_Paste\\MySecret.exe\" ".$_Snippet_SwitchM); setclipboard("\"".getfolder(UserMacroFolder)."\\Secur_Paste\\MySecret.exe\" ".$_Snippet_SwitchM); ## chord plays - this code works - executable name without extension #exec("\"".getfolder(UserMacroFolder)."\\Secur_Paste\\sounder\" ".$_Sound_Choice.""); #setclipboard("\"".getfolder(UserMacroFolder)."\\Secur_Paste\\sounder\" ".$_Sound_Choice.""); ## chord plays - this code works #exec("\"".getfolder(UserMacroFolder)."\\Secur_Paste\\sounder.exe\" ".$_Sound_Choice.""); #setclipboard("\"".getfolder(UserMacroFolder)."\\Secur_Paste\\sounder.exe\" ".$_Sound_Choice.""); } _Snippet_Decrypt{ # only when encrypt works } _Snippet_BuildMenu{ # add another option to Favorites menu setmenu("F&avorites",macro,"Snippet Testing",_Snippet_RunCode,3); } ## - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #$OnStartup=$OnStartup."_Snippet_GetCrypt;"; $OnInit=$OnInit."_Snippet_BuildMenu;"; #$OnInit=$OnInit."_Snippet_SetAccels;"; $macroModules=$macroModules."Snippet;"; [/code][/quote]
[Please Enable JavaScript]
K-Meleon forum is powered by
Phorum
.
Home/News
Screenshots
Download
Documentation
Resources
Get Involved
Forum
Bugs
Development
English