浏览本站的朋友很多都在上LOC论坛,本汪其实每天有上去看看,因为有一些比较好看的撕B和信息,不过对于新人来说,还是需要尽快提升一下等级,论坛提供了每天访问其他用户的空间10就可以获得20金币的升级办法,之前有很多大佬在github上使用函数进行自动访问功能,不过有一些被C大的防御系统给干掉了,今天给大家分享一个目前还可以使用的脚本。
打开你吃灰的VPS,安装好宝塔,然后安排python3
debian或ubuntu使用
1 |
apt-get install python3-pip |
Centos使用
1 |
yum install python3 |
然后新建一个PY文件,名字随便起,不要在自己的电脑用文本编辑,使用宝塔新建,站长这里是建在/home/www里的,名字就是loc.py,然后把以下脚本复制进去,账号和密码那里改成自己的,可以多个账号使用。
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 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 |
#!/usr/bin/env python # -*- coding: UTF-8 -*- # Author: MoeClub.org import re import sys import time from urllib import request, parse from http import cookiejar account_dict = { '0': {'username': '账号A', 'password': '密码A'}, '1': {'username': '账户B', 'password': '密码B'}, } def Login(URL, UserData): _cookies = '' _cookie = cookiejar.CookieJar() _handler = request.HTTPCookieProcessor(_cookie) _req = request.Request(URL, data=parse.urlencode(UserData).encode('utf-8')) request.build_opener(_handler).open(_req) for cookie in _cookie: _cookies += cookie.name + '=' + cookie.value + ';' return _cookies def GetPage(URL, Header_Cookies): _Header = {'Cookie': str(Header_Cookies)} _req = request.Request(URL, headers=_Header) return request.urlopen(_req).read().decode('utf-8') def GetCredit(user_data, proto='https'): username = user_data['username'] Login_URL = proto + '://hostloc.com/member.php?mod=logging&action=login&loginsubmit=yes&infloat=yes&lssubmit=yes&inajax=1' My_Credit = proto + '://hostloc.com/home.php?mod=spacecp&ac=credit&showcredit=1&inajax=1' My_Home = proto + '://hostloc.com/home.php?mod=spacecp&inajax=1' My_Cookies = Login(Login_URL, user_data) if '<td>' + str(username) + '</td>' not in GetPage(My_Home, My_Cookies): print('[%s] Login Fail!' % username) else: try: CreditNum0 = str(re.findall('[0-9]+', GetPage(My_Credit, My_Cookies))[-1]) except: CreditNum0 = 'Null' for x in range(25297, 25309): GetPage(proto + '://hostloc.com/space-uid-{}.html'.format(x), My_Cookies) time.sleep(4) try: if CreditNum0 == 'Null': raise Exception CreditNum1 = str(re.findall('[0-9]+', GetPage(My_Credit, My_Cookies))[-1]) if CreditNum0 == CreditNum1: CreditDetails = str(CreditNum1) else: CreditDetails = str(CreditNum0) + '->' + str(CreditNum1) except: CreditDetails = 'Null' print('[%s] Login Success! (Credit: %s)' % (username, CreditDetails)) if __name__ == '__main__': if len(sys.argv) > 1: n = 0 account_dict = {} account_list = [sys.argv[x] for x in range(1, len(sys.argv))] for account in account_list: if ":" not in account: continue account_dict[str(n)] = {} account_dict[str(n)]['username'] = str(str(account).split(":", 1)[0]) account_dict[str(n)]['password'] = str(str(account).split(":", 1)[-1]) n += 1 for i in range(0, len(account_dict)): try: GetCredit(account_dict[str(i)]) time.sleep(4) except: continue |
然后在宝塔的计划任务添加个Shell脚本,按以下输入就可以每天定时领取20金币,账号放在那里150天就可以升级元老了,不过你要多去灌水会升级更快,另外版主们也会不定时清理刷分号。
如果你一直想进入LOC论坛,却找不到门,可以发邮件联系我,站长给你发邀请。
转载请注明:国外VPS » 分享LOC论坛以最新可用的签到脚本,需要自己有VPS