zoukankan      html  css  js  c++  java
  • python写unix口令破解器

    看了python绝技做出来的unix口令破解器

    首先需要crypt。

    python并不自带!!

    windows下pip安装失败= =

    后来直接去kali敲了

    附件:jiami.txt #假设是unix的口令文件

    附件1:passwds.txt#假设是字典

    windows crypt模块下载:https://www.dlitz.net/software/pycrypto/

    import crypt
    def testpass(cryptpass):#加密的口令hash
      salt=cryptpass[0:2]#提取加密口令hash前面两个字符视为salt
      destfiles=open('passwd.txt','r')#读取密码字典
      for word in destfiles.readlines():#历遍字典
        word=word.strip('
    ')#提取每一个单词
        cryptword=crypt.crypt(word,salt)#用每个单词计和salt算一个新hash
        print'[*]Found password:'+word+'
    '#找到密码
        return
    print'[-]Fount Not password.
    '#找不到密码
    
    def mian():
      passfile=open('jiami.txt')#打开加密的文件
      for line in passfile.readlines():#历遍加密的文件
        if ':' in line:
          user=line.split(':')[0]
         cryptpass=line.split(':')[1].strip('')#每一行hash都是分开的
         print'[*]Cracking Password For:'+user
         testpass(cryptpass)
    
    if__name__='__main__':
      main()

     结果图:

  • 相关阅读:
    Sass--传多个参数
    Sass--传一个带值的参数
    Sass--传一个不带值的参数
    Sass--调用混合宏
    Sass--混合宏--声明宏
    Sass--伪类嵌套
    Sass-属性嵌套
    Sass--嵌套选择器
    Sass-局部变量和全局变量
    sass--变量
  • 原文地址:https://www.cnblogs.com/haq5201314/p/7528200.html
Copyright © 2011-2022 走看看