Skip to content

Commit

Permalink
ignore_secondlayer_checks description
Browse files Browse the repository at this point in the history
  • Loading branch information
hzhreal committed Dec 20, 2024
1 parent 4d4ed00 commit 92b89df
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 5 deletions.
4 changes: 3 additions & 1 deletion TUTORIAL.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ If the game has second layer of encryption that is implemented, you will get pro
**encrypt**: Accepts save pairs that will get resigned, and you will get prompted to replace the files inside the save.
**Parameters**:
- upload_individually, Choose if you want to upload the decrypted files one by one, or the ones you want at once. Put to true if you want to swap all the files in the save. If you put it to false, and there is more than 1 file inside, you will have to rename the files you want uploaded using a format. The bot will prompt you on the details.
- include_sce_sys, Choose if you want to upload the contents of the 'sce_sys' folder. You can replace any sce_sys files you want, make sure to have the same filenames.
- include_sce_sys, Choose if you want to upload the contents of the 'sce_sys' folder. You can replace any sce_sys files you want, make sure to have the same filenames.
- ignore_secondlayer_checks, Choose if you want the bot to neglect checking if the files inside your save can be encrypted/compressed.
If the game has second layer of encryption that is implemented, the savefiles you swap will automatically get encrypted if needed.

//
Expand Down Expand Up @@ -108,6 +109,7 @@ The save you input must be fully decrypted, then you can encrypt with the bot, h
**Parameters**:
- savename, the name you want to give the save
- saveblocks, the size of the save (saveblocks * 2¹⁵)
- ignore_secondlayer_checks, Choose if you want the bot to neglect checking if the files inside your save can be encrypted/compressed.

//

Expand Down
4 changes: 2 additions & 2 deletions cogs/createsave.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from data.crypto.helpers import extra_import
from utils.constants import (
IP, PORT_FTP, PORT_CECIE, PS_UPLOADDIR, MOUNT_LOCATION,
SAVEBLOCKS_MAX, SCE_SYS_CONTENTS, MANDATORY_SCE_SYS_CONTENTS, BASE_ERROR_MSG, PS_ID_DESC, RANDOMSTRING_LENGTH, MAX_FILES, CON_FAIL_MSG, CON_FAIL, MAX_FILENAME_LEN, MAX_PATH_LEN, CREATESAVE_ENC_CHECK_LIMIT,
SAVEBLOCKS_MAX, SCE_SYS_CONTENTS, MANDATORY_SCE_SYS_CONTENTS, BASE_ERROR_MSG, PS_ID_DESC, IGNORE_SECONDLAYER_DESC, RANDOMSTRING_LENGTH, MAX_FILES, CON_FAIL_MSG, CON_FAIL, MAX_FILENAME_LEN, MAX_PATH_LEN, CREATESAVE_ENC_CHECK_LIMIT,
Color, Embed_t, logger
)
from utils.workspace import makeWorkspace, WorkspaceError, initWorkspace, cleanup
Expand Down Expand Up @@ -43,7 +43,7 @@ async def createsave(
savename: Option(str, description="The name of the save."), # type: ignore
saveblocks: saveblocks_annotation, # type: ignore
playstation_id: Option(str, description=PS_ID_DESC, default=""), # type: ignore
ignore_secondlayer_checks: bool = False
ignore_secondlayer_checks: Option(bool, description=IGNORE_SECONDLAYER_DESC, default=False) # type: ignore
) -> None:

newUPLOAD_ENCRYPTED, newUPLOAD_DECRYPTED, newDOWNLOAD_ENCRYPTED, newPNG_PATH, newPARAM_PATH, newDOWNLOAD_DECRYPTED, newKEYSTONE_PATH = initWorkspace()
Expand Down
4 changes: 2 additions & 2 deletions cogs/encrypt.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from google_drive import GDapi, GDapiError
from data.crypto import CryptoError
from utils.constants import (
IP, PORT_FTP, PS_UPLOADDIR, PORT_CECIE, MAX_FILES, BASE_ERROR_MSG, RANDOMSTRING_LENGTH, MOUNT_LOCATION, SCE_SYS_CONTENTS, PS_ID_DESC, CON_FAIL, CON_FAIL_MSG,
IP, PORT_FTP, PS_UPLOADDIR, PORT_CECIE, MAX_FILES, BASE_ERROR_MSG, RANDOMSTRING_LENGTH, MOUNT_LOCATION, SCE_SYS_CONTENTS, PS_ID_DESC, IGNORE_SECONDLAYER_DESC, CON_FAIL, CON_FAIL_MSG,
logger, Color, Embed_t,
emb6, emb14
)
Expand All @@ -32,7 +32,7 @@ async def encrypt(
upload_individually: Option(bool, description="Choose if you want to upload the decrypted files one by one, or the ones you want at once."), # type: ignore
include_sce_sys: Option(bool, description="Choose if you want to upload the contents of the 'sce_sys' folder."), # type: ignore
playstation_id: Option(str, description=PS_ID_DESC, default=""), # type: ignore
ignore_secondlayer_checks: bool = False
ignore_secondlayer_checks: Option(bool, description=IGNORE_SECONDLAYER_DESC, default=False) # type: ignore
) -> None:

newUPLOAD_ENCRYPTED, newUPLOAD_DECRYPTED, newDOWNLOAD_ENCRYPTED, newPNG_PATH, newPARAM_PATH, newDOWNLOAD_DECRYPTED, newKEYSTONE_PATH = initWorkspace()
Expand Down
1 change: 1 addition & 0 deletions utils/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
UPLOAD_TIMEOUT,
SYS_FILE_MAX,
PS_ID_DESC,
IGNORE_SECONDLAYER_DESC,
BASE_ERROR_MSG,
QR_FOOTER1,
QR_FOOTER2,
Expand Down
1 change: 1 addition & 0 deletions utils/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ def __init__(self) -> None:
CREATESAVE_ENC_CHECK_LIMIT = 20 # if the amount of gamesaves uploaded in createsave command is less or equal to this number we will perform a check on each of the files to see if we can add encryption to it

PS_ID_DESC = "Your Playstation Network username. Do not include if you want to use the previous one."
IGNORE_SECONDLAYER_DESC = "If you want the bot to neglect checking if the files inside your save can be encrypted/compressed."

BASE_ERROR_MSG = "An unexpected server-side error has occurred! Try again, and if it occurs multiple times, please contact the host."

Expand Down

0 comments on commit 92b89df

Please sign in to comment.