- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
我有一些代码可以向网站发送 curl 请求,但目前它只有一个网站,我不希望他们错误地禁止我的服务器 IP。无论如何,我可以通过 Tor 网络发送那些 cURL 请求吗?
我需要什么软件才能做到这一点?
运行 CentOS 6.5
public function checkLogin2($email, $password, $cookiefile){
$cookiefile = 'cookies/'.$cookiefile;
$handle = fopen($cookiefile, 'w+');
#$proxy = 'proxy-nl.privateinternetaccess.com:1080';
#$us = 'x9597458:Th3hXjVyuD';
$this->_curl->setCookieFile($cookiefile);
#$this->_curl->addOption(CURLOPT_PROXY, $proxy);
#$this->_curl->addOption(CURLOPT_PROXYTYPE, CURLPROXY_SOCKS5);
#$this->_curl->addOption(CURLOPT_PROXYUSERPWD, $us);
$this->_curl->setUserAgent('FreshAndroidApp-1.3.1');
$this->_curl->addHeader('Content-Type', 'application/x-www-form-urlencoded');
$this->_curl->addHeader('Cookie', 'JSESSIONID=' . strtoupper(md5(time())));
$this->_curl->addHeader('Cookie2', '$Version=1');
try {
$HTML = $this->_curl->post("URL HERE",
array('password' => $password,
'emailAddress' => $email
));
if(!self::isJson($HTML)){
return '{"status":"uncheck", "msg":"<font color="red"><b>Uncheck</b></font> => ' .$email.'|'.$password.'"}';
}
$resp = json_decode($HTML);
if($resp->{'status'} == "success"){
$details = $this->_curl->get('URL HERE');
return $details;
} else if ($resp->{'status'} == "failure"){
return '{"status":"failure"}';
}
fclose($handle);
} catch (CurlWrapperException $e){
return '{"status":"socksfailure", "msg":"'.$proxy. ' => Die or timeout"}';
}
fclose($handle);
}
最佳答案
您需要安装并运行 TOR,如以下链接所述:https://www.torproject.org/docs/rpms.html.en
然后,如果你的代码是正确的(我对 PHP 了解不多),就这样做:
$this->_curl->addOption(CURLOPT_PROXY, 127.0.0.1:9050);
$this->_curl->addOption(CURLOPT_PROXYTYPE, CURLPROXY_SOCKS5);
因为 TOR 代理默认在端口 9050 上运行。如果您在另一台机器上运行 TOR,您也可以输入另一个 IP 而不是 127.0.0.1。
我觉得应该可以
关于php - 通过 tor 发送 cURL 请求?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27767190/
我想知道当我连接到 Tor 网络时将我的数据包发送到哪里。我想在 Tor 网络中看到其他路由器,如下所示: $ traceroute google.com 3 ........... 4 *
我知道我们已经讨论过了,但我在这里找到的问答和谷歌搜索不适合我的问题。 我读到我不应该这样做有几个原因(看看替代品,一个负担得起的种子箱可能是最好的选择)。尽管如此,我仍在努力让它工作,但目前我做不到
默认 TOR在链中使用 3 个节点(大约),但它的工作速度非常缓慢。我想使用一个,所以连接到某个服务器,那个已经是导出节点。 我知道这会影响我的匿名性,但我认为我可以忍受(特别是如果这样做会更快的话)
是否可以阻止 Tor 用户? (https://www.torproject.org/) 由于我运行的网站的性质,我应该尽我所能停止多个帐户并阻止某些位置。 Tor 比代理更糟糕 - 完全是一场噩梦.
我的计算机上运行着 Tor,我需要每五分钟更改一次 Tor 导出节点。例如,如果我开始通过某个导出节点使用 Tor,那么我希望 Tor 在 5 分钟内更改为具有不同 IP 地址的导出节点。我怎样才
来历及作用 Tor.exe进程程序文件通常是Tor/Tor Project或被认为是Privoxy或Polipo、Hide My IP Address、Tor 0.2.0.2-alpha类似的The
我正在尝试通过 python 运行 Tor。我的目标是能够在我选择的时间不时切换导出或以其他方式更改我的 IP。我已经学习了几个教程并遇到了几个不同的错误。 此代码打印我的 IP 地址 import
我可以在 Linux 上使用 torrc 文件轻松更改该设置,但在 Windows 版 Tor 浏览器上找不到该选项。 看起来可以通过“vidalia”完成:但是如何访问它?我在 TOR 浏览器上找不
我正在使用连接到 tor 网络的 stem 示例,这应该将客户端连接到 tor 网络,它似乎正在这样做但是当我检查 ip 地址时它是不正确的而不是 tor ip,任何关于为什么会这样,更重要的是我该如
我正在尝试用 Java 代码实现 Orchid Tor 库;不幸的是,由于缺乏文档,我无法让它工作,这就是我所做的: ...................... private final stat
我已经在 linux 系统上安装了 tor 浏览器包。我从命令行启动它 :~$ ./.tor/tor-browser_en-US/start-tor-browser 这将首先启动 vidalia,然后
struct Tnode { Tnode *left; Tnode *right; int content; Tnode (int item = 0) { this->content
我正在关注博文 here . 我使用的是 Windows 机器,所以我无法按照确切的步骤操作。这就是我所做的: 安装了 Tor Browser for Windows 已安装 pytorctl pip
我正在尝试将 .onion 网站的内容导入 python,一些研究表明 'stem '当我运行这个 tutorial script ,或更具体地说,当我尝试使用 stem.process.launch
我使用google cloud shell来执行这个程序 Linux 版本 Distributor ID: Debian Description: Debian GNU/Linu
我正在创建一个 Android Jsoup 网络抓取应用程序,它通过端口 9150 上的 SOCKS 代理连接到 Tor,(我希望请求完全匿名): private const val TOR_
import java.io.File; import org.openqa.selenium.WebDriver; import org.openqa.selenium.firefox.Firefo
关注 https://github.com/Sitecore/autohaus/blob/master/Autohaus.Custom/Indexing/Analyzers/NGramAnalyzer
我正在设置中继,我的理解是必须打开ORPort才能中继来自外部世界的流量,但是我还需要启用DirPort吗? 最佳答案 不,您不需要启用DirPort。如果设置了DirPort,则中继还将用作目录镜像
我按照 toctrl 解释 (http://www.thesprawl.org/research/tor-control-protocol/) 关于如何创建真正快速的单跳电路,我成功创建了一个电路,但
我是一名优秀的程序员,十分优秀!