1

I would like to be able to control my mac over http post commands.. (Launching apps for example)

I have this jailbreak tweak (activate command) on my iphone that can send shell commands and http post requests (using curl)

But the problem is that i don't know how to prepare my mac for receiving and processing these requests.. Should I use python or php scripts (any tutorials on receiving post requests?) or are there any easy-to-setup restful api's to setup on my mac?

Thanks guys

1 Answers1

0

What you're talking about already exists, in mutltiple forms actually.

  1. RDP: You're probably already aware of Remote Desktop Clients which should be sufficient enough. If you're really inclined on launching apps via command line, you can just open up terminal and do it remotely.

  2. SSH: You can set up a secure shell server on both devices and launch a connection over the LAN. There are multiple clients that I know of on dos systems such as PuTTY or WinSCP. On UNIX systems, there is an SSH shell which you can use for remote connections on either ends. However everything you do will be command-line so you should already have a knowledge of the file system structure and how to navigate it and actually use it.

If you are looking for a script on iOS, I've had very little experience with developing in Python and I don't even know if it can pull off what you are asking. iOS 7.X >= compiles in Objective-C, iOS 8.X compiles in Swift, and the upcoming iOS 9 will be compiling in Swift 2.

Oleg Silkin
  • 508
  • 1
  • 5
  • 12
  • Well i know about those options, but the thing is that i need to login with those, instead of sending one command (including password) to control the mac.. That's why i wanted to try something like post requests.. Maybe some cgi scripting.. – Ritchy Romero Aug 28 '15 at 18:24
  • You could write a script that would block the GUI password prompt from appearing on the Mac and input your password; then connect via SSH It's in no way, an intelligent method, however it would save you a lot of work from over-complicating it. – Oleg Silkin Aug 29 '15 at 02:43