-
Notifications
You must be signed in to change notification settings - Fork 617
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
Consider Using Windows Subsystem #28
Comments
I like the way it is - however, I am open to improvements. With the console flashing on startup, it does occur in the pcs I have used in my experience, but I'm not sure if it is standard. Do you have any other advantages of using it along with the console flash? Thanks for the awesomely structured pr! 😄 |
Not that I can think of, no. The reason why I proposed this is because keyloggers are stealth malware and having the console flash may raise suspicion against it. Perhaps someone who might use it would prefer no console flash but if you're fine with the way it currently is, then so be it. |
Coming back to this, this is a great issue - would appreciate a PR implementing it :D |
Problem
I believe that this is built under the console subsystem which relies on the method of using
ShowWindow
to hide the console window (correct me if I'm wrong). The issue is that it will flash the console on execution and is therefore not an elegant solution.My Proposal
Build and compile the code under the Windows subsystem and entirely move away from the use of a console. This change renders the
Stealth
function and#define (in)visible
obsolete.Adjustments
Microsoft Visual C++:
Change:
int main()
to:
int WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShow)
For UNICODE, use:
int wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR lpCmdLine, int nShow)
Create project under
Win32 Project
or change theSubSystem
setting toWindows (/SUBSYSTEM:WINDOWS)
underProperties -> Linker -> System
.GCC/G++:
Build using the
-mwindows
flag. The above steps are optional.If visibility is desired, use:
The text was updated successfully, but these errors were encountered: