remove defender exclusions

This commit is contained in:
wh1te909 2022-09-15 18:36:55 -07:00
parent 89be0e7d99
commit e0cfb7c90e
4 changed files with 1 additions and 18 deletions

View File

@ -653,18 +653,6 @@ func (a *Agent) AgentUninstall(code string) {
cmd.Start()
}
func (a *Agent) addDefenderExlusions() {
code := fmt.Sprintf(`
Add-MpPreference -ExclusionPath '%s\*'
Add-MpPreference -ExclusionPath '%s\*'
Add-MpPreference -ExclusionPath '%s\*'
`, winTempDir, a.ProgramDir, winMeshDir)
_, _, _, err := a.RunScript(code, "powershell", []string{}, 20, false)
if err != nil {
a.Logger.Debugln(err)
}
}
// RunMigrations cleans up unused stuff from older agents
func (a *Agent) RunMigrations() {
for _, i := range []string{"nssm.exe", "nssm-x86.exe"} {

View File

@ -245,9 +245,6 @@ func (a *Agent) Install(i *Installer) {
a.installerMsg(out.ErrorMsg, "error", i.Silent)
}
a.Logger.Infoln("Adding windows defender exclusions")
a.addDefenderExlusions()
if i.Power {
a.Logger.Infoln("Disabling sleep/hibernate...")
DisableSleepHibernate()

View File

@ -51,8 +51,6 @@ func createAgentConfig(baseurl, agentid, apiurl, token, agentpk, cert, proxy, me
}
}
func (a *Agent) addDefenderExlusions() {}
func DisableSleepHibernate() {}
func EnablePing() {}

View File

@ -25,7 +25,7 @@ import (
)
var (
version = "2.3.1"
version = "2.4.0-dev"
log = logrus.New()
logFile *os.File
)