-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPySpoofer.kv
More file actions
337 lines (275 loc) · 8.83 KB
/
Copy pathPySpoofer.kv
File metadata and controls
337 lines (275 loc) · 8.83 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
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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
<MainWindow>:
controllers_list: controllers_list
canvas.before:
Color:
rgb: 62/255, 70/255, 73/255
Rectangle:
size: self.width, self.height
GridLayout:
cols: 1
size: root.width, root.height
rows_minimum: {0:root.height*0.6/4 ,1:root.height*3.4/4}
GridLayout:
cols: 5
padding: [36.5, 20, 0, 0]
canvas.before:
Color:
rgb: 46/255, 47/255, 49/255
RoundedRectangle:
size: self.width - 70, self.height - 20
pos: self.x + 36.5, self.y
FlatButton:
text: "Scan"
radius: [5, 0, 0, 5]
on_release:
if root.scanner_active: root.a.send("stop"); \
self.background_color = [35/255, 169/255, 110/255]; \
root.scanner_active = False; \
self.stop();
else: root.scan(); \
self.background_color = [33/255, 147/255, 95/255]; \
self.move();
FlatButton:
text: "Spoof all"
on_release: for c in controllers_list.children: c.children[2].only_on()
FlatButton:
text: "Reload\nFilter List"
halign: "center"
on_press: root.load_filter_list()
Widget:
size_hint_x: None
width: 350
GridLayout:
cols: 2
size_hint: None, 1
width: 150
FlatLabel:
text: root.my_ip
width: 150
radius: [5, 0, 0, 0]
FlatLabel:
text: root.gateway_ip
width: 150
radius: [0, 5, 0, 0]
FlatLabel:
text: root.my_mac
width: 150
radius: [0, 0, 0, 5]
FlatLabel:
text: root.gateway_mac
width: 150
radius: [0, 0, 5, 0]
GridLayout:
cols: 1
padding: [36.5, 20, 0, 0]
rows_minimum: {0:53, 1:275}
TableBar:
ScrollView:
do_scroll_x: False
size_hint_x: None
bar_width: '10dp'
width: 950
canvas.before:
Color:
rgb: 46/255, 47/255, 49/255
RoundedRectangle:
size: self.width, self.height - 25
pos: self.x, self.y + 28
radius: [0, 0, 5, 5]
GridLayout:
id: controllers_list
cols: 1
size_hint_y: None
height: 575
<-FlatButton>:
size_hint_x: None
width: 100
font_name: "Lato-Black.ttf"
background_color: [33/255, 147/255, 95/255] if self.state == "down" else [35/255, 169/255, 110/255]
canvas:
###Border###
Color:
rgb: 54/255, 98/255, 83/255
RoundedRectangle:
size: self.size
pos: self.pos
radius: self.radius
###Background###
Color:
rgb: self.background_color
RoundedRectangle:
size: self.width - 2, self.height - 2
pos: self.x + 1, self.y + 1
radius: self.radius
###Text###
Color:
rgb: 195/255, 220/255, 206/255
Rectangle:
texture: self.texture
size: self.texture_size
pos: int(self.center_x - self.texture_size[0] / 2.), int(self.center_y - self.texture_size[1] / 2.)
<-FlatLabel>:
size_hint_x: None
width: 100
font_name: "Lato-Black.ttf"
background_color: [44/255, 56/255, 54/255]
canvas:
###Border###
Color:
rgb: 54/255, 98/255, 83/255
RoundedRectangle:
size: self.size
pos: self.pos
radius: self.radius
###Background###
Color:
rgb: self.background_color
RoundedRectangle:
size: self.width - 2, self.height - 2
pos: self.x + 1, self.y + 1
radius: self.radius
###Text###
Color:
rgb: 36/255, 158/255, 104/255
Rectangle:
texture: self.texture
size: self.texture_size
pos: int(self.center_x - self.texture_size[0] / 2.), int(self.center_y - self.texture_size[1] / 2.)
<-FlatTextInput>
size_hint_x: None
width: 100
font_name: "Lato-Black.ttf"
cursor_color: [36/255, 158/255, 104/255, 1]
foreground_color: [36/255, 158/255, 104/255, 1]
halign: "center"
multiline: False
canvas.before:
Color:
rgb: 54/255, 98/255, 83/255
Rectangle:
pos: self.pos
size: self.size
Color:
rgb: 44/255, 56/255, 54/255
Rectangle:
size: self.width - 2, self.height - 2
pos: self.x + 1, self.y + 1
Color:
rgba: (self.cursor_color if self.focus and not self._cursor_blink else (0, 0, 0, 0))
Rectangle:
pos: [int(x) for x in self.cursor_pos]
size: root.cursor_width, -self.line_height
Color:
rgba: self.disabled_foreground_color if self.disabled else (self.hint_text_color if not self.text else self.foreground_color)
<FlatSwitch>
ball_x: self.x + self.width/5 + 5
canvas:
###Border###
Color:
rgb: 54/255, 98/255, 83/255
Rectangle:
size: self.size
pos: self.pos
###Background###
Color:
rgb: 44/255, 56/255, 54/255
Rectangle:
size: self.width - 2, self.height - 2
pos: self.x + 1, self.y + 1
Color:
rgb: self.back if not self.disabled else [213/255, 213/255, 213/255]
Rectangle:
size: 60, 35
pos: self.x + self.width/5, self.y + self.height/5.5
Color:
rgb: [250/255, 250/255, 250/255] if not self.disabled else [189/255, 189/255, 189/255]
Rectangle:
size: 25, 25
pos: self.ball_x, self.y + self.height/5.5 + 5
<TableBar>:
cols: 8
size_hint_y: None
height: 50
FlatLabel:
text: "Name"
radius: [5, 0, 0, 0]
width: 150
FlatLabel:
text: "MAC"
width: 150
FlatLabel:
text: "IP"
width: 150
FlatLabel:
text: "Download"
FlatLabel:
text: "Upload"
FlatLabel:
text: "Spoof"
FlatLabel:
text: "Block"
FlatLabel:
text: "Filter"
radius: [0, 5, 0, 0]
<HostController>
down_meter: down_meter
down_limit: down_limit
up_meter: up_meter
up_limit: up_limit
cols: 8
size_hint: None, None
height: 60
width: 150
FlatTextInput:
text: root.name
hint_text:"Device name"
width: root.width * 3/19
padding_y: [20, 0]
on_text_validate: root.save(self.text)
FlatLabel:
text: root.mac
width: root.width * 3/19
FlatLabel:
text: root.ip
width: root.width * 3/19
GridLayout:
cols: 1
FlatLabel:
id: down_meter
text: "0 KB/s"
FlatTextInput:
id: down_limit
width: root.width * 2/19
hint_text: "Limit"
padding_y: [5, 0]
on_text_validate: root.hccl.send(["download", self.text])
GridLayout:
cols: 1
FlatLabel:
id: up_meter
text: "0 KB/s"
FlatTextInput:
id: up_limit
width: root.width * 2/19
hint_text: "Limit"
padding_y: [5, 0]
on_text_validate: root.hccl.send(["upload", self.text])
FlatSwitch:
size_hint_x: None
width: root.width * 2/19
on_press:
if self.active: root.spoof();
else: root.un_spoof();
FlatSwitch:
size_hint_x: None
width: root.width * 2/19
disabled: True
on_press:
if self.active: root.hccl.send("block");
else: root.hccl.send("start");
FlatSwitch:
size_hint_x: None
width: root.width * 2/19
on_press:
if self.active: root.hccl.send("filter");
else: root.hccl.send("unfilter");