鱼C论坛

 找回密码
 立即注册
查看: 2526|回复: 6

[作品展示] 用Python做一个密码工具

[复制链接]
发表于 2020-7-31 09:52:03 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能^_^

您需要 登录 才可以下载或查看,没有账号?立即注册

x
本帖最后由 曲速飞跃 于 2020-7-31 09:52 编辑

这是一个很简单的程序,我还做了4个小时呜呜呜

上代码!
  1. #曲速飞跃作
  2. #请提前在保存此代码的地方创建1.txt

  3. import easygui as g

  4. a = open('1.txt')
  5. b = a.read()
  6. e = int(b)
  7. if e == 1:
  8.     d = g.enterbox('查看密码?')
  9.     h = int(d)
  10.     c = open('mimas.txt')
  11.     k = c.read()
  12.     f = int(k)
  13.     if h != f:
  14.         h = g.enterbox('再次输入查看密码?')
  15.         if h != f:
  16.             exit(0)
  17.     else:
  18.         pass
  19. else:
  20.     pass


  21. while True:
  22.     msg = '主页'
  23.     title = '密码工具'
  24.     choices = ['我的账号密码','增加账号密码','设置','退出']

  25.     choices = g.choicebox(msg,title,choices)

  26.     if choices == '增加账号密码':
  27.         msg = '增加'
  28.         title = '密码工具'
  29.         table = g.enterbox('平台?')
  30.         name = g.enterbox('账号?')
  31.         message = g.enterbox('密码?')
  32.         mes = message + "I LOVE STUDY 0962135 qusufeiyuezuo"

  33.         with open('pingtai.txt', 'a+') as f:
  34.             f.write(str(table))
  35.             f.write('\r\n')
  36.         with open('zhanghao.txt', 'a+') as f:
  37.             f.write(str(name))
  38.             f.write('\r\n')
  39.         with open('mima.txt', 'a+') as f:
  40.             f.write(str(mes))
  41.             f.write('\r\n')

  42.     elif choices == '我的账号密码':
  43.         a = open('pingtai.txt')
  44.         pt = a.read()
  45.         c = open('zhanghao.txt')
  46.         zh = c.read()
  47.         e = open('mima.txt')
  48.         message = e.read()
  49.         First = message
  50.         Second = "I LOVE STUDY 0962135 qusufeiyuezuo"
  51.         end = ""

  52.         for i in First:
  53.             if i in Second:
  54.                 First = First.replace(i, "")




  55.         g.msgbox('平台:' + pt + '账号:' + zh + '密码:' + First )

  56.     elif choices == '设置':
  57.         msg = '设置'
  58.         title = '密码工具'
  59.         choices = ['使用说明','删除账号密码','设置查看密码']
  60.         choices = g.choicebox(msg, title, choices)

  61.         if choices == '使用说明':
  62.             g.msgbox('这个工具用于帮助记不住密码的人。点击增加账号密码可增加,点击我的账号密码即可查询。在设置-设置查看密码 可以设置密码。')
  63.         elif choices == '删除账号密码':
  64.             g.msgbox('在此程序保存的位置找到pingtai.txt,zhanghao.txt,mima.txt,删除对应信息即可。')
  65.         elif choices == '设置查看密码':
  66.             mima = g.enterbox('密码?(数字)')
  67.             with open('mimas.txt', 'w') as f:
  68.                 f.write(str(mima))
  69.             with open('1.txt', 'w') as f:
  70.                 f.write(str(1))
  71.     elif choices == '退出':
  72.         exit(0)




复制代码

特别说明:
1.请提前在保存此代码的地方创建1.txt,因为你如果设置了查看密码,是要检测的
2.因为是密码工具,加密是必备的。这个程序的方法是个土方法。。。
  1. mes = message + "I LOVE STUDY 0962135 qusufeiyuezuo"
复制代码

3.此程序肯定有Bug,欢迎大家纠错!




本帖被以下淘专辑推荐:

小甲鱼最新课程 -> https://ilovefishc.com
回复

使用道具 举报

 楼主| 发表于 2020-7-31 09:52:58 | 显示全部楼层
感谢!
小甲鱼最新课程 -> https://ilovefishc.com
回复

使用道具 举报

发表于 2020-7-31 09:52:58 | 显示全部楼层
  1. else:
  2.         pass
复制代码
可以省略不写
小甲鱼最新课程 -> https://ilovefishc.com
回复 支持 反对

使用道具 举报

发表于 2020-7-31 10:38:43 | 显示全部楼层
小甲鱼最新课程 -> https://ilovefishc.com
回复

使用道具 举报

 楼主| 发表于 2020-7-31 11:02:08 | 显示全部楼层
小甲鱼最新课程 -> https://ilovefishc.com
回复 支持 反对

使用道具 举报

发表于 2020-8-1 18:11:24 | 显示全部楼层
不做白嫖怪
小甲鱼最新课程 -> https://ilovefishc.com
回复 支持 反对

使用道具 举报

发表于 2020-8-5 17:59:24 From FishC Mobile | 显示全部楼层
学习学习
小甲鱼最新课程 -> https://ilovefishc.com
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|手机版|Archiver|鱼C工作室 ( 粤ICP备18085999号-1 | 粤公网安备 44051102000585号)

GMT+8, 2025-6-24 20:20

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表