-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAnonimo.class.php
More file actions
31 lines (26 loc) · 883 Bytes
/
Anonimo.class.php
File metadata and controls
31 lines (26 loc) · 883 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<?php
class Encrypt
{
public function proxy($url = '', $data = '')
{
//$data = //array('DNI' => 'xxxx'); //POST DATA
$torSocks5Proxy = "socks5://127.0.0.1:9050";
$ch = curl_init();
curl_setopt($ch, CURLOPT_PROXYTYPE, CURLPROXY_SOCKS5);
curl_setopt($ch, CURLOPT_PROXY, $torSocks5Proxy);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, false);
curl_setopt($ch, CURLOPT_HEADER, false);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
curl_setopt($ch, CURLOPT_URL, $url);
$html = curl_exec($ch);
curl_close($ch);
var_dump($html);
}
}
/********* Ejemplo (tiene que estar Tor corriendo, probado en linux) *********/
$crypt = new Encrypt();
$url = "https://check.torproject.org/";
$data = ""; //array('DNI' => 'xxxx');
$crypt->proxy();