jsp ptdrrrr
This commit is contained in:
parent
f856b77e64
commit
aa1a16e3e9
@ -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)
|
||||
|
@ -1,3 +1,7 @@
|
||||
# FullSync
|
||||
|
||||
Syncro de notification mon phone et mon pc + up checker
|
||||
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']})
|
||||
|
@ -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!")
|
||||
|
@ -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/<clipid>", methods=['GET'])
|
||||
def get_clipboard_by_id(clipid):
|
||||
"""
|
||||
|
16
Server/requirements.txt
Normal file
16
Server/requirements.txt
Normal file
@ -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
|
Loading…
Reference in New Issue
Block a user