[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: PHP coder needs Tor details
- To: or-talk@xxxxxxxxxxxxx
- Subject: Re: PHP coder needs Tor details
- From: "Mr. Blue" <trashdsfg@xxxxxxxxx>
- Date: Tue, 13 Feb 2007 17:49:52 -0800 (PST)
- Delivered-to: archiver@seul.org
- Delivered-to: or-talk-outgoing@seul.org
- Delivered-to: or-talk@seul.org
- Delivery-date: Tue, 13 Feb 2007 20:50:08 -0500
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID; b=6MxW5Bz34K6uL9ZIPzIQORx/gL2URCMyXiBXVsy+aR+jSFhzDxCNWZh2p9gkjkoqOp6ERi9NAVhRK8O9Ov1ozBFYm9geFlellyBvnH51P4HV3GPAllKzLxuVXruq+EV4SGGrFJ5iGaoXcyWsu/3j2V+z7MAbh/OLEmC1UrOVktg=;
- In-reply-to: <D908C4A9-CE61-4035-8238-291818316113@gmail.com>
- Reply-to: or-talk@xxxxxxxxxxxxx
- Sender: owner-or-talk@xxxxxxxxxxxxx
Hey Crew.
Thanks to all for your help.
First for all I would like to say that this file.php(which is manipulating Tor) will be located in admin area ONLY and will be intended for use ONLY by admin.
Admin area is protected by Apache pass authentication (Digest) over SSL and after that is passed, admin must enter another login password to enter admin area.
Only admin will use it - NOT publicly available to users!
Next....
Firstly I need to issue to shell, from PHP, command that will start Tor.
Regarding that command...
It will have ALL directives that should "normally" be located in torrc, but there is no torrc, nor I have intention to use it.
So command is:
--------------------------
tor -gid $gid -pidfile $pidfile -RunAsDaemon $b -user $uid -ClientOnly 1 -EntryNodes $nickname, -ExitNodes $nickname -StrictExitNodes 1 -NewCircuitPeriod 3600 -
--------------------------
Regarding
nodes....
Entry and exit nodes will be same.
Before I continue I would like to say that I have made a PHP script that is utilizing regular expresions and harvesting all exit nodes in a list of IP addresses from moria dirs.
So I would like to pull from my database IP of a node(NOT nickname) and put it in a $nickname variable.
Will this work? Can I select node by IP and NOT by nickname?
Also when that will be achived I am going to use PHP cURL and connect with it to 127.0.0.1:9050 using SOCKS5 protocol - then do request to some page on the internet and finaly use POSIX - posix_kill($pidfile, SIGTERM); php function to shutdown Tor, alternatively use kill to which I pass $pidfile, all in shell.
Now someone will say that I should connect to Tor using SOCKS4a and am I normall to use ONLY 1 node which will be entry and exit at the same time.
Be sure that
I am VERY aware of my actions - but I am not here because I don't wana be tracked and because I want to surf anonimously.
Now here we come to the bigest obstacle for me.(oh men, soon as I finish this script I am going to read FreeBSD book that I just got and learn that UNIX at once!)
Creating a valid shell command:
--------------------------
tor -gid $gid -pidfile $pidfile -RunAsDaemon $b -user $uid -ClientOnly 1 -EntryNodes $nickname, -ExitNodes $nickname -StrictExitNodes 1 -NewCircuitPeriod 3600 -
--------------------------
User nobody will run it.
- Should I exlude "-gid $gid" part?
- Should $b variable be 0 OR 1 (that is..., should I run it as deamon?)
- Should I exlude "-user $uid" part?
- What about $nickname? Can I pass it IP of a node?
- What should I put in a $pidfile variable?!? - I never saw one (number or letters?) It will also be used for
shuting down Tor at the end of a process...
Also I just rememberd something...
Whan tor was already runnig(started by root) I was able to utilize connection trough it by nobody, but when I attempted shutdown I got message that there was no process with pid belonging to it - or something similar - so that explains all.
Thank in advance...
Bored stiff? Loosen up...
Download and play hundreds of games for free on Yahoo! Games.