8852893dd515c095b14dcc4d16e0bd4be09d3024
2 require_once('./php-encfs.php');
4 $encrypted = '/mnt/data1/domains/kyberia.cz/encfs/a'; //encfs encrypted data
5 $plaintext = '/mnt/data1/domains/kyberia.cz/encfs/b'; //plaintext mountpoint
6 $umountpasswd = ''; //password for unmounting (can't be same as mounting password)
7 $encfsargs = '--public'; //arguments passed to encfs
10 <h1
><a href
="?">EncFS Web
Interface</a
></h1
>
11 <?php
echo("encfs '<b>$encrypted</b>' '$plaintext' $encfsargs<br /><br />"); ?
>
19 <form action
="?" method
="POST">
20 <input type
="submit" value
="MOUNT (DECRYPT)" />
21 <input type
="password" name
="mnt" value
="" />
23 <form action
="?" method
="POST">
24 <input type
="submit" value
="UNMOUNT (ENCRYPT)" />
25 <input type
="password" name
="umnt" value
="" />
27 Brougt to you by
<a href
="http://blog.harvie.cz/">Harvie
</a
> 2oo9
!
32 if(isset($_POST['mnt']) && isset($_POST['umnt']))
33 die('Error: Cannot do both mount and umount!');
35 if(isset($_POST['mnt'])) {
36 if($_POST['mnt'] == $umountpasswd)
37 die('Error: It is VERY dangerous to have same mount nad unmount password!!! Change it!');
38 if(trim($_POST['mnt']) == '')
39 die('Error: Mount password cannot be empty!!! Change it!');
41 encfs_mount($encrypted, $plaintext, $_POST['mnt'], $encfsargs);
44 if(isset($_POST['umnt'])) {
45 if($_POST['umnt'] == $umountpasswd) {
46 encfs_unmount($plaintext);
48 echo('Error: Invalid unmount password. You can change it in .php file.');
This page took 1.454787 seconds and 5 git commands to generate.