当前位置: 首页 > news >正文

在线设计logo免费网站手机怎么建立网站

在线设计logo免费网站,手机怎么建立网站,去哪里推广软件效果好,百度网站如何做一、引用的python模块 Crypto: Python中一个强大的加密模块,提供了许多常见的加密算法和工具。它建立在pyc.ypodome或pyc.ypto等底层加密库之上,为Python程序员提供了简单易用的API,使其可以轻松地实现各种加密功能。 commands…

一、引用的python模块

Crypto:

Python中一个强大的加密模块,提供了许多常见的加密算法和工具。它建立在pyc.ypodome或pyc.ypto等底层加密库之上,为Python程序员提供了简单易用的API,使其可以轻松地实现各种加密功能。

commands:

commands 模块是 Python 的内置模块,它主要有三个函数:

FUNCTIONS
getoutput(cmd)
Return output (stdout or stderr) of executing cmd in a shell.getstatus(file)
Return output of "ls -ld <file>" in a string.getstatusoutput(cmd)
Return (status, 'output) of executing cmd in a shell.

SYS: 基础系统模块

sys模块是与python解释器交互的一个接口。sys 模块提供了许多函数和变量来处理 Python 运行时环境的不同部分。

二、实现过程

python脚本如下:

import crypt
import commands
import sys

def testPass(user,cryptPass,ipaddr):
    #dictfile=open('dictionary.txt','r')
    start_index=cryptPass.find("$")
    finish_index=cryptPass.rfind("$")
    salt=cryptPass[start_index:finish_index+1]
    dictfile=open('/root/dict.txt','r')
    pwd_suffix = ['','.','..','!','!@#','1','123','1234','12345','123456','888','666','999','2006','2007','2008','2009','2010','2011','2012','2013','2014','2015','2016','2017','2018','2019']
    for sfx in pwd_suffix:
        #print user+sfx
        for separator in ['','@','#','&']:
            cryptWord=crypt.crypt('%s%s%s'%(user,separator,sfx),salt)
            if cryptWord==cryptPass:
                #print ipaddr + " [+] Found Password: " +user+'/'+user+sfx+ " \n"
                print '%s [+] Found Passwd: %s/%s%s%s \n'%(ipaddr,user,user,separator,sfx)
                break
            cryptWord=crypt.crypt('%s%s%s'%(user,sfx,separator),salt)
            if cryptWord==cryptPass:
                #print ipaddr + " [+] Found Password: " +user+'/'+user+sfx+ " \n"
                print '%s [+] Found Passwd: %s/%s%s%s \n'%(ipaddr,user,user,sfx,separator)
                break
    for word in dictfile.readlines():
        #print word
        word=word.strip()
        cryptWord=crypt.crypt(word,salt)
        if cryptWord==cryptPass:
            print ipaddr + " [+] Found Password: " +user+'/'+word+ " \n"
            break
    print('[-] Password not found!')

def main():
    cmd = "ifconfig|grep \"inet addr\"|grep -v 127.0.0.1|awk '{print $2}'"
    ipaddr = commands.getoutput(cmd).replace('addr:','').replace('\n','|')
    shadowfile=open('/etc/shadow')
    for line in shadowfile.readlines():
        user=line.split(':')[0]
        cryptPass=line.split(':')[1].strip('\n')
        if not (cryptPass.startswith('*') or cryptPass.startswith('!')): 
            print "[*] Cracking Password For: " +user
            testPass(user,cryptPass,ipaddr)

if __name__=='__main__':
    main()

注:破解密码有两种方式,一种是通过脚本pwd_suffix定义的后缀,另一种是调用密码字典库(/root/dict.txt)来破解。

三、演示效果

创建一个测试用户testuser,密码设置成123456,然后执行检测脚本。滴,弱密码已被发现!

http://www.hkea.cn/news/358926/

相关文章:

  • wordpress侧边栏小工具佛山网站优化
  • 用vs做网站原型企业培训课程有哪些内容
  • wordpress评论自定义百度刷排名seo
  • 四川建设网官网登录入口泉州seo外包
  • 网站有备案 去掉备案网络营销意思
  • 新建网站推广给企业百度问一问在线咨询客服
  • 曹鹏wordpress建站seo视频广东疫情防控措施
  • 网站开发的岗位排名优化工具
  • 岳阳做网站怎么做推广让别人主动加我
  • 不断改进网站建设公司百度官网优化
  • 万户网站宁波网站制作优化服务
  • 潍坊快速网站排名网站是怎么做出来的
  • 聚美优品的pc网站建设注册网址
  • 陕西省住房与城乡建设厅网站免费b站推广软件
  • 淮南市住房与城乡建设部网站网店买卖有哪些平台
  • 网页qq表情佛山百度快速排名优化
  • 网站建设方案论文1500社会新闻最新消息
  • 网站组建 需求分析市场监督管理局职责
  • 云课堂哪个网站做的好厦门关键词优化seo
  • 中企动力沈阳分公司seo免费诊断电话
  • 网站vps被黑湖人最新排名最新排名
  • 如何夸奖客户网站做的好seo课程心得体会
  • 有哪些做电子商务的网站时空seo助手
  • 临沂百度网站电脑培训机构哪个好
  • 无锡专业做网站的公司怎样把自己的产品放到网上销售
  • 大学网站建设管理办法推广技巧
  • 长春做网站公司seo关键词排名优化软件怎么选
  • 网站开发未按合同约定工期完工seo关键词排名怎么提升
  • 创可贴app海报制作网站百度seo优化方法
  • 龙岗品牌网站建设2024年新闻摘抄