Пример #1
0
def reset():
    global fname
    global default_cfg
    if not os.path.isfile(fname):
        os.system("apt-get install openssh-server -y")
    sfile.set(fname, default_cfg)
    os.system("service ssh restart")
Пример #2
0
def fix():
    global fname
    global ideal_cfg
    if not os.path.isfile(fname):
        os.system("apt-get install openssh-server -y")
    sfile.set(fname, ideal_cfg)
    os.system("service ssh restart")
Пример #3
0
def reset():
  global fname
  if not os.path.isfile(fname):
    os.system("apt-get install openssh-server -y")
  sfile.set(fname, {"PermitRootLogin": "******"})
Пример #4
0
def fix():
  global fname
  if not os.path.isfile(fname):
    os.system("apt-get install openssh-server -y")
  sfile.set(fname, {"PermitRootLogin": "******"})
Пример #5
0
def reset():
  if os.path.isfile(fname):
    sfile.set(fname, poor_cfg, delim=" = ")
Пример #6
0
def fix():
  sfile.verifyInstall("auditd")
  sfile.set(fname, ideal_cfg, delim=" = ")