I have an app which sends specific packets to a server every time I press a particular button on the app, the problem is that I need to press it every 30 seconds during a few hours and it's annoying. Is there any way to script it so that the packets are automatically sent every 30 seconds to the server?

I thought about a macro tool but it's not possible since I can't jailbreak. Any ideas on how to approach to a solution?

  • What is going to keep the iOS device from going to sleep and backgrounding the app? I see some sort of mechanical clock / heat engine on a pendulum physically dipping something onto the screen of your phone.... – bmike Feb 4 '16 at 21:36
  • 1
    I suppose you mean the app is one you downloaded from the App Store, rather than one you developed? Is pressing a button the only option, or can you use a keyboard to perform the same action? – jcaron Feb 4 '16 at 23:26
  • Yes, it is indeed downloaded from the App Store and I have no idea on how to get it's source. I can't use the keyboard for this. I thought of multiple solutions like getting the app's source or installing a macro recorder but I still don't know how I could do any of those. – Franco Roura Feb 6 '16 at 3:15

Solved! This might be really helpful for those with the same issue, follow these steps:

  1. Download and install Burp Suite Free Edition in your PC/Mac
  2. Go to Proxy->Options and edit the *.8080 interface to "All interfaces" in "Bind to address"
  3. Go to your iPhone/Tablet/Whatever and connect it to the same Wi-Fi network your PC is connected to, set up a manual proxy to your PC's IP on port 8080.
  4. In Burp Suite go to Proxy->HTTP History and press the button in your cellphone that sends the request you want to automate.
  5. Compile a script in C# that sends a HTTP request with the same method, parameters and headers.
  6. Make it loop :)

Now your PC will send the packets to the host and you can even simulate it was sent from iOS using the parameters you just coppied, it also wont drain your phone's battery at all.

| improve this answer | |

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .