2025年11月6日星期四

某侠任务脚本

1.购买服务器阿里云:服务器购买地址https://t.aliyun.com/U/Bg6shY若失效,可用地址

1.购买服务器

阿里云:

服务器购买地址

https://t.aliyun.com/U/Bg6shY

若失效,可用地址

https://www.aliyun.com/daily-act/ecs/activity_selection?source=5176.29345612&userCode=49hts92d

腾讯云:

https://curl.qcloud.com/wJpWmSfU

若失效,可用地址

https://cloud.tencent.com/act/cps/redirect?redirect=2446&cps_key=ad201ee2ef3b771157f72ee5464b1fea&from=console

华为云

https://activity.huaweicloud.com/cps.html?fromacct=64b5cf7cc11b4840bb4ed2ea0b2f4468&utm_source=V1g3MDY4NTY=&utm_medium=cps&utm_campaign=201905

2.部署教程

2024年最新青龙面板跑脚本教程(一)持续更新中

3.代码如下

# cron: 18 8 * * *from notify import sendimport jsonimport hashlibimport requests,randomimport time,re,os,sysdef pr(message):    msg.append(message +  "\n")    print(message)
msg = []def index(username,password): #登录信息    password = hashlib.md5(password.encode('utf-8')).hexdigest()    sign = "account" + username + "device_code[d]b305cc73-8db8-4a25-886f-e73c502b1e99password" + password + "voice_codefa1c28a5b62e79c3e63d9030b6142e4b"    sign = hashlib.md5(sign.encode('utf-8')).hexdigest()    url = "http://huluxia.com/account/login/ANDROID/4.1.8?platform=2&gkey=000000&app_version=4.3.0.7.1&versioncode=367&market_id=tool_web&_key=&device_code=%5Bd%5Db305cc73-8db8-4a25-886f-e73c502b1e99&phone_brand_type=VO"    data = {    'account': username,    'login_type''2',    'password': password,    'sign': sign}    headers = {"User-Agent""okhttp/3.8.1"}    response = requests.post(url=url, data=data, headers=headers)    response.encoding = "utf-8"    info = json.loads(response.text)        key = info['_key']    pr(f"登陆成功,用户名:{info['user']['nick']}")    app_qiandao(key)
def app_qiandao(key): #签到    pr("开始执行签到任务...")    id = app_list()    for i in id:      timestamp = int(time.time() * 1000)      sign = "cat_id" + str(i[0]) + "time" + str(timestamp) + "fa1c28a5b62e79c3e63d9030b6142e4b"      sign = hashlib.md5(sign.encode('utf-8')).hexdigest()      url = f"http://floor.huluxia.com/user/signin/ANDROID/4.1.8?platform=2&gkey=000000&app_version=4.3.0.7.1&versioncode=20141475&market_id=floor_web&_key={key}&phone_brand_type=OP&cat_id={i[0]}&time={timestamp}"      headers = {                "Accept-Encoding""identity",                "Host""floor.huluxia.com",                'User-Agent''okhttp/3.8.1',                "Content-Type""application/x-www-form-urlencoded",                "Content-Length""37"            }      data =  { "sign": sign }      time.sleep(random.randint(15,20))      response = requests.post(url=url, headers=headers,data=data)      response.encoding = "utf-8"      info = json.loads(response.text)        if 1 == info['status']:          pr(f"{i[1]} 签到成功,获得{info['experienceVal']}点经验")      else:         pr(f"{i[1]},{info['msg']}")    pr("签到完成")def app_list(): #板块列表    list = []    url = f"https://floor.huluxia.com/category/list/ANDROID/4.2.3?"    headers = {        "Host""floor.huluxia.com",        "Connection""keep-alive",        "Cache-Control""max-age=0",        "sec-ch-ua""\"Microsoft Edge\";v=\"131\", \"Chromium\";v=\"131\", \"Not_A Brand\";v=\"24\"",        "Upgrade-Insecure-Requests""1",        "User-Agent""Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36 Edg/131.0.0.0",        "Accept""text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7",        "Accept-Language""zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6"        }    response = requests.get(url=url, headers=headers)    response.encoding = "utf-8"    info = json.loads(response.text)    if info['status'] == 1:      for i in info['categories']:        id = i['categoryID']        title = i['title']        list.append((id,title))    else:      pr("获取失败")    return list  
def sicxs():    config_path = 'config.py'    if os.path.exists(config_path):      import config      else:      with open(config_path, 'w'as f:         pr("首次运行,已创建配置文件 config.py,请按照说明填写相关变量后再次运行脚本。")        f.write('#可以在此文件中添加配置变量,例如:\nsfsy = ""\n')    try:        env_cookie = os.environ.get("app_hlx")        si_cookie = getattr(config, 'app_hlx'''        if env_cookie and si_cookie:            cookies = env_cookie + "\n" + si_cookie        elif env_cookie:            cookies = env_cookie        elif si_cookie:            cookies = si_cookie        else:            pr("请设置变量 export app_hlx='' 或在 config.py 中设置 app_hlx =")            sys.exit()    except Exception as e:        pr("请设置变量 export app_hlx='' 或在 config.py 中设置 app_hlx =")        sys.exit()
    list_cookie = [c for c in re.split(r'\n|&', cookies) if c.strip()]    total_cookies = len(list_cookie)
    for i, list_cookie_i in enumerate(list_cookie):        try:            print(f'\n----------- 账号【{i + 1}/{total_cookies}】执行 -----------')            pr(f"账号【{i + 1}】开始执行:")            list = list_cookie_i.split("#")            index(list[0], list[1])        except Exception as e:            print(f"账号【{i + 1}/{total_cookies}】执行出错")            finally:            send("葫芦侠三楼"''.join(msg))            msg.clear()    print(f'\n-----------  执 行  结 束 -----------')
if __name__ == '__main__':   sicxs()
解析

该脚本为葫芦侠三楼自动签到脚本。

主要作用

  • 葫芦侠三楼自动签到脚本:以「手机号#密码」为账号格式,自动完成登录 → 拉取板块列表 → 逐板块签到 → 输出经验获取的完整流程。

  • 多账号与通知:从环境变量或 config.py 读取 app_hlx(多账号用换行或 & 分割),逐个执行并使用 notify.send("葫芦侠三楼", …) 发送结果,适合 cron 定时(示例:18 8 * * *)。

主要方法

  • pr(message):统一日志收集到全局 msg,便于每个账号执行完后一次性通知。

  • index(username, password)

    1. 将密码做 MD5

    2. 按固定模板拼接参数并 MD5 生成 sign

    3. 调用登录接口获取 _key 与昵称;

    4. 成功后进入 app_qiandao(_key)

  • app_qiandao(key)

    1. 调用 app_list() 获取所有可签到的 板块 (categoryID, title)

    2. 对每个板块按「cat_id + 时间戳」模板 MD5 生成 sign,发起签到;

    3. 随机 15–20s 休眠以降低频率;

    4. 根据返回打印"签到成功 / 获得经验 / 失败原因"。

  • app_list():请求板块列表接口,解析并返回 (id, title) 列表;异常时提示"获取失败"。

  • sicxs()

    • 初始化或生成 config.py

    • 合并读取 app_hlx(环境变量与 config.py),按换行或 & 切分,每条为 手机号#密码

    • 逐账号执行 index();每个账号结束后发送一次通知并清空 msg;最后打印"执行结束"。


注意

本文部分变量已做脱敏处理,仅用于测试和学习研究,禁止用于商业用途,不能保证其合法性,准确性,完整性和有效性,请根据情况自行判断。技术层面需要提供帮助,可以通过打赏的方式进行探讨。


历史脚本txt文件获取>>
服务器搭建,人工服务咨询>>

没有评论:

发表评论

注册SHEIN平台有哪些注意事项

一开始以为注册SHEIN跟淘宝店差不多,结果踩了不少坑。后来慢慢摸索,才算是顺利通过。 一开始以为注册SHEIN跟淘宝店差不多,结果踩了不少坑。后来慢慢摸索,才算是顺利通过。总结注册过程中遇到的问题,有些地方如果早点注意到,可能会省下不少时间。 首先,SHEIN不接受个人身份...