iptables.py 文件源码

python
阅读 26 收藏 0 点赞 0 评论 0

项目:SCUTUM 作者: K4YT3X 项目源码 文件源码
def __init__(self, log=False):
        """
        Keyword Arguments:
            log {object} -- object of logger (default: {False})

        Raises:
            FileNotFoundError -- raised when UFW not installed
        """
        self.log = log
        if log is False:
            from logger import Logger
            self.log = Logger()

        if not os.path.isfile('/usr/sbin/ufw'):  # Detect if ufw installed
            print(avalon.FM.BD + avalon.FG.R + '\nWe have detected that you don\'t have UFW installed!' + avalon.FM.RST)
            print('UFW Firewall function requires UFW to run')
            if not self.sysInstallPackage("ufw"):
                avalon.error("ufw is required for this function. Exiting...")
                raise FileNotFoundError("File: \"/usr/sbin/ufw\" not found")
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号