以下如有雷同,不胜荣幸

 

* --- 示例代码!!!!!----*/

#! /usr/bin/env python

# _*_  coding:utf-8 _*_

import socket

import sys

PASSWORD_DIC=['redis','root','oracle','password','[email protected]','abc123!','123456','admin']

def check(ip, port, timeout):

    try:

        socket.setdefaulttimeout(timeout)

        s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)

        s.connect((ip, int(port)))

        s.send("INFO\r\n")

        result = s.recv(1024)

        if "redis_version" in result:

            return u"未授权访问"

        elif "Authentication" in result:

            for pass_ in PASSWORD_DIC:

                s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)

                s.connect((ip, int(port)))

                s.send("AUTH %s\r\n" %(pass_))

                result = s.recv(1024)

                if '+OK' in result:

                    return u"存在弱口令,密码:%s" % (pass_)

    except Exception, e:

        pass

if __name__ == '__main__':

    ip=sys.argv[1]

    port=sys.argv[2]

    print check(ip,port, timeout=10)

/* ---示例代码----*/

 

redis未授权弱口令检测脚本(redis未授权访问漏洞,利用redis写webshell)

 

 redis未授权弱口令检测脚本(redis未授权访问漏洞,利用redis写webshell)

 

redis未授权弱口令检测脚本(redis未授权访问漏洞,利用redis写webshell)

 

相关文章:

  • 2021-11-14
  • 2021-11-26
  • 2022-12-23
  • 2021-08-23
  • 2021-04-02
  • 2021-07-15
猜你喜欢
  • 2022-01-11
  • 2021-08-16
  • 2021-09-08
相关资源
相似解决方案