mxy123h 发表于 2017-12-8 13:19:31

非常简单的PHP自动刷hostloc积分代码

本帖最后由 mxy123h 于 2019-5-2 21:48 编辑

引用别的大佬的吧"[*] $username,
[*]            "password" => $password,
[*]            "fastloginfield" => "username",
[*]            "quickforward" => "yes",
[*]            "handlekey" => "ls",
[*]            "loginsubmit" => true
[*]    );
[*]
[*]    echo "login($username) ... ";
[*]    $login = curl_post($suburl,$loginInfo);
[*]
[*]    if(strpos($login, $username) !== FALSE){
[*]
[*]      preg_match("/>用户组: (.*?)/", $login, $preg);
[*]      $group = $preg;
[*]      echo "Success!($group)\n";
[*]    }else{
[*]      echo "Failed!\n\n";
[*]      continue;
[*]    }
[*]
[*]    extract(get_jf());
[*]    echo "Credit: $credit; Money: $money\n";
[*]
[*]    echo "Visting user space ";
[*]    for($i=0;$i/", $html, $preg);
[*]    if(!empty($preg)){
[*]      $data['credit'] = $preg;
[*]    }else{
[*]      $data['credit'] = 0;
[*]    }
[*]    preg_match("/金钱: (\d+)/", $html, $preg);
[*]    if(!empty($preg)){
[*]      $data['money'] = $preg;
[*]    }else{
[*]      $data['money'] = 0;
[*]    }
[*]
[*]    return $data;
[*]}
[*]
[*]function curl_post($url, $post_data){
[*]    global $cookie_name, $cookie_val;
[*]    while(true){
[*]      $res = do_curl_post($url, $post_data);
[*]      preg_match("/cookie="(\w*?)\=(\w*)/", $res, $preg_cookie);
[*]      preg_match("/href="(.*?)"/", $res, $preg_url);
[*]
[*]      if(!empty($preg_cookie)){
[*]            $cookie_name = $preg_cookie;
[*]            $cookie_val = $preg_cookie;
[*]            $res = do_curl_post($preg_url, $post_data);
[*]      }else{
[*]            break;
[*]      }
[*]      sleep(1);
[*]    }
[*]    return $res;
[*]}
[*]
[*]
[*]function do_curl_post($url, $post_data){
[*]    global $cookie_name, $cookie_val;
[*]    $ch = curl_init ();
[*]    curl_setopt($ch, CURLOPT_POST , 1);
[*]    curl_setopt($ch, CURLOPT_HEADER , 0);
[*]    curl_setopt($ch, CURLOPT_URL , $url);
[*]    curl_setopt($ch, CURLOPT_COOKIEJAR , '/tmp/hostloc.cookie');
[*]    //curl_setopt($ch, CURLOPT_HTTPHEADER, array('X-FORWARDED-FOR:'.rand_ip()));
[*]    curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (compatible;Baiduspider-render/2.0; +http://www.baidu.com/search/spider.html)');
[*]    curl_setopt($ch, CURLOPT_POSTFIELDS , $post_data);
[*]    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
[*]    curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
[*]    curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
[*]    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
[*]    curl_setopt($ch, CURLOPT_TIMEOUT,600);
[*]    curl_setopt($ch, CURLOPT_REFERER, 'https://www.hostloc.com/');
[*]    if(!empty($cookie_name)){
[*]      curl_setopt($ch, CURLOPT_COOKIE, "$cookie_name=$cookie_val;");
[*]    }
[*]    $result = curl_exec($ch);
[*]    curl_close($ch);
[*]    return $result;
[*]}
[*]
[*]
[*]function curl_get($url){
[*]    global $cookie_name, $cookie_val;
[*]    $ch = curl_init ();
[*]    curl_setopt($ch, CURLOPT_HEADER , 0);
[*]    curl_setopt($ch, CURLOPT_URL , $url);
[*]    curl_setopt($ch, CURLOPT_COOKIEFILE, '/tmp/hostloc.cookie');
[*]    //curl_setopt($ch, CURLOPT_HTTPHEADER, array('X-FORWARDED-FOR:'.rand_ip()));
[*]    curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (compatible;Baiduspider-render/2.0; +http://www.baidu.com/search/spider.html)');
[*]    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
[*]    curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
[*]    curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
[*]    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
[*]    curl_setopt($ch, CURLOPT_TIMEOUT,600);
[*]    if(!empty($cookie_name)){
[*]      curl_setopt($ch, CURLOPT_COOKIE, "$cookie_name=$cookie_val;");
[*]    }
[*]    $result = curl_exec($ch);
[*]    curl_close($ch);
[*]    return $result;
[*]}
[*]
[*]function rand_ip(){
[*]    return rand(1,255).'.'.rand(1,255).'.'.rand(1,255).'.'.rand(1,255);
[*]}
[*]复制代码
"

cnly1987 发表于 2017-12-8 13:35:14

本帖最后由 cnly1987 于 2017-12-8 13:36 编辑

我给你来段更加简洁的。
[*]import requests
[*]import time
[*]s = requests.Session()
[*]s.post("http://www.hostloc.com/member.php", {'username':'XXXX', 'password': 'xxxxxx',})
[*]urls = ["http://www.hostloc.com/space-uid-{}.html".format(str(i)) for i in range(10000, 24000)]
[*]for i in urls:
[*]    s.get(i)
[*]    time.sleep(3)复制代码

ru1404 发表于 2020-4-10 11:53:00

听说回帖金币+1,试试~

陈道临 发表于 2020-4-9 05:50:00

24000差评   

viruscn 发表于 2019-6-24 12:19:00

差评差评!uid=10000开始太高了,应该从uid=15开始!!!
008.gif

nickyutse 发表于 2019-5-1 04:26:00

试试看,好不好用

西部数码代理 发表于 2019-4-4 23:23:00

嗯,这个是管用的。

aumfoo 发表于 2018-2-16 07:50:52

差评,居然把用户选择范围设为10000-24000,强烈要求改成10000-25000!!!

因为我是24006
005.gif

shc 发表于 2017-12-8 13:51:33


西部数码代理 发表于 2017-12-8 13:23

具体怎么用,会不会被管理发现。
wocao这个不会封号吧?
右键 新建记事本.txt 把上面的复制过去保存 改后缀123.php 放到某个地方 然后访问 http://domain/123.php

mxy123h 发表于 2017-12-8 14:26:34

- - 嗯,反正现在都很多
页: [1] 2
查看完整版本: 非常简单的PHP自动刷hostloc积分代码