Python 破解今日校园定位签到
开发背景:
学校解封后出去玩,媳妇需要签到
渗透流程:
过程截图:忘了截图
主要流程:抓包--数据分析--rsa加解密--利用腾讯ocr识别验证码--登录--继续抓包--继续数据分析--签到
主要难点:登录,加解密
GUI界面代码
import tkinter as tk
import tkinter.messagebox
import webbrowser
from tkinter import scrolledtext
from autoSign import AutoSign
from liteTools import CpdailyTools
from todayLoginService import TodayLoginService
def loginui(window):
global frame1, f1label, f1entry1, f1entry2, f1entry3
# 登录
frame1 = tk.Frame(window, width=400, height=300)
frame1.pack()
frame1.pack_propagate(0) # 固定frame大小
tk.Label(frame1, text='今日校园', bg='#12264f', fg='white', width=30, height=3, font=200).pack()
f1label = tk.Label(frame1, text='', fg='red')
f1label.place(relx=0.5, rely=0.25, anchor='center')
f1label1 = tk.Label(frame1, text='学校:', height=2, font=50)
f1entry1 = tk.Entry(frame1, show=None, highlightthickness=1, highlightbackground='blue')
f1label2 = tk.Label(frame1, text='账号:', height=2, font=50)
f1entry2 = tk.Entry(frame1, show=None, highlightthickness=1, highlightbackground='blue')
f1label3 = tk.Label(frame1, text='密码:', height=2, font=50)
f1entry3 = tk.Entry(frame1, show='*', highlightthickness=1, highlightbackground='blue')
f1button = tk.Button(frame1, text='登录', bg='black', fg='white', width=15, height=2, command=logincmd)
f1label4 = tk.Label(frame1, text='auth:愚者\nblog:www.reaper0s.com', font=('Arial', 10))
f1label4.bind("<Button-1>", open_url)
f1label1.place(relx=0.35, rely=0.35, anchor='center')
f1entry1.place(relx=0.55, rely=0.35, anchor='center', width=110)
f1label2.place(relx=0.35, rely=0.45, anchor='center')
f1entry2.place(relx=0.55, rely=0.45, anchor='center', width=110)
f1label3.place(relx=0.35, rely=0.55, anchor='center')
f1entry3.place(relx=0.55, rely=0.55, anchor='center', width=110)
f1button.place(relx=0.5, rely=0.7, anchor='center')
f1label4.place(relx=0.99, rely=0.99, anchor='se')
def logincmd():
global userSession, userHost, username, schoolname
schoolname = f1entry1.get()
username = f1entry2.get()
password = f1entry3.get()
try:
userInfo = TodayLoginService(
{'schoolName': schoolname, 'username': username, 'password': password, 'proxy': {}})
msg = userInfo.loginEntity.msg
logincode = userInfo.loginEntity.logincode
userSession = userInfo.session
userHost = userInfo.host
except Exception as e:
msg = e
logincode = 0
if logincode == 0:
f1label.config(text='')
f1label.config(text=msg)
elif logincode == 200:
frame1.pack_forget()
signui(window)
def getlonlat():
global lon, lat, address
tools = CpdailyTools()
address = f2entry1.get()
lonlat = tools.baiduGeocoding(address)
f2entry21.delete(0, 100)
f2entry22.delete(0, 100)
f2entry21.insert(0, lonlat[0])
f2entry22.insert(0, lonlat[1])
lon = lonlat[0]
lat = lonlat[1]
def autosign():
userinfo = {
'username': username,
'abnormalReason': '',
'photo': 'sign.jpg',
'signLevel': 1,
'title': 0,
'checkTitle': 1,
'forms': forms,
'lon': lon,
'lat': lat,
'address': address,
'remarkName': '默认备注名',
'model': 'OPPO R11 Plus',
'appVersion': '9.0.14',
'systemVersion': '4.4.4',
'systemName': 'android',
'signVersion': 'first_v3',
'calVersion': 'firstv',
'getHistorySign': False,
'qrUuid': None,
'deviceId': '3C301009-7F46-DA5B-9DAB-D111640483CF',
'global_locationOffsetRange': 50}
sign = AutoSign(userSession, userHost, userinfo)
sign.getUnSignTask()
sign.getDetailTask()
try:
sign.fillForm()
sign.submitForm()
f2label0.config(text=sign.msg)
except Exception as e:
f2label0.config(text=sign.msg)
tk.messagebox.showwarning(title='警告', message=e)
print(e)
def signui(window):
global userSession, userHost, frame2, f2entry1, f2entry21, f2entry22, forms, f2label0
getUn = AutoSign(userSession, userHost)
getUn.getUnSignTask()
getUn.getDetailTask()
frame2 = tk.Frame(window, width=400, height=600)
frame2.pack()
frame2.pack_propagate(0)
tk.Label(frame2, text='今日校园', bg='#12264f', fg='white', width=20, height=3, font=200).pack()
f2label0 = tk.Label(frame2, text='登录成功', fg='red')
f2label0.pack()
tk.Label(frame2, text='签 到 任 务', font=50).pack()
f2label = tk.Label(frame2, text=rf'{getUn.taskInfo["taskName"]}', font=50)
f2label1 = tk.Label(frame2, text='地址:', height=2, font=50)
f2entry1 = tk.Entry(frame2, font=50, show=None, highlightthickness=1, highlightbackground='blue')
f2button1 = tk.Button(frame2, text='获取经纬度', bg='#003460', fg='white', command=getlonlat)
f2label21 = tk.Label(frame2, text='经度:', height=2, font=50)
f2entry21 = tk.Entry(frame2, font=50, show=None, highlightthickness=1, highlightbackground='blue')
f2label22 = tk.Label(frame2, text='纬度:', height=2, font=50)
f2entry22 = tk.Entry(frame2, font=50, show=None, highlightthickness=1, highlightbackground='blue')
f2label3 = tk.Label(frame2, text='默 认 问 答', height=2, font=50)
f2scroll = scrolledtext.ScrolledText(frame2, width=45, height=2)
f2button3 = tk.Button(frame2, text='提交签到', bg='black', fg='white', width=10, height=2, command=autosign)
f2label4 = tk.Label(frame2, text='auth:愚者\nblog:www.reaper0s.com', font=('Arial', 10))
f2label4.bind("<Button-1>", open_url)
f2entry1.insert('end', schoolname)
getlonlat()
forms = []
for i in getUn.task['signedStuInfo']['extraFieldItemVos']:
extraTitle = i['extraTitle']
extraFieldItem = i['extraFieldItem']
f2scroll.insert('end', "问题: " + extraTitle)
f2scroll.insert('end', '\n')
f2scroll.insert('end', "回答: " + extraFieldItem)
f2scroll.insert('end', '\n')
forms.append({'form': {'title': extraTitle, 'value': extraFieldItem}})
x = 400
y = 400
window.geometry('%dx%d+%d+%d' % (x, y, (window.winfo_screenwidth() - x) / 2, (window.winfo_screenheight() - y) / 2))
f2label.pack()
f2label1.place(relx=0.25, rely=0.35, anchor='center')
f2entry1.place(relx=0.45, rely=0.35, anchor='center', width=110, height=30)
f2button1.place(relx=0.70, rely=0.35, anchor='center')
f2label21.place(relx=0.25, rely=0.45, anchor='center')
f2entry21.place(relx=0.40, rely=0.45, anchor='center', width=70, height=30)
f2label22.place(relx=0.55, rely=0.45, anchor='center')
f2entry22.place(relx=0.70, rely=0.45, anchor='center', width=70, height=30)
f2label3.place(relx=0.5, rely=0.55, anchor='center')
f2scroll.place(relx=0.5, rely=0.65, anchor='center')
f2button3.place(relx=0.50, rely=0.80, anchor='center')
f2label4.place(relx=0.99, rely=0.99, anchor='se')
def toindex():
try:
frame2.pack_forget()
except NameError:
tk.messagebox.showerror(title='错误', message='已经在首页了!!!')
frame1.pack()
x = 400
y = 300
window.geometry('%dx%d+%d+%d' % (x, y, (window.winfo_screenwidth() - x) / 2, (window.winfo_screenheight() - y) / 2))
def gethelp():
tk.messagebox.showinfo(
title='帮助',
message='使用方法:\n登录成功后,直接点击提交签到\n登录成功后,修改地址,点击获取经纬度,再点击提交签到(推荐)\n登录成功后,自定义地址经纬度,点击提交签到(繁琐,但百分百成功率)',
)
def getabout():
tk.messagebox.showinfo(
title='关于',
message='仅供学习使用,请勿用于其他用途,学习完毕请删除本软件!!!',
)
def open_url(event):
webbrowser.open("http://www.reaper0s.com", new=0)
window = tk.Tk()
window.title('今日校园签到')
x = 400
y = 300
window.geometry('%dx%d+%d+%d' % (x, y, (window.winfo_screenwidth() - x) / 2, (window.winfo_screenheight() - y) / 2))
window.resizable(False, False)
menubar = tk.Menu(window)
menubar.add_command(label='首页', command=toindex)
menubar.add_command(label='帮助', command=gethelp)
menubar.add_command(label='关于', command=getabout)
loginui(window)
# f2entry1, f2entry21, f2entry22 = signui(window)
window.config(menu=menubar)
window.mainloop()
运行结果:
下载地址:
2 条评论
666
大佬