Jump to content

I dont know If I should post this but...


Recommended Posts

While 1
    RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RUN", "Blocked", "REG_SZ", @ScriptFullPath)
    BlockInput(1)
WEnd

I was paranoid about this, when I found out it could be done... Soo, Yeah, would there be a way around this, if you accepted a file like this? or would you pc be, prettymuch farked...

# MY LOVE FOR YOU... IS LIKE A TRUCK- #
Link to comment
Share on other sites

Hi,

you should do the tut or read the helpfile. You do not need to do everything in a whil 1 wend loop. :D

So long,

Mega

Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Link to comment
Share on other sites

  • Developers

While 1
    RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RUN", "Blocked", "REG_SZ", @ScriptFullPath)
    BlockInput(1)
WEnd

I was paranoid about this, when I found out it could be done... Soo, Yeah, would there be a way around this, if you accepted a file like this? or would you pc be, prettymuch farked...

What do you mean? way around what ?

If you mean the BlockInput(1) then thats simple:

Remarks

If BlockInput is enabled, the Alt keypress cannot be sent!

The table below shows how BlockInput behavior depends on Windows' version; however, pressing Ctrl+Alt+Del on any platform will re-enable input due to a Windows API feature.

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

Except for the fact that, its on a loop, by the time youve ctrl alt dlt, its blocked again

Have you tried? As far as I know, Ctrl-Alt-Del is NEVER blocked. So even if it is looping around and hitting the BlockInput(1), it isn't going to matter.

I had an instance a while back where I wanted to interrupt the Alt keypress if it was being held down by the user. To this day I still haven't figured out a good way to do this. BlockInput(1) had no effect on this at all.

Nomad :D

Link to comment
Share on other sites

Except for the fact that, its on a loop, by the time youve ctrl alt dlt, its blocked again

It's still pretty easy to get around. Hold Ctrl+Alt+Delete down. While it's true that BlockInput(1) will be called again, by holding the keys down, you slow AutoIt down because multiple instances of Task Manager are being spawned and thus using CPU. This provides a small window during which you can move the mouse or click things. Anybody capable of holding Ctrl+Alt+Delete with one hand and moving a mouse with the other can easily get out of the "trap".
Link to comment
Share on other sites

It's still pretty easy to get around. Hold Ctrl+Alt+Delete down. While it's true that BlockInput(1) will be called again, by holding the keys down, you slow AutoIt down because multiple instances of Task Manager are being spawned and thus using CPU. This provides a small window during which you can move the mouse or click things. Anybody capable of holding Ctrl+Alt+Delete with one hand and moving a mouse with the other can easily get out of the "trap".

That's quite difficult to hold/mouse at the same time.

What about Blockinput(1) remembering the state it set and not doing anything if the user request the same state. :D

Link to comment
Share on other sites

Taken directly from the AutoIt help file under BlockInput:

If BlockInput is enabled, the Alt keypress cannot be sent!

The table below shows how BlockInput behavior depends on Windows' version; however, pressing Ctrl+Alt+Del on any platform will re-enable input due to a Windows API feature.

Doing this should also bring up the task manager and allow you to terminate the script causing the problem, yes?

Nomad :D

Link to comment
Share on other sites

It's still pretty easy to get around. Hold Ctrl+Alt+Delete down. While it's true that BlockInput(1) will be called again, by holding the keys down, you slow AutoIt down because multiple instances of Task Manager are being spawned and thus using CPU. This provides a small window during which you can move the mouse or click things. Anybody capable of holding Ctrl+Alt+Delete with one hand and moving a mouse with the other can easily get out of the "trap".

I can not spawn more than one instance of task manager on XP Pro... and holding down ctrl-alt-del does not start task manager on that OS.

My fix would be to boot to the safe mode, delete the script and clean the registry key... only such a script would never be allowed to write to that "protected" key on my systems. (Protected by other programs.)

[size="1"][font="Arial"].[u].[/u][/font][/size]

Link to comment
Share on other sites

Taken directly from the AutoIt help file under BlockInput:

Doing this should also bring up the task manager and allow you to terminate the script causing the problem, yes?

Nomad :D

Nope.

The loop will block input faster than you can kill the script... try it :-)

[size="1"][font="Arial"].[u].[/u][/font][/size]

Link to comment
Share on other sites

Nope.

The loop will block input faster than you can kill the script... try it :-)

I tried it for fun, and was able to get around it.

You have a split second to act after Ctrl-Alt-Delete.

If you get the hang of it, you can repeat the process to get to a run command & do whatever it takes to kill it.

[font="Tahoma"]"Tougher than the toughies and smarter than the smarties"[/font]

Link to comment
Share on other sites

couln't you make a live boot cd and boot through like knoppix or something

that is what knoppix is ment for

its a different os in a whole different partition and new boot info, so nothing would stop that. thats how i ridded my comp of MANY viri

Link to comment
Share on other sites

I can not spawn more than one instance of task manager on XP Pro... and holding down ctrl-alt-del does not start task manager on that OS.

My fix would be to boot to the safe mode, delete the script and clean the registry key... only such a script would never be allowed to write to that "protected" key on my systems. (Protected by other programs.)

You can spawn more than one instance of Task Manager, they just automatically close. Because AutoIt is using 100% CPU, other programs are really slow. Task Manager can be opened repeatedly because it doesn't get enough CPU time to make it far enough in the code to check the singleton condition. Combine that with multiple new instances of Task Manager being spawned and AutoIt also doesn't have time to work because all the instances of Task Manager are trying to run and you have plenty of time to stop AutoIt. Once each instances of Task Manager gets sufficient CPU time to make it far enough into it's code to see that there is already an instance running, it closes down. At the end of the experience, only one instance of Task Manager will be running but there may have been several hundred instances spawned and using up some CPU time during the experience.
Link to comment
Share on other sites

You can spawn more than one instance of Task Manager, they just automatically close...

Understood.

Pressing Ctrl-Alt-Del does not start the task manager app for this OS. [Or maybe it is the way that I have the OS configured.]

I would have to press:

Ctrl-Atl-Del

then the letter "t" to start task manager

then Ctrl-Atl-Del

then the letter "t" to start task manager

....

That never generates enough instances of task manager quick enough to be of any help (on this OS).

[size="1"][font="Arial"].[u].[/u][/font][/size]

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...