X-Git-Url: https://mop.ddnsfree.com/gitweb/?a=blobdiff_plain;f=web%2FObj%2Fcurl-de-brisk.phh;h=223241c12afca9336ebad4ed1497fc932f47b2da;hb=f2164909d6a555815be27e67a1bf2f544a3d04e0;hp=0b720c5f6caf8e8765ddc4881cdf5aa4c3ca9b47;hpb=8da9db979a7ad38f95aa9ff8f1abfb997cc5aca3;p=curl-de-sac.git diff --git a/web/Obj/curl-de-brisk.phh b/web/Obj/curl-de-brisk.phh index 0b720c5..223241c 100755 --- a/web/Obj/curl-de-brisk.phh +++ b/web/Obj/curl-de-brisk.phh @@ -4,29 +4,31 @@ require_once($G_base . 'Obj/curl-de-sac.phh'); define('TOR_CHK_URL', 'http://localhost/curl-de-sac/test/tor_mock.ppp'); -class tor_chk_cmd extends CDS_cmd { +class Tor_chk_cmd extends CDS_cmd { var $ctx; var $user_idx; var $user_sess; var $conn_ip; + var $is_auth; - function tor_chk_cmd($cmd_cls, $ch, $ctx, $user_idx, $user_sess, $conn_ip) + function Tor_chk_cmd($cmd_cls, $ch, $ctx, $user_idx, $user_sess, $conn_ip, $is_auth) { parent::__construct($cmd_cls, $ch); $this->ctx = $ctx; $this->user_idx = $user_idx; $this->user_sess = $user_sess; $this->conn_ip = $conn_ip; + $this->is_auth = $is_auth; } } -class tor_chk_cmd_cls extends CDS_cmd_cls { - function tor_chk_cmd_cls() +class Tor_chk_cmd_cls extends CDS_cmd_cls { + function Tor_chk_cmd_cls() { parent::__construct("tor_chk", 10); } - function create($cds, $ctx, $user_idx, $user_sess, $conn_ip) + function create($cds, $ctx, $user_idx, $user_sess, $conn_ip, $is_auth) { if ($cds->dbg_get() > 0) { printf("'tor_chk'::create url:[%s]\n", 'TOR_CHK_URL'); @@ -46,7 +48,7 @@ class tor_chk_cmd_cls extends CDS_cmd_cls { if (parent::create($cds, $ch) == FALSE) break; - $cmd = new tor_chk_cmd($this, $ch, $ctx, $user_idx, $user_sess, $conn_ip); + $cmd = new Tor_chk_cmd($this, $ch, $ctx, $user_idx, $user_sess, $conn_ip, $is_auth); return $cmd; } while (FALSE); @@ -68,7 +70,7 @@ class tor_chk_cmd_cls extends CDS_cmd_cls { if (mb_strpos($content, "The IP Address you entered matches one or more active Tor servers", 0, "UTF-8") !== FALSE) { - printf("WARNING: stripos ok\n"); + // printf("WARNING: stripos ok\n"); $is_tor = TRUE; } else if (mb_strpos($content, @@ -77,10 +79,11 @@ class tor_chk_cmd_cls extends CDS_cmd_cls { printf("WARNING: tor check disabled\n"); } else { - printf("WARNING: NOT an active ...\n"); + // printf("WARNING: NOT an active Tor server on IP [%s]\n", $cmd->conn_ip); + ; } - $cmd->ctx->cds_postprocess($cmd->user_idx, $cmd->user_sess, $cmd->conn_ip, $is_tor); + $cmd->ctx->tor_chk_postprocess($cmd->user_idx, $cmd->user_sess, $cmd->conn_ip, $cmd->is_auth, $is_tor); return TRUE; }