吾爱破解 - LCG - LSG |安卓破解|病毒分析|www.52pojie.cn

 找回密码
 注册[Register]

QQ登录

只需一步,快速开始

查看: 8209|回复: 41
收起左侧

[其他转载] 江苏电信光网提速脚本(转)

[复制链接]
diaoxingyu 发表于 2016-12-13 07:09
本帖最后由 diaoxingyu 于 2016-12-13 07:18 编辑

发现了江苏电信一个长期的活动,可以临时提升宽带下行速率。
把家里的 50M 光纤提升到了 100M,宿舍里 2M 提升到了 10M (ADSL 可能会受限)。
写了个脚本挂在树莓派上,每天凌晨跑一次,终于不用为宿舍里网速不够给力发愁了,毕竟 10M 还是够用的。
#!/usr/bin/python

import requests
import platform
if platform.system() != 'Windows':
    from termcolor import colored
else:
    def colored(string, color):
        return string
import json

print colored('Jiangsu Telecom Service Speed Up Script 1.0', 'yellow')
print colored('Author: i_82 <i.82@me.com>', 'yellow')
print colored('> Get PHPSESSID...', 'blue')
s = requests.session()
headers={
    'Accept': '*/*',
    'Accept-Encoding': 'gzip, deflate, sdch',
    'Accept-Language': 'zh-CN,zh;q=0.8',
    'Cache-Control': 'max-age=0',
    'Connection': 'keep-alive',
    'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.80 Safari/537.36',
    'Origin': 'http://114yeah.com',
    'Referer': 'http://114yeah.com/',
    'X-Requested-With': 'XMLHttpRequest',
}
r = s.get("http://www.114yeah.com/", headers=headers)
if (r.status_code != 200):
    r.raise_for_status()
print colored('> PHPSESSID: ' + s.cookies['PHPSESSID'], 'green')
print colored('> Get Encrypted Token...', 'blue')
r = s.post('http://www.114yeah.com/Index/encrypchar.html', data={}, headers=headers)
if (r.status_code != 200):
    r.raise_for_status()
j = json.loads(r.text)
token = j
print colored('> Token: ' + j, 'green')
print colored('> Signing...', 'blue')
r = s.get('http://61.160.183.220/jsts/ebit/sign', params={
    'k': j
}, headers=headers)
if (r.status_code != 200):
    r.raise_for_status()
j = json.loads(r.text)
print colored('> Sign: ' + json.dumps(j), 'green')
print colored('> Recording...', 'blue')
r = s.post('http://www.114yeah.com/Index/record.html', data={
    'interuser': j['un']
})
if (r.status_code != 200):
    r.raise_for_status()
print colored('> Record Result: ' + r.text, 'green')
headers['Referer'] = 'http://www.114yeah.com/Index/speedup.html'
# print colored('> Get Encrypted Token For Starting...', 'blue')
# r = s.post('http://114yeah.com/Index/encrypchar.html', data={}, headers=headers)
# if (r.status_code != 200):
#     r.raise_for_status()
# j = json.loads(r.text)
# token = j
# print colored('> Starting Token: ' + j, 'green')
print colored('> Speeding Up...', 'blue')
r = s.get('http://61.160.183.220/jsts/ebit/start', params={
    'k': token
}, headers=headers)
if (r.status_code != 200):
    r.raise_for_status()
j = json.loads(r.text)
print colored('> Result: ' + json.dumps(j), 'green')
if (j['code'] == '-21523'):
    print colored('> Already speeded up.', 'red')
print colored('# Account: ' + j['un'], 'yellow')
print colored('# Base bandwidth: ' + str(j['base']) + ' kb/s', 'yellow')
print colored('# Up bandwidth: ' + str(j['up']) + ' kb/s', 'yellow')
raw_input()
可执行文件下载:http://pan.baidu.com/s/1i5I5Yol   密码f9cx
如有不合版规请斑竹删除,谢谢

点评

公司三条线250M 路由器只有150M的吞吐量 再提速也没有什么卵用了...给宿舍留着还差不多  发表于 2016-12-13 10:18

免费评分

参与人数 6热心值 +6 收起 理由
aa253419 + 1 这个其实就是114yeah的提速地址哇!
zzzmxrxl + 1 我很赞同!
我为伊人KL + 1 谢谢@Thanks!
heinise + 1 楼主这个临时是多久?1小时提速还是多久?
嚣张明仔 + 1 怎么办怎么办,已经是100M了。还是给你点分吧。
天气很好yo + 1 在江苏的人民感谢你

查看全部评分

发帖前要善用论坛搜索功能,那里可能会有你要找的答案或者已经有人发布过相同内容了,请勿重复发帖。

dian01 发表于 2016-12-13 10:31
江苏现在已经普及到20M了吧,打个游戏下个载够用了,除非家里看蓝光,否则俺不提啦,上次客服给打电话说免费提到50M3个月,我就直接给NG了
现在运营商的套路太深。。
头像被屏蔽
1049556901 发表于 2016-12-13 09:25
1475059 发表于 2016-12-13 07:16
小飞网络 发表于 2016-12-13 07:28
同上 怎么用
wuyachizi 发表于 2016-12-13 07:49
现在的人真是太厉害了
sw1999 发表于 2016-12-13 07:56 来自手机
海南是只要光纤全都免费升级50m,老用户直接升级100m。免费
DCCCc 发表于 2016-12-13 08:12
收藏下,等浙江电信有活动,仿照代码写个
臭味香头 发表于 2016-12-13 08:20
不知道怎么用,楼主说一下呗.
Johnxiezhou 发表于 2016-12-13 08:23 来自手机
额移动的有么楼主
vr4u 发表于 2016-12-13 08:26
不是江苏的不能用吗?
ye673275465 发表于 2016-12-13 08:35

不知道怎么用,楼主说一下呗.
您需要登录后才可以回帖 登录 | 注册[Register]

本版积分规则 警告:本版块禁止灌水或回复与主题无关内容,违者重罚!

快速回复 收藏帖子 返回列表 搜索

RSS订阅|小黑屋|处罚记录|联系我们|吾爱破解 - LCG - LSG ( 京ICP备16042023号 | 京公网安备 11010502030087号 )

GMT+8, 2024-6-8 07:57

Powered by Discuz!

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表