Forums temporarily locked down! Please read!

Author Topic: Including Espionage into a Hazel ruleset  (Read 3287 times)

Nayn

  • H4X0r
  • ****
  • Posts: 12
    • View Profile
Including Espionage into a Hazel ruleset
« on: October 17, 2014, 08:26:21 PM »
Hazel is a great little app that--for all who do not know what Hazel is--makes it possible to define conditions followed by actions to perform operations on files. Kind of like ifttt.com. You can, for example, do something like:

IF filename is "readme.txt" THEN delete this file.

I make heavy use of Hazel, especially for sorting documents I get sent to by email. Until now, when files matched specific conditions I had Hazel run a script that mounted an encrypted volume, moved and sorted all the files into this volume, unmounted it and quit.

Now I bought Espionage (finally!), but I would still like to keep automated sorting of documents.

Is there a way I can trigger mounting my encrypted volumes? I am thinking of something like Hazel matches files, runs a script, waits until I have entered my password into Espionage and when the volume is mounted, it copies all the files (but not before). This is especially tricky if the mount-point is an existing folder.

Any ideas? Thank you!

zsolt

  • Global Moderator
  • Veteran
  • *****
  • Posts: 823
    • View Profile
Re: Including Espionage into a Hazel ruleset
« Reply #1 on: October 17, 2014, 09:08:48 PM »
Pls give me a workflow example, and I will try to come up with some idea.
Follow @espionageapp on twitter for news! | For general Mac support, please visit Mac Me Support

Nayn

  • H4X0r
  • ****
  • Posts: 12
    • View Profile
Re: Including Espionage into a Hazel ruleset
« Reply #2 on: October 17, 2014, 09:24:05 PM »
Here you go. First what I have now:

Code: [Select]
if filename matches [YYYY-MM-DD]_important_document.pdf
run script to mount sparsebundle
copy to sparsbundle
sort into subfolder [YYYY]
run script to unmount sparsebundle

And now what I would like to have:

Code: [Select]
if filename matches [YYYY-MM-DD]_important_document.pdf
trigger espionage.app (so that I can mount an encrypted volume into a specific folder)
copy to the "folder" (actually the espionage-mounted volume)
sort into subfolder [YYYY]

(I also would not mind, if it would be possible, to pull instead of to push files, but this is afaik currently not possible with Hazel.)

Thank you!


zsolt

  • Global Moderator
  • Veteran
  • *****
  • Posts: 823
    • View Profile
Re: Including Espionage into a Hazel ruleset
« Reply #3 on: October 18, 2014, 06:36:09 AM »
At this moment I cannot offer you a lot. It is planned for future releases, but not there yet.
Using Applescript you you can launch and quit Espionage, one step further you can take it with GUI scripting, and you can combine it with hdiutil command which will do the mount and unmount for you.
Other approach is to use folder actions to launch custom scripts from within Espionage, so instead of file name match triggering espionage, you can trigger the file matching script from Espionage....then there is also http://www.macupdate.com/app/mac/12046/platypus with which you can wrap script into an application....

If you run into some workflow which might work for you, and you get stuck, let me know.

Rgds
Zsolt
Follow @espionageapp on twitter for news! | For general Mac support, please visit Mac Me Support

Nayn

  • H4X0r
  • ****
  • Posts: 12
    • View Profile
Re: Including Espionage into a Hazel ruleset
« Reply #4 on: October 18, 2014, 01:11:12 PM »
Okay, thank you for the answer. One last question, though: Is it possible to have Espionage add folders/files that are present in a mountpoint into the bundle mounted at this point?

So if my mountpoint is the directory /folder and I add #file1, #file2, and #file3 into /folder to have Espionage

first: secure those files somewhere (and delete them in /folder)
second: mount the volume at /folder
third: move #files1-3 into the mounted volume

...because if this would be possible, this would basically make my question obsolete as I could simply have Hazel move the files into the mountpoint and the action described above would do the rest.

Thank you!


zsolt

  • Global Moderator
  • Veteran
  • *****
  • Posts: 823
    • View Profile
Re: Including Espionage into a Hazel ruleset
« Reply #5 on: October 18, 2014, 07:55:51 PM »
It is not.
The files in the mount point folder temporarily disappear when you unlock the folder and mount the disk image volume into that mount point folder.
What you are asking is that we, upon user request to unlock the folder, check if there are any files in the mount point folder, and then move them away, unlock the folder and move them into unlocked folder....

This is a very special case and I do not think we will do something about it, because the fact that there might be files in the mount point folder is already used in our approach to security...

Namely, you can put some fake files into the moutpoint folder, deceiving the possible intruder even further, once he finds the fake files, he will stop sniffing. Also if one protects an application folder, if the folder is locked, application will usually create the default set of files, and then launch empty...and we like it that way.

I hope you find some way to efficiently protect your files.

Rgds
Zsolt
Follow @espionageapp on twitter for news! | For general Mac support, please visit Mac Me Support