Enabled FTP over TLS
This commit is contained in:
parent
ebe15c51d1
commit
8a8e1216c1
3
Main.py
3
Main.py
@ -1,7 +1,7 @@
|
|||||||
# Windows path: os.getenv('LOCALAPPDATA')/Programs/PrismLauncher/prismlauncher.exe
|
# Windows path: os.getenv('LOCALAPPDATA')/Programs/PrismLauncher/prismlauncher.exe
|
||||||
# Windows instance path: os.getenv('APPDATA')/PrismLauncher/instances
|
# Windows instance path: os.getenv('APPDATA')/PrismLauncher/instances
|
||||||
# Linux instance path: .local/share/PrismLauncher/instances
|
# Linux instance path: .local/share/PrismLauncher/instances
|
||||||
from ftplib import FTP
|
from ftplib import FTP_TLS as FTP
|
||||||
import os
|
import os
|
||||||
import io
|
import io
|
||||||
import json
|
import json
|
||||||
@ -18,6 +18,7 @@ def main():
|
|||||||
prism_instance_path = os.getenv("APPDATA")+"/PrismLauncher/instances"
|
prism_instance_path = os.getenv("APPDATA")+"/PrismLauncher/instances"
|
||||||
ftp = FTP("gitea.piwalker.net")
|
ftp = FTP("gitea.piwalker.net")
|
||||||
ftp.login()
|
ftp.login()
|
||||||
|
ftp.prot_p()
|
||||||
bio = io.BytesIO()
|
bio = io.BytesIO()
|
||||||
ftp.retrbinary("RETR versions.json", bio.write)
|
ftp.retrbinary("RETR versions.json", bio.write)
|
||||||
bio.seek(0)
|
bio.seek(0)
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
from ftplib import FTP
|
from ftplib import FTP_TLS as FTP
|
||||||
from getpass import getpass
|
from getpass import getpass
|
||||||
import json
|
import json
|
||||||
import io
|
import io
|
||||||
@ -9,6 +9,7 @@ username = input("Username: ")
|
|||||||
password = getpass()
|
password = getpass()
|
||||||
version_tag = input("Version Number: ")
|
version_tag = input("Version Number: ")
|
||||||
ftp = FTP("gitea.piwalker.net", username, password)
|
ftp = FTP("gitea.piwalker.net", username, password)
|
||||||
|
ftp.prot_p()
|
||||||
bio = io.BytesIO()
|
bio = io.BytesIO()
|
||||||
ftp.retrbinary("RETR versions.json", bio.write)
|
ftp.retrbinary("RETR versions.json", bio.write)
|
||||||
bio.seek(0)
|
bio.seek(0)
|
||||||
|
Loading…
Reference in New Issue
Block a user