Browsing Hacker

Facebook Hacker Cup 2013:Beautiful Strings solution in PHP

Here is the solution for FHC 2013 Beautiful Strings problem in PHP: $ip = fopen(‘input.txt‘, "r"); $test_cases = trim(fgets($ip));     $c=1;     while($c!= $test_cases+1){         $case=preg_replace(‘/[^a-z]+/’, ", strtolower(trim(fgets($ip))));         $vals=array_count_values(str_split($case));         arsort($vals);         $beauty=26;         $max_b=0;         foreach($vals as $v){             $max_b +=$v*$beauty;             $beauty–;


NimBuzz Official Website hacked by Iranian Hackers

Just now. Nimbuzz main site was hacked by someone identified as Sourena.  The hacker defaced the main site to this <p> </div> <div style="text-align: left;"> As a proof he saved a mirror at <a href="" style="font-weight: bold;" >Zone-H</a>. The <b>Nimbuzz</b>&nbsp;website can&#8217;t be accessed right now. Google Chrome gives an error "<b>Oops! Google Chrome could not connect to</b>" </div> <div style="text-align: left;"> </div> <div style="text-align: left;"> <b>Nimbuzz </b>is one of the popular chat clients in <b>PC </b>and mobile phones.


What is SQL Injection and how to make your PHP site free from SQL Injection hacking

SQL Injection (SQLi) is a very dangerous thing that a hacker can do to your site. This happens mostly in SQL queries. Let me make you understand this in a simple way. Suppose you’re SQL query code is this: $user=$_GET[‘user’]; $sql=mysql_query("SELECT * FROM users WHERE user='".$user."‘"); It’s a normal code. BUT it is a very easy method for hacker to easily destroy your database. The user ID is getting from a GET request.





This blog was once on WordPress. Now a static site. See source code on



Currently working on projects.