PDA

View Full Version : Botting on official client [without taking over I/O units]



slacky
03-28-2018, 07:45 PM
https://i.imgur.com/29pX26G.png
Here's a short simple tutorial for how to run any kind of script, be that for OSRS, NXT, or any other game you can automate, without the script taking control over keyboard or mouse, and it's quite simple, and not particularly resource hungry. And in fact it's half-way shipped with windows already.

This will also allow you to run multiple accounts / bots at once, while you use your PC, and as mentioned there is very little overhead in going this route, nothing compared to running a virtual machine.

To start, you must install the following tool: https://github.com/stascorp/rdpwrap/releases
It allows us to run a host, and a client at the same time so that we can connect to our own PC.

Now that's done, what you wanna do is to create a new user (https://villavu.com/forum/showthread.php?t=118173&p=1391327#2) (might need it to be administrator for access to content owned by your main user). See the second post in this tutorial for a step by step.

Using RDP:


Go to start menu, look/search for "Remote Desktop Connection"

Start it, and select "Show options"
https://i.imgur.com/BBLch95.png

Fill in account name for the account we just created
https://i.imgur.com/89ARWBD.png

Click "Connect" and fill in your password




That's it, you should now have a window pop up that remotely is logged into your new user account, which you can bot on.

Notes:

Just use the same Simba install for every bot (usually `C:/Simba/Simba.exe`), there's no issue there. So you only have to setup Simba once.
There may be some limitations related to what version of Windows you use, I have no looked into it.
RDPWrap (the tool linked above) might need to be reinstalled after major windows updates.
Minimizing the window will block I/O, here's an alt fix shared by olly:

1. Run the regedit.exe tool.
2. Find the registry key HKEY_LOCAL_MACHINE\Software\Microsoft\Terminal Server Client.
3. Create a DWORD value with the name RemoteDesktop_SuppressWhenMinimized and set its value to 2.
4. Find the registry key HKEY_LOCAL_MACHINE\Software\Wow6432Node\Microsoft\ Terminal Server Client.
5. Create a DWORD value with the name RemoteDesktop_SuppressWhenMinimized and set its value to 2.
6. Close the regedit.exe tool.

slacky
03-28-2018, 07:46 PM
How to setup a new administrator user:


Go to `Control Panel\User Accounts\User Accounts\Manage Accounts` and select "Add new user"
https://i.imgur.com/h2Y3XR5.png
.
Within the "Family & other people" window you select "Add someone else to this PC"
https://i.imgur.com/cuEmWO9.png
.
Select "I don't have this person's sign-in information"
https://i.imgur.com/zQqTs5T.png
.
Select "Add a user without Microsoft account"
https://i.imgur.com/DZCUQju.png
.
Enter the userdetails of your choosing - password is needed.
https://i.imgur.com/9zixBAO.png
.
Finally, you can now change the account type to admin, by clicking the account, and selecting "Change account type"
https://i.imgur.com/134nSn7.png

P1nky
03-28-2018, 08:16 PM
Thank you for this! Rep+

StickToTheScript
03-28-2018, 10:37 PM
Been doing this for a while! It has been fantastic! Great tutorial!

Dan the man
03-29-2018, 12:38 AM
DO you have to have the RDT window open for this to work properly?

I have a bot running and I notice that when I minimize it, the bot doesn't do anything.

slacky
03-29-2018, 12:52 AM
DO you have to have the RDT window open for this to work properly?

I have a bot running and I notice that when I minimize it, the bot doesn't do anything.
Yeah, once minimized it seems a signal is sent that blocks all I/O methods. You could probably drag it off screen tho, I just usually make the window really small :p

On a rare occasion the issue you spotted will happen out of the blue as well.. has only happened a couple of times to me in all the time I've used it.

Dan the man
03-29-2018, 12:58 AM
Yeah, once minimized it seems a signal is sent that blocks all I/O methods. You could probably drag it off screen tho, I just usually make the window really small :p

On a rare occasion the issue you spotted will happen out of the blue as well.. has only happened a couple of times to me in all the time I've used it.

Good to hear it isn't just me!

Thanks for the guide; always thought you had to use VMware in order to do this. :D

Olly
03-29-2018, 01:28 AM
DO you have to have the RDT window open for this to work properly?

I have a bot running and I notice that when I minimize it, the bot doesn't do anything.

Try this:


1. Run the regedit.exe tool.
2. Find the registry key HKEY_LOCAL_MACHINE\Software\Microsoft\Terminal Server Client.
3. Create a DWORD value with the name RemoteDesktop_SuppressWhenMinimized and set its value to 2.
4. Find the registry key HKEY_LOCAL_MACHINE\Software\Wow6432Node\Microsoft\ Terminal Server Client.
5. Create a DWORD value with the name RemoteDesktop_SuppressWhenMinimized and set its value to 2.
6. Close the regedit.exe tool.

Dan the man
03-29-2018, 01:36 AM
Try this:


1. Run the regedit.exe tool.
2. Find the registry key HKEY_LOCAL_MACHINE\Software\Microsoft\Terminal Server Client.
3. Create a DWORD value with the name RemoteDesktop_SuppressWhenMinimized and set its value to 2.
4. Find the registry key HKEY_LOCAL_MACHINE\Software\Wow6432Node\Microsoft\ Terminal Server Client.
5. Create a DWORD value with the name RemoteDesktop_SuppressWhenMinimized and set its value to 2.
6. Close the regedit.exe tool.

That appears to be working :)

Brandon
03-29-2018, 02:32 AM
I wonder if this would work with Hyper-V..

deejaay
03-29-2018, 10:46 AM
This is amazing, thank you. If only I could get a VPN to run on that user without connecting my main user to it :P. Guess I'll just have to stick to using proxies.

sillyfrog
03-30-2018, 01:52 AM
that's bad ass! thanks for sharing.

wedmarco
03-30-2018, 04:20 AM
This is sick! Thanks for sharing!

Dan the man
03-30-2018, 04:55 AM
Try this:


1. Run the regedit.exe tool.
2. Find the registry key HKEY_LOCAL_MACHINE\Software\Microsoft\Terminal Server Client.
3. Create a DWORD value with the name RemoteDesktop_SuppressWhenMinimized and set its value to 2.
4. Find the registry key HKEY_LOCAL_MACHINE\Software\Wow6432Node\Microsoft\ Terminal Server Client.
5. Create a DWORD value with the name RemoteDesktop_SuppressWhenMinimized and set its value to 2.
6. Close the regedit.exe tool.

slacky you should look at adding this little snippet to the OP as well. Found it very useful to be able to minimize RDT.

slacky
03-30-2018, 07:26 AM
slacky you should look at adding this little snippet to the OP as well. Found it very useful to be able to minimize RDT.
It's already linked in the op, and the post itself is early on the first page of the thread, so that alone makes it easier to spot.
Edit, added the fix itself in the notes section..

R0b0t1
04-04-2018, 01:55 AM
I wonder if this would work with Hyper-V..

Yes, but with more overhead. A new Terminal Services session is only a couple of MB. An OS instance would be much larger (hundreds of MB to a few GB).

Really we should be moving away from Windows.

JSmooth
04-15-2018, 07:17 AM
What is the advantage of this over SMART - rather, is the use for when SMART is not supported, such as an RSPS or otherwise?

slacky
04-16-2018, 08:44 PM
What is the advantage of this over SMART - rather, is the use for when SMART is not supported, such as an RSPS or otherwise?
There exists much skepticism around SMART, how it could increase the odds of receiving a ban, so this gives you a an alternative, and yes also gives you a way for all those cases where SMART isn't an option, including RS3 with NXT client.

PS: This thread is not for discussing ban rates, there are many other threads for that, refer yourself to those for such talks.

bg5
05-05-2018, 04:37 PM
Is this tool Win 10 only ?
Or more precisely - would it work on win 7 ?

Brandon
05-07-2018, 12:10 AM
Is this tool Win 10 only ?
Or more precisely - would it work on win 7 ?

It's Remote Desktop.. It will work on all windows versions >= XP SP3. Otherwise RemoteDesktop_SuppressWhenMinimized will not work.

oscar1994
05-08-2018, 07:48 AM
Thx for sharing this tutorial :sasmokin:

shiftlid
05-16-2018, 06:34 AM
Interesting approach, thanks for the share.

bg5
06-16-2018, 01:15 PM
Wow, it's one of the best thing I've seen here in years! Amazing!

So in Windows Remote Desktop remote I/O is treated like native ?

But do you know if you run Simba inside the REM it's input is also treated like real mouse/keyboard ? ( no LLKHF_INJECTED / LLKHF_LOWER_IL_INJECTED flags )

slacky
06-17-2018, 12:31 AM
Wow, it's one of the best thing I've seen here in years! Amazing!

So in Windows Remote Desktop remote I/O is treated like native ?

But do you know if you run Simba inside the REM it's input is also treated like real mouse/keyboard ? ( no LLKHF_INJECTED / LLKHF_LOWER_IL_INJECTED flags )
The clicks are still emulated if they are generated from within that instance. If you pass emulated clicks from your desktop into that remote window, then.. who knows.

Citrus
06-17-2018, 02:59 AM
If you pass emulated clicks from your desktop into that remote window, then.. who knows.

Everything [sent to the remote window] is seen as hardware input.

slacky
06-17-2018, 03:36 AM
Everything is seen as hardware input.
even emulated clicks generated from within? Well, that's cool I guess.

Citrus
06-17-2018, 05:01 AM
even emulated clicks generated from within? Well, that's cool I guess.

No, I meant anything sent to the remote window. SendInput, PostMessage, etc.

slacky
06-17-2018, 09:57 AM
No, I meant anything sent to the remote window. SendInput, PostMessage, etc.
Then I follow, and pretty much what I expected.

imalama101
06-21-2018, 01:24 AM
Wait do I not have to use the rdp checker exe to run rdpwrapper? This gives me a tiny window to work in, if I could just use the regular Remote desktop connection built into the computer that would be great. Is that a thing? I get the error "your computer could not connect to another console session on the remote computer because you already have a console session in progress. Help please

slacky
06-21-2018, 04:11 PM
Wait do I not have to use the rdp checker exe to run rdpwrapper? This gives me a tiny window to work in, if I could just use the regular Remote desktop connection built into the computer that would be great. Is that a thing? I get the error "your computer could not connect to another console session on the remote computer because you already have a console session in progress. Help please
You just have to run the installer, to "patch" it, and that's it. Now you can use RDC as usual, as it says in the tutorial.

imalama101
06-21-2018, 04:28 PM
I think my problem is that I was trying to use my computers ip and not 127.0.0.2, this is what I am supposed to use right?

slacky
06-21-2018, 04:35 PM
I think my problem is that I was trying to use my computers ip and not 127.0.0.2, this is what I am supposed to use right?
Mhm.

Thomas
12-25-2018, 11:01 AM
Has anyone been using this with NXT? Care 2 share experiences?

alar82
12-26-2018, 06:29 AM
For me opengl mode crashes. Compatibility mode works.

Thomas
12-29-2019, 12:50 PM
For me opengl mode crashes. Compatibility mode works.

Are you still able to do this on the latest Windows 10 update? Because it seems they drop support on updating RDP Wrap

alar82
12-29-2019, 06:28 PM
Are you still able to do this on the latest Windows 10 update? Because it seems they drop support on updating RDP Wrap

Yea looking at github it seems that owner of that project isn't interested updating it. So it no longer works.

chief herb
01-07-2020, 02:49 AM
do you know any other way this is still possible? been looking for something like this!

Dan the man
01-07-2020, 05:07 AM
I still use this. Need to manually update it though; can be a pain in the ass the first time.

Dan the man
02-18-2020, 04:37 AM
Ok so I have had a few people message me asking how to make this work again, so I have decided to write a guide on how to update it.
This guide will assume you have followed Slacky's install guide already, and you are just wanting to fix it.

Video tutorial:

https://www.youtube.com/watch?v=Pm-kjKdEfdA&t

Written tutorial:

If you don't already have the archieve folder, download it from here: https://github.com/stascorp/rdpwrap/releases
You want the zip files, not the msi file.

Open the zip file to view its contents, and you should see 6 files - a mixture of executable and bat files.

https://i.imgur.com/vKgQwrt.png

Open RDPConf.exe and you will be presented with a screen that looks like this:

https://i.imgur.com/V9IVD64.png

Notethat it says [not supported] under the version. If all text is green, then this guide won't fix your issue, otherwise continue on.
Be sure to note down the version number of the client. In this case it is 10.0.18362.657. This is important and we will need the information later.

Close this interface and open up a command prompt window (run it as an administrator). To do this in Windows 10, Go to start, type cmd, then right click on Command Prompt program and run as administrator.
Type or copy the following into the command prompt:

net stop TermService
You will get something that looks like this:

https://i.imgur.com/Fh9fvQX.png

Press Y, then enter to confirm. This will stop the TermService program.

Now that TermService is closed, we need to find the code to patch the ini file. The easiest way is to google "RDP update <ver>", or in this example "RDP update 10.0.18362.657". There is usually a relevant link to the github, where someone has raised the issue and someone has posted a fix. In this case, someone has raised the issue and posted the fix in the same post: https://github.com/stascorp/rdpwrap/issues/983.
You are after 2x blocks of code that are formatted like:

[10.0.18362.657]
LocalOnlyPatch.x86=1
LocalOnlyOffset.x86=B7D06
LocalOnlyCode.x86=jmpshort
LocalOnlyPatch.x64=1
LocalOnlyOffset.x64=82FB5
LocalOnlyCode.x64=jmpshort
SingleUserPatch.x86=1
SingleUserOffset.x86=50535
SingleUserCode.x86=nop
SingleUserPatch.x64=1
SingleUserOffset.x64=0DBFC
SingleUserCode.x64=Zero
DefPolicyPatch.x86=1
DefPolicyOffset.x86=50269
DefPolicyCode.x86=CDefPolicy_Query_eax_ecx
DefPolicyPatch.x64=1
DefPolicyOffset.x64=1FE15
DefPolicyCode.x64=CDefPolicy_Query_eax_rcx
SLInitHook.x86=1
SLInitOffset.x86=5A77A
SLInitFunc.x86=New_CSLQuery_Initialize
SLInitHook.x64=1
SLInitOffset.x64=22DDC
SLInitFunc.x64=New_CSLQuery_Initialize

[10.0.18362.657-SLInit]
bInitialized.x86 =D577C
bServerSku.x86 =D5780
lMaxUserSessions.x86 =D5784
bAppServerAllowed.x86 =D578C
bRemoteConnAllowed.x86=D5790
bMultimonAllowed.x86 =D5794
ulMaxDebugSessions.x86=D5798
bFUSEnabled.x86 =D579C
bInitialized.x64 =F6A8C
bServerSku.x64 =F6A90
lMaxUserSessions.x64 =F6A94
bAppServerAllowed.x64 =F6A9C
bRemoteConnAllowed.x64=F6AA0
bMultimonAllowed.x64 =F6AA4
ulMaxDebugSessions.x64=F6AA8
bFUSEnabled.x64 =F6AAC


As you can see, the title of each block is relevant to your RDP version.

Now that we have found our updated code, we need to update the RDP ini file. It is generally located in c:/program files/RDP Wrapper/. Open rdpwrap.ini and edit it in notepad or your text editor of choice.
If you are not able to edit the ini file, or save it, you may need to assign ownership of the file to yourself, or create a copy of it with the fix applied, and overwrite the old one in the RDP Wrapper directory. Assigning ownership is done by right clicking on the file > properties > Security > Advanced and at the top you will see Name and Owner. I assigned Everyone as the owner to make it simplier, but if you are more security conscious that me, do it against your user.

https://i.imgur.com/HVj8Syw.png

https://i.imgur.com/twH9MTi.png

With your ini file open, scroll to the very bottom line and insert your 2 blocks of code. Be sure to leave a line separating the previous blocks, and REMEMBER TO LEAVE A BLANK LINE AT THE END.

https://i.imgur.com/1xAWnWu.png

Save the file and close it. Again, if you have issues saving it, follow the above guide or google folder permissions in Windows 10.
Now that our file is saved, we want to start the TermService client again. To do this, open up a command prompt and run it as an administrator (follow the same process from step 4). Type or copy the following line into the Command Prompt:

Net Start TermService

This should restart your TermService.

Go back to the RDP Wrap archieve file and open it again (if its not still open) and run the RDPConf.exe as demonstrated in step 3. There should now be text showing [fully supported] like so:

https://i.imgur.com/FsKrTDC.png

If you don't see the text, then you have done something wrong, or there is a deeper issue with your RDP wrap installation.

Restart your PC for the changes to properly take effect, then attempt to open another RDP session again. You should no longer get the error "the number of connections to this computer is limited and all connections are in use right now".


FOOT NOTE: If you are having issues with your windows profiles not appearing/giving you the incorrect credential error when using 127.0.0.2, then use 127.0.0.3 as your connection address instead.

Hope this helps!

lostralian
03-04-2020, 07:35 AM
thanks Slacky and DantheMan for the adjustments.

Kristiaan
06-24-2020, 11:56 AM
With me it says "listener State: Not Listening" aswell as "Not Supported".

alar82
01-05-2021, 07:14 PM
With me it says "listener State: Not Listening" aswell as "Not Supported".

Use autoupdater to update it. https://github.com/asmtron/rdpwrap/blob/master/binary-download.md
Works fine.

footballjds
01-18-2021, 04:23 PM
With me it says "listener State: Not Listening" aswell as "Not Supported".


Use autoupdater to update it. https://github.com/asmtron/rdpwrap/blob/master/binary-download.md
Works fine.

I was able to follow Slacky's updated guide and your advice about the update.bat

Here's the key info:

https://github.com/asmtron/rdpwrap/blob/master/binary-download.md


INSTALL of RDP Wrapper and Autoupdater

Download "RDPWrap-v1.6.2.zip" LINK#1 or LINK#2 and extract all files to the "%ProgramFiles%\RDP Wrapper" directory

DO NOT use other location to extract/install the RDP Wrapper files. USE ONLY the "%ProgramFiles%\RDP Wrapper" directory (normally C:\Program Files\RDP Wrapper)

Download autoupdate.zip and extract all files to the "%ProgramFiles%\RDP Wrapper" directory

To enable autorun of autoupdate.bat on system startup, run the folling helper batch file as administrator:

"%ProgramFiles%\RDP Wrapper\helper\autoupdate__enable_autorun_on_start up.bat"

Set in your Antivirus/WindowsDefender an exclusion on the folder "%ProgramFiles%\RDP Wrapper" to prevent the deletion of RDP Wrapper files

Now you can use the autoupdate batch file to install and update the RDP Wrapper. Please run autoupdate.bat as administrator:

"%ProgramFiles%\RDP Wrapper\autoupdate.bat"




EDIT
Unable to get things working minimized. I followed the regedit advice...

Emarian
01-19-2021, 01:27 AM
Hey footballjds check this out


Updated OP with a new build in response to the most recent wave of commits to the Simba repository (22nd Aug - 2nd Sep): https://github.com/MerlijnWajer/Simba/commits/fpc-3.0

I will only be updating the 64-bit build of Simba 1.3 from now on, unless anybody wants newer builds of other configurations.

I'd also like to toss a link out to another (small) project of mine, libframebuffer (https://gitlab.com/KeepBotting/libframebuffer). It is Linux-specific (like the builds on this thread) and works as a great alternative to SMART. It is actually very similar to what was done here (https://villavu.com/forum/showthread.php?t=118411) as a component of BenLand100's Python macroing solution.

Edit: Updated build again, we are now up-to-date with this commit: https://github.com/MerlijnWajer/Simba/commit/157d9a5dc4b463fd24f934c045cd8d65641b085b

I use on linux and works perfect

EDIT:
Or it did. I only set up it once then realized it'd be easier to retrofit an old laptop I had with linux and now I just use that

Itankbots
01-22-2021, 03:52 AM
Can you do this multiple times on the same desktop to run multiple scripts at once without them interfering with each other?

saml1991
01-27-2021, 12:24 AM
This is amazing!

Also I had to pop out earlier today and was even able to RDP in from my mobile through my VPN without the connection I had open on the local PC interfering (but I manually stop and start scripts for my non RS game haven't tested if it effects running scripts)