X-Git-Url: http://mop.ddnsfree.com/gitweb/?a=blobdiff_plain;ds=sidebyside;f=web%2FObj%2Fcurl-de-brisk.phh;h=223241c12afca9336ebad4ed1497fc932f47b2da;hb=f2164909d6a555815be27e67a1bf2f544a3d04e0;hp=ec1d3b1a54b811ea6425e4dd6518805b893f56ba;hpb=4df66961d9b755076157ad1d147e118bb504f745;p=curl-de-sac.git diff --git a/web/Obj/curl-de-brisk.phh b/web/Obj/curl-de-brisk.phh index ec1d3b1..223241c 100755 --- a/web/Obj/curl-de-brisk.phh +++ b/web/Obj/curl-de-brisk.phh @@ -1,32 +1,34 @@ 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; }