uweb/python/uas.py

52 lines
3.8 KiB
Python
Raw Normal View History

2020-01-05 12:29:36 +00:00
#!/bin/env python
from subprocess import run, PIPE
def engine2mdlnk(engine):
2020-01-06 10:15:32 +00:00
return '<p><a href="i:02' +engine+ '">' +engine+ "</a></p>\n";
2020-01-05 12:29:36 +00:00
html_head = '''<!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1">
<title>浏览器标识使用技巧</title></head><body>
<h3>浏览器标识使用技巧</h3>
<p>
<a href="/uweb">超微浏览器</a>下点击配置链接可自动添加浏览器标识强制清空后台重启后可用</p>
<p>配置文件"/sdcard/uweb/default.uas"如下<br>
''';
html_tail ="</body></html>";
md_tail = '''
大多数安卓应用都有一个应用标识通过这个标识服务器可以控制提供给用户资源的多寡和质量一般来说应用可以得到最多最好的资源; 其次是PC版的浏览器; 而手机浏览器一般会被逼去下载专门的应用
Android手机使用最广应用最多所以Android浏览器最有可能被逼/诱导下载各式各样的应用浏览器如果伪装成苹果手机如果苹果上没有相关应用网站就不可能逼你去下载android应用
对手机浏览器用户而言最佳的是伪装成应用其次伪装成Linux台式机因为如果伪装成Windows PC会逼你下程序而linux程序对不起还没开发呢如果嫌PC排版不好则可以伪装成一款没有应用的手机Nokia的塞班已经没有应用了有也不会逼你下了用户基数还不少所以伪装成塞班就是一个不错的选择
以百度网盘为例下载时安卓手机要逼你下安卓应用; 苹果手机要下ios应用; Windows上要下百度管家只有塞班和Linux PC百度没开发应用所以可通过伪装成塞班来直接下载文件
uweb浏览器提供了多功能标识可同时伪装成百度应用苏宁易购阿里搜索百度简单搜索火狐iPhone等访问很多网站会方便很多不妨设置为缺省的浏览器标识
''';
selist = map(engine2mdlnk,[
"百度网盘:LogStatistic",
2020-02-13 12:55:13 +00:00
"多功能:Mozilla/5.0 Dalvik/2 (Linux; U;) Gecko/63.0 Firefox/63.0 iPhone/7.1 Android/8.0 SNEBUY-APP/10.1 SearchCraft/2.8.2 baiduboxapp/3.2.5.10 UCBrowser/11.3.8.976 U3/1.0.0 ALiSearchApp/2.4",
2020-01-05 12:29:36 +00:00
"Symbian:Mozilla/5.0 (SymbianOS/9.4; Series60/5.0 NokiaN97-1/20.0.019; Profile/MIDP-2.1 Configuration/CLDC-1.1) AppleWebKit/525 (KHTML, like Gecko) BrowserNG/7.1.18124",
"iPhone:Mozilla/5.0 (iPhone; CPU iPhone OS 10_2_1 like Mac OS X) AppleWebKit/602.4.6 (KHTML, like Gecko) Version/10.0 Mobile/14D27 Safari/602.1",
"win:Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.73 Safari/537.36",
"QQ:Mozilla/5.0 (Linux; U; Android 10; zh-cn; Pixel 3 XL Build/QPP5.190530.014) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/66.0.3359.126 MQQBrowser/9.6 TBS/043906 Mobile Safari/537.36 MicroMessenger/7.6",
"quark:Mozilla/5.0 (Linux; U; Android 6.0.1; zh-CN; HW Build/MMB29M) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/57.0.2987.108 Quark/3.7.0.123 Mobile Safari/537.36",
2020-01-06 10:15:32 +00:00
"macos:Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_8; en-us) AppleWebKit/534.50 (KHTML, like Gecko) Version/5.1 Safari/534.50",
"winRT:Mozilla/5.0 (Windows NT 6.3; Win64; ARM; Trident/7.0; Touch; rv:11.0) like Gecko",
2020-02-13 12:55:13 +00:00
"Edge mobile:Mozilla/5.0 (Windows Phone 10.0; Android 6.0.1; Microsoft; Lumia 950) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.2743.116 Mobile Safari/537.36 Edge/15.14977",
"Blackberry:Mozilla/5.0 (BB10; Kbd) AppleWebKit/537.35+ (KHTML, like Gecko) Version/10.3.3.2205 Mobile Safari/537.35+",
2020-01-05 12:29:36 +00:00
]);
llist = [selist,"</p>"];
print(html_head)
print(''.join(string for slist in llist for string in slist))
p = run(['marked', '--pedantic'], stdout=PIPE,
input=md_tail, encoding='utf-8')
print(p.stdout)
print(html_tail)