北京联通沃宽无限制提速开源实现完善版

2015-11-02 22:08:37 +08:00
 msdx123

前言

/t/232710 这个没用正则且需要手动改帐号
这个版本实现正则+自动获取帐号

这是啥?

一个能帮助北京联通光纤用户利用沃宽提速到 100M 的脚本 /可执行文件。

特点呢?

咋用?

执行 python 脚本 ( speedy.py for python2; speedy3.py for python3)

Windows 用户可以执行 speedy.exe

源码

For Python2

import urllib2
import urllib
import datetime
import time
import re
import os
ContentID = urllib2.urlopen('http://bj.wokuan.cn/web/startenrequest.php').read()
ID = "".join(re.findall(r"cn=(\d*)",ContentID))
Content = urllib2.urlopen('http://bj.wokuan.cn/phoneservice/get_server_time.php').read()
YR = int("".join(re.findall(r"\"(\d*)-",Content)))
MTH = int("".join(re.findall(r"-(\d*)-",Content)))
D= int("".join(re.findall(r"-(\d*) ",Content)))
HR = int("".join(re.findall(r" (\d*):",Content)))
MIN = int("".join(re.findall(r":(\d*):",Content)))
SEC = int("".join(re.findall(r":(\d*)\"",Content)))
s = datetime.datetime(YR,MTH,D,HR,MIN,SEC)
TM = str(int(time.mktime(s.timetuple()))*1000)
data = {}
data['device'] = 'Android Phone'
data['devicename'] = 'Android Phone'
data['reqtime'] = TM
data['paras'] = '{"device":"Android Phone","devicename":"Android Phone","reqtime":"'+TM+'","upspeedcode":"09","oldspeedcode":"01","adslaccount":"'+ID+'","accetime":"300000.0","sv":"is"}'
data['accetime'] = '300000.0'
post_data = urllib.urlencode(data)
url = 'http://bj.wokuan.cn/phoneservice/mobile_improvespeed.php'
req = urllib2.urlopen(url, post_data)
res = req.read()
print("".join(re.findall(r":\"(.*)\",\"",res)))
print("Press Enter to exit.")
raw_input()

For Python3

import urllib.request
import urllib.parse
import urllib
import datetime
import time
import re
ContentID = urllib.request.urlopen('http://bj.wokuan.cn/web/startenrequest.php').read().decode('utf-8')
ID = "".join(re.findall(r"cn=(\d*)",ContentID))
Content = urllib.request.urlopen('http://bj.wokuan.cn/phoneservice/get_server_time.php').read().decode('utf-8')
YR = int("".join(re.findall(r"\"(\d*)-",Content)))
MTH = int("".join(re.findall(r"-(\d*)-",Content)))
D= int("".join(re.findall(r"-(\d*) ",Content)))
HR = int("".join(re.findall(r" (\d*):",Content)))
MIN = int("".join(re.findall(r":(\d*):",Content)))
SEC = int("".join(re.findall(r":(\d*)\"",Content)))
s = datetime.datetime(YR,MTH,D,HR,MIN,SEC)
TM = str(int(time.mktime(s.timetuple()))*1000)
data = {}
data['device'] = 'Android Phone'
data['devicename'] = 'Android Phone'
data['reqtime'] = TM
data['paras'] = '{"device":"Android Phone","devicename":"Android Phone","reqtime":"'+TM+'","upspeedcode":"09","oldspeedcode":"01","adslaccount":"'+ID+'","accetime":"300000.0","sv":"is"}'
data['accetime'] = '300000.0'
post_data = urllib.parse.urlencode(data).encode(encoding='UTF8')
url = 'http://bj.wokuan.cn/phoneservice/mobile_improvespeed.php'
req = urllib.request.urlopen(url, post_data)
res = req.read().decode('utf-8')
print(res)

可执行文件

http://pan.baidu.com/s/1o69w23C

efae

最后

Q :为啥不用 Github 等?

A :懒

Q :有 Bug 么?能用么?

A :不保证

7911 次点击
所在节点    分享创造
65 条回复
d8
2015-11-02 23:45:29 +08:00
弱弱的问下,其他省份可行么
msdx123
2015-11-02 23:50:44 +08:00
@d8 不行
jwnlive
2015-11-03 01:58:03 +08:00
顺道求一个宽带票 公司报销用,北京的最好,多谢
Valyrian
2015-11-03 04:19:01 +08:00
好东西。。可是家里线路只能支持刀 4M 。。

(吐槽: data 那个 dict 就用 literal 一次写好不就完了。。为什么要先建个空的然后一项一项往里加。。)
yiciyuansky
2015-11-03 07:38:50 +08:00
执行成功了,但是网速好像没什么变化。。。。难道是线路问题?
ytjfmv
2015-11-03 07:41:56 +08:00
重新拨号还有效么
zhoujianqingz
2015-11-03 08:04:38 +08:00
您好,请问能帮我解决下江苏电信的提速么,我发现 git 有的工具我按步骤做了,但是始终不对
JiaFeiX
2015-11-03 09:46:56 +08:00
请问楼主用的什么程序,将 py 编译为 exe 的?
hronro
2015-11-03 10:00:07 +08:00
我靠,这个牛逼啊!
xfspace
2015-11-03 10:10:21 +08:00
能用谁还去翻源码。。。
msdx123
2015-11-03 10:11:51 +08:00
@JiaFeiX Pyinstaller
msdx123
2015-11-03 10:12:59 +08:00
@Valyrian 当时大概心不在焉吧,直接提交个字符串上去也是可以的
loserwn
2015-11-03 10:13:37 +08:00
@msdx123 还是那个问题。 accetime 的时间确认了么?是消耗账户默认的时间,之后还能使用么?可以大于 15 小时?
msdx123
2015-11-03 10:18:00 +08:00
@loserwn 帖子里写了啊。无限制,消耗完默认时间之后还能提速。下次好好读帖子吧。。

@yiciyuansky 提示 Success 了么?如果有可能是线路问题了

@zhoujianqingz 给下 Gayhub 地址看看吧
loserwn
2015-11-03 10:22:30 +08:00
@msdx123 抱歉,仔细又读了一下。 thx
yt1988
2015-11-03 10:48:29 +08:00
可以做个简单的 OSX GUI 吗 用起来会简单一点
yiciyuansky
2015-11-03 11:26:37 +08:00
@msdx123 提示了,应该是线路问题了;
zhoujianqingz
2015-11-04 12:40:31 +08:00
luo7
2015-11-07 15:13:42 +08:00
我这里是这样的 然后就退出没有然后了 客户端是可以提速的
http://ww4.sinaimg.cn/large/a15b4afegw1exsfl51v9ej20ds05ogmf
luo7
2015-11-08 15:03:45 +08:00

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/233067

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX