-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathresponder.py
More file actions
56 lines (49 loc) · 1.56 KB
/
responder.py
File metadata and controls
56 lines (49 loc) · 1.56 KB
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
import json,os,time,threading
import modules as md
import sys
try:
if sys.argv[1] != "e4oyBHK7YPBj7Tvj":
sys.exit()
except:sys.exit()
# Set Cmd Title & Style
os.system("28P - Chat")
os.system("color 5 & mode con: cols=90 lines=50")
# Styling :::
print('''
.d888b. .d888b. d8888b. .o88b. db db .d8b. d888888b
VP `8D 88 8D 88 `8D d8P Y8 88 88 d8' `8b `~~88~~'
odD' `VoooY' 88oodD' 8P 88ooo88 88ooo88 88
.88' .d~~~b. 88~~~ C8888D 8b 88~~~88 88~~~88 88
j88. 88 8D 88 Y8b d8 88 88 88 88 88
888888D `Y888P' 88 `Y88P' YP YP YP YP YP v0.2
============================== By - Mr28 ================================\n\n\n''')
config = md.ConfigFile().GetConfig()
# -================== Start App ==================-
def update():
msgFile = {"msg":"","name":"","host":"","me":""}
setOld = open('msg.json','w')
setOld.write(json.dumps(msgFile))
setOld.close()
def getNewMsg():
if(os.path.getsize("msg.json")>9):
openMsgFile = open('msg.json','r')
msgFile = json.loads(openMsgFile.read())
openMsgFile.close()
msg = msgFile['msg']
name = msgFile['name']
me = msgFile['me']
if(msg != ""):
threading.Thread(print(" "+str(name)+" >> "+str(msg)))
if(me != ""):
threading.Thread(print(" Me >> %s "%me))
threading.Thread(update())
try:
update()
while(True):
getNewMsg()
time.sleep(1)
finally:
print("\033[1;36;40m Closing ...")
time.sleep(1)
threading.Thread(update())
sys.exit()