This repository has been archived by the owner on Apr 7, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
/
player.py
105 lines (82 loc) · 3.7 KB
/
player.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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
from utils import Utils
import os, time
class Player():
def __init__(self, ut):
self.ut = ut
self.Configuration = self.ut.readConfiguration()
self.getStore = self.ut.requestString("store.php",
accesstoken=self.Configuration["accessToken"], lang="en")
def getApplication(self):
Dict_request = self.getStore["apps"]
ApplicationCount = []
for ApplicationUp in enumerate(Dict_request):
Application = {}
try:
Application["baseprice"] = ApplicationUp[1]["baseprice"]
Application["level"] = ApplicationUp[1]["level"]
Application["price"] = ApplicationUp[1]["price"]
Application["factor"] = ApplicationUp[1]["factor"]
Application["maxlvl"] = ApplicationUp[1]["maxlvl"]
Application["running"] = ApplicationUp[1]["running"]
Application["appid"] = ApplicationUp[1]["appid"]
Application["require"] = ApplicationUp[1]["require"]
except KeyError as e:
Application["baseprice"] = None
Application["level"] = ApplicationUp[1]["level"]
Application["price"] = ApplicationUp[1]["price"]
Application["factor"] = None
Application["maxlvl"] = ApplicationUp[1]["maxlvl"]
Application["running"] = None
Application["appid"] = ApplicationUp[1]["appid"]
Application["require"] = ApplicationUp[1]["require"]
ApplicationCount.append(Application)
return ApplicationCount
def getHelperApplication(self):
Application = self.getApplication()
FinalApplication = {}
for allApplication in Application:
# AntiVirus
if int(allApplication["appid"]) == 1:
FinalApplication["AV"] = allApplication
# Firewall
if int(allApplication["appid"]) == 2:
FinalApplication["FW"] = allApplication
# Spam
if int(allApplication["appid"]) == 3:
FinalApplication["SPAM"] = allApplication
# Brute Force
if int(allApplication["appid"]) == 4:
FinalApplication["BRUTE"] = allApplication
# Bank Protection
if int(allApplication["appid"]) == 5:
FinalApplication["BP"] = allApplication
# Software developement kit
if int(allApplication["appid"]) == 6:
FinalApplication["SDK"] = allApplication
if int(allApplication["appid"]) == 7:
pass
#FinalApplication[""] = allApplication
if int(allApplication["appid"]) == 8:
pass
#FinalApplication[""] = allApplication
if int(allApplication["appid"]) == 9:
pass
#FinalApplication[""] = allApplication
if int(allApplication["appid"]) == 10:
FinalApplication["IPSP"] = allApplication
if int(allApplication["appid"]) == 11:
pass
#FinalApplication[""] = allApplication
if int(allApplication["appid"]) == 12:
pass
#FinalApplication[""] = allApplication
if int(allApplication["appid"]) == 13:
pass
#FinalApplication[""] = allApplication
if int(allApplication["appid"]) == 14:
pass
#FinalApplication[""] = allApplication
if int(allApplication["appid"]) == 15:
pass
#FinalApplication[""] = allApplication
return FinalApplication