StrokesPlus.net Forum
»
General Discussion
»
Scripts
»
Running scripts with StrokePlus's startup automatically
Rank: Advanced Member
Groups: Translators, Approved Joined: 7/17/2021(UTC) Posts: 135
Thanks: 35 times Was thanked: 18 time(s) in 15 post(s)
|
Hi everyone, I have this particular scenario in my mind to do certain tasks as S+ launches(such as with Windows startup)..
I would like to disable my machine's controls such as mouse movement(by locking cursor in a 0px rectangle which I can do) and keyboard controls(honestly I have no idea how to do that and still 'unlock' machine later P).
Assuming I have script to 'lock' machine's controls, I would like to run the script immediately after S+ loads settings(after that loading settings UI on startup) so that any 'unexpected guest' looses control over machine even if he manages to bypass machine's login.
I am fine with having to press a secret keyboard shortcut afterwards to run 'unlocking' script and gain control over my machine if it means I have peace of mind that most 'guests' will most probably be unable to do much with my machine. (I know data can still be extracted if you are motivated enough but unexpected scenarios such as locked cursor can throw many minds into fear especially if they don't know about S+ which should be a sin on its own P)
Any tips and additional feature ideas and implementations are much appreciated.
|
|
|
|
Rank: Advanced Member
Groups: Translators, Approved Joined: 7/17/2021(UTC) Posts: 135
Thanks: 35 times Was thanked: 18 time(s) in 15 post(s)
|
And very sorry about this post being in a 'feature request' section, it's not a feature request, I am just new to using forums. Please move this post to normal discussions if its possible to do as a moderator.
|
|
|
|
Rank: Administration
Groups: Translators, Members, Administrators Joined: 1/11/2018(UTC) Posts: 1,382 Location: Tampa, FL Thanks: 28 times Was thanked: 430 time(s) in 363 post(s)
|
|
|
|
|
Rank: Advanced Member
Groups: Translators, Approved Joined: 7/17/2021(UTC) Posts: 135
Thanks: 35 times Was thanked: 18 time(s) in 15 post(s)
|
Thanks for reply Rob.
I've checked out the links and from what I understand these 'hooks' are executed when S+ starts. So if I'm getting it right you're suggesting to use a hook that consumes all keyboard input rendering machine's input ineffective in other applications besides S+ (after disabling windows shortcut).
This seems like a good approach but kind of too tech-y for me right now, is there a hook or some other way to trigger a certain script(lets say mouse restrict script) to run as soon as S+ starts?
For example: if we wanted to show a 'hi user' DisplayText popup to user as soon as S+ started and there was a script 'sendHiToUser', is there a way to trigger this script to run just after S+ loaded?
|
|
|
|
Rank: Administration
Groups: Translators, Members, Administrators Joined: 1/11/2018(UTC) Posts: 1,382 Location: Tampa, FL Thanks: 28 times Was thanked: 430 time(s) in 363 post(s)
|
Yeah, any script in the Global Actions > Load/Unload > Load tab will execute on start/reload.
|
|
|
|
Rank: Advanced Member
Groups: Translators, Approved Joined: 7/17/2021(UTC) Posts: 135
Thanks: 35 times Was thanked: 18 time(s) in 15 post(s)
|
Wow it was right there in front of me!
Thanks a lot for pointing it out Rob.
|
|
|
|
Rank: Member
Groups: Approved
Joined: 4/13/2021(UTC) Posts: 8 Thanks: 4 times Was thanked: 1 time(s) in 1 post(s)
|
Originally Posted by: randomConstant Hi everyone, I have this particular scenario in my mind to do certain tasks as S+ launches(such as with Windows startup).. ... Any tips and additional feature ideas and implementations are much appreciated. sp.ConsumePhysicalInput(true); Is literally undefeatable. It times out now, but if you wanted to remove that timeout I think there's an argument for that. Literally I was locked out of my own system a couple times and I have a degree in computer science and could not figure out anyway to do anything. Control + Alt + Delete work a little bit, but once you're back in windows you're locked out again. I am not sure how you eat your cake and have it too, in that this locks you out. But, you might be able to ask somebody should know to hold control 2 seconds after strokes plus is started to avoid falling into stuck world. sp.ConsumePhysicalInput(true); // Default, 60 second timeout sp.ConsumePhysicalInput(true, 600); // 600 second timeout sp.ConsumePhysicalInput(true, 1); // 1 second timeout sp.ConsumePhysicalInput(true, 0); // Infinite, must manually call stop Edited by user Tuesday, November 23, 2021 8:46:03 AM(UTC)
| Reason: Added versions.
|
1 user thanked Tatarize for this useful post.
|
|
|
Rank: Advanced Member
Groups: Translators, Approved Joined: 7/17/2021(UTC) Posts: 135
Thanks: 35 times Was thanked: 18 time(s) in 15 post(s)
|
Thank you Tatarize!It seems to be an easier way to block all input. However, I decided not to implement this whole 'stuck-pc' idea on my machine because the input would stop as S+ starts and anyone interested enough to snoop on the machine will figure out the link between stuck machine and S+ from its startup notification overlay. Maybe a delayed BSOD in case the user doesn't stop a 'self-destruct' script with some 'secret' shortcut would be better.
|
|
|
|
Rank: Administration
Groups: Translators, Members, Administrators Joined: 1/11/2018(UTC) Posts: 1,382 Location: Tampa, FL Thanks: 28 times Was thanked: 430 time(s) in 363 post(s)
|
So what's the main goal here?
You just want the PC running, but basically unable to be interacted with?
|
|
|
|
Rank: Advanced Member
Groups: Translators, Approved Joined: 7/17/2021(UTC) Posts: 135
Thanks: 35 times Was thanked: 18 time(s) in 15 post(s)
|
Originally Posted by: Rob So what's the main goal here?
You just want the PC running, but basically unable to be interacted with? Actually since Windows login is not that hard to bypass I was thinking of a way to use S+ to detect an intruder (when a script is not stopped within a certain time period) and also stop, stuck, or crash the machine confusing the intruder and probably scaring them off. Since Windows controls can not be stopped for the time S+ takes to startup, making the machine stuck might make the intruder suspicious of S+, so maybe a delayed self-crash BSOD or something similar would be better. Example: Owner starts machine, logs into Windows, presses shortcut within 60 seconds after S+ loads, resumes using his machine normally. Intruder starts machine, bypasses Windows login, continues using machine and does not press shortcut within 60 seconds, machine crashes showing BlueScreenOfDeath, maybe tries 2 more times, thinks he just messed up a fully functional machine, gets scared a bit and leaves machine alone. We could probably log the intrusion activity in a file somewhere on machine before self-crashing and maybe even take selfie of the intruder from front camera or start monitoring his activity using a keylogger and self-crash after, lets say 5 minutes if we really want to catch the intruder I am not a security expert by any means but a similar method might be useful when dealing with normies.
|
|
|
|
Rank: Administration
Groups: Translators, Members, Administrators Joined: 1/11/2018(UTC) Posts: 1,382 Location: Tampa, FL Thanks: 28 times Was thanked: 430 time(s) in 363 post(s)
|
|
1 user thanked Rob for this useful post.
|
|
|
Rank: Advanced Member
Groups: Translators, Approved Joined: 7/17/2021(UTC) Posts: 135
Thanks: 35 times Was thanked: 18 time(s) in 15 post(s)
|
Oh Damn. This is pretty interesting and maybe I should buy a tin-foil-hat now. But the discussion has cleared the following points including my initial query: - Running scripts as S+ starts (using load/unload)
- Locking mouse movement and disabling all keyboard input by consuming it (hooks)
- Information about some Windows privileged shortcuts and tasks
I do not, however, think that doing all of this with S+ is worth it when dealing with a tech-savvy intruder. Suggestions for someone likeminded: - For normies just lock the movement and send Windows shutdown keys (such as Win+X, U, U) if the lock-script is not disabled in due time. Maybe even throw in a fake malware popup.
- For tech-savvy intruders just run a logger silently after the lock or intruder-detector-script is not disabled in due time and look up their activity later.
- Encrypt your data using VeraCrypt or some other trustworthy disk encryption software with a long mixed password, intruders can easily break in through the Windows P.
and thank you again for making this amazing software @developers. Windows is worth using now because of it. Only two software I can't use systems without now are S+ (for Windows) and Niagara Launcher (a minimal/neat launcher for Android).
|
|
|
|
Rank: Administration
Groups: Translators, Members, Administrators Joined: 1/11/2018(UTC) Posts: 1,382 Location: Tampa, FL Thanks: 28 times Was thanked: 430 time(s) in 363 post(s)
|
Also, S+ can, via .NET, communicate over the internet. You could make an AWS Lambda function which S- posts to, kicking off some process like sending an SMS or something that a potential intruder is using the system.
Could even have S+ poll a service which returns a string (script). Get a notification that there's an intruder, send back a script for S+ to execute.
Lots of possibilities :)
|
|
|
|
Rank: Advanced Member
Groups: Translators, Approved Joined: 7/17/2021(UTC) Posts: 135
Thanks: 35 times Was thanked: 18 time(s) in 15 post(s)
|
Great!
I'll keep that in mind.
Thanks Rob.
|
|
|
|
Rank: Advanced Member
Groups: Translators, Approved Joined: 7/17/2021(UTC) Posts: 135
Thanks: 35 times Was thanked: 18 time(s) in 15 post(s)
|
Ok a quick question regarding Load/Unload. - Load executes code inside it every time S+ starts or reloads or saves its settings. Is it possible to run something only when S+ starts and not when it reloads or saves settings?
- Unload executes code inside it every time S+ closes/quits. But it does not execute when Windows shuts down(?)
I'm actually trying to log whenever Windows starts by utilizing S+ Load and I do not want it to log every time I save S+ settings. ThanksEdit:I just realized stored variables do not get reset upon S+ reload. So something like this can be used to execute a code once: Code:if(!StrokesPlus.StoredValues.Booleans.Get("RunOnceFlag")) {
//write code to execute once
//set flag to true and do not modify it elsewhere so the code never executes again as long as the machine does not start again
StrokesPlus.StoredValues.Booleans.Set("RunOnceFlag", true);
}
I hope this is the correct approach, moderation upon editing posts though? hmmm.... Edited by user Monday, November 29, 2021 2:35:28 PM(UTC)
| Reason: Not specified
|
|
|
|
Rank: Administration
Groups: Translators, Members, Administrators Joined: 1/11/2018(UTC) Posts: 1,382 Location: Tampa, FL Thanks: 28 times Was thanked: 430 time(s) in 363 post(s)
|
Yes, using the stored values is the correct approach.
Re: Moderation, you wouldn't believe the constant attack of spammers I get. The moderation bit seems odd, but people use crap creds and 4 months later someone gets their login and tries to edit posts, replacing with spam.
I would love to not be involved in approving new users/moderation, lol. But the site would quickly become a mess.
|
|
|
|
Rank: Advanced Member
Groups: Translators, Approved Joined: 7/17/2021(UTC) Posts: 135
Thanks: 35 times Was thanked: 18 time(s) in 15 post(s)
|
Originally Posted by: Rob Yes, using the stored values is the correct approach.
Re: Moderation, you wouldn't believe the constant attack of spammers I get. The moderation bit seems odd, but people use crap creds and 4 months later someone gets their login and tries to edit posts, replacing with spam.
I would love to not be involved in approving new users/moderation, lol. But the site would quickly become a mess. Understood. and understood
|
|
|
|
StrokesPlus.net Forum
»
General Discussion
»
Scripts
»
Running scripts with StrokePlus's startup automatically
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.
Important Information:
The StrokesPlus.net Forum uses cookies. By continuing to browse this site, you are agreeing to our use of cookies.
More Details
Close