From a564faf762c2011707daa27f6fcf0d159f779aff Mon Sep 17 00:00:00 2001 From: Giulio Date: Tue, 16 Jul 2019 12:43:51 +0200 Subject: [PATCH] Readme and basic config --- README.md | 52 +++++++++++++++++++++++++++++++++++++++++ agent/config/api.ini | 2 ++ agent/gsm.ini | 4 ++++ frontend/config/api.ini | 1 + 4 files changed, 59 insertions(+) create mode 100644 README.md create mode 100644 agent/config/api.ini create mode 100644 agent/gsm.ini create mode 100644 frontend/config/api.ini diff --git a/README.md b/README.md new file mode 100644 index 0000000..5c1d6a7 --- /dev/null +++ b/README.md @@ -0,0 +1,52 @@ +# sms-receiver +## Purpose +Many websites allow you to freely receive sms and most of them are ad supported. They are mostly used for registration to services which do require phone number confirmation. Some of this services can be tricked by using a Voip numbers as the ones provided for example by [Nexmo](https://www.nexmo.com/) while others try to detect Voip numbers and discard them so a physicial SIM may be required. + +This is a simple build of a cheap device that can receive SMS from multiple physical numbers and publish their contents on a web server in real time. It also integrates the use of Voip numbers. + +It is an open source clone of something like this [16 MTK GSM Modem Bulk](https://aliexpress.com/item/32854256758.html) + +## Hardware + +| # | Part | Cost | +|---|------|------| +| 4 | [AI-Thinker A6 GSM Module](https://it.aliexpress.com/item/32886046720.html) | ~23 | +| 4 | [USB TTL Adapter](https://www.aliexpress.com/item/32831329095.html) | ~3 | +| 1 | [NanoPI Neo 2](https://aliexpress.com/item/32975776753.html) | ~20 | +| 1 | [16GB MicroSD](https://www.aliexpress.com/item/32855791603.html) | ~3 | +| 1 | [4 Port USB Hub](https://www.aliexpress.com/item/1242714664.html) | ~1 | +| 1 | [5V 10A Power Supply](https://www.aliexpress.com/item/32983648084.html) | ~9 | +| n | Spare cables | ~3 | +| Total | ~70eur | + +## Pictures +Soon + +## Software +The NanoPI Neo2 is used for controlling the GSM modules. Any other device which can be powered via USB or via 5V DC and has a usb port which suppport a USB Hub is fine. Adding more modules should be trivial by just using a bigger USB hub. +The code is written in python and simply opens a serial connection with any modem to check for incoming messages. When messages are found, the agent will send a put request with the message's sender and text to the web fronted which can be either hosted on the same machine or elsewhere + +## Config +Numbers needs to be specified because most of the times they aren't written on the sim card. Sim cards may be hotswapped, but if this config isn't updated the wrong receiving number will be displayed on the frontend. + +*agent/config/gsm.ini* +``` +/dev/ttyUSB0 +393409821322 +/dev/ttyUSB1 +443312123452 +/dev/ttyUSB2 +913446435634 +/dev/ttyUSB3 +12456345344 +``` + + +Hostname and secret key used for updating the frontend. May as well be http://127.0.0.1 + +*agent/config/api.ini* +``` +https://sms.lsd.cat +supersecretegakey1234123 +``` + +*frontend/config/api.ini* +``` +supersecretegakey1234123 +``` \ No newline at end of file diff --git a/agent/config/api.ini b/agent/config/api.ini new file mode 100644 index 0000000..86e8b37 --- /dev/null +++ b/agent/config/api.ini @@ -0,0 +1,2 @@ +https://sms.lsd.cat +supersecretegakey1234123 diff --git a/agent/gsm.ini b/agent/gsm.ini new file mode 100644 index 0000000..f53b075 --- /dev/null +++ b/agent/gsm.ini @@ -0,0 +1,4 @@ +/dev/ttyUSB0 +393409821322 +/dev/ttyUSB1 +443312123452 +/dev/ttyUSB2 +913446435634 +/dev/ttyUSB3 +12456345344 diff --git a/frontend/config/api.ini b/frontend/config/api.ini new file mode 100644 index 0000000..a7b40c8 --- /dev/null +++ b/frontend/config/api.ini @@ -0,0 +1 @@ +supersecretegakey1234123