Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/php
- <?php
- // set PHP include path
- $newIncludePath = array();
- $newIncludePath[] = '/opt/apps/zend_framework/';
- $newIncludePath[] = 'include';
- $newIncludePath[] = get_include_path();
- $newIncludePath = implode(PATH_SEPARATOR, $newIncludePath);
- set_include_path($newIncludePath);
- // load Zend Framework
- require_once 'Zend/Loader/Autoloader.php';
- $autoloader = Zend_Loader_Autoloader::getInstance();
- $autoloader->setFallbackAutoloader(true);
- require_once('classes/User.class.php');
- // incoming pipe
- $file_stdin = fopen('php://stdin', 'r');
- $user = trim(fgets($file_stdin));
- $pass = trim(fgets($file_stdin));
- // aaa check
- #$user = new User();
- #$auth_result = $user->logon($user, $pass, '12');
- #if ($auth_result == 1) {
- # exit(0);
- #}
- ## debug file (NEVER ENABLE THIS! ALL PASSWORDS WILL BE RECORDED IN PLAINTEXT ON THE FILESYSTEM)
- #$file_log = fopen('/tmp/auth_test', 'a');
- #fwrite($file_log, "$user");
- #fwrite($file_log, "$pass");
- // return FAIL flag by default
- exit(0)
- ?>
Add Comment
Please, Sign In to add comment