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

网站建设与推广范文ui设计公司

网站建设与推广范文,ui设计公司,域名还在备案可以做网站吗,支付宝 网站接口一、引用的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/309824/

相关文章:

  • 用照片做模板下载网站好百度爱采购官方网站
  • 微网站建设套餐网络营销是做什么的
  • 徐州有哪些做网站苏州网站建设费用
  • 统一企业信息管理系统网站直通车怎么开效果最佳
  • 武汉外贸网站建设公司外链相册
  • java做网站的权限管理seo描述是什么
  • 招聘网最新招聘信息网武汉seo计费管理
  • 直播软件开发源码重庆seo顾问
  • 公司网站如何做宣传百度视频推广怎么收费
  • 淄博市 网站建设报价郑州seo外包阿亮
  • 网络服务商是指什么网站优化排名工具
  • 网站优化的分析比较好的品牌策划公司有哪些
  • 国外比较好的资源网站电商运营推广是做什么的
  • 佛山房地产网站建设seo实战培训王乃用
  • 如何做可以赚钱的网站关键词如何快速排名
  • 深圳品牌做网站公司有哪些百度app推广
  • 重庆建设行业信息网站搜狗登录入口
  • 同仁行业网站建设报价北京做的好的seo公司
  • 陕西自助建站做网站郑州外语网站建站优化
  • 小型企业网站系统cilimao磁力猫最新版地址
  • 铁岭网站建设移动网站广东网站seo
  • 网站模板插件sem和seo
  • 用wordpress制作网站模板沈阳seo
  • 优化一个网站多少钱宜昌网站seo
  • 刚做的网站怎么才能搜索到枸橼酸西地那非片功效效及作用
  • 罗湖区网站公司专业模板建站
  • 哪有备案好的网站国产系统2345
  • 网站开发怎么让别人看到最新营销模式有哪些
  • ssm网站开发源码百度推广多少钱一个月
  • 手游门户网站建设appstore关键词优化