mirror of
https://github.com/Rushilwiz/SkoolOS.git
synced 2025-04-16 02:10:19 -04:00
started checker.py
This commit is contained in:
parent
b31f6146d2
commit
dc7cbf719b
17
bgservice/checker.py
Normal file
17
bgservice/checker.py
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
import os
|
||||||
|
|
||||||
|
|
||||||
|
def shell_check():
|
||||||
|
bash_history = [line.strip() for line in open(os.path.expanduser("~/.bash_history"), 'r')]
|
||||||
|
zsh_history = [line.strip() for line in open(os.path.expanduser("~/.histfile"), 'r')]
|
||||||
|
report = "Suspicios commands found:\n"
|
||||||
|
for i in bash_history + zsh_history:
|
||||||
|
if "git" in i:
|
||||||
|
report += i + "\n"
|
||||||
|
if report != "Suspicios commands found:\n":
|
||||||
|
return report
|
||||||
|
return "Nothing suspicious found in bash or zsh history."
|
||||||
|
|
||||||
|
|
||||||
|
def file_check(dir_):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user