上传文件至「/」
This commit is contained in:
@@ -0,0 +1,47 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
"""
|
||||||
|
Created on Sat Mar 22 13:00:20 2025
|
||||||
|
@author: liuks
|
||||||
|
"""
|
||||||
|
import requests
|
||||||
|
import hashlib
|
||||||
|
|
||||||
|
|
||||||
|
LOGIN_URL = "https://api.infi.cn/board/user/nc/accountLogin"
|
||||||
|
USER_API = "https://api.infi.cn/bsg/user/getMyInfo"
|
||||||
|
|
||||||
|
def main():
|
||||||
|
|
||||||
|
account = input("请输入英飞思想家手机号/账号: ").strip()
|
||||||
|
password = input("请输入密码: ").strip()
|
||||||
|
|
||||||
|
|
||||||
|
login_data = {
|
||||||
|
"account": account,
|
||||||
|
"passwd": hashlib.md5(password.encode()).hexdigest(),
|
||||||
|
"loginOriginType": 1
|
||||||
|
}
|
||||||
|
|
||||||
|
login_response = requests.post(
|
||||||
|
LOGIN_URL,
|
||||||
|
json=login_data,
|
||||||
|
headers={"Content-Type": "application/json"}
|
||||||
|
)
|
||||||
|
token = login_response.json()["obj"]["token"]
|
||||||
|
|
||||||
|
|
||||||
|
user_response = requests.post(
|
||||||
|
USER_API,
|
||||||
|
headers={
|
||||||
|
"access-token": token,
|
||||||
|
"Origin": "https://infi.cn",
|
||||||
|
"Content-Type": "application/json"
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
|
user_data = user_response.json()["obj"]
|
||||||
|
print(f"\n【用户信息】\n姓名: {user_data['name']}\n手机号: {user_data['mobile']}\n机构: {user_data['orgFullList'][0]['name']}")
|
||||||
|
return user_response.json()["obj"]
|
||||||
|
if __name__ == "__main__":
|
||||||
|
while (True):
|
||||||
|
a = main()
|
||||||
Reference in New Issue
Block a user