This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <? | |
| /******************************************** | |
| detect SQL injection php | |
| ago/2010 - classe testada | |
| ********************************************/ | |
| class detectSQLinjection { | |
| //****************************************** | |
| function ok() { | |
| return count($this->er)==0; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $sql = safeInput("UPDATE table_name SET field_one='%s', field_two='%s' WHERE id='%s'", $input); | |
| function safeInput($string, $args){ | |
| foreach( $input as $key => $value ){ | |
| // 'clean' the input | |
| $args[$key] = mysql_real_escape_string($value); | |
| } | |
| // add the statement as the first element of the array | |
| $args[0] = $string; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var request = require("request"); | |
| //script by OverJT, based on https://github.com/devsseb/apinator | |
| var Akinator = function() { | |
| this.url = 'http://api-es2.akinator.com/ws/'; | |
| this.session = null; | |
| this.signature = null; | |
| this.onAsk = null; | |
| this.step = 0; | |
| } |