Aleksander Machniak
2015-09-02 427ab2f3938122d7ce1d0862a583a5adaed6c6c9
bin/decrypt.sh
@@ -19,7 +19,7 @@
 +-----------------------------------------------------------------------+
*/
/*-
/**
 * If http_received_header_encrypt is configured, the IP address and the
 * host name of the added Received: header is encrypted with 3DES, to
 * protect information that some could consider sensitve, yet their
@@ -28,8 +28,8 @@
 * Such an encrypted Received: header might look like:
 *
 * Received: from DzgkvJBO5+bw+oje5JACeNIa/uSI4mRw2cy5YoPBba73eyBmjtyHnQ==
 *    [my0nUbjZXKtl7KVBZcsvWOxxtyVFxza4]
 *   with HTTP/1.1 (POST); Thu, 14 May 2009 19:17:28 +0200
 *  [my0nUbjZXKtl7KVBZcsvWOxxtyVFxza4]
 *  with HTTP/1.1 (POST); Thu, 14 May 2009 19:17:28 +0200
 *
 * In this example, the two encrypted components are the sender host name
 * (DzgkvJBO5+bw+oje5JACeNIa/uSI4mRw2cy5YoPBba73eyBmjtyHnQ==) and the IP
@@ -48,11 +48,11 @@
 *
 * If (most likely binary) junk is shown, then
 *  - either the encryption password has, between the time the mail was sent
 *    and `now', changed, or
 *    and 'now', changed, or
 *  - you are dealing with counterfeit header data.
 */
define('INSTALL_PATH', realpath(dirname(__FILE__).'/..') . '/');
define('INSTALL_PATH', realpath(__DIR__ .'/..') . '/');
require INSTALL_PATH . 'program/include/clisetup.php';
@@ -60,7 +60,7 @@
   die("Usage: " . basename($argv[0]) . " encrypted-hdr-part [encrypted-hdr-part ...]\n");
}
$RCMAIL = rcmail::get_instance();
$RCMAIL = rcube::get_instance();
for ($i = 1; $i < $argc; $i++) {
   printf("%s\n", $RCMAIL->decrypt($argv[$i]));