0xthirteen / sharprdp Goto Github PK
View Code? Open in Web Editor NEWRemote Desktop Protocol .NET Console Application for Authenticated Command Execution
License: BSD 3-Clause "New" or "Revised" License
Remote Desktop Protocol .NET Console Application for Authenticated Command Execution
License: BSD 3-Clause "New" or "Revised" License
Attempted to execute from Windows 2008 R2 server, but it appears it won't send special characters (eg. shift, Windows key), so it doesn't execute anything. It is able to still send normal letters though.
I did have to change AxMsRdpClient9NotSafeForScripting
to AxMsRdpClient6NotSafeForScripting
, as it's latest supported version on Server 2008. Also tried changing other settings with no success.
Is that possible rdpsharp just paste the command instead of virtual type the command.
For example, cmd / c, the spcace after cmd will turn cmd into other word under non English input method, so the command will not correctly executed.
Just wondering if this tool will kick users out of their sessions on desktop OS's?
On a french version of Windows with keyboard in French, key sent are sent like on a QWERTY keyboard.
Can you give the source of the harcoded key values ? What I was able to find with a quick search do not match with your values (like here)
I was thinking to add another argument to specify the language of the targeted system in order to use the appropriate keymap.
I've been experimenting with this in my lab, and among some of the issues that I've encountered (not properly sending =
, '
, or "
, for example) I have tried to switch to having it execute Powershell with Base64 encoded commands. However, since it doesn't preserve case of the commands, the information in the encoded command is garbled.
For example, if I try the following: sharprdp.exe computername=<targetcomputer> exec=cmd command="powershell -enc c3RhcnQtcHJvY2VzcyAiY21kIiAtdmVyYiBydW5hcyAtYXJndW1lbnRsaXN0ICIvayIsIm5ldCB1c2VyIGJsdXJmYSBibHVyZmEgL2RvbWFpbiAvYWRkIg=="
It tries to run powershell -enc c3rhcnqtchjvy2vzcyaiy21kiiatdmvyyibydw5hcyatyxjndw1lbnrsaxn0icivayisim5ldcb1c2vyigjsdxjmysbibhvyzmegl2rvbwfpbiavywrkig==
but the ASCII equivalent of that base64 string is szárz.r.ïËkós&¢Ëmd.&.vkòÊ&òw.as&.Ë.çw enzìk.ô.ȯk(¬.neuÆõskò..ìw.æÊÆân.òÎg .jïo.én&¯Ë ä.
whereas the ASCII equivalent of the original command is start-process "cmd" -verb runas -argumentlist "/k","net user blurfa blurfa /domain /add"
hello, thanks for sharing the tool, I get this problem once I start building the code:
"C:\temp\SharpRDP\SharpRDP\SharpRDP.sln" (default target) (1) ->
"C:\temp\SharpRDP\SharpRDP\SharpRDP\SharpRDP.csproj" (default target) (2) ->
(CoreCompile target) ->
Client.cs(8,7): error CS0246: The type or namespace name 'AxMSTSCLib' could not be found (are you missing a using dir
ective or an assembly reference?) [C:\temp\SharpRDP\SharpRDP\SharpRDP\SharpRDP.csproj]
Client.cs(104,65): error CS0246: The type or namespace name 'IMsTscAxEvents_OnLogonErrorEvent' could not be found (ar
e you missing a using directive or an assembly reference?) [C:\temp\SharpRDP\SharpRDP\SharpRDP\SharpRDP.csproj]
Client.cs(197,67): error CS0246: The type or namespace name 'IMsTscAxEvents_OnDisconnectedEvent' could not be found (
are you missing a using directive or an assembly reference?) [C:\temp\SharpRDP\SharpRDP\SharpRDP\SharpRDP.csproj]
64 Warning(s)
3 Error(s)
using Vstudio2019 command line but either with VStudio2017 I get the same error on Client.cs at this point:
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
--> using AxMSTSCLib; <--
using MSTSCLib;
thanks
Adding the following line to client.cs will enable drive redirection.
rdpConnection.AdvancedSettings5.RedirectDrives = true;
Would probably be a good thing to have that as an optional flag.
I tried compiling SharpRDP on Windows 7 with Visual Studio 2019 and received the following errors:
Severity Code Description Project File Line Suppression State
Error CS0246 The type or namespace name 'IMsRdpExtendedSettings' could not be found (are you missing a using directive or an assembly reference?) SharpRDP C:\Users\sunny\Projects\SharpRDP\SharpRDP\SharpRDP\Client.cs 62 Active
Second Error:
Severity Code Description Project File Line Suppression State
Error CS7069 Reference to type 'IMsRdpClientAdvancedSettings8' claims it is defined in 'Interop.MSTSCLib', but it could not be found SharpRDP C:\Users\sunny\Projects\SharpRDP\SharpRDP\SharpRDP\Client.cs 68 Active
I added the C:\Users\sunny\Projects\SharpRDP\SharpRDP\ to to my Reference Paths. Do I need to take any extra steps to successfully compile SharpRDP?
Commit: f312f89 (latest as of writing)
Any guidance/suggestions would be greatly appreciated. Thanks!
Connect first host drives
SharpRDP.exe computername=domain.target command="\tsclient\C\Temp\putty.exe" username=domain\user password=password connectdrive=true
nothing happend..no process started (putty exe stored on C:\Temp\putty.exe on 1st pc)
help plz
Hi ... nice tool :-)
Tried this on standard W10 install ... works well.
But on enterprise environment (AD managed and configured) I get following error :
8455 - SL_ERR_FRESH_CRED_REQUIRED_BY_SERVER
Quick check:
https://docs.microsoft.com/en-us/windows/win32/termserv/imstscaxevents-ondisconnected
"The server authentication policy does not allow connection requests using saved credentials. The user must enter new credentials"
I tried to disable GPO using procedures similar to this:
http://woshub.com/fix-saved-rdp-credentials-windows/
No success ...
Since password is provided in command line I'm not sure why "saved credential?" issue pops-up.
Possible BUG ?
Just FYI ... normal RDP works fine,so creds and connections are OK ...
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.