-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.py
executable file
·39 lines (29 loc) · 860 Bytes
/
test.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/usr/bin/python
import cgi
import cgitb
import sys
import urllib
sys.path.append("..")
import openseed_account as Account
import openseed_setup as Settings
import openseed_seedgenerator as Seeds
import openseed_music as Music
import openseed_connections as Connections
import openseed_chat as Chat
import onetime as OneTime
import json
form = cgi.FieldStorage()
dev_pub = form.getvalue("pub")
read_json = form.getvalue("msg")
print("Content-type:text/html\r\n\r\n")
if dev_pub == None:
from_client = json.loads(read_json)
else:
devID = Account.get_priv_from_pub(dev_pub)
decrypted_message = Seeds.simp_decrypt(devID,read_json)
from_client = json.loads(decrypted_message)
action = from_client["act"]
if Account.check_appID(from_client["appID"],from_client["devID"]):
app = from_client["appID"]
dev = from_client["devID"]
print("We're Here")