Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function obfuscate($code)
- {
- $len = strlen($code);
- $obf = '';
- for ($i = 0; $i < $len; $i++) {
- $bin = decbin(ord($code[$i]));
- $bin = ($binLen = strlen($bin) > 7)
- ? ''
- : implode('', array_fill(0, 8 - strlen($bin), '0')) . $bin;
- $obf .= str_replace(array('1', '0'), array(chr(9), chr(32)), $bin);
- }
- return $obf;
- }
- function include_o($file)
- {
- $file = trim($file);
- if ( empty($file)
- || !is_readable($file)
- ) {
- throw new Exception("Filename is empty or file isn't readable");
- }
- $string = file_get_contents($file);
- $len = strlen($string);
- $out = '';
- for ($i = 0; $i < $len; $i++) {
- $out .= chr(bindec(str_replace(array(chr(9), chr(32)), array('1', '0'), substr($string, $i, 8))));
- $i += 7;
- }
- if (!empty($out)) {
- eval($out);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement