Change API urls, add README, and increase user ID entropy

This commit is contained in:
Kevin F 2022-12-05 20:13:19 +00:00
parent dd3c280965
commit 87e1fa48e7
3 changed files with 16 additions and 8 deletions

7
README.md Normal file
View File

@ -0,0 +1,7 @@
# MoneroSMS.com CLI
This is a command line interface for MoneroSMS.com.
Requires python3.10+ and the requests library.
See monerosms.com for more info. Contact me privately at admin@monerosms.com to report security bugs or for account support.

View File

@ -2,16 +2,17 @@ import os
import sys
from base64 import urlsafe_b64encode
VERSION = '0.2.0'
VERSION = '1.0.0'
base_url = "https://api.sms.voidnet.tech/"
base_url = "https://api.monerosms.com/"
proxies = {}
if os.getenv("MONERO_SMS_TOR", None):
base_url = "http://qgwz46kabdhwv6l7zhfihhe7h5ep2nbo4mvhw74lcnsxk2mkhh5lpyqd.onion/"
proxies = {
'http': f'socks4a://127.0.0.1:{os.getenv("MONERO_SMS_TOR")}',
'https': f'socks4a://127.0.0.1:{os.getenv("MONERO_SMS_TOR")}'
}
base_url = "http://api.xmr4smsoncunkfgfjr6xmxl57afsmuu6rg2bwuysbgg4wdtoawamwxad.onion/"
if not os.getenv("MONERO_SMS_TRANSPARENT_TOR", None):
proxies = {
'http': f'socks4a://127.0.0.1:{os.getenv("MONERO_SMS_TOR")}',
'https': f'socks4a://127.0.0.1:{os.getenv("MONERO_SMS_TOR")}'
}
user = os.getenv('MONERO_SMS_TOKEN')

View File

@ -59,7 +59,7 @@ def menu():
print("You are not permitted to use the service unless you agree.")
return None
with open(auth_file, 'wb') as f:
f.write(urlsafe_b64encode(os.urandom(16)).removesuffix(b'=='))
f.write(urlsafe_b64encode(os.urandom(32)).replace('=', ''))
print(f'Account number generated {auth_file}')
print('Back it up to keep access to your account')
return None