-1

There is a free online SMS service called globfone which allows you to send free text messages via their website. However, I'm looking to integrate this functionality into a script through curl. But the problem is that I am unable to find where to start as the URL does not change from page to page after you enter details such as the phone number or the message itself so I can't work out what to put in the curl command. Is anyone aware of how I could achieve this?

For example, there is another service called textbelt which does exactly what I want (i.e. sending texts from the command line) but requires that you make and pay for an account despite the service originally being free after its original release.

I would really appreciate it if someone could point me in the right direction (if there even is one) as I am currently quite stuck.

schroeder
  • 123,438
  • 55
  • 284
  • 319
John Greeny
  • 101
  • 2
  • I am not sure how this is a security question. This is a programming question. – schroeder Jul 29 '18 at 16:43
  • @schroeder I felt this was more of a security question due to the fact that it deals with the bypassing of Captcha which may have been a rather controversial subject on another forum such as Stack Overflow. – John Greeny Jul 29 '18 at 17:37
  • Your question never mentions captcha – schroeder Jul 29 '18 at 18:18

1 Answers1

0

The issue I see with this is Globfone's implementation of a captcha, which is no doubt in place to prevent precisely what you are looking to do.

It's a POST message to wp-admin/admin-ajax.php that includes the payload: action=sendSms&g-recaptcha-response=SOME_CAPTCHA_RESPONSE_ID&number=%2B1+SOME_NUMBER&message=SOME_MESSAGE which seems easy enough to send via curl with properly configured headers, though again, the inclusion of the unique captcha ID will probably prevent this from working.

This is also a question that is probably better suited for the general Stack Overflow community. There is a post here that talks a little about this.

If you are looking for programmatic SMS I would look into a service called Twilio (though it is also a paid service), or a SMS gateway using a service provider that you already have an account with, see here for a listing.

jonroethke
  • 1,006
  • 2
  • 7
  • 21
  • Thank you for your response! I had come across the Stack Overflow post that you had linked but wasn't quite sure how exactly to implement it. Would you be able to give any more specific advice on how to do this? i.e. both how to format the `curl -X POST` command but also how exactly to get around the captcha (which I understand will be hard) but the link quoted in the Stack Overflow post is no longer valid. Thank you once again! – John Greeny Jul 29 '18 at 17:35
  • The `curl` command would be a POST like what you already have started there, but would also include the form-data (i.e. the action, the g-recaptcha-response, the number you are looking to send the message to, and the message), and would need to include headers like `X-Requested-With: XMLHttpRequest` in order to mimic AJAX requests. Explaining how to bypass captcha is out of scope. I would consider another solution. – jonroethke Jul 29 '18 at 18:46