#!/usr/bin/php
<?php
-/* Written by David Herrmann.
+/* Written by David Herrmann,
+ * improved by Philipp Kreil.
* Dedicated to the Public Domain.
*/
/* PHP IAuth verifier.
* echo "+wogsfr 131071 fake.host.net account:124653295"
* The last parameter "mode" can have as many spaces as you want.
*/
-
+error_reporting(0);
+
/* These constants are defined to access $argv more easily. */
define("ARG_REMOTEIP", $argv[1]);
define("ARG_REMOTEPORT", $argv[2]);
}
/* This rejects the client. */
-function iauth_reject() {
+function iauth_reject($reason = NULL) {
+ if($reason != NULL && strlen($reason) != 0) echo"error ".$reason." %";
exit(0);
}
/* iauth_reject(); */
/* our real implementation */
+if (is_readable('iauth-wgn.php')) {
+ require('iauth-wgn.php');
+}
iauth_return();
?>