From 14a6127ee2ad59578d67bf404b3565f292cdaec9 Mon Sep 17 00:00:00 2001 From: Charles Xu Date: Mon, 4 Mar 2019 15:02:57 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=20=E7=A8=8D=E5=BE=AE=E6=94=B9=E4=BA=86?= =?UTF-8?q?=E4=B8=80=E7=82=B9=E6=8D=90=E7=8C=AE=E9=A1=B5=E9=9D=A2=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E6=95=88=E6=9E=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ssshare/donation.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ssshare/donation.py b/ssshare/donation.py index 820fb44..98e2e32 100644 --- a/ssshare/donation.py +++ b/ssshare/donation.py @@ -225,18 +225,18 @@ def parse(data): else: number, message = data[:2] if message: - message = ',并留言:”{}“'.format(message) + message = ',并留言:”{}“'.format(message) if len(data) >= 3: - name = data[2] + name = '' + data[2]+ '' else: name = '某位没有留下名字的' if len(data) >= 4: - comment = '
to 这位朋友:{}'.format(data[3]) + comment = '
to 这位朋友:{}'.format(data[3]) else: comment = '' - return_data = '

{name}朋友捐献了{number}元{message}:){comment}

'.format( + return_data = '

{name}朋友捐献了{number}元{message}:){comment}

'.format( name=name, number=number, message=message, From f6aae6bb4f4506103c7e8e9dd00ede6baaec32a8 Mon Sep 17 00:00:00 2001 From: Charles Xu Date: Mon, 4 Mar 2019 15:32:17 +0800 Subject: [PATCH 2/2] bug fixed for freess.site --- ssshare/ss/crawler.py | 4 ++-- ssshare/ss/ssr_check.py | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/ssshare/ss/crawler.py b/ssshare/ss/crawler.py index c5f9971..eba5537 100644 --- a/ssshare/ss/crawler.py +++ b/ssshare/ss/crawler.py @@ -208,8 +208,8 @@ def get_value(char): 'remarks': x[6], 'server': x[1], 'server_port': x[2], - 'password': x[4], - 'method': x[3], + 'password': x[3], + 'method': x[4], } for x in data] except Exception as e: logging.exception(e, stack_info=True) diff --git a/ssshare/ss/ssr_check.py b/ssshare/ss/ssr_check.py index b26f251..8b84167 100644 --- a/ssshare/ss/ssr_check.py +++ b/ssshare/ss/ssr_check.py @@ -3,6 +3,7 @@ import time import threading from ssshare.ss import ss_local +import random def test_connection( @@ -25,7 +26,9 @@ def test_connection( return ok, content -def test_socks_server(dictionary=None, str_json=None, port=2001): +def test_socks_server(dictionary=None, str_json=None, port=None): + if not port: + port = random.randint(2000, 3000) try: try: loop, tcps, udps = ss_local.main(