• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Python RuleTestTemplate.RuleTest类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Python中src.tests.lib.RuleTestTemplate.RuleTest的典型用法代码示例。如果您正苦于以下问题:Python RuleTest类的具体用法?Python RuleTest怎么用?Python RuleTest使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了RuleTest类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。

示例1: setUp

 def setUp(self):
     RuleTest.setUp(self)
     self.rule = DisableSerialLoginPrompts(self.config, self.environ,
                                           self.logdispatch,
                                           self.statechglogger)
     self.rulename = self.rule.rulename
     self.rulenumber = self.rule.rulenumber
开发者ID:inscriptionweb,项目名称:stonix,代码行数:7,代码来源:zzzTestRuleDisableSerialLoginPrompts.py


示例2: setUp

 def setUp(self):
     RuleTest.setUp(self)
     self.rule = InstallCasperSuite(self.config, self.environ,
                                    self.logdispatch,
                                    self.statechglogger)
     self.rulename = self.rule.rulename
     self.rulenumber = self.rule.rulenumber
开发者ID:CSD-Public,项目名称:stonix,代码行数:7,代码来源:zzzTestRuleInstallCasperSuite.py


示例3: setUp

    def setUp(self):
        RuleTest.setUp(self)
        self.rule = SecureMTA(self.config,
                              self.environ,
                              self.logdispatch,
                              self.statechglogger)
        self.rulename = self.rule.rulename
        self.rulenumber = self.rule.rulenumber
        self.ch = CommandHelper(self.logdispatch)
        if self.environ.operatingsystem == "Mac OS X":
            self.isMac = True
        else:
            self.isMac = False
        if not self.isMac:
            self.ph = Pkghelper(self.logdispatch, self.environ)
            self.origState = [False, False, False, False]

            self.smPath = "/etc/mail/sendmail.cf"
            self.smTmp = "/tmp/" + os.path.split(self.smPath)[1] + ".utmp"
            self.pfPathlist = ['/etc/postfix/main.cf',
                               '/private/etc/postfix/main.cf',
                               '/usr/lib/postfix/main.cf']
            self.pfPath = ""
            for path in self.pfPathlist:
                if os.path.exists(path):
                    self.pfPath = path
            if self.pfPath == "":
                self.pfPath = "/etc/postfix/main.cf"
            self.pfTmp = "/tmp/" + os.path.split(self.pfPath)[1] + ".utmp"
开发者ID:pombredanne,项目名称:stonix,代码行数:29,代码来源:zzzTestRuleSecureMTA.py


示例4: setUp

 def setUp(self):
     RuleTest.setUp(self)
     self.rule = DisableAdminLoginOverride(self.config, self.environ,
                                           self.logdispatch,
                                           self.statechglogger)
     self.rulename = self.rule.rulename
     self.rulenumber = self.rule.rulenumber
开发者ID:CSD-Public,项目名称:stonix,代码行数:7,代码来源:zzzTestRuleDisableAdminLoginOverride.py


示例5: setUp

 def setUp(self):
     RuleTest.setUp(self)
     self.rule = SecureDHCPServer(self.config,
                                  self.environ,
                                  self.logdispatch,
                                  self.statechglogger)
     self.rulename = self.rule.rulename
     self.rulenumber = self.rule.rulenumber
开发者ID:CSD-Public,项目名称:stonix,代码行数:8,代码来源:zzzTestRuleSecureDHCPServer.py


示例6: setUp

 def setUp(self):
     RuleTest.setUp(self)
     self.rule = ConfigureGatekeeper(self.config, self.environ,
                                     self.logdispatch,
                                     self.statechglogger)
     self.rulename = self.rulename
     self.rulenumber = self.rule.rulenumber
     self.ch = CommandHelper(self.logdispatch)
开发者ID:inscriptionweb,项目名称:stonix,代码行数:8,代码来源:zzzTestRuleConfigureGatekeeper.py


示例7: setUp

 def setUp(self):
     RuleTest.setUp(self)
     self.rule = InstalledSoftwareVerification(self.config,
                                               self.environ,
                                               self.logdispatch,
                                               self.statechglogger)
     self.rulename = self.rule.rulename
     self.rulenumber = self.rule.rulenumber
开发者ID:inscriptionweb,项目名称:stonix,代码行数:8,代码来源:zzzTestRuleInstalledSoftwareVerification.py


示例8: setUp

 def setUp(self):
     RuleTest.setUp(self)
     self.rule = DisableGUILogon(self.config, self.environ,
                                 self.logdispatch, self.statechglogger)
     self.rulename = self.rule.rulename
     self.rulenumber = self.rule.rulenumber
     self.ch = CommandHelper(self.logdispatch)
     self.sh = ServiceHelper(self.environ, self.logdispatch)
开发者ID:inscriptionweb,项目名称:stonix,代码行数:8,代码来源:zzzTestRuleDisableGUILogon.py


示例9: setUp

 def setUp(self):
     RuleTest.setUp(self)
     self.rule = SoftwarePatching(self.config,
                                  self.environ,
                                  self.logdispatch,
                                  self.statechglogger)
     self.rulename = self.rule.rulename
     self.rulenumber = self.rule.rulenumber
开发者ID:CSD-Public,项目名称:stonix,代码行数:8,代码来源:zzzTestRuleSoftwarePatching.py


示例10: setUp

 def setUp(self):
     RuleTest.setUp(self)
     self.rule = DisableBluetooth(self.config,
                                   self.environ,
                                   self.logdispatch,
                                   self.statechglogger)
     self.rulename = self.rule.rulename
     self.rulenumber = self.rule.rulenumber
开发者ID:CSD-Public,项目名称:stonix,代码行数:8,代码来源:zzzTestRuleDisableBluetooth.py


示例11: setUp

 def setUp(self):
     RuleTest.setUp(self)
     self.rule = ConfigureKerberos(self.config,
                                   self.environ,
                                   self.logdispatch,
                                   self.statechglogger)
     self.rulename = self.rule.rulename
     self.rulenumber = self.rule.rulenumber
     self.ch = CommandHelper(self.logdispatch)
     self.fh = FileHelper(self.logdispatch, self.statechglogger)
     if self.environ.getosfamily() == 'darwin':
         self.files = {"kerb5.conf":
                       {"path": "/etc/krb5.conf",
                        "remove": True,
                        "content": None,
                        "permissions": None,
                        "owner": None,
                        "group": None,
                        "eventid": str(self.rulenumber).zfill(4) +
                        "kerb5ut"},
                       "edu.mit.Kerberos":
                       {"path": "/Library/Preferences/edu.mit.Kerberos",
                        "remove": False,
                        "content": "test",
                        "permissions": None,
                        "owner": None,
                        "group": None,
                        "eventid": str(self.rulenumber).zfill(4) +
                        "Kerberosut"},
                       "edu.mit.Kerberos.krb5kdc.launchd":
                       {"path": "/Library/Preferences/edu.mit.Kerberos.krb5kdc.launchd",
                        "remove": False,
                        "content": "test",
                        "permissions": None,
                        "owner": None,
                        "group": None,
                        "eventid": str(self.rulenumber).zfill(4) +
                        "krb5kdcut"},
                       "edu.mit.Kerberos.kadmind.launchd":
                       {"path": "/Library/Preferences/edu.mit.Kerberos.kadmind.launchd",
                        "remove": False,
                        "content": "test",
                        "permissions": None,
                        "owner": None,
                        "group": None,
                        "eventid": str(self.rulenumber).zfill(4) +
                        "kadmindut"},
                     }
     else:
         self.files = {"kerb5.conf":
                       {"path": "/etc/krb5.conf",
                        "remove": True,
                        "content": None,
                        "permissions": None,
                        "owner": None,
                        "group": None,
                        "eventid": str(self.rulenumber).zfill(4) +
                        "kerb5ut"}}
开发者ID:inscriptionweb,项目名称:stonix,代码行数:58,代码来源:zzzTestRuleConfigureKerberos.py


示例12: setUp

 def setUp(self):
     RuleTest.setUp(self)
     self.rule = DisableWeakAuthentication(self.config,
                                           self.environ,
                                           self.logdispatch,
                                           self.statechglogger)
     self.rulename = self.rule.rulename
     self.rulenumber = self.rule.rulenumber
     self.ch = CommandHelper(self.logdispatch)
开发者ID:inscriptionweb,项目名称:stonix,代码行数:9,代码来源:zzzTestRuleDisableWeakAuthentication.py


示例13: setUp

 def setUp(self):
     RuleTest.setUp(self)
     self.rule = VerifyAccPerms(self.config,
                                self.environ,
                                self.logdispatch,
                                self.statechglogger)
     self.rulename = self.rule.rulename
     self.rulenumber = self.rule.rulenumber
     self.ch = CommandHelper(self.logdispatch)
开发者ID:CSD-Public,项目名称:stonix,代码行数:9,代码来源:zzzTestRuleVerifyAccPerms.py


示例14: setUp

 def setUp(self):
     RuleTest.setUp(self)
     self.rule = SystemAccounting(self.config,
                                  self.environ,
                                  self.logdispatch,
                                  self.statechglogger)
     self.rulename = self.rule.rulename
     self.rulenumber = self.rule.rulenumber
     self.ch = CommandHelper(self.logdispatch)
开发者ID:inscriptionweb,项目名称:stonix,代码行数:9,代码来源:zzzTestRuleSystemAccounting.py


示例15: setUp

 def setUp(self):
     RuleTest.setUp(self)
     self.rule = AuditSSHKeys(self.config,
                                   self.environ,
                                   self.logdispatch,
                                   self.statechglogger)
     self.rulename = self.rule.rulename
     self.rulenumber = self.rule.rulenumber
     self.ignoreresults = True
开发者ID:CSD-Public,项目名称:stonix,代码行数:9,代码来源:zzzTestRuleAuditSSHKeys.py


示例16: setUp

 def setUp(self):
     RuleTest.setUp(self)
     self.rule = DisableInteractiveStartup(self.config,
                                           self.environ,
                                           self.logdispatch,
                                           self.statechglogger)
     self.rulename = self.rule.rulename
     self.rulenumber = self.rule.rulenumber
     self.ch = CommandHelper(self.logdispatch)
开发者ID:CSD-Public,项目名称:stonix,代码行数:9,代码来源:zzzTestRuleDisableInteractiveStartup.py


示例17: setUp

 def setUp(self):
     RuleTest.setUp(self)
     self.rule = SystemIntegrityProtection(self.config,
                                           self.environ,
                                           self.logdispatch,
                                           self.statechglogger)
     self.rulename = self.rule.rulename
     self.rulenumber = self.rule.rulenumber
     self.ch = CommandHelper(self.logdispatch)
开发者ID:CSD-Public,项目名称:stonix,代码行数:9,代码来源:zzzTestRuleSystemIntegrityProtection.py


示例18: setUp

 def setUp(self):
     RuleTest.setUp(self)
     self.rule = RestrictAdminSSH(self.config,
                                  self.environ,
                                  self.logdispatch,
                                  self.statechglogger)
     self.rulename = self.rule.rulename
     self.rulenumber = self.rule.rulenumber
     self.ch = CommandHelper(self.logdispatch)
开发者ID:CSD-Public,项目名称:stonix,代码行数:9,代码来源:zzzTestRuleRestrictAdminSSH.py


示例19: setUp

 def setUp(self):
     RuleTest.setUp(self)
     self.rule = RemoveBadDotFiles(self.config,
                                   self.environ,
                                   self.logdispatch,
                                   self.statechglogger)
     self.rulename = self.rule.rulename
     self.rulenumber = self.rule.rulenumber
     self.ch = CommandHelper(self.logdispatch)
开发者ID:CSD-Public,项目名称:stonix,代码行数:9,代码来源:zzzTestRuleRemoveBadDotFiles.py


示例20: setUp

 def setUp(self):
     RuleTest.setUp(self)
     self.rule = AuditNetworkSniffing(self.config,
                                 self.environ,
                                 self.logdispatch,
                                 self.statechglogger)
     self.rulename = self.rule.rulename
     self.rulenumber = self.rule.rulenumber
     self.ch = CommandHelper(self.logdispatch)
开发者ID:CSD-Public,项目名称:stonix,代码行数:9,代码来源:zzzTestRuleAuditNetworkSniffing.py



注:本文中的src.tests.lib.RuleTestTemplate.RuleTest类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python db.DB类代码示例发布时间:2022-05-27
下一篇:
Python sysvars.is_gtk函数代码示例发布时间:2022-05-27
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap