宝塔利用
删除宝塔中的登陆日志
import sqlite3
import argparse
def log(id):
conn = sqlite3.connect('default.db')
c = conn.cursor()
c.execute("DELETE from logs where ID={};".format(id))
conn.commit()
print ("id= {} ok".format(id))
parser = argparse.ArgumentParser(description="")
parser.add_argument("-id", type=str, help="")
args = parser.parse_args()
if args.id:
log(args.id)
标签:宝塔,parser,log,args,利用,id,conn
From: https://www.cnblogs.com/startstart/p/16909510.html