使用Python3开发冒险岛登录器,特别简单

效果图:

源码如下:

#!/usr/bin/env python3
# encoding=utf-8
from tkinter import *
from tkinter import messagebox as tkMessageBox
import base64
# import webbrowser
import tkinter as tk
import subprocess
import requests
import re
import osdef name_exist(name):url="http://221.10.118.241:55000/ser_user"res=requests.post(url,data={"username":name})if res.text=="1":return Trueelse:return False#处理注册
def newuser(name,pwd):#声明全局变量,传递给insert# global cursor,dbif name=="" or pwd=="":tkMessageBox.showinfo(title='失败', message='账号和密码不能为空!')return Falseelif len(pwd)>10:tkMessageBox.showinfo(title='失败', message='密码长度不能大于10!')return Falseif name_exist(name): #返回正确的值说明用户名存在tkMessageBox.showinfo(title='失败', message='用户名已存在!')return Falseelse:url = "http://221.10.118.241:55000/zc_user"data2={"username":name,"password":pwd}res=requests.post(url,data=data2)if res.text=="1":tkMessageBox.showinfo(title='成功', message='注册成功,获得的账号为:{} 密码为:{}'.format(name,pwd))else:tkMessageBox.showinfo(title='成功', message='注册失败!')
#验证是否是qq
def is_qq(qq):res=requests.get("http://www.webxml.com.cn/webservices/qqOnlineWebService.asmx/qqCheckOnline?qqCode={}".format(qq))result=re.findall('<string xmlns="http://WebXml.com.cn/">E</string>', res.text)if result:return Falseelse:return True
'''
注册账号
'''
def signin():win1 = Toplevel()width = 410height = 300# 获取屏幕尺寸以计算布局参数,使窗口居屏幕中央screenwidth = win1.winfo_screenwidth()screenheight = win1.winfo_screenheight()alignstr = '%dx%d+%d+%d' % (width, height, (screenwidth - width) / 2, (screenheight - height) / 2)win1.geometry(alignstr)# 设置窗口是否可变长、宽,True:可变,False:不可变win1.resizable(width=False, height=False)z_labe1 = Label(win1, text='注册冒险岛账号')z_labe1.place(x=150,y=30)z_labe2 = Label(win1, text='QQ:')z_labe2.place(x=100,y=80)z_sheet_text1 = StringVar()z_sheet1 = Entry(win1, textvariable=z_sheet_text1)z_sheet1.place(x=150,y=80)z_labe3 = Label(win1, text='密码:')z_labe3.place(x=100, y=120)z_sheet_text2 = StringVar()z_sheet2 = Entry(win1, textvariable=z_sheet_text2)z_sheet2.place(x=150, y=120)z_labe4 = Label(win1, text='确认密码:')z_labe4.place(x=75, y=160)z_sheet_text3 = StringVar()z_sheet3 = Entry(win1, textvariable=z_sheet_text3)z_sheet3.place(x=150, y=160)def on_click1():name = z_sheet_text1.get()pwd = z_sheet_text2.get()pwd2 = z_sheet_text3.get()if is_qq(name):if pwd!=pwd2:tkMessageBox.showinfo(title='失败', message='两次密码输入不一致,请重新输入!')#调用处理新用户窗口newuser(str(name),str(pwd))win1.destroy()else:tkMessageBox.showinfo(title='失败', message='注册账号必须使用QQ,请检查是否输入有误!')win1.destroy()btnz=Button(win1, text="注册", command=on_click1,width=10,bg = "#9393FF",bd=0,fg="#FFFFFF")btnz.place(x=180, y=200)'''修改密码'''
def up_pwd():win1 = Toplevel()width = 410height = 300# 获取屏幕尺寸以计算布局参数,使窗口居屏幕中央screenwidth = win1.winfo_screenwidth()screenheight = win1.winfo_screenheight()alignstr = '%dx%d+%d+%d' % (width, height, (screenwidth - width) / 2, (screenheight - height) / 2)win1.geometry(alignstr)# 设置窗口是否可变长、宽,True:可变,False:不可变win1.resizable(width=False, height=False)z_labe1 = Label(win1, text='修改账号密码')z_labe1.place(x=170,y=30)z_labe2 = Label(win1, text='账号:')z_labe2.place(x=100,y=80)z_sheet_text1 = StringVar()z_sheet1 = Entry(win1, textvariable=z_sheet_text1)z_sheet1.place(x=150,y=80)z_labe3 = Label(win1, text='旧密码:')z_labe3.place(x=88, y=120)z_sheet_text2 = StringVar()z_sheet2 = Entry(win1, textvariable=z_sheet_text2)z_sheet2.place(x=150, y=120)z_labe4 = Label(win1, text='新密码:')z_labe4.place(x=88, y=160)z_sheet_text3 = StringVar()z_sheet3 = Entry(win1, textvariable=z_sheet_text3)z_sheet3.place(x=150, y=160)def on_click1():#此处需要继续修改name = z_sheet_text1.get()pwd = z_sheet_text2.get()pwd2 = z_sheet_text3.get()req_data={"username":name,"password":pwd2}url="http://221.10.118.241:5000/up_pwd"res=requests.post(url,data=req_data)if res.text=="1":tkMessageBox.showinfo(title='提示', message='密码修改成功!')win1.destroy()else:tkMessageBox.showinfo(title='提示', message='密码修改失败!')win1.destroy()btnz=Button(win1, text="确认修改", command=on_click1,width=10,bg = "#9393FF",bd=0,fg="#FFFFFF")btnz.place(x=180, y=200)#退出程序
def quit1():root.quit()
#kf
def kefu():# webbrowser.open("https://jq.qq.com/?_wv=1027&amp;k=5r8sedg")tkMessageBox.showinfo(title='提示', message='暂未开放此功能!')
#登录
def login():ocmd="MapleStory.exe "+sheet_text1.get().replace(":"," ")print(ocmd)os.popen(ocmd)open_game()
'''
tasklist
taskkill /pid 9396 -t
'''
def z_popen(cmd):try:popen = subprocess.Popen(cmd, stdout=subprocess.PIPE)lines = popen.stdout.readlines()return [line.decode('gbk') for line in lines]except Exception as ex:pass
'''
打开游戏
'''
def open_game():import timetime.sleep(2)#关闭第一个弹窗页面cmd_text = z_popen("tasklist")for item in cmd_text:if "MapleStory.exe" in item:print(item)data_list = [x for x in item.split(" ") if x]n_cmd = "taskkill /pid {} -t".format(data_list[1])z_popen(n_cmd)time.sleep(2)if __name__ == '__main__':root = tk.Tk()root.title('樱木冒险岛登录引导')width = 816height = 458# 增加背景图片photo = tk.PhotoImage(file="222.png")theLabel = tk.Label(root, image=photo, fg="white")  # 前景色theLabel.place(x=0,y=0)# 获取屏幕尺寸以计算布局参数,使窗口居屏幕中央screenwidth = root.winfo_screenwidth()screenheight = root.winfo_screenheight()alignstr = '%dx%d+%d+%d' % (width, height, (screenwidth - width) / 2, (screenheight - height) / 2)root.geometry(alignstr)# 设置窗口是否可变长、宽,True:可变,False:不可变root.resizable(width=False, height=False)# # ------------------------------------------#button1 = Button(root, text='注册账号', width=11, command=signin,bg = "#9393FF",fg="#FFFFFF",bd=0)button1.place(x=28, y=340)button2 = Button(root, text='修改密码', width=11, command=up_pwd,bg = "#9393FF",fg="#FFFFFF",bd=0)button2.place(x=122, y=340)button3 = Button(root, text='防爆内存', width=11, command=kefu,bg = "#9393FF",fg="#FFFFFF",bd=0)button3.place(x=215, y=340)button4 = Button(root, text='联系客服', width=11, command=kefu,bg = "#9393FF",fg="#FFFFFF",bd=0)button4.place(x=308, y=340)button5 = Button(root, text='卡号自救', width=11, command=kefu,bg = "#9393FF",fg="#FFFFFF",bd=0)button5.place(x=28, y=385)button6 = Button(root, text='礼包兑换', width=11, command=kefu,bg = "#9393FF",fg="#FFFFFF",bd=0)button6.place(x=122, y=385)button7 = Button(root, text='福利领取', width=11, command=kefu,bg = "#9393FF",fg="#FFFFFF",bd=0)button7.place(x=215, y=385)#-------------labe2 = Label(root, text='服务端IP+端口:', font=("", 11), bg="#FFFFFF",fg="#ADADAD",bd=0)labe2.place(x=530, y=340)sheet_text1 = StringVar()sheet1 = Entry(root, textvariable=sheet_text1,bd=0)sheet1.place(x=640, y=340)sheet_text1.set("221.10.118.241:3339")button8 = Button(root, text='一键进入游戏', width=20,height=2,fg="#FFFFFF", command=login, bg="#6A6AFF", bd=0,activebackground="#DDDDFF")button8.place(x=580, y=385)tk.mainloop()

使用python3编写冒险岛079登录器相关推荐

  1. 虚拟机架设冒险岛服务器,冒险岛单机版V139虚拟机版+视频安装教程+139客户端+登录器...

    冒险岛单机版V139虚拟机版+视频安装教程+139客户端+登录器 步骤需要的文件: ① mxd_139_download.exe [这个是客户端下载器,打开会开始下载139客户端.] ② vm.rar ...

  2. [分享] 冒险岛079私服搭建

    文章目录 前言 目录介绍 环境介绍 过程 第一步启动mSer/mysql/phpStudy.exe 第二步 启动mSer/服务端.bat 第三步 启动 冒险岛online\登录器.bat 常见问题 启 ...

  3. 冒险岛登录服务器未响应是什么意思,冒险岛079单机/小范围联机游戏搭建

    参考教程:冒险岛079单机搭建流程 准备工作到单机游戏的部分可以参考上面的教程. 除本篇外,我还写了一篇通过修改服务端脚本达到输入地图编号就能传送到指定地图的目的的教程,详参:冒险岛079实现按地图编 ...

  4. 天龙八部OL登录器编写之创建快捷方式

    早些年玩天龙八部OL的时候,就想自己搭建一个来玩,因为外面有很多泄漏出来的版本. 现在外面已经有很成熟的登录器了,我就来贴一段天龙八部OL编写的代码吧,写的很挫, 并没有涉及到数据包解密的部分.纯属水 ...

  5. python还款程序_使用Python3 编写简单信用卡管理程序

    1.程序执行代码: #Author by Andy #_*_ coding:utf-8 _*_ import os,sys,time Base_dir=os.path.dirname(os.path. ...

  6. python编写登录_通过Python编写一个简单登录功能过程解析

    通过Python编写一个简单登录功能过程解析 需求: 写一个登录的程序, 1.最多登陆失败3次 2.登录成功,提示欢迎xx登录,今天的日期是xxx,程序结束 3.要检验输入是否为空,账号和密码不能为空 ...

  7. 基于clswindow for vb开发的qq登录器源码

    clswindow是vb下控制外部程序的一个框架,封装了很多简单使用的操作函数. clswindow的详细介绍:https://blog.csdn.net/sysdzw/article/details ...

  8. 学习编写Unity计算着色器 Learn to Write Unity Compute Shaders

    利用图形处理器的力量 你会学到: 如何编写Unity计算着色器 如何在后处理图像过滤器中使用ComputeShaders 如何使用ComputeShaders进行粒子效果和群集 如何使用Structu ...

  9. 按键精灵上传账号到服务器_百度网盘超级会员账号登录器

    百度网盘超级会员账号登录器 该软件较为简洁,双击运行,自动进行网页登录,程序已内置一个网盘超级会员账号供大家使用,可以正常下载,请大家不要上传任何违法违规内容,该程序仅供大家临时下载使用,同时下载人数 ...

  10. linux的静态编译elf无法调试,[翻译]自己动手编写一个Linux调试器系列之4 ELF文件格式与DWARF调试格式 by lantie@15PB...

    自己动手编写一个Linux调试器系列之4 ELF文件格式与DWARF调试格式 by lantie@15PB 在上一节中,你已经听说了DWARF调试格式,它是程序的调试信息,是一种可以更好理解源码的方式 ...

最新文章

  1. 公益合种油松专车3天领证
  2. 20175317 《Java程序设计》第一周学习总结
  3. 微软CEO致雅虎董事会的最后通牒信
  4. 对C#下函数,委托,事件的一点理解!
  5. Exchange环境搭建心得
  6. 修改默认的pip版本为对应python2.7
  7. js accordian效果
  8. php input 数组的值,如何获取2值表单输入数组到PHP数组中(How to get 2 value form input array into PHP array)...
  9. 拓扑排序C++实现+实例解析(详解 兄弟们冲呀呀呀呀呀呀呀)
  10. JS浏览器加载一个页面的过程
  11. 探索HTTP传输中gzip压缩的秘密
  12. GitHub推出云端IDE,可在浏览器里使用VS Code了
  13. 分布式与集群(一):我眼中的分布式与集群
  14. Android 插件化 动态升级
  15. jni数组使用(二)
  16. Aria2 基础配置及下载设置
  17. 美国工程管理计算机方向,理工科同学必看!美国工程管理研究生申请大揭秘~...
  18. 全球和国产十大AI芯片
  19. 详解物理学四大神兽————麦克斯韦妖
  20. 企业采用IT人才外包会有这么多好处

热门文章

  1. 北京54或国家80或CGCS2000转WGS84坐标系的程序实现方法
  2. 虚拟机器系统安装管理 Xencenter
  3. python将xml写入excel_Python实现将xml导入至excel
  4. 局域网服务器传输大文件方案,局域网快速传输大文件【操作方案】
  5. 设置jupyter notebook的启动及工作目录方法汇总
  6. PyCharm2021设置成中文版
  7. 新牛牛盲盒微信小程序源码_支持流量变现,带完整素材图片
  8. ios android 系统字体,ios、android 系统字体说明
  9. 在Windows server 2019 Core 版本上安装SQL2016
  10. hcia第五天 结课