├── .assets
├── logo.png
└── script_look.png
├── LICENSE
├── README.md
├── lib
├── core
│ ├── exceptions.py
│ ├── logger.py
│ ├── updater.py
│ ├── utils.py
│ ├── version
│ └── wifi.py
└── main.py
├── logs
└── .logs
└── smsbox.py
/.assets/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TrollSkull/SMSBOX/099d1290ce8214f9d62f943763c5f82e8ce29e83/.assets/logo.png
--------------------------------------------------------------------------------
/.assets/script_look.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TrollSkull/SMSBOX/099d1290ce8214f9d62f943763c5f82e8ce29e83/.assets/script_look.png
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2023 TrollSkull
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
2 |

3 |
4 | []()
5 | []()
6 | []()
7 |
8 |
9 | > [!WARNING]
10 | > This repository is no longer mantained.
11 |
12 | SMSBOX is a tool to send anonymous messages, written by **[TrollSkull](https://github.com/TrollSkull)**, this script uses
13 | the **[Textbelt API](https://textbelt.com)** to work, Textbelt is an API that allows us to send a single message per day on a single IP.
14 |
15 |
16 |
17 | ## INSTALLATION
18 | You can download SMSBOX on any platform by cloning the official Git repository:
19 |
20 | ```bash
21 | $ apt install -y git python
22 |
23 | $ git clone https://github.com/TrollSkull/SMSBOX
24 |
25 | $ cd SMSBOX
26 |
27 | $ python smsbox.py
28 | ```
29 |
30 | ### LICENCE
31 |
32 | **[MIT License © SMSBOX](https://github.com/TrollSkull/SMSBOX/blob/main/LICENSE)**
33 |
--------------------------------------------------------------------------------
/lib/core/exceptions.py:
--------------------------------------------------------------------------------
1 | class MyExceptions(Exception):
2 | def __init__(self, err_mess):
3 | self.err = err_mess
4 |
5 | def __str__(self):
6 | return self.err
--------------------------------------------------------------------------------
/lib/core/logger.py:
--------------------------------------------------------------------------------
1 | import logging, sys, os
2 |
3 | from lib.core.utils import Utils
4 | from lib.core.wifi import CheckWifi
5 |
6 | class Logger:
7 | def logged(message, number, response):
8 | if os.system == "win32":
9 | log_dir = os.getcwd() + '\logs'
10 | else:
11 | log_dir = os.getcwd() + '/logs'
12 |
13 | if os.path.isfile(log_dir + Utils.DATE_FILE + ".log") == True:
14 | logging.info('\n')
15 | else:
16 | logging.basicConfig(filename = (log_dir + Utils.DATE_FILE + ".log"), level=logging.DEBUG, format='')
17 |
18 | template = "SMSBOX Debug Log, taken on " + Utils.DATE + ".\n"
19 | logging.info(str(template))
20 |
21 | logging.info(f'[INFO - {Utils.TIME}] Message sent to: "' + number + '" at ' + Utils.DATE_LOG)
22 | logging.info(f'[INFO - {Utils.TIME}] Message: "' + message + '"')
23 | logging.info(f'[INFO - {Utils.TIME}] Response: {response}\n')
--------------------------------------------------------------------------------
/lib/core/updater.py:
--------------------------------------------------------------------------------
1 | import requests, urllib.request, sys
2 | from lib.core.utils import Colors
3 | from lib.core.wifi import CheckWifi
4 | from lib.core.utils import Utils
5 |
6 | URL = "https://raw.githubusercontent.com/TrollSkull/SMSBOX/master/"
7 |
8 | def Update():
9 | FILES = ['smsbox.py', 'lib/core/wifi.py', 'lib/core/updater.py', 'lib/core/version',
10 | 'lib/core/utils.py', 'lib/main.py', 'lib/core/exceptions.py', 'requirements.txt']
11 |
12 | for FL in FILES:
13 | DATA = urllib.request.urlopen(URL + FL).read()
14 |
15 | with open(FL, "wb") as F:
16 | F.write(DATA)
17 |
18 | print(Colors.OK + "\n[SMSBOX]" + Colors.RESET + " Updated successfull, exiting script.")
19 | sys.exit(0)
20 |
21 | def CheckVersion():
22 | try:
23 | tool_version = open("./lib/core/version", "r").read()
24 | except:
25 | tool_version = "1.0"
26 |
27 | try:
28 | CheckWifi()
29 | git_version = requests.get("https://raw.githubusercontent.com/TrollSkull/SMSBOX/main/lib/core/version").text
30 | except Exception as err:
31 | import sys
32 |
33 | print(err, file=sys.stderr)
34 | sys.exit(1)
35 |
36 | print(Colors.WORKING + "\n[SMSBOX]" + Colors.RESET +" Verifying Git version...")
37 |
38 | if (tool_version == git_version):
39 | print(Colors.WARNING + "\n[SMSBOX]" + Colors.RESET + " Version match with GitHub repository.")
40 |
41 | else:
42 | print(Colors.WORKING + "\n[SMSBOX]" + Colors.RESET + " Update available, downloading " + Colors.WORKING + "(" + Colors.OK + Utils.GIT_VERSION + Colors.WORKING + ")...")
43 | Update()
--------------------------------------------------------------------------------
/lib/core/utils.py:
--------------------------------------------------------------------------------
1 | import sys, os, requests, datetime
2 |
3 | class Colors:
4 | OK = '\033[92m'
5 | WARNING = '\033[93m'
6 | FAIL = '\033[91m'
7 | RESET = '\033[0m'
8 | WORKING = '\033[34m'
9 | GRAY = '\033[1;30m'
10 |
11 | class Utils:
12 | NOW = datetime.datetime.now()
13 | DATE = NOW.strftime("[%y-%m-%d]")
14 | TIME = NOW.strftime("%H:%M")
15 | DATE_FILE = NOW.strftime("/%y-%m-%d")
16 | DATE_LOG = NOW.strftime("%y-%m-%d")
17 |
18 | TOOL_VERSION = open("./lib/core/version", "r").read()
19 | GIT_VERSION = requests.get("https://raw.githubusercontent.com/TrollSkull/SMSBOX/main/lib/core/version").text
20 |
21 | def CheckOSClear():
22 | if sys.platform == "win32":
23 | os.system("cls")
24 | else:
25 | os.system("clear")
26 |
27 | def Banner():
28 | print(Colors.OK + """
29 | ___ ___ __ __ ___ ___ _____ __
30 | |_|_|_ / __| \/ / __| _ )/ _ \ \/ /
31 | |_|_|_| \__ \ |\/| \__ \ _ \ (_) > <
32 | |_|_|_| |___/_| |_|___/___/\___/_/\_\\
33 | """ + Colors.RESET)
34 |
35 | print(Colors.OK + "[" + Colors.RESET + "1" + Colors.OK + "] Message" + Colors.RESET + " - " + Colors.WORKING + "Send a message!")
36 | print(Colors.OK + "[" + Colors.RESET + "2" + Colors.OK + "] Update script" + Colors.RESET + " - " + Colors.WORKING + "Version (" + Colors.OK + Utils.TOOL_VERSION + Colors.WORKING + ")")
37 | print(Colors.OK + "[" + Colors.RESET + "3" + Colors.OK + "] Exit" + Colors.RESET + " - " + Colors.WORKING + "Close script!" + Colors.RESET)
--------------------------------------------------------------------------------
/lib/core/version:
--------------------------------------------------------------------------------
1 | 1.2
--------------------------------------------------------------------------------
/lib/core/wifi.py:
--------------------------------------------------------------------------------
1 | from socket import gethostbyname, create_connection, error
2 | from lib.core.utils import Colors
3 | import sys
4 |
5 | def CheckWifi():
6 | try:
7 | gethostbyname("google.com")
8 | conexion = create_connection(("google.com", 80), 1)
9 | conexion.close()
10 |
11 | except error:
12 | print(Colors.FAIL + "\n[SMSBOX] " + Colors.RESET + "Check your internet connection.")
13 | sys.exit(1)
--------------------------------------------------------------------------------
/lib/main.py:
--------------------------------------------------------------------------------
1 | class Main:
2 | try:
3 | import requests, time, sys
4 |
5 | from lib.core.utils import (
6 | Banner, Colors,
7 | Utils, CheckOSClear
8 | )
9 |
10 | from lib.core.logger import Logger
11 | from lib.core.wifi import CheckWifi
12 | from lib.core.updater import CheckVersion
13 |
14 | CheckOSClear()
15 | Banner()
16 | CheckWifi()
17 |
18 | except Exception as err:
19 | from lib.core.exceptions import MyExceptions
20 | raise MyExceptions(str(err))
21 |
22 | try:
23 | while True:
24 | option = str(input("\nSMSBOX " + Colors.OK + "~# " + Colors.RESET))
25 |
26 | if option == "1":
27 | phone_number = input(Colors.OK + "\nEnter the number with country code: " + Colors.RESET)
28 | phone_number = phone_number.replace(" ", "")
29 |
30 | message = input(Colors.OK + "Enter the message: " + Colors.RESET)
31 |
32 | if "+" not in phone_number:
33 | print(Colors.FAIL + "\n[SMSBOX]" + Colors.RESET + " Could not send message!\n")
34 | print(Colors.FAIL + "The country code has not been entered.")
35 | sys.exit(1)
36 |
37 | send_message = requests.post('https://textbelt.com/text', {
38 | 'phone': phone_number,
39 | 'message': message,
40 | 'key': 'textbelt'})
41 |
42 | # If you have a Textbelt KEY you can put it here.
43 | # You can buy a KEY visiting "https://textbelt.com/purchase/".
44 |
45 | response_data = send_message.json()
46 |
47 | if response_data['success'] == False:
48 | print(Colors.FAIL + "\n[SMSBOX]" + Colors.RESET + " Could not send message!\n")
49 | Logger.logged(message=message, number=phone_number, response=response_data)
50 |
51 | if response_data['quotaRemaining'] == 0:
52 |
53 | print(Colors.FAIL + response_data['error'])
54 | print(Colors.WORKING + "Your remaining messages: " + Colors.RESET + str(response_data['quotaRemaining']))
55 | sys.exit(1)
56 |
57 | else:
58 | print(response_data['error'])
59 | sys.exit(1)
60 |
61 | else:
62 | print(Colors.OK + "\n[SMSBOX]" + Colors.RESET + " The message has been sent successfully at " + Utils.TIME + "!")
63 | Logger.logged(message=message, number=phone_number, response=response_data)
64 |
65 | elif option == "2":
66 | CheckVersion()
67 |
68 | elif option == "3":
69 | print(Colors.OK + "\n[SMSBOX] " + Colors.RESET + "Bye bye!")
70 | sys.exit(0)
71 |
72 | else:
73 | print(Colors.FAIL + "\n[SMSBOX] " + Colors.RESET + "Command not found!")
74 | time.sleep(2)
75 |
76 | except KeyboardInterrupt:
77 | print (Colors.WARNING + "\n[SMSBOX] " + Colors.RESET + "Keyboard interrupt detected, exiting.")
78 | sys.exit(1)
79 |
80 | def main():
81 | try:
82 | smsbox = Main()
83 | smsbox
84 | except Exception as err:
85 | import sys
86 |
87 | print(err, file=sys.stderr)
88 | sys.exit(1)
--------------------------------------------------------------------------------
/logs/.logs:
--------------------------------------------------------------------------------
1 | Logs will be stored in this folder, the logs will be used for error handling more efficiently and help users.
2 |
--------------------------------------------------------------------------------
/smsbox.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python3
2 |
3 | __author__ = 'TrollSkull'
4 | __version__= '1.1'
5 |
6 | '''
7 | This script uses the Textbelt API to work
8 | Textbelt is an API that allows us to send
9 | a single message per day on a single IP.
10 | '''
11 |
12 | try:
13 | import requests
14 |
15 | except Exception as error:
16 | import time, os
17 |
18 | print(error + '\nSome requirements are not installed.')
19 | requirements = ['requests']
20 |
21 | for requirement in requirements:
22 |
23 | print(f'Installing "{requirement}"...')
24 | os.system(f'pip3 install {requirement}')
25 |
26 | time.sleep(1)
27 |
28 | print('\nRequirements have been installed.')
29 |
30 | try:
31 | from lib.main import Main, main
32 | from lib.core.exceptions import MyExceptions
33 | except Exception as err:
34 | import sys
35 |
36 | print(err, file=sys.stderr)
37 | sys.exit(1)
38 |
39 | if __name__ == "__main__":
40 | main()
--------------------------------------------------------------------------------