How To Send Messages Anonymously (SMS)

Dolyetyus

Özel Üye
21 Nis 2020
1,207
676
Delft
How Can We Send SMS Anonymously?

Before we start:

This tutorial is also available in two other languages. You might take a look at them as well.


Turkish: https://www.turkhackteam.org/python/1943595-nasil-anonim-olarak-mesaj-gonderilir-sms.html#post9193515
Swedish: https://www.turkhackteam.org/international-forum/1943592-hur-man-skickar-meddelanden-anonymt-sms.html


Hi and welcome again. Today, in this tutorial I’m going to present you an useful API. This API enables us to send someone a message anonymously. I’ve tried to use this before but it didn’t work on any OS except Linux (It works on Android, because Android is a Linux too). I think I have to mention about that I tried to use via the python version. I’m not sure does it work in the other programming languages but according to my experiences, python version only works on Linux.

However I’ll explain this API now (Yes now, won’t make any other comments but this API).
First thing first, through this website we can send someone messages. But we can send only a message per day. We have to pay if we want to send more messages. So let me explain how it works.



API Codes:

I'll share the codes before we start. You can find this API below. For Curl, Python, Ruby, Node.js, Javascript, PHP, C#, Java, Powershell and Go.


CURL
Kod:
[COLOR="plum"]$ curl -X POST https://textbelt.com/text \
       --data-urlencode phone='5555555555' \
       --data-urlencode message='Hello world' \
       -d key=textbelt[/COLOR]


PYTHON
Kod:
[COLOR="plum"]import requests
resp = requests.post('https://textbelt.com/text', {
  'phone': '5555555555',
  'message': 'Hello world',
  'key': 'textbelt',
})
print(resp.json())[/COLOR]


RUBY
Kod:
[COLOR="plum"]require 'net/http'
require 'uri'

uri = URI.parse("https://textbelt.com/text")
Net::HTTP.post_form(uri, {
  :phone => '5555555555',
  :message => 'Hello world',
  :key => 'textbelt',
})[/COLOR]

NODE.JS
Kod:
[COLOR="Plum"]// Using request
const request = require('request');
request.post('https://textbelt.com/text', {
  form: {
    phone: '5555555555',
    message: 'Hello world',
    key: 'textbelt',
  },
}, (err, httpResponse, body) => {
  console.log(JSON.parse(body));
});

// Using axios
const axios = require('axios');
axios.post('https://textbelt.com/text', {
  phone: '5555555555',
  message: 'Hello world',
  key: 'textbelt',
}).then(response => {
  console.log(response.data);
})[/COLOR]


JAVASCRIPT
Kod:
[COLOR="Plum"]fetch('https://textbelt.com/text', {
  method: 'post',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({
    phone: '5555555555',
    message: 'Hello world',
    key: 'textbelt',
  }),
}).then(response => {
  return response.json();
}).then(data => {
  console.log(data);
});[/COLOR]


PHP
Kod:
[COLOR="plum"]$ch = curl_init('https://textbelt.com/text');
$data = array(
  'phone' => '5555555555',
  'message' => 'Hello world',
  'key' => 'textbelt',
);

curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($data));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

$response = curl_exec($ch);
curl_close($ch);[/COLOR]


C#
Kod:
[COLOR="Plum"]using System;
using System.Collections.Specialized;
using System.Net;

using (WebClient client = new WebClient())
{
  byte[] response = client.UploadValues("http://textbelt.com/text", new NameValueCollection() {
    { "phone", "5555555555" },
    { "message", "Hello world" },
    { "key", "textbelt" },
  });

  string result = System.Text.Encoding.UTF8.GetString(response);[/COLOR]


JAVA
Kod:
[COLOR="Plum"]final NameValuePair[] data = {
    new BasicNameValuePair("phone", "5555555555"),
    new BasicNameValuePair("message", "Hello world"),
    new BasicNameValuePair("key", "textbelt")
};
HttpClient httpClient = HttpClients.createMinimal();
HttpPost httpPost = new HttpPost("https://textbelt.com/text");
httpPost.setEntity(new UrlEncodedFormEntity(Arrays.asList(data)));
HttpResponse httpResponse = httpClient.execute(httpPost);

String responseString = EntityUtils.toString(httpResponse.getEntity());
JSONObject response = new JSONObject(responseString);[/COLOR]


POWERSHELL
Kod:
[COLOR="Plum"]$body = @{
  "phone"="5555555555"
  "message"="Hello World"
  "key"="textbelt"
}
$submit = Invoke-WebRequest -Uri https://textbelt.com/text -Body $body -Method Post[/COLOR]


GO
Kod:
[COLOR="Plum"]import (
  "net/http"
  "net/url"
)

func main() {
  values := url.Values{
    "phone": {"5555555555"},
    "message": {"Hello world"},
    "key": {"textbelt"},
  }

  http.PostForm("https://textbelt.com/text", values)[/COLOR]



Now Let's Use This API And Send A Message

Alright, I choose Python. If you know me, I'm a pythoner. (No, exactly this is not because of I cannot code in other languages :D)
It is time to open a new IDE and paste these codes.


rZWiUP.jpg


As you can see, the code above is not that user-friendly. So I need to edit it. Thus we can make this more useful and easier to use.


fwOOh5.jpg


So now it is more good-looking and we can use it easily through user inputs and I've added a confirmation input. I'm sure that this one is more way better. (I’m gonna share these code in the end of this tutorial)

Now it is time to execute this program. Let us see if it works.


gjfMa2.jpg


Well, we executed the code. It mustn't threw that error on your device, at least, if it is your first message of course.

I guess you want to see the result. Your curiosity ends with the picture below.



L2XjAd.jpg


And Bob's your uncle. We made it. An American number sent us our message. But never forget, It only allows an SMS, which means max 160 characters. If your text is longer than 160 characters, it won't send it.
For those one who wants to know what this binary means: It says "Selam" which means "Hi" in Turkish :)



Final Words

Today I introduced this message API to you. I hope it'll be useful for you as well. Take care and goodbye for now. If I wrote something wrong, please correct me.

Important: Neither I nor TurkHack Team take any responsibilities for your usage.

(Annotation: I wrote up this whole tutorial all by myself. Therefore there is no source in this tutorial)


Python Codes:
Kod:
[COLOR="Plum"]import requests

while True:
	number = input("Enter the Target's phone number (With the country code, but without '+':")
	message = input('Enter your message: ')

	print(f'Receiver : {number}\nYour Message: {message}')

	print("If you want to continue (1)\nIf you want to change the info above(2)")
	edit=int(input())
	
	if edit==1:
		resp = requests.post('https://textbelt.com/text', {
		'phone': number,
		'message': message,
		'key': 'textbelt',
		})
		response = resp.json()
		if response['success'] == False:
 			print('ERROR : ',response['error'])

		elif response['success'] == True:
 			print('DONE! Your Message ID is:',response['textId'])
		break
	elif edit==2:
		continue
	else:
 		print("Wrong Command!\nBe sure you to check the message info for security")
	continue
[/COLOR]
 
Son düzenleme:
Üst

Turkhackteam.org internet sitesi 5651 sayılı kanun’un 2. maddesinin 1. fıkrasının m) bendi ile aynı kanunun 5. maddesi kapsamında "Yer Sağlayıcı" konumundadır. İçerikler ön onay olmaksızın tamamen kullanıcılar tarafından oluşturulmaktadır. Turkhackteam.org; Yer sağlayıcı olarak, kullanıcılar tarafından oluşturulan içeriği ya da hukuka aykırı paylaşımı kontrol etmekle ya da araştırmakla yükümlü değildir. Türkhackteam saldırı timleri Türk sitelerine hiçbir zararlı faaliyette bulunmaz. Türkhackteam üyelerinin yaptığı bireysel hack faaliyetlerinden Türkhackteam sorumlu değildir. Sitelerinize Türkhackteam ismi kullanılarak hack faaliyetinde bulunulursa, site-sunucu erişim loglarından bu faaliyeti gerçekleştiren ip adresini tespit edip diğer kanıtlarla birlikte savcılığa suç duyurusunda bulununuz.