mirror of
https://github.com/cowrie/cowrie.git
synced 2025-07-01 18:07:27 -04:00
more2
This commit is contained in:
@ -40,13 +40,14 @@ class Passwd(object):
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self, cfg):
|
def __init__(self, cfg):
|
||||||
self.passwd_file = '%s/etc/passwd' % cfg.get('honeypot', 'contents_path')
|
self.passwd_file = '%s/etc/passwd' % cfg.get('honeypot',
|
||||||
|
'contents_path')
|
||||||
self.load()
|
self.load()
|
||||||
|
|
||||||
|
|
||||||
def load(self):
|
def load(self):
|
||||||
"""
|
"""
|
||||||
load the passwd db
|
load /etc/passwd
|
||||||
"""
|
"""
|
||||||
self.passwd = []
|
self.passwd = []
|
||||||
with open(self.passwd_file, 'r') as f:
|
with open(self.passwd_file, 'r') as f:
|
||||||
@ -90,8 +91,7 @@ class Passwd(object):
|
|||||||
# with open(self.passwd_file, 'w') as f:
|
# with open(self.passwd_file, 'w') as f:
|
||||||
# for (login, uid, passwd) in self.userdb:
|
# for (login, uid, passwd) in self.userdb:
|
||||||
# f.write('%s:%d:%s\n' % (login, uid, passwd))
|
# f.write('%s:%d:%s\n' % (login, uid, passwd))
|
||||||
|
raise NotImplementedError
|
||||||
pass
|
|
||||||
|
|
||||||
def getpwnam(self, name):
|
def getpwnam(self, name):
|
||||||
"""
|
"""
|
||||||
|
|||||||
Reference in New Issue
Block a user