#๐ run cmd commands remotely
46 messages ยท Page 1 of 1 (latest)
@iron basin
Remember to:
- Ask your Python question, not if you can ask or if there's an expert who can help.
- Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
- Explain what you expect to happen and what actually happens.
:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.
SSH?
not like that... was wondering for something else...
both devices will be in same network tho
What exactly do you want if ssh is not suitable?
if you're looking for an app like interface, kde connect is nice
Instead of making the helpers tease the information out of you, please provide what exactly you're after, and the python element to the question.
no idea... thats why i asked... i want to run commands to my cmd on windows pc from my phone
so basically i want to control League of Legend's LCU api remotely, to do that i have to send requests to my local client that runs on my pc from my phone
OK. If you want to remote into your PC, consider turning on RDP and installing an RDP client on your phone.
If you want a Python solution, consider making a web frontend.
i dont need any kind of mouse control or gui, just to post requests
you can make a fastapi that you send request to it and then it execute some commands
is it secure, no but it should serve what you want
yeah thats cool but how can i make it listen for commands?
i know only to expose the lcu with flask
you can send the command as part of the request body
still didn't understand 
so from what I understood you want to run some commands in your terminal
and you want to pass these commands from your phone
is that right?
if so then you can make an endpoint which takes accept commands in the body
http://127.0.0.1/execute -d
`{
"commands" : "shutdown /s /f /t 0"
}`
im planning to make it somewhat lightweight...
it's a golang binary running a tiny webserver
there's a Windows version and I'd make a wild guess it will use <20Mb ram
i mean lightweight so people dont have to install whole wsl
I didn't realise at first, but there is a native Windows binary
On the github releases
oh
i think its not what i was searching for...
thats to control servers or something
It's to run pre-specified shell commands on a computer over a webui.
You could code up your own flask app to do this as xVip suggested, but the functionality you need to do this safely on a local network already exists here.
ohh cool
so like i can imitate olivetin in flask?
Yes. You could write an api endpoint that runs your command as xVip suggested. And then make a quick frontend to trigger the request.
cool
This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.