def __init__(self, interface, log=False):
"""
Arguments:
interface {string} -- name of interface to handle
log {object} -- object of logger (default: {False})
Raises:
FileNotFoundError -- raised when arptables not installed
"""
self.log = log
if log is False:
from logger import Logger
self.log = Logger()
self.interface = interface
installer = Installer()
if not os.path.isfile('/usr/bin/arptables') and not os.path.isfile('/sbin/arptables'): # Detect if arptables installed
print(avalon.FM.BD + avalon.FG.R + '\nWe have detected that you don\'t have arptables installed!' + avalon.FM.RST)
print('SCUTUM requires arptables to run')
if not installer.sysInstallPackage("arptables"):
avalon.error("arptables is required for scutum. Exiting...")
raise FileNotFoundError("File: \"/usr/bin/arptables\" and \"/sbin/arptables\" not found")
评论列表
文章目录