flyshell 1.1.4__tar.gz → 1.1.6__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {flyshell-1.1.4/src/flyshell.egg-info → flyshell-1.1.6}/PKG-INFO +1 -1
- {flyshell-1.1.4 → flyshell-1.1.6}/src/flyshell/abstract/parent_cmd.py +1 -1
- {flyshell-1.1.4 → flyshell-1.1.6}/src/flyshell/builtin/system.py +0 -1
- {flyshell-1.1.4 → flyshell-1.1.6}/src/flyshell/builtin/utils.py +1 -2
- {flyshell-1.1.4 → flyshell-1.1.6}/src/flyshell/constants.py +2 -2
- {flyshell-1.1.4 → flyshell-1.1.6}/src/flyshell/core/auth.py +2 -4
- {flyshell-1.1.4 → flyshell-1.1.6}/src/flyshell/core/directory.py +8 -7
- {flyshell-1.1.4 → flyshell-1.1.6}/src/flyshell/main.py +1 -1
- {flyshell-1.1.4 → flyshell-1.1.6/src/flyshell.egg-info}/PKG-INFO +1 -1
- {flyshell-1.1.4 → flyshell-1.1.6}/LICENSE +0 -0
- {flyshell-1.1.4 → flyshell-1.1.6}/README.md +0 -0
- {flyshell-1.1.4 → flyshell-1.1.6}/pyproject.toml +0 -0
- {flyshell-1.1.4 → flyshell-1.1.6}/setup.cfg +0 -0
- {flyshell-1.1.4 → flyshell-1.1.6}/src/flyshell/__init__.py +0 -0
- {flyshell-1.1.4 → flyshell-1.1.6}/src/flyshell/abstract/__init__.py +0 -0
- {flyshell-1.1.4 → flyshell-1.1.6}/src/flyshell/abstract/base_cmd.py +0 -0
- {flyshell-1.1.4 → flyshell-1.1.6}/src/flyshell/abstract/base_plugin.py +0 -0
- {flyshell-1.1.4 → flyshell-1.1.6}/src/flyshell/builtin/__init__.py +0 -0
- {flyshell-1.1.4 → flyshell-1.1.6}/src/flyshell/builtin/diskops.py +0 -0
- {flyshell-1.1.4 → flyshell-1.1.6}/src/flyshell/builtin/fs.py +0 -0
- {flyshell-1.1.4 → flyshell-1.1.6}/src/flyshell/core/__init__.py +0 -0
- {flyshell-1.1.4 → flyshell-1.1.6}/src/flyshell/core/console.py +0 -0
- {flyshell-1.1.4 → flyshell-1.1.6}/src/flyshell/core/data.py +0 -0
- {flyshell-1.1.4 → flyshell-1.1.6}/src/flyshell/core/loader.py +0 -0
- {flyshell-1.1.4 → flyshell-1.1.6}/src/flyshell.egg-info/SOURCES.txt +0 -0
- {flyshell-1.1.4 → flyshell-1.1.6}/src/flyshell.egg-info/dependency_links.txt +0 -0
- {flyshell-1.1.4 → flyshell-1.1.6}/src/flyshell.egg-info/entry_points.txt +0 -0
- {flyshell-1.1.4 → flyshell-1.1.6}/src/flyshell.egg-info/requires.txt +0 -0
- {flyshell-1.1.4 → flyshell-1.1.6}/src/flyshell.egg-info/top_level.txt +0 -0
- {flyshell-1.1.4 → flyshell-1.1.6}/tests/test_auth.py +0 -0
- {flyshell-1.1.4 → flyshell-1.1.6}/tests/test_data.py +0 -0
- {flyshell-1.1.4 → flyshell-1.1.6}/tests/test_directory.py +0 -0
- {flyshell-1.1.4 → flyshell-1.1.6}/tests/test_loader.py +0 -0
- {flyshell-1.1.4 → flyshell-1.1.6}/tests/test_security.py +0 -0
|
@@ -81,8 +81,7 @@ class Kill(BaseCmd):
|
|
|
81
81
|
def execute(self, args):
|
|
82
82
|
choice = input("\nAre you sure [y/n]?: ").strip().lower()
|
|
83
83
|
if choice == "y":
|
|
84
|
-
|
|
85
|
-
sys.exit(0)
|
|
84
|
+
return (-1, "\nShutting down...\n")
|
|
86
85
|
return (1, "\nAction cancelled.\n")
|
|
87
86
|
|
|
88
87
|
|
|
@@ -7,7 +7,6 @@ import getpass
|
|
|
7
7
|
import hashlib
|
|
8
8
|
import re
|
|
9
9
|
import secrets
|
|
10
|
-
import sys
|
|
11
10
|
|
|
12
11
|
|
|
13
12
|
def hash_password(password, salt=None):
|
|
@@ -102,7 +101,7 @@ def login_flow(is_lock=False) -> bool:
|
|
|
102
101
|
i -= 1
|
|
103
102
|
print("\nAccount Error: Password does not match.")
|
|
104
103
|
if i == 0:
|
|
105
|
-
print("Too many attempts
|
|
104
|
+
print("Too many attempts.")
|
|
106
105
|
return False
|
|
107
106
|
print(f"You have {i} attempts remaining.\n")
|
|
108
107
|
|
|
@@ -118,5 +117,4 @@ class Lock(BaseCmd):
|
|
|
118
117
|
if login_flow(is_lock=True):
|
|
119
118
|
return (0, "")
|
|
120
119
|
else:
|
|
121
|
-
|
|
122
|
-
sys.exit(0)
|
|
120
|
+
return (-1, "\nShutting down...\n")
|
|
@@ -8,6 +8,7 @@ from flyshell.core import auth, data
|
|
|
8
8
|
|
|
9
9
|
from datetime import datetime, timezone
|
|
10
10
|
import shlex
|
|
11
|
+
import sys
|
|
11
12
|
|
|
12
13
|
|
|
13
14
|
class Cmds(BaseCmd):
|
|
@@ -145,14 +146,14 @@ def _execute_single(raw_cmd: str) -> int:
|
|
|
145
146
|
code, message = result
|
|
146
147
|
if message:
|
|
147
148
|
print(message)
|
|
149
|
+
if code == -1:
|
|
150
|
+
sys.exit(0)
|
|
151
|
+
elif code == -2:
|
|
152
|
+
sys.exit(1)
|
|
148
153
|
return code
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
if result:
|
|
153
|
-
print(result)
|
|
154
|
-
return 0
|
|
155
|
-
return 0
|
|
154
|
+
else:
|
|
155
|
+
print("\nCommand Error: Unknown exit code error occurred.\n")
|
|
156
|
+
return 1
|
|
156
157
|
elif cmd_name in c.PLUGINS:
|
|
157
158
|
log(raw_cmd)
|
|
158
159
|
plugin = c.PLUGINS[cmd_name]
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|