Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Development (v1.9) #20

Open
wants to merge 14 commits into
base: main
Choose a base branch
from
23 changes: 19 additions & 4 deletions CREDITS.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,19 @@
https://github.com/smartboyathome/Cheshire-Engine/blob/master/ScoringServer/utils.py
https://www.w3schools.com/
https://nitratine.net/blog/post/encryption-and-decryption-in-python
https://stackoverflow.com/a/55137835
https://github.com/smartboyathome/Cheshire-Engine/blob/master/ScoringServer/utils.py (Blueprint Loading)

https://www.w3schools.com/ (Design help)

https://nitratine.net/blog/post/encryption-and-decryption-in-python (Encryption in Python)

https://stackoverflow.com/a/55137835 (Git Repo name function)

https://gist.github.com/barzamin/590660de3ed13eaab9267f29d2a4c43f (Discord Login help)

https://github.com/jdiez17/flask-paypal (Flask PayPal Example)

https://designmodo.com/shopping-cart-ui/ (Shopping Cart UI)

https://stackoverflow.com/questions/988228/convert-a-string-representation-of-a-dictionary-to-a-dictionary (Convert a String representation of a Dictionary to a dictionary)

https://stripe.com/docs/billing/subscriptions/webhooks (Subscription Webhooks)

https://stripe.com/docs/billing/subscriptions/build-subscriptions (Subscriptions)
39 changes: 32 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,33 +13,58 @@ A WIP Open-source WHMCS alternative.
- [x] Built with Flask
- [x] Lightweight
- [x] [Stripe](https://stripe.com) Support
- [x] One-Time Payments
- [x] Recurring Payments
- [x] Webhook (WIP)
- [x] One-Time Payments
- [x] Recurring Payments (WIP)
- [x] On Purchase
- [ ] Recurring (Soon)
- [x] [PayPal](https://paypal.com) Support (LOOKING FOR CONTRIBUTORS)
- [x] One-Time Payments (WIP)
- [ ] Recurring Payments
- [ ] Webhook
- [x] [hCaptcha](https://www.hcaptcha.com/)
- [x] Fully Modular Design
- [x] Custom Module Support
- [x] Admin Panel
- [x] Product Management
- [x] Stripe Products Integration
- [ ] Stripe Products Integration
- [x] Storefront
- [ ] Email Sending (W.I.P)
- [x] Shopping Cart
- [x] Email Sending (WIP)
- [ ] Purchase Messages
- [ ] Contact Messages
- [ ] Account Registration Messages
- [x] Website Search (W.I.P)
- [x] User Management (W.I.P)
- [x] Website Search
- [x] User Management
- [x] Two Factor Authentication
- [x] [Google Authenticator](https://play.google.com/store/apps/details?id=com.google.android.apps.authenticator2)
- [ ] SMS Authentication (Soon)
- [ ] [TextMagic](https://textmagic.com)
- [ ] [AndroidSMSServer](https://github.com/umer0586/AndroidSMSServer)
- [ ] Email 2FA (Soon)
- [x] Basic Accounts
- [ ] Affiliate Accounts
- [ ] Reseller Accounts
- [x] Multiple Login Methods
- [x] Email Login
- [x] Google Login
- [ ] Discord Login
- [x] Discord Login
- [x] Github Login
- [x] Facebook Login
- [ ] Microsoft Login (WIP)

# Contribution
All contributions are welcome! Just create a fork and open up a Pull Request :)

# TODO
- [ ] Shopping Cart
- [ ] Domain Management/Reselling
- [ ] DNS Management
- [ ] ID Management
- [ ] Domain Redirection
- [ ] Management API
- [ ] Account Management
- [ ] Product Management
- [ ] [PayPal](https://paypal.com) Support (?)

- [ ] Documented Code & Comments (Soon)
128 changes: 71 additions & 57 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,69 +2,83 @@

<img src="https://img.shields.io/discord/887501133902385202?logo=discord&style=social"> <img src="https://img.shields.io/github/last-commit/Loona-cc/LoonaBilling?logo=github&style=social"> <img src="https://img.shields.io/github/workflow/status/Loona-cc/LoonaBilling/CodeQL?logo=github-sponsors&style=social">

# Development Changelog
Sorry for the late update, I tried to make this update a little bigger.
# Development Changelog (v1.9)
Sorry for the long wait for another update, had some problems with Stripe and the API.
Alot of the updates aren't documented

## LoonaBilling
+ Renamed links in `templates/core/index.html`
+ Failed module loading is deleted from `app.mods` list

## Admin Dashboard
+ Added Admin Modules Tab
+ Enable/Disable Modules
+ Install Modules

+ Added Update Tab
+ Check for updates
+ Pull new updates (WIP)

+ Added File Manager Tab
+ Edit template files from the web browser

+ New Admin Sidebar
+ Branding Tab
+ Modules Tab
+ Update Tab
+ File manager tab
+ Theme Manager

## Customer Dashboard
+ Added new links
+ Help / Support
+ Support Page
+ Tickets
+ Services
+ Payments

## Config
+ Removed Branding Settings -> Moved to Branding Tab
+ Changed encryption salt to Fernet key instead of Mac Address
+ Reason: Mac Address changes on different networks and will be a pain if servers change
+ Fixed Branding Issue
+ Added Error Handling for Admin Dashboard stats
+ Added Error Handling for Git Library

## Stripe
+ Rewrote Stripe Module
+ Added Automation
+ [x] Payments
+ [x] Subscriptions (WIP)

## PayPal
+ Added PayPal (Needs to be reworked)
+ Looking for contributions

## Search
+ Fixed Links
+ Added more banned words

## Accounts
+ Fixed dashboard being Accounts.wrapper
+ Added Manage Accounts Tab
+ Suspended accounts now redirect to `error.html` with message

# Auth Util
+ Updated login_is_required wrapper
+ Fixed routes becoming module.wrapper
+ Added Settings Tab
+ 2FA
+ [ ] Added 2FA Module System
+ Added Authenticator 2FA
+ Works with Google Authenticator
+ Asks for verification when logging in
+ Added SMS 2FA (Todo)
+ [ ] Implemented SMS 2FA
+ ...
+ Added Discord Login / Register
+ Added Enable / Disable for Google, Discord and Email
+ Added hCaptcha Tab
+ Added Github Login
+ Add Enable / Disable
+ Changed Discord Login/Register Enc PW to ID (instead of email)
+ Added Facebook Login
+ Added Enable / Disable (TODO)
+ Added Setup Guide (TODO)
+ Fixed hCaptcha (Changed hcaptcha.verify to module.hcaptcha.verify)
+ Added Microsoft Login (Pain) (WIP)

## Products
+ Added Product importing from Payment Providers
+ Show Products
+ Import Products (Todo)

## Mail
+ Added SMTP Settings
+ Added Mail Sending

## Stripe
+ Stripe adds Customer ID to user config

# Files Util
+ Added `readJSON(file)` function
+ Added `readJSONVar(file, var)` function
+ Added `delVarJSON(file, var)` function
+ Added `getBranding()` function
+ Added `Filesize(file)` function
+ Added `endisModule(module)` function
+ Added `moduleEnabled(module)` function

# Mail Util
+ Added Threaded Mail Sending

# Network Util
+ Added Network Util to cut down on repeated code

## Divs
+ Added adminSide div
+ Added `updateJSONargs(file, arg, content)` function

# Other
+ Join our [Discord](https://loona.cc)!

## Development TODO
+ Main
+ [ ] Backup System
+ [ ] Move Servers Easily
+ [ ] Online/Remote Backups
+ Payments
+ [x] Create Shopping Cart / Checkout (WIP)
+ [x] Create Customer Transaction Numbers (WIP) (Cart IDs)
+ [x] Rework Payment Provider System
+ [x] Stripe (WIP)
+ [x] PayPal (WIP) (NEED CONTRIBUTORS)
+ Store
+ [ ] Make default be the default page (/store)
+ Products
+ [ ] Import Products from Payment Providers
1 change: 1 addition & 0 deletions config.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@
port = 80
ssl = None # Replace with ssl = ('cert.pem', 'key.pem') for SSL
filemanagerEnabled = True
mailEnabled = True
16 changes: 16 additions & 0 deletions core/modules/2fa/androidsmsserver.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
from flask import Blueprint, render_template, abort
from jinja2 import TemplateNotFound
import requests
from threading import Thread

module = Blueprint('Android SMS', __name__)
module.hasAdminPage = False
module.moduleDescription = '2FA and SMS Sending Module'
module.version = '1.0'

def sendSMS(phone, sms):
x = requests.post('https://192.168.137.14:8080/sendSMS', data={'phone': str(phone), 'message': sms, 'password': 'amogus'}, verify=False)
github-advanced-security[bot] marked this conversation as resolved.
Show resolved Hide resolved
print(x.text)

#for f in range(10):
# Thread(target=lambda:sendSMS('', 'monke')).start()
15 changes: 15 additions & 0 deletions core/modules/2fa/textmagicsms.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
from flask import Blueprint, render_template, abort
from jinja2 import TemplateNotFound


module = Blueprint('TextMagic-SMS', __name__)
module.hasAdminPage = False
module.moduleDescription = '2FA and SMS Sending Module'
module.version = '1.0'

# Soon

#username = "your_textmagic_username"
#token = "your_apiv2_key"
#client = TextmagicRestClient(username, token)
#message = client.messages.create(phones="9990001001", text="Hello TextMagic")
27 changes: 20 additions & 7 deletions core/modules/automation/httprequests.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,29 @@
module = Blueprint('httprequests', __name__)
module.hasAdminPage = False
module.moduleDescription = 'Automate simple http requests'
module.version = '1.0'
module.version = '1.1'
module.methods = dir()

module.automation = [('sendRequest', {'url': 'str', 'data': 'str'})]

def sendRequest(url, data):
def test(xee, eee):
pass

def sendRequest(dta):
print('**********', dta)
url = dta[0]
data = dta[1]
try:
timeout = dta[2]
except:
timeout = 4
print(f'Sending data [{url}] ({data})')
try:
x = requests.post(url, data=data, timeout=4)
x = requests.post(url, data=data, timeout=timeout)
print(x.text)
return x.text
except Exception as e:
print(e)
return 0

# Soon
exc_type, exc_obj, exc_tb = sys.exc_info()
fname = os.path.split(exc_tb.tb_frame.f_code.co_filename)[1]
print(e, exc_type, fname, exc_tb.tb_lineno)
return {'success': False, 'error': e}
Loading