脚本

discuz论坛访问空间增加积分php/html脚本

PHP版 UTF-8保存,计划任务定时URL访问。

<?php
$useList = array(
                                'username'=>'password',
                                'username'=>'password',
                                'username'=>'password',
                                );
header("Content-Type: text/html; charset=utf-8");
foreach($useList as $k=>$v){
        locSign($k,$v);
}
function locSign($use,$pwd){
        $html = http_post('https://www.hostloc.com/member.php?mod=logging&action=login&loginsubmit=yes&infloat=yes&lssubmit=yes&inajax=1','fastloginfield=username&username='.urlencode($use).'&cookietime=2592000&password='.urlencode($pwd).'&quickforward=yes&handlekey=ls');
        if(!strrpos($html,'window.location.href')){echo $use.' login error<br>';return false;}
        $cookie = getCookie($html,'Set-Cookie: ',';');
        for($i=26200; $i<=26210; $i++){
                $html = http_get("https://www.hostloc.com/space-uid-{$i}.html",$cookie);
        }
        echo $use.' Sign ok!!!<br>';
}
function http_get($url,$cookie) {
        $ch = curl_init($url);
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
        curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
        curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
        curl_setopt($ch, CURLOPT_HTTPHEADER,array('User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:35.0) Gecko/20100101 Firefox/35.0','Referer: https://www.hostloc.com/forum-45-1.html','Cookie: '.$cookie));
        curl_setopt($ch, CURLOPT_TIMEOUT, 10);
        $src = curl_exec($ch);
        curl_close($ch);
        return $src;
}
function http_post($url,$body){
        $ch = curl_init();  
        curl_setopt($ch, CURLOPT_URL,$url);
        curl_setopt($ch, CURLOPT_HEADER, 1);
        curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);  
        curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);  
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 
        curl_setopt($ch, CURLOPT_HTTPHEADER,array('User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:35.0) Gecko/20100101 Firefox/35.0','Referer: https://www.hostloc.com/forum.php'));
        curl_setopt($ch, CURLOPT_POST, 1);
        curl_setopt($ch, CURLOPT_POSTFIELDS, $body);        
        $result = curl_exec($ch);  
        curl_close($ch);  
        return $result;    
}
function getCookie($str,$leftStr,$rightStr){
        if(strrpos($str,$leftStr) == false || strrpos($str,$rightStr) == false){return '';}
        $arr1 = explode($leftStr,$str);$i = 0;$cookie = '';
        foreach($arr1 as $k=>$v){$i++;if($i > 1){$arr2 = explode($rightStr,$v);$cookie .= $arr2[0].'; ';}}
        return $cookie;
}
?>

html版 需要登录帐户

<!-- 原作者 http://hunter.gitlab.io/app/hostloc/ -->
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="x-dns-prefetch-control" content="on">
    <link rel="dns-prefetch" href="//www.hostloc.com" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta http-equiv="Cache-Control" content="no-siteapp">
    <meta http-equiv="Cache-Control" content="no-transform">
    <meta name="applicable-device" content="pc,mobile">
    <meta name="referrer" content="no-referrer">
    <meta name="renderer" content="webkit">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <title>全球主机交流论坛 - 在线刷分</title>
    <link rel="icon" type="image/x-icon" href="//www.hostloc.com/favicon.ico">
    <style>
        html, body {
            width: 100%;
            height: 100%;
            overflow-x: hidden;
        }
        body {
            margin: 0;
            padding: 0;
            font-family: "Helvetica Neue", Helvetica, Arial, "PingFang SC", "Hiragino Sans GB", "Heiti SC", "Microsoft Yahei", "WenQuanYi Micro Hei", sans-serif;
            background-color: #fdf6e3;
            -webkit-user-select: none;
            -moz-user-select: none;
            -ms-user-select: none;
            user-select: none;
        }
        div {
            position: fixed;
            top: 0;
            width: 100%;
            height: 100%;
            z-index: 100;
        }
        h1 {
            text-align: center;
        }
        img {
            width: 1px;
            height: 1px;
        }
    </style>
</head>
<body>
<h1>正在刷分</h1>
<h1>双击页面访问论坛</h1>
<footer>
    <script>
        //document.oncontextmenu = function () { return false; };
        //document.onkeydown = function () { return false; };
        (function () {
            var s = document.createElement('script');
            s.src = '//hm.baidu.com/hm.js?b80974a784c1807a572f8d52160788b1';
            s.async = true;
            var x = document.getElementsByTagName('script')[0];
            x.parentNode.insertBefore(s, x);
        })();
        var maxUserId = 30000;
        div = document.createElement("div");
        div.id = "app";
        document.body.appendChild(div);
        document.getElementById("app").ondblclick = function () {
            window.open("https://www.hostloc.com/");
        };
        for (var i = 0; i < 20; i++) {
            setTimeout(function () {
                addContent(Math.ceil(Math.random() * maxUserId));
            }, i * 100 + 500);
        }
        setTimeout(function () {
            document.getElementsByTagName("h1")[0].innerHTML = "完成!";
        }, 2000);
        function addContent(userId) {
            img = document.createElement("img");
            img.src = "https://www.hostloc.com/space-uid-" + userId + ".html";
            document.body.appendChild(img);
        }
    </script>
</footer>
</body>
</html>

回复

This is just a placeholder img.