抓取TubeVPN节点,然后出订阅

使用模拟器运行软件后,观察得出下面抓包数据

算法助手里也出现相关数据


这里直接记录下加密密钥KEY
UDRnpNG4zVafoPDyKirGyqnq0gP4wlnS

然后使用网页在线工具测试一下刚抓包得数据是否对应得上
https://tool.lmeee.com/jiami/aes

整个流程清楚了。就是通过这个请求,然后获取一天免费使用时间,破解清空缓存得原理就是随机一下IMEI这个值就行
如果是直接提取节点得话,就只能够用一天。一天后就会失效。然后我想了下。让程序直接每次都获取一次一天有效得节点

  1. # -*- coding: utf-8 -*-
  2. #隐士博客(kjol.cc)
  3. from ssl import VERIFY_DEFAULT
  4. from Crypto.Cipher import AES
  5. from Crypto.Util.Padding import pad, unpad
  6. import binascii
  7. import uuid
  8. import requests
  9. from datetime import datetime
  10. import json
  11. import base64
  12. from flask import Flask, request, jsonify
  13. app = Flask(__name__)
  14.  
  15. @app.route('/generate-ssr-link', methods=['POST'])
  16. def generate_uuid():
  17. return str(uuid.uuid4())
  18. def aes_encrypt(plaintext, key):
  19. cipher = AES.new(key, AES.MODE_ECB)
  20. padded_text = pad(plaintext, AES.block_size)
  21. encrypted_bytes = cipher.encrypt(padded_text)
  22. return binascii.hexlify(encrypted_bytes).decode('utf-8').upper()
  23.  
  24. def aes_decrypt(encrypted_hex, key):
  25. encrypted_bytes = binascii.unhexlify(encrypted_hex)
  26. cipher = AES.new(key, AES.MODE_ECB)
  27. pt = unpad(cipher.decrypt(encrypted_bytes), AES.block_size)
  28. return pt
  29. def send_post_request(url, data):
  30. current_time = datetime.now().strftime("%Y年%m月%d日 %H:%M:%S")
  31. data['t'] = f"t={current_time}"
  32. response = requests.post(url, data=data,verify=False)
  33. return response
  34.  
  35. url = "https://edgeapi.mmasafe.com/node/getInformation_ex"
  36. key = b'UDRnpNG4zVafoPDyKirGyqnq0gP4wlnS'
  37.  
  38.  
  39. @app.route('/tube', methods=['GET'])
  40. def tube():
  41. server_index = int(request.args.get('id', default=0))
  42. new_uuid = generate_uuid()
  43. plaintext = b'{"imei":"3e65cf01-a490-49a2-b1e5-6a37772e3171}","platform":"android","version_number":46,"models":"V2218A","sdk":"32","m":"D4B7349DFE560C38F232FA7D0196C379","c":4}'
  44. plaintext = plaintext.decode('utf-8').replace('3e65cf01-a490-49a2-b1e5-6a37772e3171', new_uuid).encode('utf-8')
  45. encrypted_hex = aes_encrypt(plaintext, key)
  46. data = {
  47. "value": encrypted_hex
  48. }
  49. response = send_post_request(url, data)
  50. encrypted_hex = response.json().get('data')
  51. # 解密
  52. decrypted_text = aes_decrypt(encrypted_hex, key)
  53. json_string = decrypted_text.decode('utf-8')
  54. response_data = json.loads(json_string)
  55. encoded_link = ''
  56. if server_index <= 0 or server_index >= len(response_data['goserverlist']):
  57. for server in response_data['goserverlist']:
  58. city = server['name']
  59. password = server['password']
  60. server_ip = server['host']
  61. server_port = server['remotePort']
  62. method = server['method']
  63. city_encoded = base64.b64encode(city.encode('utf-8')).decode('utf-8')
  64. password_encoded = base64.b64encode(password.encode('utf-8')).decode('utf-8')
  65. protoparam_encoded = base64.b64encode(server['protocol_param'].encode('utf-8')).decode('utf-8')
  66. ssr_link = f"{server_ip}:{server_port}:{server['protocol']}:{method}:{server['obfs']}:{password_encoded}/?remarks={city_encoded}&protoparam={protoparam_encoded}&obfsparam="
  67. encoded_link = encoded_link + "ssr://" + base64.b64encode(ssr_link.encode('utf-8')).decode('utf-8')+'\n'
  68. return encoded_link
  69. server = response_data['goserverlist'][server_index]
  70. city = server['name']
  71. password = server['password']
  72. server_ip = server['host']
  73. server_port = server['remotePort']
  74. method = server['method']
  75. city_encoded = base64.b64encode(city.encode('utf-8')).decode('utf-8')
  76. password_encoded = base64.b64encode(password.encode('utf-8')).decode('utf-8')
  77. protoparam_encoded = base64.b64encode(server['protocol_param'].encode('utf-8')).decode('utf-8')
  78. ssr_link = f"{server_ip}:{server_port}:{server['protocol']}:{method}:{server['obfs']}:{password_encoded}/?remarks={city_encoded}&protoparam={protoparam_encoded}&obfsparam="
  79. encoded_link = encoded_link + "ssr://" + base64.b64encode(ssr_link.encode('utf-8')).decode('utf-8')
  80. return encoded_link
  81.  
  82. if __name__ == '__main__':
  83. app.run(host='0.0.0.0',port=80,debug=True)

如果只想使用某条指定得线路,传入ID参数
如我只想使用第一条线路
http://py.kjol.cc/tube?id=1

返回得是一条单独得SSR链接。然后找个在线订阅转换
我尝试了一下使用https://id9.cc/转换

在线订阅转换地址有如下

https://acl4ssr-sub.github.io/
https://sub.dler.io/
https://sub.pet/
https://bianyuan.xyz/
https://sub.pet/
https://sublink.dev/
https://sub.tsutsu.one/
https://nexconvert.com/
https://api.nameless13.com/
https://sub.ssltd.xyz/
https://sub.tronet.cloud/

个人喜欢https://acl4ssr-sub.github.io/

如下面转换完成后

https://sub.id9.cc/sub?target=clash&new_name=true&url=http%3A%2F%2Fpy.kjol.cc%2Ftube%3Fid%3D1&insert=false&config=https%3A%2F%2Fraw.githubusercontent.com%2FACL4SSR%2FACL4SSR%2Fmaster%2FClash%2Fconfig%2FACL4SSR_Online.ini

配上定时24小时内自动更新订阅,或者失效就手动更新订阅

  1. AA说道:

    后续是不是加什么混淆参数了呀,服务器不通了

    1. 隐士说道:

      添加协议头,还有频繁请求会把你IP拉黑了,上节点池,缓存请求数据,减少请求次数

      1. AA说道:

        问一下,这个协议头还能怎么加勒?节点池到好理解

  2. 隐士说道:

    已经修复,可以使用了得

  3. AA说道:

    有问题了现在

发表评论

邮箱地址不会被公开。 必填项已用*标注