/**
* @abstract Curl模拟登陆
* @version Apache/2.2.17 (Win32) mod_ssl/2.2.17 OpenSSL/0.9.8o PHP/5.3.4 mod_perl/2.0.4 Perl/v5.10.1
MySQL 客户端版本: mysqlnd 5.0.7-dev - 091210 - $Revision: 304625 $
* time 2012-04-17
* @author Veric
* @copyright
*/
function getCookieUrl($host_url, $script_name, $method = 'GET', $data = '', $cookie_str = ''){
$sock = fsockopen($host_url, 80, $errno, $errstr, 30);
if (!$sock) die("$errstr ($errno)\n");
//将字符串转化为大写strToUpper
$method = strToUpper($method);
$method = ($method == 'GET') ? 'GET' : 'POST';
if (substr($script_name, 0, 1) != '/') {
$script_name = '/' . $script_name;
}
//写入文件
fwrite($sock, $method . " " . $script_name . " HTTP/1.0\r\n");
fwrite($sock, "Host: " . $host_url . "\r\n");
if (!emptyempty($cookie_str)) {
fwrite($sock, "COOKIE: " . $cookie_str . "\r\n");
}
fwrite($sock, "Content-type: application/x-www-form-urlencoded\r\n");
if (!emptyempty($data)) {
fwrite($sock, "Content-length: " . strlen($data) . "\r\n");
}
fwrite($sock, "Accept: */*\r\n");
fwrite($sock, "\r\n");
if (!emptyempty($data)) {
fwrite($sock, "$data\r\n");
}
fwrite($sock, "\r\n");
//测试文件指针是否到了文件结束的位置feof
//从文件指针中读取一行fgets
$body = "";
while (!feof($sock)) {
$body .= fgets($sock, 4096);
}
fclose($sock);
return $body;
}
$_SESSION[num]=$num=616343;
$host_url = 'www.*******.com';
$host_page='space.php?uid='.$num.'&ticket=';
$data ='';
//获取$cookie 是用网络嗅探器抓取的 分析数据包 可自行下载
$cookie='hyr_recommenduser=24; hyr_viewuids=476346__359336_154171_86276_300199_386764_380537_45907_297250; __utmc=169110968; hyr_auth=d4c7DUAeTbdnIkgqwKJLN78W7YDhUA%2FLr0y6Ssyo9ja0c5D0o7VYCPW8rYiSl6S%2F%2FLJJWYCsVElX6ImSxclFSb2fJdM; hyr_loginuser=kongbo; hyr_xy=0; __utma=169110968.1584085828.1331304385.1331304385.1331304385.1; __utmb=169110968.1.10.1331304385; __utmz=169110968.1331304385.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); hyr_sendmail=1; hyr_synfriend=1; _jkb_9202=1; _webim=%7B%22o%22%3Afalse%2C%22s%22%3A%22available%22%7D
';
echo $content1= getCookieUrl($host_url, $host_page , 'POST', $data, $cookie);
?>
摘自 Vericlongmore的专栏

熱AI工具

Undresser.AI Undress
人工智慧驅動的應用程序,用於創建逼真的裸體照片

AI Clothes Remover
用於從照片中去除衣服的線上人工智慧工具。

Undress AI Tool
免費脫衣圖片

Clothoff.io
AI脫衣器

AI Hentai Generator
免費產生 AI 無盡。

熱門文章

熱工具

Atom編輯器mac版下載
最受歡迎的的開源編輯器

MantisBT
Mantis是一個易於部署的基於Web的缺陷追蹤工具,用於幫助產品缺陷追蹤。它需要PHP、MySQL和一個Web伺服器。請查看我們的演示和託管服務。

ZendStudio 13.5.1 Mac
強大的PHP整合開發環境

EditPlus 中文破解版
體積小,語法高亮,不支援程式碼提示功能

SecLists
SecLists是最終安全測試人員的伙伴。它是一個包含各種類型清單的集合,這些清單在安全評估過程中經常使用,而且都在一個地方。 SecLists透過方便地提供安全測試人員可能需要的所有列表,幫助提高安全測試的效率和生產力。清單類型包括使用者名稱、密碼、URL、模糊測試有效載荷、敏感資料模式、Web shell等等。測試人員只需將此儲存庫拉到新的測試機上,他就可以存取所需的每種類型的清單。