Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
for i in res:
d = dict(zip(key, i))
lst.append(d)
print json.dumps({'data': lst})
def user_status(self, dbuser):
"""Determines whether a user is locked or not"""
sql = "SELECT account_status FROM dba_users WHERE username='{0}'" \
.format(dbuser)
self.cur.execute(sql)
res = self.cur.fetchall()
for i in res:
print i[0]
class Main(Checks):
def __init__(self):
parser = argparse.ArgumentParser()
parser.add_argument('--username')
parser.add_argument('--password')
parser.add_argument('--address')
parser.add_argument('--database')
parser.add_argument('--port')
subparsers = parser.add_subparsers()
for name in dir(self):
if not name.startswith("_"):
p = subparsers.add_parser(name)
method = getattr(self, name)
argnames = inspect.getargspec(method).args[1:]
for argname in argnames: