mirror of
https://github.com/onionshare/onionshare.git
synced 2025-08-01 19:06:20 -04:00
Add QR code for private key, update tests
This commit is contained in:
parent
400460f7c9
commit
9b859b9d08
4 changed files with 65 additions and 83 deletions
|
@ -394,7 +394,13 @@ def main(cwd=None):
|
|||
if mode_settings.get("general", "qr"):
|
||||
qr = QRCode()
|
||||
qr.add_data(url)
|
||||
print("Onion address as QR code:")
|
||||
qr.print_ascii()
|
||||
if not mode_settings.get("general", "public"):
|
||||
qr.clear()
|
||||
qr.add_data(app.auth_string)
|
||||
print("Private key as QR code:")
|
||||
qr.print_ascii()
|
||||
print("")
|
||||
print("Waiting for the scheduled time before starting...")
|
||||
app.onion.cleanup(False)
|
||||
|
@ -481,7 +487,13 @@ def main(cwd=None):
|
|||
if mode_settings.get("general", "qr"):
|
||||
qr = QRCode()
|
||||
qr.add_data(url)
|
||||
print("Onion address as QR code:")
|
||||
qr.print_ascii()
|
||||
if not mode_settings.get("general", "public"):
|
||||
qr.clear()
|
||||
qr.add_data(app.auth_string)
|
||||
print("Private key as QR code:")
|
||||
qr.print_ascii()
|
||||
|
||||
print("")
|
||||
print("Press Ctrl+C to stop the server")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue