Fix: Messages forwarded as attachments from message list were not getting flagged...
[squirrelmail.git] / contrib / decrypt_headers.php
index 7304b72785d3fe7bed3be34146856ed7cf7ceae5..a8d7ff1dc800b0b5f08dfc211a4146a251687d67 100644 (file)
@@ -3,7 +3,7 @@
 /**
  * Script provides form to decode encrypted header information.
  *
 /**
  * Script provides form to decode encrypted header information.
  *
- * @copyright © 2005-2006 The SquirrelMail Project Team
+ * @copyright © 2005-2009 The SquirrelMail Project Team
  * @license http://opensource.org/licenses/gpl-license.php GNU Public License
  * @version $Id$
  * @package squirrelmail
  * @license http://opensource.org/licenses/gpl-license.php GNU Public License
  * @version $Id$
  * @package squirrelmail
 define('SM_PATH','../');
 
 /**
 define('SM_PATH','../');
 
 /**
- * include SquirrelMail string functions
+ * include SquirrelMail string and generic functions
  * script needs OneTimePadDecrypt() (functions/strings.php)
  * script needs OneTimePadDecrypt() (functions/strings.php)
- * and sqgetGlobalVar() (functions/global.php, loaded by strings.php)
+ * and sqgetGlobalVar() (functions/global.php)
  */
  */
+include_once(SM_PATH.'functions/global.php');
 include_once(SM_PATH.'functions/strings.php');
 
 /**
 include_once(SM_PATH.'functions/strings.php');
 
 /**
@@ -36,14 +37,14 @@ function hex2ip($hex) {
             .hexdec(substr($hex,4,2)).'.'
             .hexdec(substr($hex,6,2));
     } elseif (strlen($hex)==32) {
             .hexdec(substr($hex,4,2)).'.'
             .hexdec(substr($hex,6,2));
     } elseif (strlen($hex)==32) {
-        $ret=hexdec(substr($hex,0,4)).':'
-            .hexdec(substr($hex,4,4)).':'
-            .hexdec(substr($hex,8,4)).':'
-            .hexdec(substr($hex,12,4)).':'
-            .hexdec(substr($hex,16,4)).':'
-            .hexdec(substr($hex,20,4)).':'
-            .hexdec(substr($hex,24,4)).':'
-            .hexdec(substr($hex,28,4));
+        $ret=substr($hex,0,4).':'
+            .substr($hex,4,4).':'
+            .substr($hex,8,4).':'
+            .substr($hex,12,4).':'
+            .substr($hex,16,4).':'
+            .substr($hex,20,4).':'
+            .substr($hex,24,4).':'
+            .substr($hex,28,4);
     } else {
         $ret=$hex;
     }
     } else {
         $ret=$hex;
     }
@@ -80,7 +81,7 @@ if (sqgetGlobalVar('submit',$submit,SQ_POST)) {
     echo "<hr />";
 }
 ?>
     echo "<hr />";
 }
 ?>
-<form action="<?php echo $PHP_SELF ?>" method="post" >
+<form action="" method="post">
 <p>
 Secret key: <input type="password" name="secret"><br />
 Encrypted string: <input type="text" name="enc_string"><br />
 <p>
 Secret key: <input type="password" name="secret"><br />
 Encrypted string: <input type="text" name="enc_string"><br />
@@ -88,4 +89,4 @@ Check, if it is an address string: <input type="checkbox" name="ip_addr" /><br /
 <button type="submit" name="submit" value="submit">Submit</button>
 </p>
 </form>
 <button type="submit" name="submit" value="submit">Submit</button>
 </p>
 </form>
-</body></html>
\ No newline at end of file
+</body></html>