[PR #232] [MERGED] Remote shell fixes #1058

Closed
opened 2026-02-27 15:52:57 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/quasar/Quasar/pull/232
Author: @yankejustin
Created: 5/27/2015
Status: Merged
Merged: 5/27/2015
Merged by: @MaxXor

Base: masterHead: RemoteShellFix


📝 Commits (9)

  • 690dcc3 Merge pull request #16 from MaxXor/master
  • 2e761af Fixed Remote Shell Flickering
  • be78162 Changes to output handling of commands
  • 5c4525e Changes to Dispose(bool)
  • 007296e Changed how exiting is determined
  • 39a717c Correctly colorize errors
  • 320172a Perfected handling of exiting
  • d402d78 Fixed client breaking on shell close
  • 9bddb0f Initialize ManualResetEvents in the constructor

📊 Changes

6 files changed (+169 additions, -23 deletions)

View changed files

📝 Client/Core/Packets/ClientPackets/ShellCommandResponse.cs (+5 -1)
📝 Client/Core/RemoteShell/Shell.cs (+113 -12)
📝 Server/Core/Commands/MiscHandler.cs (+12 -1)
📝 Server/Core/Packets/ClientPackets/ShellCommandResponse.cs (+5 -1)
📝 Server/Forms/FrmRemoteShell.Designer.cs (+3 -3)
📝 Server/Forms/FrmRemoteShell.cs (+31 -5)

📄 Description

Fixes

1. Remote Shell Form is now set to double-buffered. - Fixes an issue with the Remote Shell Form flickering. 2. Handling "exit" commands. - No longer directly sends an "exit" command to the client because this.Close() is called. In such context, the Remote Shell Form is closed. The Remote Shell Form is subscribed to an event that will send an "exit" command to the client when the Remote Shell Form is closing. There is no need to send two "exit" commands. 3. The output TextBox for the Remote Shell Form is now a RichTextBox. - Allows correct colorization of appended text.

Changes

1. Handling "exit" commands. - Changed how it is handled: correctly parsed from a command and handled correctly. 2. Dispose(bool). - Dispose(bool) should not suppress finalization. Finalization suppression should be determined by Dispose(). - Now disposes of the new ManualResetEvent objects.

Additions

1. Added a property to RemoteShellCommandResponse (IsError). - This new property denotes how it should be handled: it the RemoteShellCommand responded with an error (IsError = true), we should print it differently (red). 2. Added an interface (IRemoteShell) for the RemoteShellForm. - Provides methods to use specifically for printing regular messages or errors. - More readable. - By routing all of the output messages and error messages to the same spot, changing or extending on these features are significantly easier. 3. Multi-threaded output chaining. - Created new thread that handles the output of errors in the shell. - Added a new method that queues up the threads used to chain the two different outputs together.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/quasar/Quasar/pull/232 **Author:** [@yankejustin](https://github.com/yankejustin) **Created:** 5/27/2015 **Status:** ✅ Merged **Merged:** 5/27/2015 **Merged by:** [@MaxXor](https://github.com/MaxXor) **Base:** `master` ← **Head:** `RemoteShellFix` --- ### 📝 Commits (9) - [`690dcc3`](https://github.com/quasar/Quasar/commit/690dcc33e1548329e6590adfee712684a95d8cda) Merge pull request #16 from MaxXor/master - [`2e761af`](https://github.com/quasar/Quasar/commit/2e761af6f166bf9a0bce616e7d45348c6c9e0aae) Fixed Remote Shell Flickering - [`be78162`](https://github.com/quasar/Quasar/commit/be78162f633f61e659f436f2d72b4b66d72ab5fb) Changes to output handling of commands - [`5c4525e`](https://github.com/quasar/Quasar/commit/5c4525eb692e658031373d2c35b08e5b6779d124) Changes to Dispose(bool) - [`007296e`](https://github.com/quasar/Quasar/commit/007296e24c8a493f0a3febc872f80938ac4cb162) Changed how exiting is determined - [`39a717c`](https://github.com/quasar/Quasar/commit/39a717c6268d51016ab972c1359337edd035c8d9) Correctly colorize errors - [`320172a`](https://github.com/quasar/Quasar/commit/320172a12642674a1e4095cef3f1acc0be87b123) Perfected handling of exiting - [`d402d78`](https://github.com/quasar/Quasar/commit/d402d7833fada828ee948ec4c4fd69b544191854) Fixed client breaking on shell close - [`9bddb0f`](https://github.com/quasar/Quasar/commit/9bddb0ffd5537672c2e7de68cb77155e8389109b) Initialize ManualResetEvents in the constructor ### 📊 Changes **6 files changed** (+169 additions, -23 deletions) <details> <summary>View changed files</summary> 📝 `Client/Core/Packets/ClientPackets/ShellCommandResponse.cs` (+5 -1) 📝 `Client/Core/RemoteShell/Shell.cs` (+113 -12) 📝 `Server/Core/Commands/MiscHandler.cs` (+12 -1) 📝 `Server/Core/Packets/ClientPackets/ShellCommandResponse.cs` (+5 -1) 📝 `Server/Forms/FrmRemoteShell.Designer.cs` (+3 -3) 📝 `Server/Forms/FrmRemoteShell.cs` (+31 -5) </details> ### 📄 Description <h1>Fixes</h1> 1. Remote Shell Form is now set to double-buffered. - Fixes an issue with the Remote Shell Form flickering. 2. Handling "exit" commands. - No longer directly sends an "exit" command to the client because <code>this.Close()</code> is called. In such context, the Remote Shell Form is closed. The Remote Shell Form is subscribed to an event that will send an "exit" command to the client when the Remote Shell Form is closing. There is no need to send two "exit" commands. 3. The output TextBox for the Remote Shell Form is now a <code>RichTextBox</code>. - Allows correct colorization of appended text. <h1>Changes</h1> 1. Handling "exit" commands. - Changed how it is handled: correctly parsed from a command and handled correctly. 2. <code>Dispose(bool)</code>. - <code>Dispose(bool)</code> should not suppress finalization. Finalization suppression should be determined by <code>Dispose()</code>. - Now disposes of the new <code>ManualResetEvent</code> objects. <h1>Additions</h1> 1. Added a property to RemoteShellCommandResponse (IsError). - This new property denotes how it should be handled: it the RemoteShellCommand responded with an error (IsError = true), we should print it differently (red). 2. Added an interface (<code>IRemoteShell</code>) for the RemoteShellForm. - Provides methods to use specifically for printing regular messages or errors. - More readable. - By routing all of the output messages and error messages to the same spot, changing or extending on these features are significantly easier. 3. Multi-threaded output chaining. - Created new thread that handles the output of errors in the shell. - Added a new method that queues up the threads used to chain the two different outputs together. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 15:52:57 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/Quasar#1058
No description provided.