Some minor changes
This commit is contained in:
@@ -10,7 +10,7 @@ from progress.bar import Bar
|
|||||||
|
|
||||||
|
|
||||||
VERSION_NUMBER="0.1.1"
|
VERSION_NUMBER="0.1.1"
|
||||||
|
SCRIPT_BASENAME = os.path.basename(sys.argv[0])
|
||||||
|
|
||||||
async def read_chunks(filename, chunk_size = 1024):
|
async def read_chunks(filename, chunk_size = 1024):
|
||||||
with open(filename, "rb") as f:
|
with open(filename, "rb") as f:
|
||||||
@@ -107,7 +107,7 @@ async def main():
|
|||||||
parser.add_argument('--password', type=str, help="Specify the shared password (for --receive)")
|
parser.add_argument('--password', type=str, help="Specify the shared password (for --receive)")
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
passwd_part = server_part = ""
|
passwd_part = server_part = ""
|
||||||
send_part = f'{sys.argv[0]} --receive '
|
send_part = f'{SCRIPT_BASENAME} --receive'
|
||||||
if args.receive:
|
if args.receive:
|
||||||
role = 'receive'
|
role = 'receive'
|
||||||
password = args.password
|
password = args.password
|
||||||
@@ -128,7 +128,7 @@ async def main():
|
|||||||
WS_RELAY_SERVER = args.server
|
WS_RELAY_SERVER = args.server
|
||||||
server_part = f'--server {WS_RELAY_SERVER}'
|
server_part = f'--server {WS_RELAY_SERVER}'
|
||||||
if args.version:
|
if args.version:
|
||||||
print(f"{sys.argv[0]} ver {VERSION_NUMBER}")
|
print(f"{SCRIPT_BASENAME} ver {VERSION_NUMBER}")
|
||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
|
|
||||||
k = derive_key_from_password(password)
|
k = derive_key_from_password(password)
|
||||||
|
|||||||
Reference in New Issue
Block a user