diff --git a/Clients/Linux/client.py b/Clients/Linux/client.py index 53d1457..fc01e4d 100755 --- a/Clients/Linux/client.py +++ b/Clients/Linux/client.py @@ -9,7 +9,6 @@ import json import pyperclip import requests import socketio -from pid.decorator import pidfile from cryptography.fernet import Fernet import notification as notif @@ -17,8 +16,8 @@ import notification as notif IP = 'localhost' PORT = "9564" HOSTNAME = "WarMachine" -USERNAME = "neotaku67" -PASSWORD = "un bon mot de passe de prefererance mais en sah tant qu'il est hashe ca passe" +USERNAME = "moi" +PASSWORD = "azerty" SIGNATURE = "[AllSync] " KEY = b'n63cPRiZ5DBIBgIR8oiDhnzE5oAj-6xsU1ed8gdPr8A=' fernet = Fernet(KEY) @@ -90,16 +89,13 @@ def ClipboardUpdate(data): print("[ClipboardEvent] received data") -@pidfile() def main(): notification_thread.start() sio.wait() - if __name__ == "__main__": try: main() except: - print("cant lock pid file, is an another instance running?") sio.disconnect() sys.exit(1) diff --git a/README.md b/README.md index cbfd500..f476040 100755 --- a/README.md +++ b/README.md @@ -1,3 +1,7 @@ # FullSync -Syncro de notification mon phone et mon pc + up checker \ No newline at end of file +Syncro de notification mon phone et mon pc + up checker + + +use FullSync +db.createUser({user: 'FullSync', pwd: 'un bon mot de passe tkt', roles: ['readWrite']}) diff --git a/Server/Models/MongoDb/mongodb.py b/Server/Models/MongoDb/mongodb.py index 0427834..49f6b07 100644 --- a/Server/Models/MongoDb/mongodb.py +++ b/Server/Models/MongoDb/mongodb.py @@ -13,8 +13,6 @@ client = MongoClient('simailadjalim.fr:27017', authSource='FullSync', authMechanism='SCRAM-SHA-256') - - try: client.admin.command('ping') print("Pinged your deployment. You successfully connected to MongoDB!") diff --git a/Server/app.py b/Server/app.py index cc01f17..ce73735 100644 --- a/Server/app.py +++ b/Server/app.py @@ -67,7 +67,6 @@ def add_notification(): return {"status": "ok"}, 200 - @app.route("/notification", methods=['GET']) def get_notifications(): """ @@ -135,7 +134,6 @@ def get_clipboard(): clipboard = [clip.__dict__ for clip in clipboard] return {"status": "ok", "clipboard": clipboard}, 200 - @app.route("/clipboard/", methods=['GET']) def get_clipboard_by_id(clipid): """ diff --git a/Server/requirements.txt b/Server/requirements.txt new file mode 100644 index 0000000..7601a9b --- /dev/null +++ b/Server/requirements.txt @@ -0,0 +1,16 @@ +bidict==0.22.1 +blinker==1.7.0 +click==8.1.7 +dnspython==2.4.2 +Flask==3.0.0 +Flask-SocketIO==5.3.6 +h11==0.14.0 +itsdangerous==2.1.2 +Jinja2==3.1.2 +MarkupSafe==2.1.3 +pymongo==4.6.1 +python-engineio==4.8.0 +python-socketio==5.10.0 +simple-websocket==1.0.0 +Werkzeug==3.0.1 +wsproto==1.2.0