B
B
Bez_imeni_vovse_zhivu_na_2016-02-05 21:20:54
PHP
Bez_imeni_vovse_zhivu_na_, 2016-02-05 21:20:54

How to prevent access to the site through the TOR browser?

For an error to appear:
TOR is prohibited services for the site, sorry.
TOR is a prohibited service for this site.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
Mark Doe, 2016-02-05
@Bez_imeni_vovse_zhivu_na_

Well, for example, in PHP

function IsTorExitPoint(){
    if (gethostbyname(ReverseIPOctets($_SERVER['REMOTE_ADDR']).".".$_SERVER['SERVER_PORT'].".".ReverseIPOctets($_SERVER['SERVER_ADDR']).".ip-port.exitlist.torproject.org")=="127.0.0.2") {
        return true;
    } else {
       return false;
    } 
}

function ReverseIPOctets($inputip){
    $ipoc = explode(".",$inputip);
    return $ipoc[3].".".$ipoc[2].".".$ipoc[1].".".$ipoc[0];
}

Those. check for a specific IP left by Tor. Or - check the IP for belonging to Tor nodes - you can get a list of them here

A
angry_cellophane, 2016-02-06
@angry_cellophane

Good move, Roskomnadzor, but no

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question