From a614069355f44039c6cb183999416c10f4fbfad7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=99=9A=E9=A3=8E=E6=8B=82=E6=9F=B3=E9=A2=9C?= <434857005@qq.com> Date: Sat, 13 Jan 2024 03:57:47 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0bd=E5=BD=B1=E8=A7=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- base/custom.conf | 16 ++--- base/rules.db | Bin 172032 -> 172032 bytes txt/hipy/base_java_loader.py | 18 ++++++ txt/hipy/base_spider.py | 6 +- txt/hipy/bdys.jar | Bin 4980 -> 0 bytes txt/hipy/bidi.jar | Bin 0 -> 8046 bytes txt/hipy/test_1.txt | 22 +++++++ "txt/hipy/\344\270\244\344\270\252BT.py" | 2 + ...24\346\273\264\345\275\261\350\247\206.py" | 55 +++++++++++++----- 9 files changed, 95 insertions(+), 24 deletions(-) delete mode 100644 txt/hipy/bdys.jar create mode 100644 txt/hipy/bidi.jar create mode 100644 txt/hipy/test_1.txt diff --git a/base/custom.conf b/base/custom.conf index e262fa3e..d6b0d9ce 100644 --- a/base/custom.conf +++ b/base/custom.conf @@ -27,7 +27,7 @@ "searchable":1, "quickSearch":0, "filterable":1, - "ext":"base_spider" + "ext":"{{host}}/txt/hipy/base_spider.json" }, { "key": "hipy_t3_base_spider", @@ -43,11 +43,11 @@ "key":"hipy_t4_cntv央视", "name":"cntv央视(hipy_t4)", "type":4, - "api":"http://192.168.31.49:5707/api/v1/vod/cntv央视?api_ext={{host}}/txt/hipy/cntv央视.json", + "api":"http://192.168.31.49:5707/api/v1/vod/cntv央视", "searchable":1, "quickSearch":0, "filterable":1, - "ext":"cntv央视" + "ext":"{{host}}/txt/hipy/cntv央视.json" }, { "key": "hipy_t3_cntv央视", @@ -63,11 +63,11 @@ "key":"hipy_t4_两个BT", "name":"两个BT(hipy_t4)", "type":4, - "api":"http://192.168.31.49:5707/api/v1/vod/两个BT?api_ext={{host}}/txt/hipy/两个BT.json", + "api":"http://192.168.31.49:5707/api/v1/vod/两个BT", "searchable":1, "quickSearch":0, "filterable":1, - "ext":"两个BT" + "ext":"{{host}}/txt/hipy/两个BT.json" }, { "key": "hipy_t3_两个BT", @@ -103,11 +103,11 @@ "key":"hipy_t4_哔滴影视", "name":"哔滴影视(hipy_t4)", "type":4, - "api":"http://192.168.31.49:5707/api/v1/vod/哔滴影视?api_ext={{host}}/txt/hipy/bdys.jar", + "api":"http://192.168.31.49:5707/api/v1/vod/哔滴影视", "searchable":1, "quickSearch":0, "filterable":1, - "ext":"{{host}}/txt/hipy/bdys.jar" + "ext":"{{host}}/txt/hipy/bidi.jar" }, { "key": "hipy_t3_哔滴影视", @@ -117,7 +117,7 @@ "searchable": 1, "quickSearch": 0, "filterable": 1, - "ext": "{{host}}/txt/hipy/bdys.jar" + "ext": "{{host}}/txt/hipy/bidi.jar" }, {"key":"Test_jsapi","name":"Test_jsapi(drpy)","type":3,"api":"{{host}}/libs/drpy2.min.js","searchable":2,"quickSearch":0,"filterable":0,"ext":"{{host}}/js/jsapi.js","jar":"{{host}}/libs/jar/custom_jsapi.jar"}, diff --git a/base/rules.db b/base/rules.db index 0d52779991151894bf1cd0272d4b1c55f3f685c6..fbfb4775f114f6569f8c941003a7fb93bed70a03 100644 GIT binary patch delta 519 zcmZoTz}0YoYl1Xm`$QRM#`ea9tqF`v@|mZyIZtOVVBEs*%=Vr=mhBq5CEHSVPPW+T z#|juTw;LBS3b2|;GMh4GWEND$ml(%Cojm2)?k!LEZhW!4jZp(3V}dH9zP-GRu~(BZ zcslC>#-%L$3j7SyAIxJCpFXdh$#na#1&pzrjB6%uJSMt5cNODg76*A|M>Vv5_POmw<)>54X>T0yPO33JlBu53>(u e4-pQ)4r>k<4Z{s^4IK>3vk_ph47bdj0yG2B2R)zw diff --git a/txt/hipy/base_java_loader.py b/txt/hipy/base_java_loader.py index d255a34e..f97b7351 100644 --- a/txt/hipy/base_java_loader.py +++ b/txt/hipy/base_java_loader.py @@ -12,6 +12,9 @@ try: # from base.spider import Spider as BaseSpider from base.spider import BaseSpider + from com.github.tvbox.osc.util import PyUtil + from java import jbyte, jarray + # https://chaquo.com/chaquopy/doc/current/python.html#java.jbyte except ImportError: from t4.base.spider import BaseSpider @@ -46,8 +49,23 @@ def init_jar(self, jar_path="./bdys.jar"): self._prepare_env(jpype) self.jClass = jpype.JClass elif self.ENV.lower() == 't3': + PyUtil.load(jar_path) self.jClass = None + def call_java(self, class_name, method_name, *args): + if self.ENV.lower() == 't4': + class1 = self.jClass(class_name) + method = getattr(class1, method_name) + # method = eval(f'class1.{method_name}', {'class1': class1}) + # print(method) + return method(*args) + elif self.ENV.lower() == 't3': + return PyUtil.call(class_name, method_name, *args) + + @staticmethod + def jarBytes(some_bytes: bytes): + return jarray(jbyte)(some_bytes) + def init(self, extend=""): pass diff --git a/txt/hipy/base_spider.py b/txt/hipy/base_spider.py index 97a4826f..147e8e49 100644 --- a/txt/hipy/base_spider.py +++ b/txt/hipy/base_spider.py @@ -92,7 +92,7 @@ def init_file(ext_file): print(f'更新扩展筛选条件发生错误:{e}') ext = self.extend - print(f"============{extend}============") + print(f"============ext:{ext},extend:{extend}============") if isinstance(ext, str) and ext: if ext.startswith('./'): ext_file = os.path.join(os.path.dirname(__file__), ext) @@ -406,4 +406,8 @@ def check_unsafe_attributes(string): # spider.init_api_ext_file() # 生成筛选对应的json文件 spider.log({'key': 'value'}) spider.log('====文本内容====') + with open('test_1.txt', encoding='utf-8') as f: + code = f.read() + a = spider.superStr2dict(code) + print(type(a), a) # spider.searchContent('斗罗大陆') diff --git a/txt/hipy/bdys.jar b/txt/hipy/bdys.jar deleted file mode 100644 index 9f7e3560e448a15278d7ebdb79c4604df03db70d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4980 zcmZ`-bx;&uyC#;9lJ1gbi6x~$q-5z_LUQRw8VL!B1q1}?5G16LhFwy+JEXg$S=kBgvqM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vXL z%r<;>5iJ@@({|Jh^#}ZZ9MJeW^6!aEDcjbBBg!#aGCrHZjK({QAm)|@? zAH!D~hZ@^jKWtMooFBkvhhAS}>SjmgeX&yS~uT}0f$Jow;wQS^G<@2pvF>vI9 zE5MV#-q{j1(HKhcD~S9T1bQZm@rIS&wVnXF3t7K=yWMH=Ta|zAx(?|Sw&H}*+73Ws zZoa2`R_a7gvuB#r$QxR&;AZ%3Rvi#Sp765ej~_&j#N}T1%&N|G>zFq5GnZCFy^22;szJZF8RD@nZFp6HFEoyEd z;>#@63<1}B!k68*|KcP6J|+8?i2#(PwZz%vRb)7n#Z}~Gq&2nJm1VA!$H$Zu+1RHs z6xo<3#~}?GoO9fpdv5YoQ#T{3Dy%SQbWmDCqB6pxl46~6Hvys&dT?>+A3<#creZBX z8X4)O+l3pUI+-y#eH0KB94XY_vn40uU3 literal 0 HcmV?d00001 diff --git a/txt/hipy/test_1.txt b/txt/hipy/test_1.txt new file mode 100644 index 00000000..9c649d25 --- /dev/null +++ b/txt/hipy/test_1.txt @@ -0,0 +1,22 @@ +[{'key':'你好', +'value':'这是一串代码', +'tip':'可能会有注释','a':true,"b":None,"c":null,'d':True}] +// 单行注释 +# 单行注释 + +/* + + +多行注释 +*/ + +""" + +多行注释 +""" + + +''' +多行注释 + +''' \ No newline at end of file diff --git "a/txt/hipy/\344\270\244\344\270\252BT.py" "b/txt/hipy/\344\270\244\344\270\252BT.py" index 39a624e4..13c99415 100644 --- "a/txt/hipy/\344\270\244\344\270\252BT.py" +++ "b/txt/hipy/\344\270\244\344\270\252BT.py" @@ -506,6 +506,8 @@ def check_unsafe_attributes(string): # print(spider.categoryContent('movie_bt', 1, True, {})) # print(spider.searchContent('斗罗大陆')) # print(spider.detailContent(['https://www.bttwo.net/movie/20107.html'])) + # print(spider.playerContent('在线播放', spider.decodeStr('https%3A%2F%2Fwww.bttwo.net%2Fv_play%2FbXZfMzY4Nzgtbm1fMQ%3D%3D.html','utf-8'), None)) + # print(spider.playerContent('在线播放', spider.decodeStr('https://www.bttwo.net/v_play/bXZfMTMyNjkwLW5tXzE=.html','utf-8'), None)) # print(spider.playerContent('在线播放', 'https://www.bttwo.net/v_play/bXZfMTMyNjA2LW5tXzE=.html', None)) # ciphertext = '+T77kORPkp6wtgdzcqQgPmUXomqshgO6IfTIGE8/40Iht0nDYW9pcGGUk/1157KS876b7FW1m6JMjPY2G+pwtscUjTcCq2G2NTnAX+1iMIexjK+nfTobgi2qYMtke/sWWe51RH/9IxqvoosAhH4dlN+QT/TIHKFFa6OyFiFp2hlUvPNpukbtZcHHshHMolQc9JmW3av+Js9AcyKDLuoFg9N38jrBidnUadw/9Pog/lsoRXUp7JFhdiVujAIkxTJjabvQXT2jGQS88MY7/kiem5SikAh/D+zVPnwO3E7z87o3GIC4agtWKbjTCfeRsUCGg20fEiEl79YoJAaBofZ67cHYNvjcvu6DPSE1Nf29keNMoZlSCLvJPOzSv1+nBi4aVz4s5M2puSDczFyFPPE6aW4Zpr1tVRstr/RuMPLZoDu2D/p6Znxrvwcgj8N6g997Y8P6jNGhdSdmLaFQNgjJT/4cBV1X8W3UzohaapewK3Zum6lmyzcNRlXHHdoCyM4WNYoEOTjln0oKexGIXEBoGijjTzVpng9eGAjMyjYoPKAC0ZCAPTMv94UlLRruUbEtCxlMN0AYzNB2mC/otT6bu/063/ECzCvBS7LjJuamYX+2zsSomIUMiNzfx4S4/ZY9M8tGdVclNKKCzCQ+ovWUPMvEtKDW+g/qUdfx8a/cXMYkEeR66D5ChMGlEVwayytjjJDn4a0/4SxpcOkNVwRMFfhyuFNAPyS65m7ieJe+r5QuwlMa67DwQdBRkw4t2bmt3CXU+qPvfeCchNcVKjHPAwWaHbI3NGN+/4sZ5aa9aLV/r0jIwL8ThWHwbbvox/VCfCLtrtNX1JW7VPnqHudvuqDb2VE5nYPU96VdNGUoGSNUJraXPQ2J1YG0x6DKOznfPiwrK6pD0emY3mtCQcN1UB62q0nTvavI3GBpFKd5y9w4idS+pjHBpdedL4lFc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5amzTLKUc' diff --git "a/txt/hipy/\345\223\224\346\273\264\345\275\261\350\247\206.py" "b/txt/hipy/\345\223\224\346\273\264\345\275\261\350\247\206.py" index 9ddc6fb1..cfa073c1 100644 --- "a/txt/hipy/\345\223\224\346\273\264\345\275\261\350\247\206.py" +++ "b/txt/hipy/\345\223\224\346\273\264\345\275\261\350\247\206.py" @@ -27,11 +27,11 @@ "key":"hipy_t4_哔滴影视", "name":"哔滴影视(hipy_t4)", "type":4, - "api":"http://192.168.31.49:5707/api/v1/vod/哔滴影视", + "api":"http://192.168.31.49:5707/api/v1/vod/哔滴影视?api_ext={{host}}/txt/hipy/bidi.jar", "searchable":1, "quickSearch":0, "filterable":1, - "ext":"" + "ext":"{{host}}/txt/hipy/bidi.jar" }, { "key": "hipy_t3_哔滴影视", @@ -41,7 +41,7 @@ "searchable": 1, "quickSearch": 0, "filterable": 1, - "ext": "" + "ext": "{{host}}/txt/hipy/bidi.jar" }, """ @@ -103,7 +103,8 @@ def init(self, extend=""): if ext.endswith('.jar'): jar_path = os.path.join(os.path.dirname(__file__), './jars') os.makedirs(jar_path, exist_ok=True) - jar_file = os.path.join(os.path.dirname(__file__), './jars/bdys.jar') + # jar_file = os.path.join(os.path.dirname(__file__), './jars/bdys.jar') + jar_file = os.path.join(os.path.dirname(__file__), './jars/bidi.jar') jar_file = Path(jar_file).as_posix() need_down = False msg = '' @@ -119,6 +120,9 @@ def init(self, extend=""): if need_down: self.log(msg) + if self.ENV.lower() == 't3': + # ext = ext.replace('.jar', '.dex') + pass content = self.get_init_api(ext) with open(jar_file, mode='wb+') as f: f.write(content) @@ -131,11 +135,18 @@ def init(self, extend=""): break if self.javar: - jar_file = os.path.join(os.path.dirname(__file__), './jars/bdys.jar') + # jar_file = os.path.join(os.path.dirname(__file__), './jars/bdys.jar') + jar_file = os.path.join(os.path.dirname(__file__), './jars/bidi.jar') jar_file = Path(jar_file).as_posix() self.javar.init_jar(jar_file) - self.class1 = self.javar.jClass('com.C4355b') - self.token = str(self.class1.getToken()) + # self.class1 = self.javar.jClass('com.C4355b') + self.token = str(self.javar.call_java('com.EncryptionUtils', 'getToken')) + # self.class1 = self.javar.jClass('com.EncryptionUtils') + # # class1 = self.class1() # 类实例化 + # class1 = self.class1 + # self.token = str(class1.getToken()) + # print(self.token) + # # self.token = str(self.class1.getToken()) self.headers.update({'token': self.token}) gParam['inited'] = True @@ -391,14 +402,28 @@ def localProxy(self, params): content = pdata.strip() media_type = 'text/plain' if 'txt' in name else 'video/MP2T' - - return [200, media_type, content] + action = { + 'url': url, + 'header': headers, + 'param': '', + 'type': media_type, + 'after': '' + } + if '3' in self.ENV: + return [200, media_type, action, content] + else: + return [200, media_type, content] # -----------------------------------------------自定义函数----------------------------------------------- def decode(self, text): bt = base64.b64decode(text) - res = self.class1.dec(bt) - return self.str2json(str(res)) + # self.log(self.headers) + if self.ENV.lower() == 't3': + bt = self.javar.jarBytes(bt) + res = self.javar.call_java('com.EncryptionUtils', 'dec', bt) + # res = self.class1.dec(bt) + # print(str(res)) + return self.str2json(str(res)) if res else None def process_data(self, req_bytes): """ @@ -422,10 +447,10 @@ def process_data(self, req_bytes): # spider.log('====文本内容====') # print(spider.homeContent(True)) # print(spider.homeVideoContent()) - # print(spider.categoryContent('0', 1, False, None)) + print(spider.categoryContent('0', 1, False, None)) # print(spider.detailContent([24420])) # spider.searchContent('斗罗大陆') # print(spider.playerContent('至尊线路', 'vip://https://www.bdys03.com/api/v1/playurl/174296?type=1', None)) - print(spider.playerContent('需要解析', - 'https://www.bde4.cc/10E79044B82A84F70BE1308FFA5232E4DC3D0CA9EC2BF6B1D4EF56B2CE5B67CF238965CCAE17F859665B7E166720986D.m3u8', - None)) + # print(spider.playerContent('需要解析', + # 'https://www.bde4.cc/10E79044B82A84F70BE1308FFA5232E4DC3D0CA9EC2BF6B1D4EF56B2CE5B67CF238965CCAE17F859665B7E166720986D.m3u8', + # None))