├── gpl-license.html ├── index.php ├── proxyConfiguration.ini ├── proxyConnector.class.php └── readMe /gpl-license.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 |Copyright (C) 1989, 1991 Free Software Foundation, Inc.
18 | 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Everyone is permitted to copy and distribute verbatim copies
21 | of this license document, but changing it is not allowed.
Preamble
24 | 25 |The licenses for most software are designed to take away your 26 | freedom to share and change it. By contrast, the GNU General Public 27 | License is intended to guarantee your freedom to share and change free 28 | software--to make sure the software is free for all its users. This 29 | General Public License applies to most of the Free Software Foundation's 30 | software and to any other program whose authors commit to using it. 31 | (Some other Free Software Foundation software is covered by the GNU 32 | Library General Public License instead.) You can apply it to your 33 | programs, too.
34 | 35 |When we speak of free software, we are referring to freedom, not 36 | price. Our General Public Licenses are designed to make sure that you 37 | have the freedom to distribute copies of free software (and charge for 38 | this service if you wish), that you receive source code or can get it if 39 | you want it, that you can change the software or use pieces of it in 40 | new free programs; and that you know you can do these things.
41 | 42 |To protect your rights, we need to make restrictions that forbid 43 | anyone to deny you these rights or to ask you to surrender the rights. 44 | These restrictions translate to certain responsibilities for you if you 45 | distribute copies of the software, or if you modify it.
46 | 47 |For example, if you distribute copies of such a program, whether 48 | gratis or for a fee, you must give the recipients all the rights that 49 | you have. You must make sure that they, too, receive or can get the 50 | source code. And you must show them these terms so they know their 51 | rights.
52 | 53 |We protect your rights with two steps: (1) copyright the 54 | software, and (2) offer you this license which gives you legal 55 | permission to copy, distribute and/or modify the software.
56 | 57 |Also, for each author's protection and ours, we want to make 58 | certain that everyone understands that there is no warranty for this 59 | free software. If the software is modified by someone else and passed 60 | on, we want its recipients to know that what they have is not the 61 | original, so that any problems introduced by others will not reflect on 62 | the original authors' reputations.
63 | 64 |Finally, any free program is threatened constantly by software 65 | patents. We wish to avoid the danger that redistributors of a free 66 | program will individually obtain patent licenses, in effect making the 67 | program proprietary. To prevent this, we have made it clear that any 68 | patent must be licensed for everyone's free use or not licensed at all.
69 | 70 |The precise terms and conditions for copying, distribution and modification follow.
71 | 72 |TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
73 | 74 |0. This License applies to any program or other 75 | work which contains a notice placed by the copyright holder saying it 76 | may be distributed under the terms of this General Public License. The 77 | "Program", below, refers to any such program or work, and a "work based 78 | on the Program" means either the Program or any derivative work under 79 | copyright law: that is to say, a work containing the Program or a 80 | portion of it, either verbatim or with modifications and/or translated 81 | into another language. (Hereinafter, translation is included without 82 | limitation in the term "modification".) Each licensee is addressed as 83 | "you".
84 | 85 |Activities other than copying, distribution and modification are 86 | not covered by this License; they are outside its scope. The act of 87 | running the Program is not restricted, and the output from the Program 88 | is covered only if its contents constitute a work based on the Program 89 | (independent of having been made by running the Program). Whether that 90 | is true depends on what the Program does.
91 | 92 |1. You may copy and distribute verbatim copies 93 | of the Program's source code as you receive it, in any medium, provided 94 | that you conspicuously and appropriately publish on each copy an 95 | appropriate copyright notice and disclaimer of warranty; keep intact all 96 | the notices that refer to this License and to the absence of any 97 | warranty; and give any other recipients of the Program a copy of this 98 | License along with the Program.
99 | 100 |You may charge a fee for the physical act of transferring a copy, 101 | and you may at your option offer warranty protection in exchange for a 102 | fee.
103 | 104 |2. You may modify your copy or copies of the 105 | Program or any portion of it, thus forming a work based on the Program, 106 | and copy and distribute such modifications or work under the terms of 107 | Section 1 above, provided that you also meet all of these conditions:
108 | 109 |110 |128 | 129 |a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change.
111 | 112 |b) You must cause any work that you distribute or publish, that 113 | in whole or in part contains or is derived from the Program or any part 114 | thereof, to be licensed as a whole at no charge to all third parties 115 | under the terms of this License.
116 | 117 |c) If the modified program normally reads commands 118 | interactively when run, you must cause it, when started running for such 119 | interactive use in the most ordinary way, to print or display an 120 | announcement including an appropriate copyright notice and a notice that 121 | there is no warranty (or else, saying that you provide a warranty) and 122 | that users may redistribute the program under these conditions, and 123 | telling the user how to view a copy of this License. (Exception: if the 124 | Program itself is interactive but does not normally print such an 125 | announcement, your work based on the Program is not required to print an 126 | announcement.)
127 |
These requirements apply to the modified work as a whole. If 130 | identifiable sections of that work are not derived from the Program, and 131 | can be reasonably considered independent and separate works in 132 | themselves, then this License, and its terms, do not apply to those 133 | sections when you distribute them as separate works. But when you 134 | distribute the same sections as part of a whole which is a work based on 135 | the Program, the distribution of the whole must be on the terms of this 136 | License, whose permissions for other licensees extend to the entire 137 | whole, and thus to each and every part regardless of who wrote it.
138 | 139 |Thus, it is not the intent of this section to claim rights or 140 | contest your rights to work written entirely by you; rather, the intent 141 | is to exercise the right to control the distribution of derivative or 142 | collective works based on the Program.
143 | 144 |In addition, mere aggregation of another work not based on the 145 | Program with the Program (or with a work based on the Program) on a 146 | volume of a storage or distribution medium does not bring the other work 147 | under the scope of this License.
148 | 149 |3. You may copy and distribute the Program (or a 150 | work based on it, under Section 2) in object code or executable form 151 | under the terms of Sections 1 and 2 above provided that you also do one 152 | of the following:
153 | 154 |155 |173 | 174 |a) Accompany it with the complete corresponding 156 | machine-readable source code, which must be distributed under the terms 157 | of Sections 1 and 2 above on a medium customarily used for software 158 | interchange; or,
159 | 160 |b) Accompany it with a written offer, valid for at least three 161 | years, to give any third party, for a charge no more than your cost of 162 | physically performing source distribution, a complete machine-readable 163 | copy of the corresponding source code, to be distributed under the terms 164 | of Sections 1 and 2 above on a medium customarily used for software 165 | interchange; or,
166 | 167 |c) Accompany it with the information you received as to the 168 | offer to distribute corresponding source code. (This alternative is 169 | allowed only for noncommercial distribution and only if you received the 170 | program in object code or executable form with such an offer, in accord 171 | with Subsection b above.)
172 |
The source code for a work means the preferred form of the work 175 | for making modifications to it. For an executable work, complete source 176 | code means all the source code for all modules it contains, plus any 177 | associated interface definition files, plus the scripts used to control 178 | compilation and installation of the executable. However, as a special 179 | exception, the source code distributed need not include anything that is 180 | normally distributed (in either source or binary form) with the major 181 | components (compiler, kernel, and so on) of the operating system on 182 | which the executable runs, unless that component itself accompanies the 183 | executable.
184 | 185 |If distribution of executable or object code is made by offering 186 | access to copy from a designated place, then offering equivalent access 187 | to copy the source code from the same place counts as distribution of 188 | the source code, even though third parties are not compelled to copy the 189 | source along with the object code.
190 | 191 |4. You may not copy, modify, sublicense, or 192 | distribute the Program except as expressly provided under this License. 193 | Any attempt otherwise to copy, modify, sublicense or distribute the 194 | Program is void, and will automatically terminate your rights under this 195 | License. However, parties who have received copies, or rights, from you 196 | under this License will not have their licenses terminated so long as 197 | such parties remain in full compliance.
198 | 199 |5. You are not required to accept this License, 200 | since you have not signed it. However, nothing else grants you 201 | permission to modify or distribute the Program or its derivative works. 202 | These actions are prohibited by law if you do not accept this License. 203 | Therefore, by modifying or distributing the Program (or any work based 204 | on the Program), you indicate your acceptance of this License to do so, 205 | and all its terms and conditions for copying, distributing or modifying 206 | the Program or works based on it.
207 | 208 |6. Each time you redistribute the Program (or 209 | any work based on the Program), the recipient automatically receives a 210 | license from the original licensor to copy, distribute or modify the 211 | Program subject to these terms and conditions. You may not impose any 212 | further restrictions on the recipients' exercise of the rights granted 213 | herein. You are not responsible for enforcing compliance by third 214 | parties to this License.
215 | 216 |7. If, as a consequence of a court judgment or 217 | allegation of patent infringement or for any other reason (not limited 218 | to patent issues), conditions are imposed on you (whether by court 219 | order, agreement or otherwise) that contradict the conditions of this 220 | License, they do not excuse you from the conditions of this License. If 221 | you cannot distribute so as to satisfy simultaneously your obligations 222 | under this License and any other pertinent obligations, then as a 223 | consequence you may not distribute the Program at all. For example, if a 224 | patent license would not permit royalty-free redistribution of the 225 | Program by all those who receive copies directly or indirectly through 226 | you, then the only way you could satisfy both it and this License would 227 | be to refrain entirely from distribution of the Program.
228 | 229 |If any portion of this section is held invalid or unenforceable 230 | under any particular circumstance, the balance of the section is 231 | intended to apply and the section as a whole is intended to apply in 232 | other circumstances.
233 | 234 |It is not the purpose of this section to induce you to infringe 235 | any patents or other property right claims or to contest validity of any 236 | such claims; this section has the sole purpose of protecting the 237 | integrity of the free software distribution system, which is implemented 238 | by public license practices. Many people have made generous 239 | contributions to the wide range of software distributed through that 240 | system in reliance on consistent application of that system; it is up to 241 | the author/donor to decide if he or she is willing to distribute 242 | software through any other system and a licensee cannot impose that 243 | choice.
244 | 245 |This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License.
246 | 247 |8. If the distribution and/or use of the Program 248 | is restricted in certain countries either by patents or by copyrighted 249 | interfaces, the original copyright holder who places the Program under 250 | this License may add an explicit geographical distribution limitation 251 | excluding those countries, so that distribution is permitted only in or 252 | among countries not thus excluded. In such case, this License 253 | incorporates the limitation as if written in the body of this License.
254 | 255 |9. The Free Software Foundation may publish 256 | revised and/or new versions of the General Public License from time to 257 | time. Such new versions will be similar in spirit to the present 258 | version, but may differ in detail to address new problems or concerns.
259 | 260 |Each version is given a distinguishing version number. If the 261 | Program specifies a version number of this License which applies to it 262 | and "any later version", you have the option of following the terms and 263 | conditions either of that version or of any later version published by 264 | the Free Software Foundation. If the Program does not specify a version 265 | number of this License, you may choose any version ever published by the 266 | Free Software Foundation.
267 | 268 |10. If you wish to incorporate parts of the 269 | Program into other free programs whose distribution conditions are 270 | different, write to the author to ask for permission. For software which 271 | is copyrighted by the Free Software Foundation, write to the Free 272 | Software Foundation; we sometimes make exceptions for this. Our decision 273 | will be guided by the two goals of preserving the free status of all 274 | derivatives of our free software and of promoting the sharing and reuse 275 | of software generally.
276 | 277 |NO WARRANTY
278 | 279 |11. BECAUSE THE PROGRAM IS LICENSED FREE OF 280 | CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 281 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 282 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT 283 | WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT 284 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 285 | PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF 286 | THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME 287 | THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
288 | 289 |12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE 290 | LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER 291 | PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, 292 | BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, 293 | INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY 294 | TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA 295 | BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR 296 | A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF 297 | SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH 298 | DAMAGES.
299 | 300 |END OF TERMS AND CONDITIONS
301 | 302 | -------------------------------------------------------------------------------- /index.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | //include the class 4 | //remember the configuration file is located in: 5 | //proxyConfiguration.ini 6 | 7 | include("./proxyConnector.class.php"); 8 | 9 | //get an istance of the proxy 10 | $connection = proxyConnector::getIstance(); 11 | 12 | //connect to google.com and change my identity 13 | //because "switchIdentityAfterRequest" is set to TRUE 14 | //in the .ini file 15 | $connection->launch("http://www.google.com/", null); 16 | 17 | //get the data and show it 18 | $data = $connection->getProxyData(); 19 | 20 | echo ""; 21 | print_r($data); -------------------------------------------------------------------------------- /proxyConfiguration.ini: -------------------------------------------------------------------------------- 1 | ; this is the ini file for the proxy configuration 2 | ; this default value are for a TOR PROXY running 3 | ; on a local machine with HashedControlPassword method 4 | ; activated 5 | 6 | [general] 7 | ; timeout 8 | timeout = 300 9 | 10 | ; proxy ip 11 | ip = 127.0.0.1 12 | ; proxy port (default value stands for polipo port) 13 | port = 8118 14 | 15 | [TOR] 16 | ; proxy control port 17 | ; be sure to enable control in your 18 | ; tor configuration file (/etc/tor/torrc) 19 | controlPort = 9051 20 | 21 | ; the password setted in the HashedControlPassword 22 | ; set a tor control password with: 23 | ; tor --hash-password YOUR_STRONG_PASSWORD 24 | ; 25 | ; To use this default configuration file try: 26 | ; tor --hash-password t0rS3cr3tPwD 27 | ; 28 | ; left blank if you have configured TOR CONTROL PORT 29 | ; without a password 30 | controlPassword = t0rS3cr3tPwD 31 | 32 | ; if true after every request the class try to change 33 | ; his identity and his userAgent 34 | switchIdentityAfterRequest = true 35 | -------------------------------------------------------------------------------- /proxyConnector.class.php: -------------------------------------------------------------------------------- 1 | 12 | * 13 | * Licensed: GNU General Public License, version 2 (GPLv2) 14 | * 15 | * The default setting however is to run 16 | * through the Tor/Polipo network. 17 | * 18 | * New identity are changed using hashed password, 19 | * remember to configure your Tor Proxy to allow this. 20 | * 21 | * @author Marco Baldini 22 | * 23 | * @copyright 2011 Marco Baldini 24 | * 25 | * @license GNU General Public License, version 2 (GPLv2) 26 | * 27 | * @version proxyConnector 1.1 TorVersion (28/01/2011) 28 | * 29 | * @example index.php 30 | * 31 | * Based on TOR Class by Josh Sandlin32 | */ 33 | 34 | class proxyConnector { 35 | 36 | 37 | private static $instance; 38 | 39 | private $destinationUrl; 40 | private $userAgent; 41 | private $timeout; 42 | private $vector; 43 | private $payload; 44 | private $returnData; 45 | private $ip; 46 | private $port; 47 | private $controlPort; 48 | private $controlPassword; 49 | private $switchIdentityAfterRequest = true; 50 | 51 | 52 | ##PUBLIC 53 | public static function getIstance() 54 | { 55 | if (!isset(self::$instance)) { 56 | $c = __CLASS__; 57 | self::$instance = new $c; 58 | } 59 | 60 | return self::$instance; 61 | } 62 | 63 | 64 | /** 65 | * 66 | * SetUp the proxy configuration 67 | * 68 | * @param string $extIp Proxy Ip 69 | * @param number $extPort Proxy Port 70 | */ 71 | public function setProxy($extIp="127.0.0.1", $extPort="8118") 72 | { 73 | $this->ip = $extIp; 74 | $this->port =$extPort; 75 | 76 | } 77 | 78 | /** 79 | * 80 | * SetUp the control information 81 | * used by a Tor proxy to renew identity 82 | * 83 | * @param string $extPort Proxy Ip 84 | * @param number $extPassword Proxy Control Port 85 | */ 86 | public function setControlParameters($extPort, $extPassword) 87 | { 88 | $this->controlPassword = '"'.$extPassword.'"'; 89 | $this->controlPort = $extPort; 90 | 91 | } 92 | 93 | /** 94 | * 95 | * Request a remote url using Curl 96 | * 97 | * @param string $extUrl 98 | * @param string $extVector 99 | * @param number $extTimeout 100 | */ 101 | public function launch($extUrl, $extVector, $extTimeout = null) 102 | { 103 | //set parameters 104 | $this->destinationUrl = str_replace(" ","%20",$extUrl); 105 | $this->vector =$extVector; 106 | 107 | $this->setUserAgent(); 108 | 109 | //set payload 110 | $this->setPayload(); 111 | 112 | //if a timeout is set in the args, use it 113 | if(isset($timeout)) 114 | { 115 | $this->timeout = $extTimeout; 116 | } 117 | 118 | //run cURL action against url 119 | $this->setCurl(); 120 | 121 | //renew identity 122 | if ($this->switchIdentityAfterRequest) { 123 | $this->newIdentity(); 124 | $this->setUserAgent(); 125 | } 126 | } 127 | 128 | /** 129 | * 130 | * Return downloaded data from the proxy 131 | * 132 | * @return array 133 | * url: requested url 134 | * userAgent: used userAgent 135 | * timeout: used timeout 136 | * proxy: proxy address 137 | * payload: payload 138 | * return: url content 139 | */ 140 | public function getProxyData() 141 | { 142 | return array( 143 | 'url' => $this->destinationUrl, 144 | 'userAgent' => $this->userAgent, 145 | 'timeout' => $this->timeout, 146 | 'proxy' => $this->ip .":". $this->port, 147 | 'payload' => $this->payload, 148 | 'return' => $this->returnData 149 | ); 150 | } 151 | 152 | 153 | /** 154 | * 155 | * Change identity in the Tor Network 156 | * (change public IP Address) 157 | * 158 | * @return bool 159 | * true is new identity is created 160 | * false is fail creating a new identity 161 | */ 162 | public function newIdentity(){ 163 | $fp = fsockopen($this->ip, $this->controlPort, $errno, $errstr, 30); 164 | if (!$fp) return false; //can't connect to the control port 165 | 166 | fputs($fp, "AUTHENTICATE ".$this->controlPassword."\r\n"); 167 | $response = fread($fp, 1024); 168 | list($code, $text) = explode(' ', $response, 2); 169 | if ($code != '250') return false; //authentication failed 170 | 171 | //send the request to for new identity 172 | fputs($fp, "signal NEWNYM\r\n"); 173 | $response = fread($fp, 1024); 174 | list($code, $text) = explode(' ', $response, 2); 175 | if ($code != '250') return false; //signal failed 176 | 177 | fclose($fp); 178 | return true; 179 | } 180 | 181 | 182 | /** 183 | * Load the default configuration for the proxy connection 184 | * located in "proxyConfiguration.ini" 185 | */ 186 | public function loadDefaultSetUp() { 187 | 188 | $loaded_ini_array = parse_ini_file("./proxyConfiguration.ini",TRUE); 189 | 190 | $this->destinationUrl = null; 191 | $this->userAgent = null; 192 | $this->vector = null; 193 | $this->payload = null; 194 | $this->returnData = null; 195 | 196 | $this->timeout = $loaded_ini_array["general"]["timeout"]; 197 | $this->ip = $loaded_ini_array["general"]["ip"]; 198 | $this->port = $loaded_ini_array["general"]["port"]; 199 | $this->controlPort = $loaded_ini_array["TOR"]["controlPort"]; 200 | $this->controlPassword = '"'.$loaded_ini_array["TOR"]["controlPassword"].'"'; 201 | $this->switchIdentityAfterRequest = $loaded_ini_array["TOR"]["switchIdentityAfterRequest"]; 202 | } 203 | 204 | 205 | ##PRIVATE 206 | private function __construct() { 207 | $this->loadDefaultSetUp(); 208 | } 209 | 210 | private function setUserAgent() 211 | { 212 | //list of browsers 213 | $agentBrowser = array( 214 | 'Firefox', 215 | 'Safari', 216 | 'Opera', 217 | 'Flock', 218 | 'Internet Explorer', 219 | 'Seamonkey', 220 | 'Konqueror', 221 | 'GoogleBot' 222 | ); 223 | //list of operating systems 224 | $agentOS = array( 225 | 'Windows 3.1', 226 | 'Windows 95', 227 | 'Windows 98', 228 | 'Windows 2000', 229 | 'Windows NT', 230 | 'Windows XP', 231 | 'Windows Vista', 232 | 'Redhat Linux', 233 | 'Ubuntu', 234 | 'Fedora', 235 | 'AmigaOS', 236 | 'OS 10.5' 237 | ); 238 | //randomly generate UserAgent 239 | $this->userAgent = $agentBrowser[rand(0,7)].'/'.rand(1,8).'.'.rand(0,9).' (' .$agentOS[rand(0,11)].' '.rand(1,7).'.'.rand(0,9).'; en-US;)'; 240 | } 241 | 242 | 243 | private function setCurl() 244 | { 245 | $action = curl_init(); 246 | curl_setopt($action, CURLOPT_PROXY, $this->ip .":". $this->port); 247 | curl_setopt($action, CURLOPT_URL, $this->payload); 248 | curl_setopt($action, CURLOPT_HEADER, 1); 249 | curl_setopt($action, CURLOPT_USERAGENT, $this->userAgent); 250 | curl_setopt($action, CURLOPT_RETURNTRANSFER, 1); 251 | curl_setopt($action, CURLOPT_FOLLOWLOCATION, 1); 252 | curl_setopt($action, CURLOPT_TIMEOUT, $this->timeout); 253 | $this->returnData = curl_exec($action); 254 | curl_close($action); 255 | } 256 | 257 | private function setPayload() 258 | { 259 | $this->payload = $this->destinationUrl . $this->vector; 260 | } 261 | 262 | private function __clone() { 263 | trigger_error("Clonig not allowed"); 264 | } 265 | 266 | 267 | } 268 | -------------------------------------------------------------------------------- /readMe: -------------------------------------------------------------------------------- 1 | ############################# 2 | # proxyConnector ReadMe # 3 | ############################# 4 | 5 | Read this file before use proxyConnector class. 6 | 7 | Where find: 8 | - main class file: proxyConnector.class.php 9 | - configuration file: proxyConnector.ini 10 | - example: index.php 11 | - license: gpl-license.html 12 | 13 | The last version is: proxyConnector 1.1 TorVersion (28/01/2011) 14 | 15 | Before using mysessionClass check the md5sum. 16 | 17 | 8062e21ae476c038a019c50ff0ee9b6f proxyConnector.class.php 18 | 750dcb840c2c240083349d69d21f46ec proxyConfiguration.ini 19 | 7b13d3393525c6a2cfa145a4782ff523 index.php 20 | 21 | If some file do not pass the md5sum test, ask me for the file to kaiserbaldo[]gmail.com 22 | 23 | HowTo: 24 | If you want to use the TOR Network: 25 | 1. Verify that you have TOR installed in your system or find a TOR Proxy 26 | 2. Write the IP and the PORT of the proxy into the ini file in the [general] section 27 | 3. If you want to control TOR proxy to change identity you need to configure both 28 | the TOR proxy and the ini file. 29 | 3.1 Configurin the TOR Proxy: 30 | 3.1.1: Go to the configuration file of the proxy and enable the control port. 31 | The configuration file should be placed here: /etc/tor/torrc 32 | 3.1.2: The password need to be setted in the HashedControlPassword 33 | 3.1.3: Set the password: tor --hash-password YOUR_STRONG_PASSWORD 34 | 35 | 3.1 The ini file: 36 | In the tor section write the PORT of the control port you had enable before 37 | and the password you used to run tor --hash-password YOUR_STRONG_PASSWORD 38 | 39 | After that the class is ready to work 40 | 41 | Change Log: 42 | 1.1: Solved a problem in the proxy with spaced urls 43 | Added this readMe 44 | 45 | 46 | Thanks for reading --------------------------------------------------------------------------------