dapphp / torutils Goto Github PK
View Code? Open in Web Editor NEWPHP 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 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
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)
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}
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?
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.
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.