Giter Site home page Giter Site logo

Comments (7)

1xinghuan avatar 1xinghuan commented on May 23, 2024 1

实测把headers里面的User-Agent改成
Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Mobile Safari/537.36
可以登录

from pytrader.

tongyuanfeng avatar tongyuanfeng commented on May 23, 2024

f12 手机排版不需要安全控件
调整代码还是没登录成功。

from pytrader.

1xinghuan avatar 1xinghuan commented on May 23, 2024

今天正好也碰到同样的问题...

from pytrader.

tongyuanfeng avatar tongyuanfeng commented on May 23, 2024

实测把headers里面的User-Agent改成 Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Mobile Safari/537.36 可以登录

咦 我这边改了不行 翻了下js代码。感觉需要实现password: EMTradeEncrypt.encrypt(v), post提交上去的密文是动态变化的

from pytrader.

tongyuanfeng avatar tongyuanfeng commented on May 23, 2024

折腾好久,还改写了加密部分代码,结果一直调试不通过。
最后发现,头部改写浏览器类别就好,其他改乱了(把这个给放开了X-Requested-With": "XMLHttpRequest",)

成功恢复

from pytrader.

tongyuanfeng avatar tongyuanfeng commented on May 23, 2024

headers里面的User-Agent改成 Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Mobile Safari/537.36 可以登录

另外附上密码密文部分处理代码:
from Crypto.Cipher import PKCS1_v1_5 as Cipher_pksc1_v1_5
from Crypto.PublicKey import RSA

def encrpt(password, public_key):
rsakey = RSA.importKey(public_key)
cipher = Cipher_pksc1_v1_5.new(rsakey)
cipher_text = base64.b64encode(cipher.encrypt(password.encode()))
return cipher_text.decode()

key是公钥,需要修改成自己的之后再进行加密
public_key ="- https://jywg.18.cn/JsBundles/BaseJS 中查找-'''

res=self.s.post(self.config['authentication'], data={
'duration': 1800,
'password': encrpt(self.account_config['password']明文密码, public_key) ,
'identifyCode': identifyCode,

from pytrader.

jadepeng avatar jadepeng commented on May 23, 2024

headers里面的User-Agent改成 Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Mobile Safari/537.36 可以登录

另外附上密码密文部分处理代码: from Crypto.Cipher import PKCS1_v1_5 as Cipher_pksc1_v1_5 from Crypto.PublicKey import RSA

def encrpt(password, public_key): rsakey = RSA.importKey(public_key) cipher = Cipher_pksc1_v1_5.new(rsakey) cipher_text = base64.b64encode(cipher.encrypt(password.encode())) return cipher_text.decode()

key是公钥,需要修改成自己的之后再进行加密 public_key ="- https://jywg.18.cn/JsBundles/BaseJS 中查找-'''

res=self.s.post(self.config['authentication'], data={ 'duration': 1800, 'password': encrpt(self.account_config['password']明文密码, public_key) , 'identifyCode': identifyCode,

新版本代码支持了

from pytrader.

Related Issues (8)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.