CFDBDeobfuscate

"Contact Form to Database" Copyright (C) 2011-2014 Michael Simpson (email : michael.d.simpson@gmail.com).

Defined (1)

The class is defined in the following location(s).

/CFDBDeobfuscate.php  
  1. class CFDBDeobfuscate { 
  2.  
  3. // Taken from http://ditio.net/2008/11/04/php-string-to-hex-and-hex-to-string-functions/ 
  4. static function hexToStr($hex) { 
  5. $string = ''; 
  6. for ($i = 0; $i < strlen($hex) - 1; $i += 2) { 
  7. $string .= chr(hexdec($hex[$i] . $hex[$i + 1])); 
  8. return $string; 
  9.  
  10. static function deobfuscateHexString($hex, $key) { 
  11. return CFDBDeobfuscate::deobfuscateString(CFDBDeobfuscate::hexToStr($hex), $key); 
  12.  
  13. static function deobfuscateString($string, $key) { 
  14. return mcrypt_decrypt(MCRYPT_3DES, $key, $string, 'ecb'); 
  15.  
  16.