fxied smaller issues

This commit is contained in:
Pawel Orzech 2019-11-08 16:21:48 +00:00
parent fbc9bde494
commit 76978398c1
3 changed files with 66 additions and 36 deletions

View file

@ -88,9 +88,9 @@ while True:
print('') print('')
commands.db_download() commands.db_download()
elif command == '6': elif command == '6':
commamds.glb_db_dowmload() commands.glb_db_download()
elif command == '7': #elif command == '7':
commands.jp_db_download() # commands.jp_db_download()
elif command == '5': elif command == '5':
webbrowser.open(commands.discordurl, new=0, autoraise=True) webbrowser.open(commands.discordurl, new=0, autoraise=True)
elif command == 'exit': elif command == 'exit':
@ -186,8 +186,8 @@ while True:
commands.db_download() commands.db_download()
elif command == '7': elif command == '7':
commands.glb_db_download() commands.glb_db_download()
elif command == '8': # elif command == '8':
commands.jp_db_download() # commands.jp_db_download()
elif command == '6': elif command == '6':
webbrowser.open(commands.discordurl, new=0, autoraise=True) webbrowser.open(commands.discordurl, new=0, autoraise=True)
elif command == 'exit': elif command == 'exit':

View file

@ -1,38 +1,67 @@
# pysqlsimplecipher # Dragon Ball Dokkan Battle Bot
Encrypt or decrypt formated sqlite db.
This project is a tool for sqlite database encryption or decryption like This is a Dokkan Battle bot that was first created by FlashChaser. I added a lot of new features and planning on adding more, therefore I've created my own repo.
[sqlcipher](http://sqlcipher.net/) There's no support from me - it is what it is. If you're gonna get banned - bad luck.
without install sqlcipher.
When encrypt or decrypt database, an algorithm called AES-256-CBC is used.
Each page shares the same key derived from password,
but owns a random initialization vector stored at the end of the page.
## Decrypt If you want to add a feature you've made feel free to submit a pull request.
```bash
python decrypt.py encrypted.db password output.db The bot is made quite straightforwardly:
The packet module handles the encryption of packet data as well as the authorisation.
There shouldn't be too much reason to add to this file beyond fixing bugs.
The commands module is where the bulk of the code will be written for adding new features.
The dokkan module is where the command line/UI will be implemented, and will call the functions in the commands module.
The decryptor module uses: https://github.com/bssthu/pysqlsimplecipher
Although it's slow FlashChaser preferred this code over pysqlcipher simply because it's easier to package it for distribution without running into issues.
# Download
Just grab a copy of master repo and go on.
# To Do
Feel free to add feature requests. I'm gonna try and add as much as I can with my spare time. Bot already can do pretty much anything.
- Sell only Hercules
- **Hercule Punch - done**
- SBR,
- **RankUp - done**,
- Transfer but better,
- **BossRush - done**
- **EzaPLUS (up to 50lvl) - done**
# Installation
You might need to use sudo before every pip3 command.
```
pip3 install six
pip3 install pyinstaller
pip3 install colorama
pip3 install orator
pip3 install pycrypto - https://github.com/dlitz/pycrypto
OR pip3 install pycryptodome
pip3 install PySimpleGUI
pip3 install requests
``` ```
## Encrypt Then go to folder where your dokkan.py file is and: python3 dokkan.py
```bash
python encrypt.py plain.db password output.db
```
Needs reserved space at the end of each page of the database file.
Otherwise, use sqlcipher to encrypt. Happy testing!
#### Encrypt with sqlcipher # Pull Requests
- Open plain db Very happy to merge pull requests.
```bash Until I can develop some tests be careful to make sure that all new commands that you implement accurately support JP translation.
./sqlcipher plain.db
```
- Encrypt to enc.db
```sql
ATTACH DATABASE 'enc.db' as encrypted key 'testkey';
SELECT sqlcipher_export('encrypted');
DETACH DATABASE encrypted;
```
## License e.g Check that you read from the global database, and if the data doesn't exist, read from the jp database.
GNU Lesser General Public License Version 3
```python
try:
config.Model.set_connection_resolver(config.db_glb)
config.Quests.find_or_fail(int(stage_id))
except:
config.Model.set_connection_resolver(config.db_jp)
config.Quests.find_or_fail(int(stage_id))
```

View file

@ -1067,7 +1067,8 @@ def glb_db_download():
def db_download(): def db_download():
# #
jp_out_of_date = False #jp_out_of_date = False
#JP is broken
glb_out_of_date = False glb_out_of_date = False
# Check local DB versions in help.txt # Check local DB versions in help.txt