-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat/fix: Defender whitelist script, stunclick bug, ESP bugs #172
Conversation
there were tons of NullReferenceException and IndexOutOfRangeException in the BepInEx console after end of round
Side-note, the ESP seems to interfere with ReservedItemSlot mods when joining, not idea why I'm not 100% sure lc-hax is the problem, but those mods started getting unreliable around the time the ESP was added, further investigation needed |
whitelist-windows-defender.bat
Outdated
@echo off | ||
echo Windows Defender hates SharpMonoInjector, attempting to whitelist... | ||
|
||
net session >nul 2>&1 | ||
if %errorlevel% neq 0 ( | ||
echo [91mERROR: This script must run as administrator.[0m | ||
pause | ||
exit /b -1 | ||
) | ||
|
||
for %%p in ("%~dp0" "%TEMP%\.net\SharpMonoInjector") do ( | ||
powershell -ExecutionPolicy Bypass -Command "Add-MpPreference -ExclusionPath "%%p"" || goto :failed | ||
) | ||
|
||
echo [92mSuccess![0m | ||
pause | ||
exit /b 0 | ||
|
||
:failed | ||
echo [91mERROR: Failed to whitelist.[0m | ||
pause | ||
exit /b 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am terribly worried about adding this.. I think we should make this an opt-in conscious decision someone has to make and add this to docs instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, it is technically opt-in, I didn't add it to the other bat files or anything. It's just a standalone script for whoever needs it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, but the average user is going to press on that blindly. I'll shift it over to the docs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think having the bat directly in there is very convenient, otherwise Defender starts spewing plenty of blatantly false positives about SharpMonoInjector being a dozen different viruses
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In addition, if you click "Allow threat" in Windows Defender, it will actually add the virus signature to the exclusions, instead of just that particular file path... So a real virus of that type could infect just fine... I'm having trouble believing Microsoft devs are that much brain-dead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
moved the script to submodules folder and mentioned in readme, should do the trick
I think it's more likely that a patch is breaking the mods, since 99% of mods just use patches and our patches might be causing some race conditions. |
looks like reserved item mods are bugged even when not running lc-hax, so nevermind I guess I dug a bit, the bug happens with ReservedItemSlotCore v1.7.2+ released last weekend, the dev added some server-client syncing code, but didn't add a syncing timeout in case the host doesn't have the mod, so the client never initializes... reverted to v1.7.1 and it's fine now, although that version has other bugs |
Honestly, I still don't think we should put that script in yet. It's really about the message we are giving to users. I want them to strongly, and consciously make the decision to exclude the injector from their AVs. |
Thank you again for the great work! |
In order to run the batch script, one would have to open the submodules folder, right-click the file, run as administrator, and accept the UAC dialog. That's a very conscious decision in my book... Also, the command you provided won't work unless they explicitly open PowerShell as admin and
Although, from experience, asking the average user to modify a command line before usage is sometimes asking too much of them 😆 |
If they don't have the mind to do it, then it's probably best they don't do anything. |
lol maybe you're right, I guess I'm too used to people yelling at me if I don't hold their hands... I do think the readme could still benefit from having a mention about cd'ing into the lc-hax folder before using the command. |
For sure, I'll add it tomorrow |
also
using Set-MpPreference overwrote all my previous exclusions......... |
Oops, good catch. Sorry about that. |
No description provided.