diff --git a/aria2/aria2.tar.gz b/aria2/aria2.tar.gz new file mode 100644 index 0000000..962ad3f Binary files /dev/null and b/aria2/aria2.tar.gz differ diff --git a/aria2/aria2/bin/aria2.session b/aria2/aria2/bin/aria2.session new file mode 100644 index 0000000..e69de29 diff --git a/aria2/aria2/bin/aria2c b/aria2/aria2/bin/aria2c new file mode 100755 index 0000000..9fd1c7b Binary files /dev/null and b/aria2/aria2/bin/aria2c differ diff --git a/aria2/aria2/bin/version b/aria2/aria2/bin/version new file mode 100644 index 0000000..6a126f4 --- /dev/null +++ b/aria2/aria2/bin/version @@ -0,0 +1 @@ +1.7.5 diff --git a/aria2/aria2/install.sh b/aria2/aria2/install.sh new file mode 100644 index 0000000..3593d09 --- /dev/null +++ b/aria2/aria2/install.sh @@ -0,0 +1,24 @@ +#! /bin/sh +cd /tmp +cp -rf /tmp/aria2/bin/* /jffs/softcenter/ +cp -rf /tmp/aria2/res/* /jffs/softcenter/res/ +cp -rf /tmp/aria2/scripts/* /jffs/softcenter/scripts/ +cp -rf /tmp/aria2/webs/* /jffs/softcenter/webs/ +cp -rf /tmp/aria2/perp/aria2 /jffs/softcenter/perp/ +cp -rf /tmp/aria2/uninstall.sh /jffs/softcenter/scripts/uninstall_aria2.sh +rm -rf /tmp/aria2* >/dev/null 2>&1 + +if [ ! -f /jffs/softcenter/bin/aria2.session ];then + touch /jffs/softcenter/bin/aria2.session +fi + +chmod 755 /jffs/softcenter/bin/aria2 +chmod 755 /jffs/softcenter/init.d/* +chmod 755 /jffs/softcenter/scripts/aria2* +chmod 755 /jffs/softcenter/perp/aria2/* + +check_ddnsto_en=`dbus get ddnsto_enable` +if [ "${check_ddnsto_en}"x = "1"x ]; then + dbus set aria2_ddnsto=true +fi +/jffs/softcenter/scripts/aria2_config.sh diff --git a/aria2/aria2/prep/aria2/rc.log b/aria2/aria2/prep/aria2/rc.log new file mode 100644 index 0000000..92dcc08 --- /dev/null +++ b/aria2/aria2/prep/aria2/rc.log @@ -0,0 +1,6 @@ +#!/bin/sh +if test ${1} = 'start' ; then + exec tinylog -k 5 -t /var/log/${2} +fi + +exit 0 diff --git a/aria2/aria2/prep/aria2/rc.main b/aria2/aria2/prep/aria2/rc.main new file mode 100644 index 0000000..fc8a485 --- /dev/null +++ b/aria2/aria2/prep/aria2/rc.main @@ -0,0 +1,22 @@ +#!/bin/sh + +exec 2>&1 + +Aria2_enable=`dbus get aria2_enable` +Aria2_restart=`dbus get aria2_restart` +Aria2_sleep=`dbus get aria2_sleep` + +if test ${1} = 'start' ; then + if [ "$Aria2_enable" == "1" ];then + if [ "$Aria2_restart" == "1" ]; then + echo "Aria2 restart flag detected, it will now be reset" + dbus set aria2_restart=0 + elif [ "$Aria2_sleep" -gt 0 ]; then + echo "Awaiting $Aria2_sleep seconds before launching aria2..." + sleep $Aria2_sleep + fi + exec /jffs/softcenter/bin/aria2c --conf-path=/jffs/softcenter/etc/aria2.conf + fi +fi + +exit 0 diff --git a/aria2/aria2/res/aria2_check.html b/aria2/aria2/res/aria2_check.html new file mode 100644 index 0000000..3d5ddee --- /dev/null +++ b/aria2/aria2/res/aria2_check.html @@ -0,0 +1 @@ +<% nvram_dump(".aria2.log",""); %> diff --git a/aria2/aria2/res/icon-aria2.png b/aria2/aria2/res/icon-aria2.png new file mode 100644 index 0000000..74a94c0 Binary files /dev/null and b/aria2/aria2/res/icon-aria2.png differ diff --git a/aria2/aria2/scripts/aria2_config.sh b/aria2/aria2/scripts/aria2_config.sh new file mode 100644 index 0000000..4b6e78e --- /dev/null +++ b/aria2/aria2/scripts/aria2_config.sh @@ -0,0 +1,8 @@ +#!/bin/sh +eval `dbus export aria2` + +if [ "$aria2_enable" == "1" ];then + sh /jffs/softcenter/scripts/aria2_run.sh restart +else + sh /jffs/softcenter/scripts/aria2_run.sh stop +fi diff --git a/aria2/aria2/scripts/aria2_run.sh b/aria2/aria2/scripts/aria2_run.sh new file mode 100644 index 0000000..bd09981 --- /dev/null +++ b/aria2/aria2/scripts/aria2_run.sh @@ -0,0 +1,158 @@ +#!/bin/sh + +# define variables +eval `dbus export aria2` +source /jffs/softcenter/scripts/base.sh +export PERP_BASE=/jffs/softcenter/perp +#old_token=$(cat /jffs/softcenter/aria2/aria2.conf|grep rpc-secret|cut -d "=" -f2) +check_ddnsto=`dbus get aria2_ddnsto` +if [ "${check_ddnsto}"x = "true"x ]; then + ddnsto_route_id=`/jffs/softcenter/bin/ddnsto -w | awk '{print $2}'` + token=`echo $(dbus get ddnsto_token)-${ddnsto_route_id}` +else + token=${aria2_rpc_secret} +fi +ddns=$(nvram get ddns_hostname_x) +usb_disk1=`/bin/mount | grep -E 'mnt' | sed -n 1p | cut -d" " -f3` +usb_disk2=`/bin/mount | grep -E 'mnt' | sed -n 2p | cut -d" " -f3` +dbus set aria2_warning="" + +echo "" +echo "#############################################################" +printf "%0s%50s%10s\n" "#" "Aria2c Auto config Script for Merlin ARM" "#" +printf "%0s%37s%23s\n" "#" "Website: http://jffs/softcenter.cn" "#" +printf "%0s%46s%14s\n" "#" "Author: sadoneli " "#" +echo "#############################################################" +echo "" + +# start aria2c +creat_conf(){ +cat > /jffs/softcenter/aria2/aria2.conf <> /jffs/softcenter/aria2/aria2.conf </dev/null 2>&1 & + perpctl A aria2 +} + +# generate token +generate_token(){ + sed -i "s/rpc-secret=.*/rpc-secret=$token/g" "/jffs/softcenter/etc/aria2.conf" + dbus set aria2_rpc_secret="$token" +} + +# open firewall port +open_port(){ + echo open firewall port $aria2_rpc_listen_port and 8088 + iptables -I INPUT -p tcp --dport $aria2_rpc_listen_port -j ACCEPT >/dev/null 2>&1 + iptables -I INPUT -p tcp --dport 8088 -j ACCEPT >/dev/null 2>&1 + iptables -I INPUT -p tcp --dport 6881:6889 -j ACCEPT >/dev/null 2>&1 + iptables -I INPUT -p tcp --dport 51413 -j ACCEPT >/dev/null 2>&1 + iptables -I INPUT -p tcp --dport 52413 -j ACCEPT >/dev/null 2>&1 + iptables -I INPUT -p udp --dport 52413 -j ACCEPT >/dev/null 2>&1 + echo done +} + +# close firewall port +close_port(){ + echo close firewall port $aria2_rpc_listen_port and 8088 + iptables -D INPUT -p tcp --dport $aria2_rpc_listen_port -j ACCEPT >/dev/null 2>&1 + iptables -D INPUT -p tcp --dport 8088 -j ACCEPT >/dev/null 2>&1 + iptables -D INPUT -p tcp --dport 6881:6889 -j ACCEPT >/dev/null 2>&1 + iptables -D INPUT -p tcp --dport 51413 -j ACCEPT >/dev/null 2>&1 + iptables -D INPUT -p tcp --dport 52413 -j ACCEPT >/dev/null 2>&1 + iptables -D INPUT -p udp --dport 52413 -j ACCEPT >/dev/null 2>&1 + echo done +} + + +# kill aria2 +kill_aria2(){ + perpctl X aria2 + killall aria2c >/dev/null 2>&1 +} + + +del_process_check(){ + cru d aria2_guard >/dev/null 2>&1 +} + +add_cpulimit(){ + if [ "$aria2_cpulimit_enable" = "true" ];then + limit=`expr $aria2_cpulimit_value \* 2` + cpulimit -e aria2c -l $limit >/dev/null 2>&1 & + fi +} + + +load_default(){ + del_version_check + kill_aria2 + close_port + dbus set tmp_aria2_version=`dbus get aria2_version` + dbus set tmp_aria2_version_web=`dbus get aria2_version_web` + for r in `dbus list aria2|cut -d"=" -f 1` + do + dbus remove $r + done + dbus set aria2_enable=0 + dbus set aria2_install_status=1 + dbus set aria2_version=`dbus get tmp_aria2_version` + dbus set aria2_version_web=`dbus get tmp_aria2_version_web` + dbus remove tmp_aria2_version +} + +# ============================================ + +case $ACTION in +start) + if [ "$aria2_enable" == "1" ];then + creat_conf + generate_token + start_aria2 + open_port + add_cpulimit + dbus set __event__onnatstart_shellinlinux=/jffs/softcenter/scripts/aria2_run.sh + fi + ;; +stop | kill ) + kill_aria2 + killall cpulimit + close_port + dbus remove aria2_custom + dbus remove __event__onnatstart_shellinlinux + ;; +restart) + del_process_check + killall cpulimit + kill_aria2 + close_port + sleep 1 + creat_conf + generate_token + start_aria2 + open_port + add_cpulimit + dbus remove __event__onnatstart_shellinlinux + sleep 1 + dbus set __event__onnatstart_shellinlinux=/jffs/softcenter/scripts/aria2_run.sh + ;; +default) + load_default + ;; +*) + close_port + open_port + ;; +esac diff --git a/aria2/aria2/scripts/aria2_status.sh b/aria2/aria2/scripts/aria2_status.sh new file mode 100644 index 0000000..773d3fb --- /dev/null +++ b/aria2/aria2/scripts/aria2_status.sh @@ -0,0 +1,13 @@ +#! /bin/sh +source /jffs/softcenter/scripts/base.sh +aria2_status=`ps | grep -w /jffs/softcenter/aria2/aria2c | grep -cv grep` +aria2_pid=`ps | grep -w /jffs/softcenter/aria2/aria2c | grep -v grep | awk '{print $1}'` +aria2_version=`/jffs/softcenter/aria2/aria2c --version | head -n 1` +if [ "$aria2_status"x = "1"x ];then + echo 进程运行正常!${aria2_version}(PID:$aria2_pid) > /tmp/.aria2.log +else + echo \【警告】:进程未运行!\<\/em\> ${aria2_version} > /tmp/.aria2.log +fi +echo XU6J03M6 >> /tmp/.aria2.log +sleep 2 +rm -rf /tmp/.aria2.log diff --git a/aria2/aria2/uninstall.sh b/aria2/aria2/uninstall.sh new file mode 100644 index 0000000..7641a0d --- /dev/null +++ b/aria2/aria2/uninstall.sh @@ -0,0 +1,11 @@ +#!/bin/sh + +sh /jffs/softcenter/scripts/aria2_run.sh stop +rm -rf /jffs/softcenter/bin/aria2* +rm -rf /jffs/softcenter/perp/aria2 +rm -rf /jffs/softcenter/scripts/aria2_config.sh +rm -rf /jffs/softcenter/scripts/aria2_status.sh +rm -rf /jffs/softcenter/res/aria2_check.html +rm -rf /jffs/softcenter/res/icon-aria2.png +rm -rf /jffs/softcenter/webs/Module_aria2.asp +rm -fr /jffs/softcenter/scripts/uninstall_aria2.sh diff --git a/aria2/aria2/webs/Module_aria2.asp b/aria2/aria2/webs/Module_aria2.asp new file mode 100644 index 0000000..d7af868 --- /dev/null +++ b/aria2/aria2/webs/Module_aria2.asp @@ -0,0 +1,1635 @@ + + + + + + + + + + 软件中心-Aria2 + + + + + + + + + + + + + + + + + + + + +
+ +
+
+ + + + + +
+
选择下载目录
+
+
+ + + + + + +
+
+
+
+
+
+
+
+
+
+
+ + +
+
+
+ + + +
+ + + + + + "> +
+
+ + + + +
+
+ + + + + + + + + "/> + "/> + + + + + + + + +
  + + + + + + + + + +
+ + + + +
+
 
+
Aria2
+
+ +
+
+ +
+
在此页面,你能进行Aria2的安装和卸载,以及其他一些简单的设置
+
+ + + + + +
开启Aria2 +
+ +
+
插件版本:<% dbus_get_def("aria2_version", "0"); %>
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
Aria2相关信息
运行状态获取中... +
远程连接
AriaNg控制台 + +
Glutton控制台 + +
更多控制台 + +
+
+ + + + +
+ + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+
+ +
+
+
论坛技术支持: + www.koolshare.cn + +
后台技术支持: Xiaobao +
Shell, Web by: fw867 +
+
+
+
+
+ + +
+ + diff --git a/aria2/backup.sh b/aria2/backup.sh new file mode 100644 index 0000000..faf5a5b --- /dev/null +++ b/aria2/backup.sh @@ -0,0 +1,25 @@ +#! /bin/sh + +# you can do something here +# this shell scripts will run at the end of build.py scripts + + + +mkdir -p history +if [ ! -f ./history/version ];then + touch ./history/version +fi + +version_old=`cat history/version | awk '{print $1}' | sort -rn |sed -n 1p` +version_new=`cat config.json.js |grep "version"|cut -d"\"" -f 4` +md5_old=`cat history/version | sort -nk1 | awk '{print $1}' |sed -n 1p` +md5_new=` md5sum aria2.tar.gz | awk '{print $1}'` + +if [ -f ./aria2.tar.gz ];then + if [ "$version_old" != "$version_new" ];then + mkdir ./history/$version_new/ + cp ./aria2.tar.gz ./history/$version_new/ + echo $version_new $md5_new >> ./history/version + fi +fi + diff --git a/aria2/build.py b/aria2/build.py new file mode 100644 index 0000000..758dd80 --- /dev/null +++ b/aria2/build.py @@ -0,0 +1,61 @@ +#!/usr/bin/env python +# _*_ coding:utf-8 _*_ + +import os +import json +import codecs +import hashlib +from string import Template + +parent_path = os.path.dirname(os.path.realpath(__file__)) + +def md5sum(full_path): + with open(full_path, 'rb') as rf: + return hashlib.md5(rf.read()).hexdigest() + +def get_or_create(): + conf_path = os.path.join(parent_path, "config.json.js") + conf = {} + if not os.path.isfile(conf_path): + print u"config.json.js 文件找不到,build.py 一定得放插件根目录。自动为您生成一个config.json.js,其它信息请您自己修改。" + module_name = os.path.basename(parent_path) + conf["module"] = module_name + conf["version"] = "0.0.1" + conf["home_url"] = ("Module_%s.asp" % module_name) + conf["title"] = "title of " + module_name + conf["description"] = "description of " + module_name + else: + with codecs.open(conf_path, "r", "utf-8") as fc: + conf = json.loads(fc.read()) + return conf + +def build_module(): + try: + conf = get_or_create() + except: + print u"config.json.js 文件格式错误" + traceback.print_exc() + if "module" not in conf: + print u"没有 module 在 config.json.js 里" + return + module_path = os.path.join(parent_path, conf["module"]) + if not os.path.isdir(module_path): + print u"找不到对应的 %s 文件夹,config.json.js 里面的 module 值不对?" % module_path + return + install_path = os.path.join(parent_path, conf["module"], "install.sh") + if not os.path.isfile(install_path): + print u"找不到对应的 %s 文件,插件确实 install.sh 文件" + return + print u"生成中..." + t = Template("cd $parent_path && rm -f $module.tar.gz && tar -zcf $module.tar.gz $module") + os.system(t.substitute({"parent_path": parent_path, "module": conf["module"]})) + conf["md5"] = md5sum(os.path.join(parent_path, conf["module"] + ".tar.gz")) + conf_path = os.path.join(parent_path, "config.json.js") + with codecs.open(conf_path, "w", "utf-8") as fw: + json.dump(conf, fw, sort_keys = True, indent = 4, ensure_ascii=False, encoding='utf8') + print u"生成完成", conf["module"] + ".tar.gz" + hook_path = os.path.join(parent_path, "backup.sh") + if os.path.isfile(hook_path): + os.system(hook_path) + +build_module() diff --git a/aria2/build.sh b/aria2/build.sh new file mode 100755 index 0000000..224ec5c --- /dev/null +++ b/aria2/build.sh @@ -0,0 +1,33 @@ +#!/bin/sh + + +MODULE=aria2 +VERSION=2.4 +TITLE=Aria2 +DESCRIPTION=linux下载利器 +HOME_URL=Module_aria2.asp + + +# Check and include base +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +if [ "$MODULE" == "" ]; then + echo "module not found" + exit 1 +fi + +if [ -f "$DIR/$MODULE/$MODULE/install.sh" ]; then + echo "install script not found" + exit 2 +fi + +# now include build_base.sh +. $DIR/../softcenter/build_base.sh + +# change to module directory +cd $DIR + +# do something here + +do_build_result + +sh backup.sh $MODULE diff --git a/aria2/config.json.js b/aria2/config.json.js new file mode 100644 index 0000000..930e874 --- /dev/null +++ b/aria2/config.json.js @@ -0,0 +1,8 @@ +{ +"version":"2.4", +"md5":"cdd0a74446c977528b6c0bd39f6d85bb", +"home_url":"Module_aria2.asp", +"title":"Aria2", +"description":"linux下载利器", +"build_date":"2019-01-13_14:31:33" +} diff --git a/aria2/history/2.4/aria2.tar.gz b/aria2/history/2.4/aria2.tar.gz new file mode 100644 index 0000000..962ad3f Binary files /dev/null and b/aria2/history/2.4/aria2.tar.gz differ diff --git a/aria2/history/version b/aria2/history/version new file mode 100644 index 0000000..8436ee7 --- /dev/null +++ b/aria2/history/version @@ -0,0 +1 @@ +2.4 cdd0a74446c977528b6c0bd39f6d85bb diff --git a/aria2/version b/aria2/version new file mode 100644 index 0000000..6a681d7 --- /dev/null +++ b/aria2/version @@ -0,0 +1,2 @@ +2.4 +cdd0a74446c977528b6c0bd39f6d85bb diff --git a/koolproxy/config.json.js b/koolproxy/config.json.js index f87f7bb..af81781 100644 --- a/koolproxy/config.json.js +++ b/koolproxy/config.json.js @@ -1,8 +1,8 @@ { "version":"3.8.4", -"md5":"42c61e110449a52a19b76931d432df7a", +"md5":"1ad5b05d424832237b00028327e9a90e", "home_url":"Module_koolproxy.asp", "title":"koolproxy", "description":"去广告,没烦恼", -"build_date":"2019-01-13_00:10:53" +"build_date":"2019-01-13_02:08:34" } diff --git a/koolproxy/koolproxy.tar.gz b/koolproxy/koolproxy.tar.gz index 00eb175..d54acd1 100644 Binary files a/koolproxy/koolproxy.tar.gz and b/koolproxy/koolproxy.tar.gz differ diff --git a/koolproxy/koolproxy/install.sh b/koolproxy/koolproxy/install.sh index 7042d1a..c690d46 100644 --- a/koolproxy/koolproxy/install.sh +++ b/koolproxy/koolproxy/install.sh @@ -2,22 +2,26 @@ eval `dbus export koolproxy` # stop first -dbus set koolproxy_enable=0 -[ -f /jffs/softcenter/koolproxy/koolproxy.sh ] && sh /jffs/softcenter/koolproxy/koolproxy.sh stop -[ -f /jffs/softcenter/koolproxy/kp_config.sh ] && sh /jffs/softcenter/koolproxy/kp_config.sh stop +[ "$koolproxy_enable" == "1" ] && sh /jffs/softcenter/koolproxy/kp_config.sh stop + # remove old files rm -rf /jffs/softcenter/bin/koolproxy >/dev/null 2>&1 -rm -rf /jffs/softcenter/koolproxy/koolproxy.sh >/dev/null 2>&1 -rm -rf /jffs/softcenter/koolproxy/nat_load.sh >/dev/null 2>&1 -rm -rf /jffs/softcenter/koolproxy/data/*.dat >/dev/null 2>&1 -rm -rf /jffs/softcenter/koolproxy/data/*.txt >/dev/null 2>&1 -rm -rf /jffs/softcenter/koolproxy/data/*.conf >/dev/null 2>&1 -rm -rf /jffs/softcenter/koolproxy/data/gen_ca.sh >/dev/null 2>&1 +rm -rf /jffs/softcenter/init.d/*koolproxy.sh +rm -rf /jffs/softcenter/scripts/koolproxy* +rm -rf /jffs/softcenter/webs/Module_koolproxy.asp +rm -rf /jffs/softcenter/koolproxy/*.sh >/dev/null 2>&1 +rm -rf /jffs/softcenter/koolproxy/koolproxy >/dev/null 2>&1 +rm -rf /jffs/softcenter/koolproxy/data/*.sh >/dev/null 2>&1 +rm -rf /jffs/softcenter/koolproxy/data/koolproxy_ipset.conf >/dev/null 2>&1 rm -rf /jffs/softcenter/koolproxy/data/openssl.cnf >/dev/null 2>&1 -rm -rf /jffs/softcenter/koolproxy/data/version >/dev/null 2>&1 -rm -rf /jffs/softcenter/koolproxy/data/serial >/dev/null 2>&1 -rm -rf /jffs/softcenter/koolproxy/rule_store >/dev/null 2>&1 -rm -rf /jffs/softcenter/koolproxy/data/rules/1.dat >/dev/null 2>&1 +rm -rf /jffs/softcenter/koolproxy/data/rules/*.dat >/dev/null 2>&1 +rm -rf /jffs/softcenter/koolproxy/data/rules/daily.txt >/dev/null 2>&1 +rm -rf /jffs/softcenter/koolproxy/data/rules/koolproxy.txt >/dev/null 2>&1 + +# remove old ss event +cd /tmp +dbus list __|grep koolproxy |cut -d "=" -f1 | sed 's/-A/iptables -t nat -D/g'|sed 's/^/dbus remove /g' > remove.sh && chmod 777 remove.sh && ./remove.sh + # copy new files cd /tmp @@ -33,24 +37,20 @@ else cp -rf /tmp/koolproxy/koolproxy /jffs/softcenter/ mv /tmp/user.txt.tmp /jffs/softcenter/koolproxy/data/rules/user.txt fi - cp -f /tmp/koolproxy/uninstall.sh /jffs/softcenter/scripts/uninstall_koolproxy.sh - -cd / - -chmod 755 /jffs/softcenter/koolproxy/koolproxy chmod 755 /jffs/softcenter/koolproxy/* chmod 755 /jffs/softcenter/koolproxy/data/* chmod 755 /jffs/softcenter/scripts/* [ ! -e "/jffs/softcenter/bin/koolproxy" ] && cp -f /jffs/softcenter/koolproxy/koolproxy /jffs/softcenter/bin/koolproxy - +[ ! -L "/jffs/softcenter/init.d/S98koolproxy.sh" ] && ln -sf /jffs/softcenter/koolproxy/kp_config.sh /jffs/softcenter/init.d/S98koolproxy.sh rm -rf /tmp/koolproxy* >/dev/null 2>&1 [ -z "$koolproxy_policy" ] && dbus set koolproxy_policy=1 [ -z "$koolproxy_acl_default_mode" ] && dbus set koolproxy_acl_default_mode=1 - dbus set softcenter_module_koolproxy_install=1 -dbus set softcenter_module_koolproxy_version=3.3.7 -dbus set koolproxy_version=3.3.7 +dbus set softcenter_module_koolproxy_version=3.8.4 +dbus set koolproxy_version=3.8.4 + +[ "$koolproxy_enable" == "1" ] && sh /jffs/softcenter/koolproxy/kp_config.sh restart diff --git a/koolproxy/koolproxy/koolproxy/kp_config.sh b/koolproxy/koolproxy/koolproxy/kp_config.sh index 16cd168..5a62602 100755 --- a/koolproxy/koolproxy/koolproxy/kp_config.sh +++ b/koolproxy/koolproxy/koolproxy/kp_config.sh @@ -47,7 +47,7 @@ write_sourcelist(){ fi if [ -n "$koolproxy_custom_rule" ];then - echo $koolproxy_custom_rule| base64_decode |sed 's/\\n/\n/g' > $KP_DIR/data/rules/user.txt + echo $koolproxy_custom_rule| base64 -d |sed 's/\\n/\n/g' > $KP_DIR/data/rules/user.txt dbus remove koolproxy_custom_rule fi } @@ -90,16 +90,16 @@ remove_nat_start(){ add_ipset_conf(){ if [ "$koolproxy_mode" == "2" ];then echo_date 添加黑名单软连接... - rm -rf /jffs/configs/dnsmasq.d/koolproxy_ipset.conf - ln -sf /jffs/softcenter/koolproxy/data/koolproxy_ipset.conf /jffs/configs/dnsmasq.d/koolproxy_ipset.conf + rm -rf /etc/dnsmasq.user/koolproxy_ipset.conf + ln -sf /jffs/softcenter/koolproxy/data/koolproxy_ipset.conf /etc/dnsmasq.user/koolproxy_ipset.conf dnsmasq_restart=1 fi } remove_ipset_conf(){ - if [ -L "/jffs/configs/dnsmasq.d/koolproxy_ipset.conf" ];then + if [ -L "/etc/dnsmasq.user/koolproxy_ipset.conf" ];then echo_date 移除黑名单软连接... - rm -rf /jffs/configs/dnsmasq.d/koolproxy_ipset.conf + rm -rf /etc/dnsmasq.user/koolproxy_ipset.conf dnsmasq_restart=1 fi } @@ -288,6 +288,8 @@ detect_cert(){ echo_date 检测到首次运行,开始生成koolproxy证书,用于https过滤! echo_date 生成证书需要较长时间,请一定耐心等待!!! cd $KP_DIR/data && sh gen_ca.sh + mkdir -p /jffs/koolproxy/certs/ + cp -f /jffs/softcenter/koolproxy/certs/ca.crt /jffs/koolproxy/certs/ echo_date 证书生成完毕!!! fi } diff --git a/koolproxy/koolproxy/scripts/koolproxy_status.sh b/koolproxy/koolproxy/scripts/koolproxy_status.sh index fe1df09..d96d91d 100644 --- a/koolproxy/koolproxy/scripts/koolproxy_status.sh +++ b/koolproxy/koolproxy/scripts/koolproxy_status.sh @@ -14,7 +14,7 @@ rules_date_local=`cat $KSROOT/koolproxy/data/rules/koolproxy.txt | sed -n '3p'| rules_nu_local=`grep -E -v "^!" $KSROOT/koolproxy/data/rules/koolproxy.txt | wc -l` video_date_local=`cat $KSROOT/koolproxy/data/rules/koolproxy.txt | sed -n '4p'|awk '{print $3,$4}'` daily_nu_local=`grep -E -v "^!" $KSROOT/koolproxy/data/rules/daily.txt | wc -l` -custom_nu_local=`grep -E -v "^!" $KSROOT/koolproxy/data/rules/user.txt | wc -l` +#custom_nu_local=`grep -E -v "^!" $KSROOT/koolproxy/data/rules/user.txt | wc -l` rm -rf /tmp/kp_tp.txt tp_rules=`dbus list koolproxy_rule_file_|cut -d "=" -f1|cut -d "_" -f4|sort -n` @@ -40,9 +40,9 @@ else fi rm -rf /tmp/koolproxy.log if [ "$status" == "2" ];then - echo "【$date】 $version 运行正常!(PID: $pid)@@$rules_date_local / $rules_nu_local条@@$daily_nu_local条@@$video_date_local@@$custom_nu_local条$TP" > /tmp/koolproxy.log + echo "【$date】 $version 运行正常!(PID: $pid)@@$rules_date_local / $rules_nu_local条@@$daily_nu_local条@@$video_date_local$TP" > /tmp/koolproxy.log else - echo "【警告】:进程未运行!请点击提交按钮!@@$rules_date_local / $rules_nu_local条@@$daily_nu_local条@@$video_date_local@@$custom_nu_local条$TP" > /tmp/koolproxy.log + echo "【警告】:进程未运行!请点击提交按钮!@@$rules_date_local / $rules_nu_local条@@$daily_nu_local条@@$video_date_local$TP" > /tmp/koolproxy.log fi echo XU6J03M6 >> /tmp/koolproxy.log diff --git a/koolproxy/koolproxy/webs/Module_koolproxy.asp b/koolproxy/koolproxy/webs/Module_koolproxy.asp index 022aab5..4edcfd2 100644 --- a/koolproxy/koolproxy/webs/Module_koolproxy.asp +++ b/koolproxy/koolproxy/webs/Module_koolproxy.asp @@ -1,1547 +1,3068 @@ + + + + + + + + + 软件中心 - koolproxy + + + + + + + + + + + + + + + + + +
+ + + + + + + + +
  + + + + + + + + + +
+ + + + +
+
 
+
软件中心 - koolproxy
+
+ -
-
-
-
  • - koolproxy是一款高效的基于规则过滤上网流量包的软件,用于过滤页面垃圾推广元素、不良信息、不健康内容等,并且支持https! -
  • -
    - -
    -
    koolproxy自定义规则
    -
    1  点击【保存文件】按钮,文本框内的内容会保存到/jffs/softcenter/koolproxy/data/user.txt。
    -
    2  如果你更改了user.txt,你需要重新重启koolproxy插件才,新加入的规则才能生效。
    -
    3  虽然koolproxy支持adblock规则,但是我们一点都不建议你直接使用他们的规则内容,因为这极可能导致规则冲突。
    -
    - -
    -
    - - -
    -
    - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    基础设置
    - - -
    - -
    - -
    koolproxy运行状态
    选择过滤模式 - -
    插件自动重启 - - -      - 每天 - - - 重启 -      - - -      - 每隔 - - - 重启koolproxy -      - -
    访问控制匹配方法 - -
    证书下载(用于https过滤) - - https过滤使用教程 -
    koolproxy交流 - 加入QQ群① - 加入QQ群② - 加入电报群 - koolproxy官网 -
    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    规则控制   [说明]
    启用文件地址别名备注编辑删除
    - - - koolproxy.txt - - https://kprule.com/koolproxy.txt - - 静态规则 - - - -
    - - - daily.txt - - https://kprule.com/daily.txt - - 每日规则 - - - -
    - - - kp.dat - - https://kprule.com/kp.dat - - 视频规则 - - - -
    - - - user.txt - - https://kprule.com/user.txt - - 自定规则 - - - - -
    - - - - - - - - - - - -
    +
    -
    - +
    + +
    + +
  • + + koolproxy是一款高效的基于规则过滤上网流量包的软件,用于过滤页面垃圾推广元素、不良信息、不健康内容等,并且支持https! + +
  • + +
    + + + +
    + +
    koolproxy自定义规则
    + +
    1  点击【保存文件】按钮,文本框内的内容会保存到/jffs/softcenter/koolproxy/data/user.txt。
    + +
    2  如果你更改了user.txt,你需要重新重启koolproxy插件才,新加入的规则才能生效。
    + +
    3  虽然koolproxy支持adblock规则,但是我们一点都不建议你直接使用他们的规则内容,因为这极可能导致规则冲突。
    + +
    + + + +
    + +
    + + + + + +
    + +
    + + + +
    + +
    + + - + + + + - - - - - - + + + + + + + - + + + + + + + + + + + + + - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    访问控制基础设置
    主机IP地址mac地址主机别名访问控制添加/删除
    + + + + + +
    + + + +
    + +
    + + 更新日志 + +
    + +
    koolproxy运行状态
    选择过滤模式 - - -
    -
    - - - - - + + + + + + + + - -
    插件自动重启 + + + + + +      + + 每天 + + + + + + 重启 + +      + + + + + +      + + 每隔 + + + + + + 重启koolproxy + +      + + + +
    访问控制匹配方法 + + + +
    证书下载(用于https过滤) + + + + https过滤使用教程 + +
    koolproxy交流 + + 加入QQ群① + + 加入QQ群② + + 加入电报群 + + koolproxy官网 + +
    + +
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    规则控制   [说明]
    启用文件地址别名备注编辑删除
    + + + + + + koolproxy.txt + + + + https://kprule.com/koolproxy.txt + + + + 静态规则 + + + + + + + +
    + + + + + + daily.txt + + + + https://kprule.com/daily.txt + + + + 每日规则 + + + + + + + +
    + + + + + + kp.dat + + + + https://kprule.com/kp.dat + + + + 视频规则 + + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    访问控制
    主机IP地址mac地址主机别名访问控制添加/删除
    + + + + + +
    + +
    + + + + + + + + + + + + + + + +
    + +
    +
    +
    1  过滤https站点需要为相应设备安装证书,并启用http + https过滤!
    +
    2  在路由器下的设备,不管是电脑,还是移动设备,都可以在浏览器中输入110.110.110.110来下载证书。
    +
    3  如果想在多台装有koolroxy的路由设备上使用一个证书,请用winscp软件备份/jffs/softcenter/koolproxy/data文件夹,并上传到另一台路由。
    +
    +
    + +
    +
    +
    + + + diff --git a/koolproxy/version b/koolproxy/version index b3a1ef6..d5b1390 100644 --- a/koolproxy/version +++ b/koolproxy/version @@ -1,2 +1,2 @@ 3.8.4 -42c61e110449a52a19b76931d432df7a +1ad5b05d424832237b00028327e9a90e diff --git a/kuainiao/Changelog.txt b/kuainiao/Changelog.txt new file mode 100644 index 0000000..992fb08 --- /dev/null +++ b/kuainiao/Changelog.txt @@ -0,0 +1,35 @@ +Koolshare Asuswrt-Merlin KuaiNiao Changelog +=========================================== +0.3.4 ( 20/06/2016 14:41:00 ) + -fix 修复迅雷快鸟心跳保持失败 + +0.3.3 ( 17/05/2016 13:34:00 ) + -fix 修复运行脚本bug + +0.3.2 ( 17/05/2016 13:28:00 ) + -fix 修复运行脚本bug + +0.3.0 ( 17/05/2016 12:33:26 ) + -fix 更换协议版本为1.0.8 + +0.2.5 + -fix 修复加速状态提示 + +0.2.4 + -fix remove old install module and set version check in web + +0.2.3 + -fix fix installation issue + +0.2.2 + -fix adapt to new softerware center + +0.2.1 ( 11/04/2016 17:07:36 ) + - fix 双WAN模式下获取网关地址的错误 + - change 修复默认的MAC地址获取逻辑,防止迅雷检查异常 + +0.2.0 ( 01/04/2016 15:19:20 ) + - add 支持双WAN模式下的快鸟绑定指定端口加速 + +0.1.2 ( 31/03/2016 10:41:28 ) + - fix 因为迅雷移动端登陆接口增加UA认证导致的插件无法使用的异常 diff --git a/kuainiao/backup.sh b/kuainiao/backup.sh new file mode 100644 index 0000000..e71b0fc --- /dev/null +++ b/kuainiao/backup.sh @@ -0,0 +1,24 @@ +#! /bin/sh + +# you can do something here +# this shell scripts will run at the end of build.py scripts + +tar_name="$1.tar.gz" + +mkdir -p history +if [ ! -f ./history/version ];then + touch ./history/version +fi + +version_old=`cat history/version | awk '{print $1}' | sort -rn |sed -n 1p` +version_new=`cat config.json.js |grep "version"|cut -d"\"" -f 4` +md5_old=`cat history/version | sort -nk1 | awk '{print $1}' |sed -n 1p` +md5_new=` md5sum $tar_name | awk '{print $1}'` + +if [ -f ./$tar_name ];then + if [ "$version_old" != "$version_new" ];then + mkdir ./history/$version_new/ + cp ./$tar_name ./history/$version_new/ + echo $version_new $md5_new >> ./history/version + fi +fi diff --git a/kuainiao/build.sh b/kuainiao/build.sh new file mode 100755 index 0000000..1eb5201 --- /dev/null +++ b/kuainiao/build.sh @@ -0,0 +1,22 @@ +#!/bin/sh + +MODULE=kuainiao +VERSION=0.3.6 +TITLE=讯雷快鸟 +DESCRIPTION="迅雷快鸟,为上网加速而生~" +HOME_URL=Module_kuainiao.asp + +# Check and include base +DIR="$( cd "$( dirname "$BASH_SOURCE[0]" )" && pwd )" + +# now include build_base.sh +. $DIR/../softcenter/build_base.sh + +# change to module directory +cd $DIR + +# do something here +do_build_result + +# now backup +sh backup.sh $MODULE diff --git a/kuainiao/config.json.js b/kuainiao/config.json.js new file mode 100644 index 0000000..a4d6ef1 --- /dev/null +++ b/kuainiao/config.json.js @@ -0,0 +1,8 @@ +{ +"version":"0.3.6", +"md5":"915e63000cbf3a98887930b04aa874ec", +"home_url":"Module_kuainiao.asp", +"title":"讯雷快鸟", +"description":"迅雷快鸟,为上网加速而生~", +"build_date":"2019-01-13_14:01:15" +} diff --git a/kuainiao/history/0.3.6/kuainiao.tar.gz b/kuainiao/history/0.3.6/kuainiao.tar.gz new file mode 100644 index 0000000..8e549c1 Binary files /dev/null and b/kuainiao/history/0.3.6/kuainiao.tar.gz differ diff --git a/kuainiao/history/version b/kuainiao/history/version new file mode 100644 index 0000000..fbf0222 --- /dev/null +++ b/kuainiao/history/version @@ -0,0 +1 @@ +0.3.6 915e63000cbf3a98887930b04aa874ec diff --git a/kuainiao/kuainiao.tar.gz b/kuainiao/kuainiao.tar.gz new file mode 100644 index 0000000..8e549c1 Binary files /dev/null and b/kuainiao/kuainiao.tar.gz differ diff --git a/kuainiao/kuainiao/install.sh b/kuainiao/kuainiao/install.sh new file mode 100644 index 0000000..3765a00 --- /dev/null +++ b/kuainiao/kuainiao/install.sh @@ -0,0 +1,14 @@ +#!/bin/sh + +if [ ! -d /jffs/softcenter/kuainiao ]; then + mkdir -p /jffs/softcenter/kuainiao +fi + +cp -rf /tmp/kuainiao/scripts/* /jffs/softcenter/scripts/ +cp -rf /tmp/kuainiao/webs/* /jffs/softcenter/webs/ +cp -rf /tmp/kuainiao/res/* /jffs/softcenter/res/ +cp -rf /tmp/kuainiao/kuainiao/kuainiao.sh /jffs/softcenter/kuainiao/ +rm -rf /tmp/kuainiao* >/dev/null 2>&1 + +chmod a+x /jffs/softcenter/scripts/kuainiao_config.sh +chmod a+x /jffs/softcenter/kuainiao/kuainiao.sh diff --git a/kuainiao/kuainiao/kuainiao/kuainiao.sh b/kuainiao/kuainiao/kuainiao/kuainiao.sh new file mode 100644 index 0000000..b15115c --- /dev/null +++ b/kuainiao/kuainiao/kuainiao/kuainiao.sh @@ -0,0 +1,155 @@ +#!/bin/sh +eval `dbus export kuainiao` +source /jffs/softcenter/scripts/base.sh +version="0.3.6" + +#双WAN判断 +wans_mode=$(nvram get wans_mode) +if [ "$kuainiao_config_wan" == "1" ] && [ "$wans_mode" == "lb" ]; then + wan_selected=$(nvram get wan0_ipaddr) + if [ "$wan_selected" != "0.0.0.0" ]; then + bind_address=$wan_selected + else + bind_address="" + fi +elif [ "$kuainiao_config_wan" == "2" ] && [ "$wans_mode" == "lb" ]; then + wan_selected=$(nvram get wan1_ipaddr) + if [ "$wan_selected" != "0.0.0.0" ]; then + bind_address=$wan_selected + else + bind_address="" + fi +else + bind_address="" +fi + +#定义请求函数 +if [ -n "$bind_address" ]; then + HTTP_REQ="wget --bind-address=$bind_address --no-check-certificate -O - " + POST_ARG="--post-data=" +else + HTTP_REQ="wget --no-check-certificate -O - " + POST_ARG="--post-data=" +fi + +#获取加速API +get_kuainiao_api(){ + portal=`$HTTP_REQ http://api.portal.swjsq.vip.xunlei.com:81/v2/queryportal` + portal_ip=`echo $portal|grep -oE '([0-9]{1,3}[\.]){3}[0-9]{1,3}'` + portal_port_temp=`echo $portal|grep -oE "port...[0-9]{1,5}"` + portal_port=`echo $portal_port_temp|grep -oE '[0-9]{1,5}'` + if [ -z "$portal_ip" ] + then + dbus set kuainiao_warning="迅雷快鸟服务API获取失败,请检查网络环境,或稍后再试!" + #echo "迅雷快鸟服务API获取失败,请检查网络环境,或稍后再试!" + else + api_url="http://$portal_ip:$portal_port/v2" + dbus set kuainiao_config_api=$api_url + fi +} + +#从dbus中获取uid,pwd等 +uid=$kuainiao_config_uid +pwd=$kuainiao_config_pwd +nic=$kuainiao_config_nic +peerid=$kuainiao_config_peerid +uid_orig=$uid +api_url=$kuainiao_config_api +devicesign=$kuainiao_device_sign +dial_account=$kuainiao_dial_account +app_version=$kuainiao_app_version + +#初始化计数器 +if [ -z "$kuainiao_run_i" ]; then + dbus ram kuainiao_run_i=6 + kuainiao_run_i=6 +fi + +#初始化运行状态(kuainiao_run_status 0表示运行异常,1表示运行正常) +if [ -z "$kuainiao_run_status" ]; then + dbus ram kuainiao_run_status=0 + kuainiao_run_status=0 +fi + +#判断是否可以加速 +if [[ ! $kuainiao_can_upgrade -eq 1 ]]; then + dbus ram kuainiao_run_i=6 + dbus ram kuainiao_run_warnning="您的宽带不能使用讯鸟快鸟加速!"$(date "+%Y-%m-%d %H:%M:%S") + dbus ram kuainiao_run_status=0 + exit 21 +fi + +#初始化日期 +if [[ -z $kuainiao_run_orig_day ]]; then + day_of_month_orig=`date +%d` + orig_day_of_month=`echo $day_of_month_orig|grep -oE "[1-9]{1,2}"` + dbus ram kuainiao_run_orig_day=$orig_day_of_month + kuainiao_run_orig_day=$orig_day_of_month +fi + +#开始执行逻辑 +##判断是否跨天 +day_of_month_orig=`date +%d` +day_of_month=`echo $day_of_month_orig|grep -oE "[1-9]{1,2}"` +if [[ -z $kuainiao_run_orig_day || $day_of_month -ne $kuainiao_run_orig_day ]]; then + dbus ram kuainiao_run_orig_day=$day_of_month + kuainiao_run_orig_day=$day_of_month + _ts=`date +%s`000 + $HTTP_REQ "$api_url/recover?peerid=$peerid&userid=$uid&user_type=1&sessionid=$kuainiao_run_session&dial_account=$dial_account&client_type=android-swjsq-$app_version&client_version=androidswjsq-$app_version&os=android-5.0.1.24SmallRice&time_and=$_ts" + dbus ram kuainiao_run_i=6 + kuainiao_run_i=6 + sleep 5 +fi + +#判断是否需要重新登陆 +if test $kuainiao_run_i -ge 6; then + #改变sequenceNo值 + sequence=$(expr $kuainiao_run_i + 100001) + ret=`$HTTP_REQ --header "User-Agent: android-async-http/xl-acc-sdk/version-1.6.1.177600" https://login.mobile.reg2t.sandai.net:443/ $POST_ARG"{\"userName\": \""$kuainiao_config_uname"\", \"businessType\": 68, \"clientVersion\": \"2.0.3.4\", \"appName\": \"ANDROID-com.xunlei.vip.swjsq\", \"isCompressed\": 0, \"sequenceNo\": "$sequence", \"sessionID\": \"\", \"loginType\": 0, \"rsaKey\": {\"e\": \"010001\", \"n\": \"AC69F5CCC8BDE47CD3D371603748378C9CFAD2938A6B021E0E191013975AD683F5CBF9ADE8BD7D46B4D2EC2D78AF146F1DD2D50DC51446BB8880B8CE88D476694DFC60594393BEEFAA16F5DBCEBE22F89D640F5336E42F587DC4AFEDEFEAC36CF007009CCCE5C1ACB4FF06FBA69802A8085C2C54BADD0597FC83E6870F1E36FD\"}, \"cmdID\": 1, \"verifyCode\": \"\", \"peerID\": \""$peerid"\", \"protocolVersion\": 108, \"platformVersion\": 1, \"passWord\": \""$pwd"\", \"extensionList\": \"\", \"verifyKey\": \"\", \"sdkVersion\": 177550, \"devicesign\": \""$devicesign"\"}"` + session=`echo $ret|awk -F '"sessionID":' '{print $2}'|awk -F ',' '{print $1}'|grep -oE "[A-F,0-9]{32}"` + uid=`echo $ret|awk -F '"userID":' '{print $2}' | awk -F ',' '{print $1}'` + #判断登陆是否成功 + if [ -z "$session" ]; then + #登陆失败重置计数器到6 + dbus ram kuainiao_run_i=6 + dbus ram kuainiao_run_warnning="迅雷账号登陆失败!请检查迅雷账号配置!"$(date "+%Y-%m-%d %H:%M:%S") + dbus ram kuainiao_run_status=0 + exit 20 + else + #登陆成功设置登陆日期和session + day_of_month_orig=`date +%d` + orig_day_of_month=`echo $day_of_month_orig|grep -oE "[1-9]{1,2}"` + dbus ram kuainiao_run_orig_day=$orig_day_of_month + dbus ram kuainiao_run_session=$session + kuainiao_run_orig_day=$orig_day_of_month + kuainiao_run_session=$session + fi + #判断返回的uid + if [ -z "$uid" ]; then + uid=$uid_orig + fi + #登陆完成重置计数器 + dbus ram kuainiao_run_i=0 + kuainiao_run_i=0 + #登录完成重置下加速api + get_kuainiao_api + #开始加速 + _ts=`date +%s`000 + $HTTP_REQ "$api_url/upgrade?peerid=$peerid&userid=$uid&user_type=1&sessionid=$kuainiao_run_session&dial_account=$dial_account&client_type=android-swjsq-$app_version&client_version=androidswjsq-$app_version&os=android-5.0.1.24SmallRice&time_and=$_ts" +fi + +sleep 1 + +#保持心跳 +_ts=`date +%s`000 +ret=`$HTTP_REQ "$api_url/keepalive?peerid=$peerid&userid=$uid&user_type=1&sessionid=$kuainiao_run_session&dial_account=$dial_account&client_type=android-swjsq-$app_version&client_version=androidswjsq-$app_version&os=android-5.0.1.24SmallRice&time_and=$_ts"` +if [ ! -z "`echo $ret|grep "not exist channel"`" ]; then + dbus ram kuainiao_run_i=6 + dbus ram kuainiao_run_warnning="迅雷快鸟心跳保持失败!"$(date "+%Y-%m-%d %H:%M:%S") + dbus ram kuainiao_run_status=0 + exit 22 +else + dbus ram kuainiao_run_i=$(expr $kuainiao_run_i + 1) + dbus ram kuainiao_run_warnning="迅雷快鸟运行正常!"$(date "+%Y-%m-%d %H:%M:%S") + dbus ram kuainiao_run_status=1 +fi diff --git a/kuainiao/kuainiao/res/icon-kuainiao.png b/kuainiao/kuainiao/res/icon-kuainiao.png new file mode 100644 index 0000000..3d0aa59 Binary files /dev/null and b/kuainiao/kuainiao/res/icon-kuainiao.png differ diff --git a/kuainiao/kuainiao/res/md5.js b/kuainiao/kuainiao/res/md5.js new file mode 100644 index 0000000..c1d09a9 --- /dev/null +++ b/kuainiao/kuainiao/res/md5.js @@ -0,0 +1 @@ +var md5; md5 || (md5 = function(){function i(a,b){a[b>>5]|=128<>>9<<4)+14]=b;for(var c=1732584193,d=-271733879,e=-1732584194,f=271733878,g=0;a.length>g;g+=16){var h=c,i=d,j=e,o=f;c=k(c,d,e,f,a[g+0],7,-680876936),f=k(f,c,d,e,a[g+1],12,-389564586),e=k(e,f,c,d,a[g+2],17,606105819),d=k(d,e,f,c,a[g+3],22,-1044525330),c=k(c,d,e,f,a[g+4],7,-176418897),f=k(f,c,d,e,a[g+5],12,1200080426),e=k(e,f,c,d,a[g+6],17,-1473231341),d=k(d,e,f,c,a[g+7],22,-45705983),c=k(c,d,e,f,a[g+8],7,1770035416),f=k(f,c,d,e,a[g+9],12,-1958414417),e=k(e,f,c,d,a[g+10],17,-42063),d=k(d,e,f,c,a[g+11],22,-1990404162),c=k(c,d,e,f,a[g+12],7,1804603682),f=k(f,c,d,e,a[g+13],12,-40341101),e=k(e,f,c,d,a[g+14],17,-1502002290),d=k(d,e,f,c,a[g+15],22,1236535329),c=l(c,d,e,f,a[g+1],5,-165796510),f=l(f,c,d,e,a[g+6],9,-1069501632),e=l(e,f,c,d,a[g+11],14,643717713),d=l(d,e,f,c,a[g+0],20,-373897302),c=l(c,d,e,f,a[g+5],5,-701558691),f=l(f,c,d,e,a[g+10],9,38016083),e=l(e,f,c,d,a[g+15],14,-660478335),d=l(d,e,f,c,a[g+4],20,-405537848),c=l(c,d,e,f,a[g+9],5,568446438),f=l(f,c,d,e,a[g+14],9,-1019803690),e=l(e,f,c,d,a[g+3],14,-187363961),d=l(d,e,f,c,a[g+8],20,1163531501),c=l(c,d,e,f,a[g+13],5,-1444681467),f=l(f,c,d,e,a[g+2],9,-51403784),e=l(e,f,c,d,a[g+7],14,1735328473),d=l(d,e,f,c,a[g+12],20,-1926607734),c=m(c,d,e,f,a[g+5],4,-378558),f=m(f,c,d,e,a[g+8],11,-2022574463),e=m(e,f,c,d,a[g+11],16,1839030562),d=m(d,e,f,c,a[g+14],23,-35309556),c=m(c,d,e,f,a[g+1],4,-1530992060),f=m(f,c,d,e,a[g+4],11,1272893353),e=m(e,f,c,d,a[g+7],16,-155497632),d=m(d,e,f,c,a[g+10],23,-1094730640),c=m(c,d,e,f,a[g+13],4,681279174),f=m(f,c,d,e,a[g+0],11,-358537222),e=m(e,f,c,d,a[g+3],16,-722521979),d=m(d,e,f,c,a[g+6],23,76029189),c=m(c,d,e,f,a[g+9],4,-640364487),f=m(f,c,d,e,a[g+12],11,-421815835),e=m(e,f,c,d,a[g+15],16,530742520),d=m(d,e,f,c,a[g+2],23,-995338651),c=n(c,d,e,f,a[g+0],6,-198630844),f=n(f,c,d,e,a[g+7],10,1126891415),e=n(e,f,c,d,a[g+14],15,-1416354905),d=n(d,e,f,c,a[g+5],21,-57434055),c=n(c,d,e,f,a[g+12],6,1700485571),f=n(f,c,d,e,a[g+3],10,-1894986606),e=n(e,f,c,d,a[g+10],15,-1051523),d=n(d,e,f,c,a[g+1],21,-2054922799),c=n(c,d,e,f,a[g+8],6,1873313359),f=n(f,c,d,e,a[g+15],10,-30611744),e=n(e,f,c,d,a[g+6],15,-1560198380),d=n(d,e,f,c,a[g+13],21,1309151649),c=n(c,d,e,f,a[g+4],6,-145523070),f=n(f,c,d,e,a[g+11],10,-1120210379),e=n(e,f,c,d,a[g+2],15,718787259),d=n(d,e,f,c,a[g+9],21,-343485551),c=p(c,h),d=p(d,i),e=p(e,j),f=p(f,o)}return[c,d,e,f]}function j(a,b,c,d,e,f){return p(q(p(p(b,a),p(d,f)),e),c)}function k(a,b,c,d,e,f,g){return j(b&c|~b&d,a,b,e,f,g)}function l(a,b,c,d,e,f,g){return j(b&d|c&~d,a,b,e,f,g)}function m(a,b,c,d,e,f,g){return j(b^c^d,a,b,e,f,g)}function n(a,b,c,d,e,f,g){return j(c^(b|~d),a,b,e,f,g)}function p(a,b){var c=(a&65535)+(b&65535),d=(a>>16)+(b>>16)+(c>>16);return d<<16|c&65535}function q(a,b){return a<>>32-b}function r(a){for(var b=[],d=(1<e;e+=c)b[e>>5]|=(a.charCodeAt(e/c)&d)<e;e++)d+=c.charAt(b[e>>2]>>e%4*8+4&15)+c.charAt(b[e>>2]>>e%4*8&15);return d}var a=0,c=8;return function(a){return t(i(r(a),a.length*c))}}()); \ No newline at end of file diff --git a/kuainiao/kuainiao/res/rsa.js b/kuainiao/kuainiao/res/rsa.js new file mode 100644 index 0000000..0e012c3 --- /dev/null +++ b/kuainiao/kuainiao/res/rsa.js @@ -0,0 +1 @@ +var b64map="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";var b64padchar="=";function hex2b64(h){var i;var c;var ret="";for(i=0;i+3<=h.length;i+=3){c=parseInt(h.substring(i,i+3),16);ret+=b64map.charAt(c>>6)+b64map.charAt(c&63)}if(i+1==h.length){c=parseInt(h.substring(i,i+1),16);ret+=b64map.charAt(c<<2)}else{if(i+2==h.length){c=parseInt(h.substring(i,i+2),16);ret+=b64map.charAt(c>>2)+b64map.charAt((c&3)<<4)}}while((ret.length&3)>0){ret+=b64padchar}return ret}function b64tohex(s){var ret="";var i;var k=0;var slop;for(i=0;i>2);slop=v&3;k=1}else{if(k==1){ret+=int2char((slop<<2)|(v>>4));slop=v&15;k=2}else{if(k==2){ret+=int2char(slop);ret+=int2char(v>>2);slop=v&3;k=3}else{ret+=int2char((slop<<2)|(v>>4));ret+=int2char(v&15);k=0}}}}if(k==1){ret+=int2char(slop<<2)}return ret}function b64toBA(s){var h=b64tohex(s);var i;var a=new Array();for(i=0;2*i=0){var v=x*this[i++]+w[j]+c;c=Math.floor(v/67108864);w[j++]=v&67108863}return c}function am2(i,x,w,j,c,n){var xl=x&32767,xh=x>>15;while(--n>=0){var l=this[i]&32767;var h=this[i++]>>15;var m=xh*l+h*xl;l=xl*l+((m&32767)<<15)+w[j]+(c&1073741823);c=(l>>>30)+(m>>>15)+xh*h+(c>>>30);w[j++]=l&1073741823}return c}function am3(i,x,w,j,c,n){var xl=x&16383,xh=x>>14;while(--n>=0){var l=this[i]&16383;var h=this[i++]>>14;var m=xh*l+h*xl;l=xl*l+((m&16383)<<14)+w[j]+c;c=(l>>28)+(m>>14)+xh*h;w[j++]=l&268435455}return c}if(j_lm&&(navigator.appName=="Microsoft Internet Explorer")){BigInteger.prototype.am=am2;dbits=30}else{if(j_lm&&(navigator.appName!="Netscape")){BigInteger.prototype.am=am1;dbits=26}else{BigInteger.prototype.am=am3;dbits=28}}BigInteger.prototype.DB=dbits;BigInteger.prototype.DM=((1<=0;--i){r[i]=this[i]}r.t=this.t;r.s=this.s}function bnpFromInt(x){this.t=1;this.s=(x<0)?-1:0;if(x>0){this[0]=x}else{if(x<-1){this[0]=x+this.DV}else{this.t=0}}}function nbv(i){var r=nbi();r.fromInt(i);return r}function bnpFromString(s,b){var k;if(b==16){k=4}else{if(b==8){k=3}else{if(b==256){k=8}else{if(b==2){k=1}else{if(b==32){k=5}else{if(b==4){k=2}else{this.fromRadix(s,b);return}}}}}}this.t=0;this.s=0;var i=s.length,mi=false,sh=0;while(--i>=0){var x=(k==8)?s[i]&255:intAt(s,i);if(x<0){if(s.charAt(i)=="-"){mi=true}continue}mi=false;if(sh==0){this[this.t++]=x}else{if(sh+k>this.DB){this[this.t-1]|=(x&((1<<(this.DB-sh))-1))<>(this.DB-sh))}else{this[this.t-1]|=x<=this.DB){sh-=this.DB}}if(k==8&&(s[0]&128)!=0){this.s=-1;if(sh>0){this[this.t-1]|=((1<<(this.DB-sh))-1)<0&&this[this.t-1]==c){--this.t}}function bnToString(b){if(this.s<0){return"-"+this.negate().toString(b)}var k;if(b==16){k=4}else{if(b==8){k=3}else{if(b==2){k=1}else{if(b==32){k=5}else{if(b==4){k=2}else{return this.toRadix(b)}}}}}var km=(1<0){if(p>p)>0){m=true;r=int2char(d)}while(i>=0){if(p>(p+=this.DB-k)}else{d=(this[i]>>(p-=k))&km;if(p<=0){p+=this.DB;--i}}if(d>0){m=true}if(m){r+=int2char(d)}}}return m?r:"0"}function bnNegate(){var r=nbi();BigInteger.ZERO.subTo(this,r);return r}function bnAbs(){return(this.s<0)?this.negate():this}function bnCompareTo(a){var r=this.s-a.s;if(r!=0){return r}var i=this.t;r=i-a.t;if(r!=0){return(this.s<0)?-r:r}while(--i>=0){if((r=this[i]-a[i])!=0){return r}}return 0}function nbits(x){var r=1,t;if((t=x>>>16)!=0){x=t;r+=16}if((t=x>>8)!=0){x=t;r+=8}if((t=x>>4)!=0){x=t;r+=4}if((t=x>>2)!=0){x=t;r+=2}if((t=x>>1)!=0){x=t;r+=1}return r}function bnBitLength(){if(this.t<=0){return 0}return this.DB*(this.t-1)+nbits(this[this.t-1]^(this.s&this.DM))}function bnpDLShiftTo(n,r){var i;for(i=this.t-1;i>=0;--i){r[i+n]=this[i]}for(i=n-1;i>=0;--i){r[i]=0}r.t=this.t+n;r.s=this.s}function bnpDRShiftTo(n,r){for(var i=n;i=0;--i){r[i+ds+1]=(this[i]>>cbs)|c;c=(this[i]&bm)<=0;--i){r[i]=0}r[ds]=c;r.t=this.t+ds+1;r.s=this.s;r.clamp()}function bnpRShiftTo(n,r){r.s=this.s;var ds=Math.floor(n/this.DB);if(ds>=this.t){r.t=0;return}var bs=n%this.DB;var cbs=this.DB-bs;var bm=(1<>bs;for(var i=ds+1;i>bs}if(bs>0){r[this.t-ds-1]|=(this.s&bm)<>=this.DB}if(a.t>=this.DB}c+=this.s}else{c+=this.s;while(i>=this.DB}c-=a.s}r.s=(c<0)?-1:0;if(c<-1){r[i++]=this.DV+c}else{if(c>0){r[i++]=c}}r.t=i;r.clamp()}function bnpMultiplyTo(a,r){var x=this.abs(),y=a.abs();var i=x.t;r.t=i+y.t;while(--i>=0){r[i]=0}for(i=0;i=0){r[i]=0}for(i=0;i=x.DV){r[i+x.t]-=x.DV;r[i+x.t+1]=1}}if(r.t>0){r[r.t-1]+=x.am(i,x[i],r,2*i,0,1)}r.s=0;r.clamp()}function bnpDivRemTo(m,q,r){var pm=m.abs();if(pm.t<=0){return}var pt=this.abs();if(pt.t0){pm.lShiftTo(nsh,y);pt.lShiftTo(nsh,r)}else{pm.copyTo(y);pt.copyTo(r)}var ys=y.t;var y0=y[ys-1];if(y0==0){return}var yt=y0*(1<1)?y[ys-2]>>this.F2:0);var d1=this.FV/yt,d2=(1<=0){r[r.t++]=1;r.subTo(t,r)}BigInteger.ONE.dlShiftTo(ys,t);t.subTo(y,y);while(y.t=0){var qd=(r[--i]==y0)?this.DM:Math.floor(r[i]*d1+(r[i-1]+e)*d2);if((r[i]+=y.am(0,qd,r,j,0,ys))0){r.rShiftTo(nsh,r)}if(ts<0){BigInteger.ZERO.subTo(r,r)}}function bnMod(a){var r=nbi();this.abs().divRemTo(a,null,r);if(this.s<0&&r.compareTo(BigInteger.ZERO)>0){a.subTo(r,r)}return r}function Classic(m){this.m=m}function cConvert(x){if(x.s<0||x.compareTo(this.m)>=0){return x.mod(this.m)}else{return x}}function cRevert(x){return x}function cReduce(x){x.divRemTo(this.m,null,x)}function cMulTo(x,y,r){x.multiplyTo(y,r);this.reduce(r)}function cSqrTo(x,r){x.squareTo(r);this.reduce(r)}Classic.prototype.convert=cConvert;Classic.prototype.revert=cRevert;Classic.prototype.reduce=cReduce;Classic.prototype.mulTo=cMulTo;Classic.prototype.sqrTo=cSqrTo;function bnpInvDigit(){if(this.t<1){return 0}var x=this[0];if((x&1)==0){return 0}var y=x&3;y=(y*(2-(x&15)*y))&15;y=(y*(2-(x&255)*y))&255;y=(y*(2-(((x&65535)*y)&65535)))&65535;y=(y*(2-x*y%this.DV))%this.DV;return(y>0)?this.DV-y:-y}function Montgomery(m){this.m=m;this.mp=m.invDigit();this.mpl=this.mp&32767;this.mph=this.mp>>15;this.um=(1<<(m.DB-15))-1;this.mt2=2*m.t}function montConvert(x){var r=nbi();x.abs().dlShiftTo(this.m.t,r);r.divRemTo(this.m,null,r);if(x.s<0&&r.compareTo(BigInteger.ZERO)>0){this.m.subTo(r,r)}return r}function montRevert(x){var r=nbi();x.copyTo(r);this.reduce(r);return r}function montReduce(x){while(x.t<=this.mt2){x[x.t++]=0}for(var i=0;i>15)*this.mpl)&this.um)<<15))&x.DM;j=i+this.m.t;x[j]+=this.m.am(0,u0,x,i,0,this.m.t);while(x[j]>=x.DV){x[j]-=x.DV;x[++j]++}}x.clamp();x.drShiftTo(this.m.t,x);if(x.compareTo(this.m)>=0){x.subTo(this.m,x)}}function montSqrTo(x,r){x.squareTo(r);this.reduce(r)}function montMulTo(x,y,r){x.multiplyTo(y,r);this.reduce(r)}Montgomery.prototype.convert=montConvert;Montgomery.prototype.revert=montRevert;Montgomery.prototype.reduce=montReduce;Montgomery.prototype.mulTo=montMulTo;Montgomery.prototype.sqrTo=montSqrTo;function bnpIsEven(){return((this.t>0)?(this[0]&1):this.s)==0}function bnpExp(e,z){if(e>4294967295||e<1){return BigInteger.ONE}var r=nbi(),r2=nbi(),g=z.convert(this),i=nbits(e)-1;g.copyTo(r);while(--i>=0){z.sqrTo(r,r2);if((e&(1<0){z.mulTo(r2,g,r)}else{var t=r;r=r2;r2=t}}return z.revert(r)}function bnModPowInt(e,m){var z;if(e<256||m.isEven()){z=new Classic(m)}else{z=new Montgomery(m)}return this.exp(e,z)}BigInteger.prototype.copyTo=bnpCopyTo;BigInteger.prototype.fromInt=bnpFromInt;BigInteger.prototype.fromString=bnpFromString;BigInteger.prototype.clamp=bnpClamp;BigInteger.prototype.dlShiftTo=bnpDLShiftTo;BigInteger.prototype.drShiftTo=bnpDRShiftTo;BigInteger.prototype.lShiftTo=bnpLShiftTo;BigInteger.prototype.rShiftTo=bnpRShiftTo;BigInteger.prototype.subTo=bnpSubTo;BigInteger.prototype.multiplyTo=bnpMultiplyTo;BigInteger.prototype.squareTo=bnpSquareTo;BigInteger.prototype.divRemTo=bnpDivRemTo;BigInteger.prototype.invDigit=bnpInvDigit;BigInteger.prototype.isEven=bnpIsEven;BigInteger.prototype.exp=bnpExp;BigInteger.prototype.toString=bnToString;BigInteger.prototype.negate=bnNegate;BigInteger.prototype.abs=bnAbs;BigInteger.prototype.compareTo=bnCompareTo;BigInteger.prototype.bitLength=bnBitLength;BigInteger.prototype.mod=bnMod;BigInteger.prototype.modPowInt=bnModPowInt;BigInteger.ZERO=nbv(0);BigInteger.ONE=nbv(1);function Arcfour(){this.i=0;this.j=0;this.S=new Array()}function ARC4init(key){var i,j,t;for(i=0;i<256;++i){this.S[i]=i}j=0;for(i=0;i<256;++i){j=(j+this.S[i]+key[i%key.length])&255;t=this.S[i];this.S[i]=this.S[j];this.S[j]=t}this.i=0;this.j=0}function ARC4next(){var t;this.i=(this.i+1)&255;this.j=(this.j+this.S[this.i])&255;t=this.S[this.i];this.S[this.i]=this.S[this.j];this.S[this.j]=t;return this.S[(t+this.S[this.i])&255]}Arcfour.prototype.init=ARC4init;Arcfour.prototype.next=ARC4next;function prng_newstate(){return new Arcfour()}var rng_psize=256;var rng_state;var rng_pool;var rng_pptr;function rng_seed_int(x){rng_pool[rng_pptr++]^=x&255;rng_pool[rng_pptr++]^=(x>>8)&255;rng_pool[rng_pptr++]^=(x>>16)&255;rng_pool[rng_pptr++]^=(x>>24)&255;if(rng_pptr>=rng_psize){rng_pptr-=rng_psize}}function rng_seed_time(){rng_seed_int(new Date().getTime())}if(rng_pool==null){rng_pool=new Array();rng_pptr=0;var t;if(window.crypto&&window.crypto.getRandomValues){var ua=new Uint8Array(32);window.crypto.getRandomValues(ua);for(t=0;t<32;++t){rng_pool[rng_pptr++]=ua[t]}}if(navigator.appName=="Netscape"&&navigator.appVersion<"5"&&window.crypto){var z=window.crypto.random(32);for(t=0;t>>8;rng_pool[rng_pptr++]=t&255}rng_pptr=0;rng_seed_time()}function rng_get_byte(){if(rng_state==null){rng_seed_time();rng_state=prng_newstate();rng_state.init(rng_pool);for(rng_pptr=0;rng_pptr=0&&n>0){var c=s.charCodeAt(i--);if(c<128){ba[--n]=c}else{if((c>127)&&(c<2048)){ba[--n]=(c&63)|128;ba[--n]=(c>>6)|192}else{ba[--n]=(c&63)|128;ba[--n]=((c>>6)&63)|128;ba[--n]=(c>>12)|224}}}ba[--n]=0;var rng=new SecureRandom();var x=new Array();while(n>2){x[0]=0;while(x[0]==0){rng.nextBytes(x)}ba[--n]=x[0]}ba[--n]=0;ba[--n]=0;return new BigInteger(ba)}function pkcs1pad3(s,n){if(n127)&&(c<2048)){ba[j++]=(c>>6)|192;ba[j++]=(c&63)|128}else{ba[j++]=(c>>12)|224;ba[j++]=((c>>6)&63)|128;ba[j++]=(c&63)|128}}}ba[j++]=0;var rng=new SecureRandom();var x=new Array();while(j0&&E.length>0){this.n=parseBigInt(N,16);this.e=parseInt(E,16)}else{alert("Invalid RSA public key")}}function RSADoPublic(x){return x.modPowInt(this.e,this.n)}function RSAEncrypt(text){var m=pkcs1pad3(text,(this.n.bitLength()+7)>>3);if(m==null){return null}var c=this.doPublic(m);if(c==null){return null}var h=c.toString(16);if((h.length&1)==0){return h}else{return"0"+h}}RSAKey.prototype.doPublic=RSADoPublic;RSAKey.prototype.setPublic=RSASetPublic;RSAKey.prototype.encrypt=RSAEncrypt; \ No newline at end of file diff --git a/kuainiao/kuainiao/res/sha1.js b/kuainiao/kuainiao/res/sha1.js new file mode 100644 index 0000000..1b55982 --- /dev/null +++ b/kuainiao/kuainiao/res/sha1.js @@ -0,0 +1,202 @@ +/* + * A JavaScript implementation of the Secure Hash Algorithm, SHA-1, as defined + * in FIPS PUB 180-1 + * Version 2.1a Copyright Paul Johnston 2000 - 2002. + * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet + * Distributed under the BSD License + * See http://pajhome.org.uk/crypt/md5 for details. + */ + +/* + * Configurable variables. You may need to tweak these to be compatible with + * the server-side, but the defaults work in most cases. + */ +var hexcase = 0; /* hex output format. 0 - lowercase; 1 - uppercase */ +var b64pad = ""; /* base-64 pad character. "=" for strict RFC compliance */ +var chrsz = 8; /* bits per input character. 8 - ASCII; 16 - Unicode */ + +/* + * These are the functions you'll usually want to call + * They take string arguments and return either hex or base-64 encoded strings + */ +function hex_sha1(s){return binb2hex(core_sha1(str2binb(s),s.length * chrsz));} +function b64_sha1(s){return binb2b64(core_sha1(str2binb(s),s.length * chrsz));} +function str_sha1(s){return binb2str(core_sha1(str2binb(s),s.length * chrsz));} +function hex_hmac_sha1(key, data){ return binb2hex(core_hmac_sha1(key, data));} +function b64_hmac_sha1(key, data){ return binb2b64(core_hmac_sha1(key, data));} +function str_hmac_sha1(key, data){ return binb2str(core_hmac_sha1(key, data));} + +/* + * Perform a simple self-test to see if the VM is working + */ +function sha1_vm_test() +{ + return hex_sha1("abc") == "a9993e364706816aba3e25717850c26c9cd0d89d"; +} + +/* + * Calculate the SHA-1 of an array of big-endian words, and a bit length + */ +function core_sha1(x, len) +{ + /* append padding */ + x[len >> 5] |= 0x80 << (24 - len % 32); + x[((len + 64 >> 9) << 4) + 15] = len; + + var w = Array(80); + var a = 1732584193; + var b = -271733879; + var c = -1732584194; + var d = 271733878; + var e = -1009589776; + + for(var i = 0; i < x.length; i += 16) + { + var olda = a; + var oldb = b; + var oldc = c; + var oldd = d; + var olde = e; + + for(var j = 0; j < 80; j++) + { + if(j < 16) w[j] = x[i + j]; + else w[j] = rol(w[j-3] ^ w[j-8] ^ w[j-14] ^ w[j-16], 1); + var t = safe_add(safe_add(rol(a, 5), sha1_ft(j, b, c, d)), + safe_add(safe_add(e, w[j]), sha1_kt(j))); + e = d; + d = c; + c = rol(b, 30); + b = a; + a = t; + } + + a = safe_add(a, olda); + b = safe_add(b, oldb); + c = safe_add(c, oldc); + d = safe_add(d, oldd); + e = safe_add(e, olde); + } + return Array(a, b, c, d, e); + +} + +/* + * Perform the appropriate triplet combination function for the current + * iteration + */ +function sha1_ft(t, b, c, d) +{ + if(t < 20) return (b & c) | ((~b) & d); + if(t < 40) return b ^ c ^ d; + if(t < 60) return (b & c) | (b & d) | (c & d); + return b ^ c ^ d; +} + +/* + * Determine the appropriate additive constant for the current iteration + */ +function sha1_kt(t) +{ + return (t < 20) ? 1518500249 : (t < 40) ? 1859775393 : + (t < 60) ? -1894007588 : -899497514; +} + +/* + * Calculate the HMAC-SHA1 of a key and some data + */ +function core_hmac_sha1(key, data) +{ + var bkey = str2binb(key); + if(bkey.length > 16) bkey = core_sha1(bkey, key.length * chrsz); + + var ipad = Array(16), opad = Array(16); + for(var i = 0; i < 16; i++) + { + ipad[i] = bkey[i] ^ 0x36363636; + opad[i] = bkey[i] ^ 0x5C5C5C5C; + } + + var hash = core_sha1(ipad.concat(str2binb(data)), 512 + data.length * chrsz); + return core_sha1(opad.concat(hash), 512 + 160); +} + +/* + * Add integers, wrapping at 2^32. This uses 16-bit operations internally + * to work around bugs in some JS interpreters. + */ +function safe_add(x, y) +{ + var lsw = (x & 0xFFFF) + (y & 0xFFFF); + var msw = (x >> 16) + (y >> 16) + (lsw >> 16); + return (msw << 16) | (lsw & 0xFFFF); +} + +/* + * Bitwise rotate a 32-bit number to the left. + */ +function rol(num, cnt) +{ + return (num << cnt) | (num >>> (32 - cnt)); +} + +/* + * Convert an 8-bit or 16-bit string to an array of big-endian words + * In 8-bit function, characters >255 have their hi-byte silently ignored. + */ +function str2binb(str) +{ + var bin = Array(); + var mask = (1 << chrsz) - 1; + for(var i = 0; i < str.length * chrsz; i += chrsz) + bin[i>>5] |= (str.charCodeAt(i / chrsz) & mask) << (32 - chrsz - i%32); + return bin; +} + +/* + * Convert an array of big-endian words to a string + */ +function binb2str(bin) +{ + var str = ""; + var mask = (1 << chrsz) - 1; + for(var i = 0; i < bin.length * 32; i += chrsz) + str += String.fromCharCode((bin[i>>5] >>> (32 - chrsz - i%32)) & mask); + return str; +} + +/* + * Convert an array of big-endian words to a hex string. + */ +function binb2hex(binarray) +{ + var hex_tab = hexcase ? "0123456789ABCDEF" : "0123456789abcdef"; + var str = ""; + for(var i = 0; i < binarray.length * 4; i++) + { + str += hex_tab.charAt((binarray[i>>2] >> ((3 - i%4)*8+4)) & 0xF) + + hex_tab.charAt((binarray[i>>2] >> ((3 - i%4)*8 )) & 0xF); + } + return str; +} + +/* + * Convert an array of big-endian words to a base-64 string + */ +function binb2b64(binarray) +{ + var tab = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; + var str = ""; + for(var i = 0; i < binarray.length * 4; i += 3) + { + var triplet = (((binarray[i >> 2] >> 8 * (3 - i %4)) & 0xFF) << 16) + | (((binarray[i+1 >> 2] >> 8 * (3 - (i+1)%4)) & 0xFF) << 8 ) + | ((binarray[i+2 >> 2] >> 8 * (3 - (i+2)%4)) & 0xFF); + for(var j = 0; j < 4; j++) + { + if(i * 8 + j * 6 > binarray.length * 32) str += b64pad; + else str += tab.charAt((triplet >> 6*(3-j)) & 0x3F); + } + } + return str; +} diff --git a/kuainiao/kuainiao/scripts/kuainiao_config.sh b/kuainiao/kuainiao/scripts/kuainiao_config.sh new file mode 100644 index 0000000..0bd389c --- /dev/null +++ b/kuainiao/kuainiao/scripts/kuainiao_config.sh @@ -0,0 +1,252 @@ +#!/bin/sh +eval `dbus export kuainiao` +source /jffs/softcenter/scripts/base.sh +version="0.3.6" +kuainiaocru=$(cru l | grep "kuainiao") +startkuainiao=$(ls -l /jffs/softcenter/init.d/ | grep "S80Kuainiao") +app_version="2.0.3.4" + +#双WAN判断 +wans_mode=$(nvram get wans_mode) +if [ "$kuainiao_config_wan" == "1" ] && [ "$wans_mode" == "lb" ]; then + wan_selected=$(nvram get wan0_ipaddr) + if [ "$wan_selected" != "0.0.0.0" ]; then + bind_address=$wan_selected + else + bind_address="" + fi +elif [ "$kuainiao_config_wan" == "2" ] && [ "$wans_mode" == "lb" ]; then + wan_selected=$(nvram get wan1_ipaddr) + if [ "$wan_selected" != "0.0.0.0" ]; then + bind_address=$wan_selected + else + bind_address="" + fi +else + bind_address="" +fi + +#定义请求函数 +if [ -n "$bind_address" ]; then + HTTP_REQ="wget --bind-address=$bind_address --no-check-certificate -O - " + POST_ARG="--post-data=" +else + HTTP_REQ="wget --no-check-certificate -O - " + POST_ARG="--post-data=" +fi + +#数据mock +uname=$kuainiao_config_uname +pwd=$kuainiao_config_pwd +devicesign=$kuainiao_device_sign + +#获取用户真实MAC地址 +get_mac_addr(){ + if [ -n "$bind_address" ] && [ "$kuainiao_config_wan" == "1" ]; then + nic=wan0_hwaddr + elif [ -n "$bind_address" ] && [ "$kuainiao_config_wan" == "2" ]; then + nic=wan1_hwaddr + else + nic=wan_hwaddr + fi + peerid=$(nvram get $nic|awk 'gsub(/:/, "") {printf("%s", toupper($1))}')004V +} +get_mac_addr +#nic=eth0 +#peerid=$(ifconfig $nic|grep $nic|awk 'gsub(/:/, "") {print $5}')004V + +#转存参数 +dbus set kuainiao_config_nic=$nic +dbus set kuainiao_config_peerid=$peerid +dbus set kuainiao_version=$version +dbus set kuainiao_app_version=$app_version + +#获取迅雷用户uid +get_xunlei_uid(){ + ret=`$HTTP_REQ --header "User-Agent: android-async-http/xl-acc-sdk/version-1.6.1.177600" https://login.mobile.reg2t.sandai.net:443/ $POST_ARG"{\"userName\": \""$uname"\", \"businessType\": 68, \"clientVersion\": \"2.0.3.4\", \"appName\": \"ANDROID-com.xunlei.vip.swjsq\", \"isCompressed\": 0, \"sequenceNo\": 1000001, \"sessionID\": \"\", \"loginType\": 0, \"rsaKey\": {\"e\": \"010001\", \"n\": \"AC69F5CCC8BDE47CD3D371603748378C9CFAD2938A6B021E0E191013975AD683F5CBF9ADE8BD7D46B4D2EC2D78AF146F1DD2D50DC51446BB8880B8CE88D476694DFC60594393BEEFAA16F5DBCEBE22F89D640F5336E42F587DC4AFEDEFEAC36CF007009CCCE5C1ACB4FF06FBA69802A8085C2C54BADD0597FC83E6870F1E36FD\"}, \"cmdID\": 1, \"verifyCode\": \"\", \"peerID\": \""$peerid"\", \"protocolVersion\": 108, \"platformVersion\": 1, \"passWord\": \""$pwd"\", \"extensionList\": \"\", \"verifyKey\": \"\", \"sdkVersion\": 177550, \"devicesign\": \""$devicesign"\"}"` + #判断是否登陆成功 + session=`echo $ret|awk -F '"sessionID":' '{print $2}'|awk -F ',' '{print $1}'|grep -oE "[A-F,0-9]{32}"` + + if [ -z "$session" ] + then + dbus set kuainiao_warning="迅雷账号登陆失败,请检查输入的用户名密码!" + #echo "迅雷账号登陆失败,请检查输入的用户名密码!" + else + uid=`echo $ret|awk -F '"userID":' '{print $2}'|awk -F ',' '{print $1}'` + dbus set kuainiao_config_uid=$uid + fi +} + +#获取加速API +get_kuainiao_api(){ + portal=`$HTTP_REQ http://api.portal.swjsq.vip.xunlei.com:81/v2/queryportal` + portal_ip=`echo $portal|grep -oE '([0-9]{1,3}[\.]){3}[0-9]{1,3}'` + portal_port_temp=`echo $portal|grep -oE "port...[0-9]{1,5}"` + portal_port=`echo $portal_port_temp|grep -oE '[0-9]{1,5}'` + if [ -z "$portal_ip" ] + then + dbus set kuainiao_warning="迅雷快鸟服务API获取失败,请检查网络环境,或稍后再试!" + #echo "迅雷快鸟服务API获取失败,请检查网络环境,或稍后再试!" + else + api_url="http://$portal_ip:$portal_port/v2" + dbus set kuainiao_config_api=$api_url + fi +} + +#检测快鸟加速信息 +get_bandwidth(){ + if [ -n "$api_url" ]; then + band=$(bandwidth) + can_upgrade=`echo $band|awk -F '"can_upgrade":' '{print $2}'|awk -F ',' '{print $1}'` + dbus set kuainiao_can_upgrade=$can_upgrade + kuainiao_can_upgrade=$can_upgrade + dial_account=`echo $band|awk -F '"dial_account":' '{print $2}'|awk -F ',' '{print $1}'|grep -oE '[0-9]{1,20}'` + dbus set kuainiao_dial_account=$dial_account + kuainiao_dial_account=$dial_account + #判断是否满足加速条件 + if [[ $can_upgrade -eq 1 ]]; then + #echo "迅雷快鸟可以加速~~~愉快的开始加速吧~~" + #获取加速详细信息 + old_downstream=`echo $band|awk -F '"bandwidth":' '{print $2}'|awk -F '"downstream":' '{print $2}'|awk -F ',' '{print $1}'` + max_downstream=`echo $band|awk -F '"max_bandwidth":' '{print $2}'|awk -F '"downstream":' '{print $2}'|awk -F ',' '{print $1}'` + dbus set kuainiao_warning="迅雷快鸟可以加速~~~愉快的开始加速吧~~" + dbus set kuainiao_old_downstream=$old_downstream + dbus set kuainiao_max_downstream=$max_downstream + else + dbus set kuainiao_warning="T_T 不能加速啊,不满足加速条件哦~~" + #echo "T_T 不能加速啊,不满足加速条件哦~~" + fi + fi +} + +#检测是否可以使用迅雷快鸟服务 +check_kuainiao(){ + portal=`$HTTP_REQ http://api.portal.swjsq.vip.xunlei.com:81/v2/queryportal` + portal_ip=`echo $portal|grep -oE '([0-9]{1,3}[\.]){3}[0-9]{1,3}'` + portal_port_temp=`echo $portal|grep -oE "port...[0-9]{1,5}"` + portal_port=`echo $portal_port_temp|grep -oE '[0-9]{1,5}'` + if [ -z "$portal_ip" ] + then + #export kuainiao_warning="迅雷快鸟服务API获取失败,请检查网络环境,或稍后再试!" + echo "迅雷快鸟服务API获取失败,请检查网络环境,或稍后再试!" + else + api_url="http://$portal_ip:$portal_port/v2" + #开始尝试加速 + res=`$HTTP_REQ "$api_url/upgrade?peerid=$peerid&userid=$uid&user_type=1&sessionid=$session"` + #echo $res + errno=`echo $res|awk -F '"errno":' '{print $2}'|awk -F ',' '{print $1}'` + #判断是否加速成功(errno=812的时候为:当前宽带已处于提速状态) + if [ -n "$errno" ] + then + richmessage=`echo $res|awk -F '"richmessage":' '{print $2}'|awk -F ',' '{print $1}'|awk '{sub(/^"*/,"");sub(/"*$/,"")}1'` + #export kuainiao_warning=$richmessage + echo $richmessage + else + downstream=`echo $ret|awk -F '"downstream":' '{print $2}'|awk -F ',' '{print $1}'` + upstream=`echo $ret|awk -F '"upstream":' '{print $2}'|awk -F ',' '{print $1}'` + fi + fi +} + +#检测试用加速信息 +query_try_info(){ + info=`$HTTP_REQ "$api_url/query_try_info?peerid=$peerid&userid=$uid&user_type=1&sessionid=$session"` + echo $info +} +##{"errno":0,"message":"","number_of_try":0,"richmessage":"","sequence":0,"timestamp":1455936922,"try_duration":10} + +#检测提速带宽 +bandwidth(){ + _ts=`date +%s`000 + width=`$HTTP_REQ "$api_url/bandwidth?peerid=$peerid&userid=$uid&user_type=1&sessionid=$session&dial_account=$dial_account&client_type=android-swjsq-$app_version&client_version=androidswjsq-$app_version&os=android-5.0.1.24SmallRice&time_and=$_ts"` + echo $width +} +##{"bandwidth":{"downstream":51200,"upstream":0},"can_upgrade":1,"dial_account":"100001318645","errno":0,"max_bandwidth":{"downstream":102400,"upstream":0},"message":"","province":"bei_jing","province_name":"北京","richmessage":"","sequence":0,"sp":"cnc","sp_name":"联通","timestamp":1455936922} + +#迅雷快鸟加速心跳 +kuainiao_keepalive(){ + _ts=`date +%s`000 + keepalive=`$HTTP_REQ "$api_url/keepalive?peerid=$peerid&userid=$uid&user_type=1&sessionid=$session&dial_account=$dial_account&client_type=android-swjsq-$app_version&client_version=androidswjsq-$app_version&os=android-5.0.1.24SmallRice&time_and=$_ts"` + echo $keepalive +} + +#快鸟加速注销 +kuainiao_recover(){ + _ts=`date +%s`000 + recover=`$HTTP_REQ "$api_url/recover?peerid=$peerid&userid=$uid&user_type=1&sessionid=$session&dial_account=$dial_account&client_type=android-swjsq-$app_version&client_version=androidswjsq-$app_version&os=android-5.0.1.24SmallRice&time_and=$_ts"` + echo $recover +} + +#将执行脚本写入crontab定时运行 +add_kuainiao_cru(){ + if [ "$kuainiao_can_upgrade" == "1" ] && [ -f /jffs/softcenter/kuainiao/kuainiao.sh ]; then + #确保有执行权限 + chmod +x /jffs/softcenter/kuainiao/kuainiao.sh + cru a kuainiao "*/4 * * * * /jffs/softcenter/kuainiao/kuainiao.sh" + fi +} + +#加入开机自动运行 +auto_start(){ + if [ "$kuainiao_can_upgrade" == "1" ] && [ "$kuainiao_start" == "1" ] && [ -f /jffs/softcenter/kuainiao/kuainiao.sh ]; then + if [ -f /jffs/softcenter/init.d/S80Kuainiao.sh ]; then + rm -rf /jffs/softcenter/init.d/S80Kuainiao.sh + fi + cat > /jffs/softcenter/init.d/S80Kuainiao.sh < + + + + + + + + + 软件中心 - 迅雷快鸟设置 + + + + + + + + + + + + + + + + + + + + +
    + + +
    + + + + + + + + + "/> + "/> + + + + + + + + + + + + + + +
      + + + + + + + + + +
    + + + + +
    +
     
    +
    迅雷快鸟
    +
    +
    +
    迅雷快鸟加速服务,带宽平均提升5倍,最高可达100M
    +
    + + + + + + + + + + +
    开关设置
    开启快鸟加速 +
    + +
    +
    + 当前版本:<% dbus_get_def("kuainiao_version", "未知"); %> +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    基本设置
    迅雷用户名 + +
    密码 + +
    显示密码
    +
    运行状态
    快鸟状态 + + + + +
    提速状态 + + + +
    启动设置
    开机自启 + +
    启动延时 + +
    双WAN设置
    加速WAN口 + +
    + +
    + +
    +
    +
    +
    论坛技术支持: www.koolshare.cn
    + 后台技术支持: Xiaobao
    + Shell, Web by: wangchll
    +
    修改版 by: paldier +
    +
    +
    +
    +
    + + + diff --git a/kuainiao/version b/kuainiao/version new file mode 100644 index 0000000..8bb7c1d --- /dev/null +++ b/kuainiao/version @@ -0,0 +1,2 @@ +0.3.6 +915e63000cbf3a98887930b04aa874ec diff --git a/softcenter/app.json.js b/softcenter/app.json.js index 68479f7..2a66235 100644 --- a/softcenter/app.json.js +++ b/softcenter/app.json.js @@ -21,15 +21,35 @@ "version": "2.2" }, { - "build_date": "2019-01-13_00:10:53", + "build_date": "2019-01-13_02:08:34", "description": "去广告,没烦恼", "home_url": "Module_koolproxy.asp", - "md5": "42c61e110449a52a19b76931d432df7a", + "md5": "1ad5b05d424832237b00028327e9a90e", "name": "koolproxy", "tar_url": "koolproxy/koolproxy.tar.gz", "title": "koolproxy", "version": "3.8.4" }, + { + "build_date": "2019-01-13_14:01:15", + "description": "迅雷快鸟,为上网加速而生~", + "home_url": "Module_kuainiao.asp", + "md5": "915e63000cbf3a98887930b04aa874ec", + "name": "kuainiao", + "tar_url": "kuainiao/kuainiao.tar.gz", + "title": "讯雷快鸟", + "version": "0.3.6" + }, + { + "build_date": "2019-01-13_14:31:33", + "description": "linux下载利器", + "home_url": "Module_aria2.asp", + "md5": "cdd0a74446c977528b6c0bd39f6d85bb", + "name": "aria2", + "tar_url": "aria2/aria2.tar.gz", + "title": "Aria2", + "version": "2.4" + }, { "build_date": "2018-12-06_13:29:29", "description": "kms", @@ -52,7 +72,7 @@ } ], "home_url": "https://raw.githubusercontent.com/paldier/softcenter/master", - "md5": "51b7d9cc5d6af10bc8979ca078c1a8fd", + "md5": "ad166b845c7885b7c5a18f2ce6514886", "tar_url": "softcenter/softcenter.tar.gz", "version": "1.1.6" } \ No newline at end of file diff --git a/softcenter/config.json.js b/softcenter/config.json.js index 2ea14fd..221706a 100644 --- a/softcenter/config.json.js +++ b/softcenter/config.json.js @@ -1,4 +1,4 @@ { "version":"1.1.6", -"md5":"51b7d9cc5d6af10bc8979ca078c1a8fd" +"md5":"ad166b845c7885b7c5a18f2ce6514886" } diff --git a/softcenter/gen_install.py b/softcenter/gen_install.py index ccba39e..626e2b2 100755 --- a/softcenter/gen_install.py +++ b/softcenter/gen_install.py @@ -31,7 +31,7 @@ def work_paths_by_walk(): print os.path.join(root,sub) def work_parent(): - ignore_paths = frozenset(["maintain_files", "softcenter", "v2ray", "adbyby", "ddnspod", "gdddns", "kuainiao", "shadowsocks"]) + ignore_paths = frozenset(["maintain_files", "softcenter", "v2ray", "adbyby", "ddnspod", "gdddns", "shadowsocks"]) for fname in os.listdir(parent_path): if fname[0] == "." or fname in ignore_paths: diff --git a/softcenter/push_message.json.js b/softcenter/push_message.json.js index d631ac6..26f5738 100644 --- a/softcenter/push_message.json.js +++ b/softcenter/push_message.json.js @@ -1,5 +1,5 @@ { -"title":"梅林改版固件 - 软件中心", +"title":"梅林固件 - 软件中心", "content1":"软件中心测试版:(2018年12月6日):", "content2":"原软件中心暂时保留且用法不变;", "content3":"新软件中心暂时不要启用和原软件中心冲突的插件", diff --git a/softcenter/softcenter.tar.gz b/softcenter/softcenter.tar.gz index b990f05..8a518ba 100644 Binary files a/softcenter/softcenter.tar.gz and b/softcenter/softcenter.tar.gz differ diff --git a/softcenter/softcenter/scripts/base.sh b/softcenter/softcenter/scripts/base.sh new file mode 100644 index 0000000..32d499e --- /dev/null +++ b/softcenter/softcenter/scripts/base.sh @@ -0,0 +1,77 @@ +#!/bin/sh +# By Koolshare + +ACTION=$1 + +kservice() { + local ssd + local exec + local name + local start + ssd="${SERVICE_DEBUG:+echo }start-stop-daemon${SERVICE_QUIET:+ -q}" + case "$1" in + -C) + ssd="$ssd -K -t" + ;; + -S) + ssd="$ssd -S${SERVICE_DAEMONIZE:+ -b}${SERVICE_WRITE_PID:+ -m}" + start=1 + ;; + -K) + ssd="$ssd -K${SERVICE_SIG:+ -s $SERVICE_SIG}" + ;; + *) + echo "kservice: unknown ACTION '$1'" 1>&2 + return 1 + esac + shift + exec="$1" + [ -n "$exec" ] || { + echo "kservice: missing argument" 1>&2 + return 1 + } + [ -x "$exec" ] || { + echo "kservice: file '$exec' is not executable" 1>&2 + return 1 + } + name="${SERVICE_NAME:-${exec##*/}}" + [ -z "$SERVICE_USE_PID$SERVICE_WRITE_PID$SERVICE_PID_FILE" ] \ + || ssd="$ssd -p ${SERVICE_PID_FILE:-/var/run/$name.pid}" + [ -z "$SERVICE_MATCH_NAME" ] || ssd="$ssd -n $name" + ssd="$ssd${SERVICE_UID:+ -c $SERVICE_UID${SERVICE_GID:+:$SERVICE_GID}}" + [ -z "$SERVICE_MATCH_EXEC$start" ] || ssd="$ssd -x $exec" + shift + $ssd${1:+ -- "$@"} +} + +kservice_check() { + kservice -C "$@" +} + +kservice_signal() { + SERVICE_SIG="${SERVICE_SIG:-USR1}" kservice -K "$@" +} + +kservice_start() { + kservice -S "$@" +} + +kservice_stop() { + local try + SERVICE_SIG="${SERVICE_SIG:-$SERVICE_SIG_STOP}" kservice -K "$@" || return 1 + while [ $((try++)) -lt $SERVICE_STOP_TIME ]; do + kservice -C "$@" || return 0 + sleep 1 + done + SERVICE_SIG="KILL" kservice -K "$@" + sleep 1 + ! kservice -C "$@" +} + +kservice_reload() { + SERVICE_SIG="${SERVICE_SIG:-$SERVICE_SIG_RELOAD}" kservice -K "$@" +} + +export PATH=$PATH:/jffs/softcenter/bin:/jffs/softcenter/scripts:/bin:/usr/bin:/sbin:/usr/sbin:/home/admin:/opt/sbin:/opt/bin:/opt/usr/sbin:/opt/usr/bin + +#logger "Leaving ${0##*/}." diff --git a/softcenter/softcenter/scripts/pluginbase.sh b/softcenter/softcenter/scripts/pluginbase.sh new file mode 100644 index 0000000..9b96150 --- /dev/null +++ b/softcenter/softcenter/scripts/pluginbase.sh @@ -0,0 +1,24 @@ +#!/bin/sh + +case $ACTION in +start) + service_start $PROCS $ARGS + ;; +stop | kill ) + service_stop $PROCS + ;; +restart) + service_stop $PROCS + service_start $PROCS $ARGS + ;; +check) + service_check $PROCS + ;; +reconfigure) + service_reload $PROCS $ARGS + ;; +*) + echo "Usage: $0 (start|stop|restart|check|kill|reconfigure)" + exit 1 + ;; +esac diff --git a/softcenter/version b/softcenter/version index 3065220..119f2ef 100644 --- a/softcenter/version +++ b/softcenter/version @@ -1,2 +1,2 @@ 1.1.6 -51b7d9cc5d6af10bc8979ca078c1a8fd +ad166b845c7885b7c5a18f2ce6514886 diff --git a/speedtest/speedtest/webs/Module_speedtest.asp b/speedtest/speedtest/webs/Module_speedtest.asp index 112472c..a4e3f5a 100644 --- a/speedtest/speedtest/webs/Module_speedtest.asp +++ b/speedtest/speedtest/webs/Module_speedtest.asp @@ -233,7 +233,7 @@ diff --git a/swap/swap/webs/Module_swap.asp b/swap/swap/webs/Module_swap.asp index 601c6c6..f26cad4 100644 --- a/swap/swap/webs/Module_swap.asp +++ b/swap/swap/webs/Module_swap.asp @@ -48,7 +48,7 @@