Giter Site home page Giter Site logo

dapphp / torutils Goto Github PK

View Code? Open in Web Editor NEW
69.0 69.0 8.0 2.43 MB

PHP classes for interacting with Tor over the control protocol, querying directory authorities and servers, and DNS exit lists.

License: BSD 3-Clause "New" or "Revised" License

PHP 100.00%

torutils's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

torutils's Issues

TorDNSEL not working?

Hello,

I simply copied the torDNSEL file and called it like that:

use Dapphp\TorUtils\TorDNSEL;

require_once 'TorDNSEL.php';

Then I used this code:

try {
    $isTor = TorDNSEL::IpPort(
        $_SERVER['SERVER_ADDR'],
        $_SERVER['SERVER_PORT'],
        $_SERVER['REMOTE_ADDR']
    );
    var_dump($isTor);
 } catch (\Exception $ex) {
     echo $ex->getMessage() . "\n";
 }

And whether I'm using tor browser 7.5 or not, it returns "bool(false) " (note that I tried functions from other people and same result basically)

Signal failed error

I get an error in TorUtils-master/examples/tc_NewNym.php
Signal failed: Dapphp\TorUtils\ProtocolError in TorUtils-master/src/ControlClient.php:751
Stack trace:
#0 TorUtils-master/examples/tc_NewNym.php(16): Dapphp\TorUtils\ControlClient->signal('NEWNYM')
#1 {main}

error 'Dapphp\TorUtils\ControlClient' not found when using TorUtils in Laravel

With composer i have imported TorUtils
("require": {
"laravel/framework": "5.1.*",
"dapphp/TorUtils":"dev-master")

When i use TorUtils like:
use Dapphp\TorUtils\ControlClient;
use Dapphp\TorUtils\ProtocolError;
$tc = new ControlClient();

try {
$tc->connect(); // connect to 127.0.0.1:9051
$tc->authenticate(); // uses cookie authentication, can also use $tc->authenticate('password_here');
} catch (\Exception $ex) {
echo "Failed to create Tor control connection: " . $ex->getMessage() . "\n";
exit;
}

try {
echo "Sending NEWNYM signal to controller...";
$tc->signal(ControlClient::SIGNAL_NEWNYM);
echo "OK";
} catch (ProtocolError $pe) {
echo $pe->getMessage();
}

$tc->quit(); // close control connection

i get the error 'Dapphp\TorUtils\ControlClient' not found.
It seems the files are in the right place: is see: laravel\vendor\dapphp\torutils\src\ControlClient.php

i olso tried use dapphp\torUtils\controlClient; and several other things without succes.
How to get this class word in Laravel?

Client to get tor/status-vote/current/authority informations

First of all: Thanks for this library.
I would like to get the informations of this endpoint tor/status-vote/current/authority.
As far as I have seen there is currently no way to get these informations, right?
The parser seems to be capable of parsing those informations.

dns server

try {
    $isTor = TorDNSEL::IpPort(
        $_SERVER['SERVER_ADDR'],
        $_SERVER['SERVER_PORT'],
        $_SERVER['REMOTE_ADDR']
    );
    var_dump($isTor);
 } catch (\Exception $ex) {
     echo $ex->getMessage() . "\n";
 }

This will always result in error:

Warning: fsockopen(): unable to connect to udp://exitlist.torproject.org:53 (php_network_getaddresses: getaddrinfo failed: Name or service not known) in /var/www/html/project/vendor/dapphp/torutils/src/TorDNSEL.php on line 183
Failed to send DNS request. Error 0: php_network_getaddresses: getaddrinfo failed: Name or service not known 

It seems like DNS server exitlist.torproject.org has changed. Will you please advice how to fix this

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.