forked from 10se1ucgo/DisableWinTracking
-
Notifications
You must be signed in to change notification settings - Fork 0
/
dwt.py
515 lines (429 loc) · 23.7 KB
/
dwt.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
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
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
# Copyright (C) Łukasz Łapaj 2018-2020
# Copyright (C) 10se1ucgo 2015-2016
#
# This file is part of DisableWinTracking.
#
# DisableWinTracking is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# DisableWinTracking is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with DisableWinTracking. If not, see <http://www.gnu.org/licenses/>.
import io
import logging
import platform
import sys
import traceback
import webbrowser
from ctypes import windll
import wx
from wx.lib.itemspicker import ItemsPicker, IP_SORT_SELECTED, IP_SORT_CHOICES, IP_REMOVE_FROM_CHOICES
import dwt_about
import dwt_util
class RedirectText(io.StringIO):
def __init__(self, console_window, old_stdout):
super(RedirectText, self).__init__()
self.out = console_window
self.old_out = old_stdout
def write(self, string):
# Oh my god this is the DUMBEST THING I've ever done. (Keeping a reference to the old stdout)
self.old_out.write(string)
self.out.WriteText(string)
class ConsoleDialog(wx.Dialog):
def __init__(self, old_stdout):
wx.Dialog.__init__(self, parent=wx.GetApp().TopWindow, title="Console Output", size=(510, 200),
style=wx.DEFAULT_DIALOG_STYLE | wx.RESIZE_BORDER)
console_box = wx.TextCtrl(self, style=wx.TE_MULTILINE | wx.TE_READONLY)
sys.stdout = RedirectText(console_box, old_stdout)
top_sizer = wx.BoxSizer(wx.VERTICAL)
console_sizer = wx.BoxSizer(wx.VERTICAL)
button_sizer = self.CreateButtonSizer(wx.OK | wx.CANCEL)
report_button = wx.FindWindowById(wx.ID_CANCEL, self)
report_button.SetLabel("Report an issue")
console_sizer.Add(console_box, 1, wx.LEFT | wx.RIGHT | wx.EXPAND | wx.ALIGN_TOP, 5)
top_sizer.Add(console_sizer, 1, wx.ALL | wx.EXPAND, 5)
top_sizer.Add(button_sizer, 0, wx.ALL | wx.ALIGN_LEFT, 5)
self.Bind(wx.EVT_CLOSE, handler=lambda x: sys.exit(0))
self.Bind(wx.EVT_BUTTON, handler=lambda x: sys.exit(0), id=wx.ID_OK)
self.Bind(wx.EVT_BUTTON, source=report_button, handler=self.submit_issue)
self.SetSizer(top_sizer)
def submit_issue(self):
webbrowser.open_new_tab("https://github.com/LukaszLapaj/DisableWinTracking/")
class MainFrame(wx.Frame):
def __init__(self):
super(MainFrame, self).__init__(parent=wx.GetApp().GetTopWindow(), title="Disable Windows 10 Tracking",
size=(380, 305))
self.SetMinSize(self.GetSize())
panel = MainPanel(self)
file_menu = wx.Menu()
settings = file_menu.Append(wx.ID_SETUP, "&Settings", "DWT settings")
# file_menu.SetBackgroundColour(wx.SYS_COLOUR_MENU)
help_menu = wx.Menu()
# about = help_menu.Append(wx.ID_ABOUT, "&About", "About DWT")
licenses = help_menu.Append(wx.ID_ANY, "&Licenses", "Open-source licenses")
menu_bar = wx.MenuBar()
menu_bar.Append(file_menu, "&File")
menu_bar.Append(help_menu, "&Help")
self.SetMenuBar(menu_bar)
check_elevated()
self.SetIcon(wx.Icon(sys.executable, wx.BITMAP_TYPE_ICO))
# self.Bind(wx.EVT_MENU, lambda x: dwt_about.about_dialog(self), about)
self.Bind(wx.EVT_MENU, panel.settings, settings)
self.Bind(wx.EVT_MENU, lambda x: dwt_about.Licenses(self), licenses)
self.Layout()
class MainPanel(wx.Panel):
def __init__(self, parent):
super(MainPanel, self).__init__(parent)
self.parent = parent
self.unpicked_ads = []
self.picked_normal = []
self.picked_extra = []
self.picked_ips = []
self.service_check = wx.CheckBox(self, label="Services")
self.service_check.SetToolTip("Disables or deletes tracking services. Choose option in 'Services Method'")
self.service_check.SetValue(1)
self.diagtrack_check = wx.CheckBox(self, label="Clear DiagTrack log")
self.diagtrack_check.SetToolTip("Clears Diagnostic Tracking log and prevents modification to it.")
self.diagtrack_check.SetValue(1)
# Telemetry checkbox
self.telemetry_check = wx.CheckBox(self, label="Telemetry")
self.telemetry_check.SetToolTip("Sets 'AllowTelemetry' to 0. "
"On non-Enterprise OS editions, requires HOSTS file modification.")
self.telemetry_check.SetValue(1)
# Clean HOSTS checkbox
self.clear_hosts_check = wx.CheckBox(self, label="Clear Hosts")
self.clear_hosts_check.SetToolTip("Removes all earlier changes to Hosts file.")
self.clear_hosts_check.SetValue(1)
# Ad HOSTS file checkbox
self.ads_check = wx.CheckBox(self, label="Block ad/malware domains")
self.ads_check.SetToolTip("Adds known ad/spyware/malware domains to Hosts file.")
self.ads_check.SetValue(1)
# HOSTS file checkbox
self.host_check = wx.CheckBox(self, label="Block tracking domains")
self.host_check.SetToolTip("Adds known tracking domains to Hosts file. Required to disable Telemetry")
self.host_check.SetValue(1)
# Extra HOSTS checkbox
self.extra_host_check = wx.CheckBox(self, label="Block more tracking domains")
self.extra_host_check.SetToolTip("For the paranoid. Adds extra domains to the Hosts file.\n"
"May cause issues with Skype, Dr. Watson, Hotmail and/or Error Reporting.")
# Flush DNS Service
self.flush_dns_check = wx.CheckBox(self, label="Flush DNS Service")
self.flush_dns_check.SetToolTip("This will restart DNS Service to apply all changes instantly.")
self.flush_dns_check.SetValue(1)
# IP block checkbox
self.ip_check = wx.CheckBox(self, label="Block tracking IP addresses")
self.ip_check.SetToolTip("Blocks known tracking IP addresses with Windows Firewall.")
# WifiSense checkbox
self.wifisense_check = wx.CheckBox(self, label="WifiSense")
self.wifisense_check.SetToolTip("Disable sharing stored Wi-Fi keys.")
# OneDrive uninstall checkbox
self.onedrive_check = wx.CheckBox(self, label="Uninstall OneDrive")
self.onedrive_check.SetToolTip("Uninstalls OneDrive from your computer and removes it from Explorer.")
# Xbox DVR checkbox
self.dvr_check = wx.CheckBox(self, label="Disable Xbox DVR")
self.dvr_check.SetToolTip("Disable Xbox DVR feature to increase FPS in games")
# Windows Update checkbox
self.windows_update_check = wx.CheckBox(self, label="Windows Update")
self.windows_update_check.SetToolTip("Disable all incoming updates through Windows Update.")
# CloudFlare DNS checkbox
self.cloudflare_dns_check = wx.CheckBox(self, label="Enable CloudFlare DNS")
self.cloudflare_dns_check.SetToolTip("Switch all connections to safe CloudFlare DNS")
# Location checkbox
self.location_check = wx.CheckBox(self, label="Disable Location")
self.location_check.SetToolTip("")
self.service_rad = wx.RadioBox(self, label="Services", choices=("Disable", "Delete"))
self.service_rad.SetItemToolTip(item=0, text="Simply disables the services. This can be undone.")
self.service_rad.SetItemToolTip(item=1, text="Deletes the services completely. This can't be undone.")
self.mode_rad = wx.RadioBox(self, label="Mode", choices=("Apply", "Revert"))
self.mode_rad.SetItemToolTip(item=0, text="Applies the selected settings.")
self.mode_rad.SetItemToolTip(item=1, text="Reverts the selected settings.")
go_button = wx.Button(self, label="Run!")
top_sizer = wx.BoxSizer(wx.VERTICAL)
top_row_sizer = wx.BoxSizer(wx.HORIZONTAL)
check_sizer = wx.BoxSizer(wx.VERTICAL)
rad_sizer = wx.BoxSizer(wx.VERTICAL)
top_sizer.Add(top_row_sizer, 0, wx.ALL, 5)
# top_sizer.Add(self.app_box, 0, wx.ALL, 5)
top_row_sizer.Add(check_sizer, 0, wx.ALL)
top_row_sizer.Add(rad_sizer, 0, wx.ALL)
rad_sizer.Add(self.service_rad, 0, wx.ALL | wx.ALIGN_CENTER, 13)
rad_sizer.Add(self.mode_rad, 0, wx.ALL | wx.ALIGN_CENTER, 13)
rad_sizer.Add(go_button, 0, wx.ALL | wx.ALIGN_CENTER, 13)
check_sizer.Add(self.service_check, 0, wx.ALL, 1)
check_sizer.Add(self.diagtrack_check, 0, wx.ALL, 1)
check_sizer.Add(self.telemetry_check, 0, wx.ALL, 1)
check_sizer.Add(self.clear_hosts_check, 0, wx.ALL, 1)
check_sizer.Add(self.ads_check, 0, wx.ALL, 1)
check_sizer.Add(self.host_check, 0, wx.ALL, 1)
check_sizer.Add(self.extra_host_check, 0, wx.ALL, 1)
check_sizer.Add(self.flush_dns_check, 0, wx.ALL, 1)
check_sizer.Add(self.ip_check, 0, wx.ALL, 1)
check_sizer.Add(self.wifisense_check, 0, wx.ALL, 1)
check_sizer.Add(self.onedrive_check, 0, wx.ALL, 1)
check_sizer.Add(self.dvr_check, 0, wx.ALL, 1)
check_sizer.Add(self.windows_update_check, 0, wx.ALL, 1)
check_sizer.Add(self.cloudflare_dns_check, 0, wx.ALL, 1)
check_sizer.Add(self.location_check, 0, wx.ALL, 1)
# self.Bind(wx.EVT_CHECKBOX, handler=self.select_all_apps, source=select_all_check)
self.Bind(wx.EVT_CHECKBOX, handler=self.ip_warning, source=self.ip_check)
self.Bind(wx.EVT_CHECKBOX, handler=self.hosts_warning, source=self.extra_host_check)
self.Bind(wx.EVT_BUTTON, handler=self.go, source=go_button)
self.SetSizer(top_sizer)
# def select_all_apps(self, event):
# Iterates through all children of the wxStaticBox of the wxStaticBoxSizer and checks/unchecks all wxCheckBoxes.
# for child in self.app_box.GetStaticBox().GetChildren():
# if isinstance(child, wx.CheckBox):
# child.SetValue(event.IsChecked())
def services_waring(self, event):
warn = wx.MessageDialog(parent=self,
message="This option could potentially disable Microsoft Licensing traffic and thus "
"certain games and apps may cease to work, such as, Forza, or Gears of War.",
caption="Attention!", style=wx.YES_NO | wx.ICON_EXCLAMATION)
warn.Destroy()
def ip_warning(self, event):
# Warn users about the potential side effects of the IP blocking firewall rules
if event.IsChecked():
warn = wx.MessageDialog(parent=self,
message="This option could potentially disable Microsoft Licensing traffic and thus "
"certain games and apps may cease to work, such as, Forza, or Gears of War.",
caption="Attention!", style=wx.YES_NO | wx.ICON_EXCLAMATION)
if warn.ShowModal() == wx.ID_NO:
event.GetEventObject().SetValue(False)
warn.Destroy()
def hosts_warning(self, event):
# Warn users about the potential side effects of the extra hosts mod.
if event.IsChecked():
warn = wx.MessageDialog(parent=self,
message="This option could potentially disable one or more of the following "
"services:\n\nSkype, Hotmail, Dr. Watson and/or Error Reporting. Continue?",
caption="Attention!", style=wx.YES_NO | wx.ICON_EXCLAMATION)
if warn.ShowModal() == wx.ID_NO:
event.GetEventObject().SetValue(False)
warn.Destroy()
def go(self, event):
if not all((self.unpicked_ads, self.picked_ips, self.picked_extra, self.picked_normal)):
self.settings(event=None)
undo = bool(self.mode_rad.GetSelection())
if self.ip_check.IsChecked():
dwt_util.ip_block(self.picked_ips, undo=undo)
if self.diagtrack_check.IsChecked():
dwt_util.clear_diagtrack()
if self.service_check.IsChecked():
if self.service_rad.GetSize():
dwt_util.delete_service("dmwappushsvc")
dwt_util.delete_service("DiagTrack")
else:
dwt_util.disable_service("dmwappushsvc")
dwt_util.disable_service("DiagTrack")
dwt_util.services(undo=undo)
if self.telemetry_check.IsChecked():
dwt_util.telemetry(undo=undo)
if self.clear_hosts_check.IsChecked():
dwt_util.clear_hosts()
if self.ads_check.IsChecked():
dwt_util.hosts_ad_removal(self.unpicked_ads, undo=undo)
if self.host_check.IsChecked():
dwt_util.hosts_tracking_removal(self.picked_normal, undo=undo)
if self.extra_host_check.IsChecked():
dwt_util.hosts_tracking_removal(self.picked_extra, undo=undo)
if self.flush_dns_check.IsChecked():
dwt_util.flush_dns()
if self.wifisense_check.IsChecked():
dwt_util.wifisense(undo=undo)
if self.onedrive_check.IsChecked():
dwt_util.onedrive(undo=undo)
if self.dvr_check.IsChecked():
dwt_util.dvr(undo=undo)
if self.windows_update_check.IsChecked():
dwt_util.windows_update(undo=undo)
if self.cloudflare_dns_check.IsChecked():
dwt_util.cloudflare_dns(undo=undo)
if self.location_check.IsChecked():
dwt_util.location(undo=undo)
logger.info("Done. It's recommended that you reboot as soon as possible for the full effect.")
logger.info("If you feel something didn't work properly, please press the 'Report an issue'")
console.Center()
console.Show()
def settings(self, event, silent=False):
if not silent:
dialog = wx.Dialog(parent=self, title="Settings", style=wx.DEFAULT_DIALOG_STYLE | wx.RESIZE_BORDER)
sizer = wx.BoxSizer(wx.VERTICAL)
normal_domain_picker = ItemsPicker(dialog, choices=[], selectedLabel="Domains to be blocked",
ipStyle=IP_SORT_SELECTED | IP_SORT_CHOICES | IP_REMOVE_FROM_CHOICES)
if self.picked_normal:
normal_domain_picker.SetSelections(self.picked_normal)
normal_domain_picker.SetItems([domain for domain in normal_domains if domain not in self.picked_normal])
else:
normal_domain_picker.SetSelections(normal_domains)
extra_domain_picker = ItemsPicker(dialog, choices=[], selectedLabel="Extra domains to be blocked",
ipStyle=IP_SORT_SELECTED | IP_SORT_CHOICES | IP_REMOVE_FROM_CHOICES)
if self.picked_extra:
extra_domain_picker.SetSelections(self.picked_extra)
extra_domain_picker.SetItems([domain for domain in extra_domains if domain not in self.picked_extra])
else:
extra_domain_picker.SetSelections(extra_domains)
ip_picker = ItemsPicker(dialog, choices=[], selectedLabel="IP addresses to be blocked",
ipStyle=IP_SORT_SELECTED | IP_SORT_CHOICES | IP_REMOVE_FROM_CHOICES)
if self.picked_ips:
ip_picker.SetSelections(self.picked_ips)
ip_picker.SetItems([ip for ip in ip_addresses if ip not in self.picked_ips])
else:
ip_picker.SetSelections(ip_addresses)
whitelist_picker = ItemsPicker(dialog, choices=[], selectedLabel="Domains to be whitelisted",
ipStyle=IP_SORT_SELECTED | IP_SORT_CHOICES | IP_REMOVE_FROM_CHOICES)
if self.unpicked_ads:
whitelist_picker.SetSelections(self.unpicked_ads)
whitelist_picker.SetItems([domain for domain in adblock_whitelist if domain not in self.unpicked_ads])
else:
whitelist_picker.SetSelections(adblock_whitelist)
if not silent:
sizer.Add(normal_domain_picker, 0, wx.EXPAND)
sizer.Add(whitelist_picker, 0, wx.EXPAND)
sizer.Add(extra_domain_picker, 0, wx.EXPAND)
sizer.Add(ip_picker, 0, wx.EXPAND)
if event is not None:
dialog.SetSizerAndFit(sizer)
dialog.Center()
dialog.ShowModal()
dialog.Destroy()
self.unpicked_ads = whitelist_picker.GetSelections()
self.picked_normal = normal_domain_picker.GetSelections()
self.picked_extra = extra_domain_picker.GetSelections()
self.picked_ips = ip_picker.GetSelections()
def setup_logging():
global logger
logger = logging.getLogger('dwt')
logger.setLevel(logging.DEBUG)
formatter = logging.Formatter(fmt='%(asctime)s %(levelname)s: %(message)s', datefmt='%H:%M:%S')
stdout_log = logging.StreamHandler(sys.stdout)
stdout_log.setLevel(logging.DEBUG)
stdout_log.setFormatter(formatter)
logger.addHandler(stdout_log)
try:
file_log = logging.FileHandler(filename='dwt.log', mode='w+')
file_log.setLevel(logging.DEBUG)
file_log.setFormatter(formatter)
logger.addHandler(file_log)
except (OSError, IOError):
error_dialog = wx.MessageDialog(parent=wx.GetApp().GetTopWindow(),
message="Could not create log file, errors will not be recorded!",
caption="ERROR!", style=wx.OK | wx.ICON_ERROR)
error_dialog.ShowModal()
error_dialog.Destroy()
logger.exception("Could not create log file.")
logger.info("Python {version} on {platform}".format(version=sys.version, platform=sys.platform))
logger.info(platform.uname())
logger.info("DisableWinTracking version {v}".format(v=dwt_about.__version__))
def exception_hook(error, value, trace):
error_message = ''.join(traceback.format_exception(error, value, trace))
logger.critical(error_message)
error_dialog = wx.MessageDialog(parent=wx.GetApp().GetTopWindow(),
message="An error has occured!\n\n" + error_message,
caption="ERROR!", style=wx.OK | wx.CANCEL | wx.ICON_ERROR)
error_dialog.SetOKCancelLabels("Ignore", "Quit")
if error_dialog.ShowModal() == wx.ID_OK:
error_dialog.Destroy()
else:
error_dialog.Destroy()
sys.exit(1)
def check_elevated(silent=False):
if not bool(windll.advpack.IsNTAdmin(0, None)):
if silent:
windll.shell32.ShellExecuteW(None, "runas", str(sys.executable),
"{0} -silent".format(str(__file__)), None, 1)
sys.exit(1)
else:
windll.shell32.ShellExecuteW(None, "runas", str(sys.executable), str(__file__), None, 1)
sys.exit(1)
def silent():
setup_logging()
check_elevated(True)
dwt_util.clear_diagtrack()
dwt_util.disable_service("dmwappushsvc")
dwt_util.disable_service("DiagTrack")
dwt_util.services(0)
dwt_util.telemetry(0)
dwt_util.wifisense(0)
dwt_util.onedrive(0)
logger.info("COMPLETE")
def silent_default():
setup_logging()
check_elevated(True)
dwt_util.clear_diagtrack()
dwt_util.disable_service("dmwappushsvc")
dwt_util.disable_service("DiagTrack")
dwt_util.services(0)
dwt_util.telemetry(0)
dwt_util.clear_hosts()
dwt_util.hosts_ad_removal(adblock_whitelist, 0)
dwt_util.hosts_tracking_removal(normal_domains, 0)
logger.info("COMPLETE")
if __name__ == '__main__':
normal_domains = (
'a-0001.a-msedge.net', 'a-0002.a-msedge.net', 'a-0003.a-msedge.net', 'a-0004.a-msedge.net',
'a-0005.a-msedge.net', 'a-0006.a-msedge.net', 'a-0007.a-msedge.net', 'a-0008.a-msedge.net',
'a-0009.a-msedge.net', 'a-msedge.net', 'a.ads1.msn.com', 'a.ads2.msads.net', 'a.ads2.msn.com',
'a.rad.msn.com', 'ac3.msn.com', 'adnexus.net', 'adnxs.com', 'ads.msn.com',
'ads1.msads.net', 'ads1.msn.com', 'aidps.atdmt.com', 'aka-cdn-ns.adtech.de',
'az361816.vo.msecnd.net', 'az512334.vo.msecnd.net', 'b.ads1.msn.com', 'b.ads2.msads.net',
'b.rad.msn.com', 'bs.serving-sys.com', 'c.atdmt.com', 'c.msn.com', 'cdn.atdmt.com',
'cds26.ams9.msecn.net', 'choice.microsoft.com', 'choice.microsoft.com.nsatc.net',
'compatexchange.cloudapp.net', 'corp.sts.microsoft.com', 'corpext.msitadfs.glbdns2.microsoft.com',
'cs1.wpc.v0cdn.net', 'db3aqu.atdmt.com', 'df.telemetry.microsoft.com',
'diagnostics.support.microsoft.com', 'ec.atdmt.com', 'feedback.microsoft-hohm.com',
'feedback.search.microsoft.com', 'feedback.windows.com', 'flex.msn.com', 'g.msn.com', 'h1.msn.com',
'i1.services.social.microsoft.com', 'i1.services.social.microsoft.com.nsatc.net',
'lb1.www.ms.akadns.net', 'live.rads.msn.com', 'm.adnxs.com', 'msedge.net', 'msftncsi.com',
'msnbot-65-55-108-23.search.msn.com', 'msntest.serving-sys.com', 'oca.telemetry.microsoft.com',
'oca.telemetry.microsoft.com.nsatc.net', 'pre.footprintpredict.com', 'preview.msn.com',
'rad.live.com', 'rad.msn.com', 'redir.metaservices.microsoft.com', 'schemas.microsoft.akadns.net',
'secure.adnxs.com', 'secure.flashtalking.com', 'settings-sandbox.data.microsoft.com',
'settings-win.data.microsoft.com', 'sls.update.microsoft.com.akadns.net', 'sqm.df.telemetry.microsoft.com',
'sqm.telemetry.microsoft.com', 'sqm.telemetry.microsoft.com.nsatc.net', 'ssw.live.com',
'static.2mdn.net', 'statsfe1.ws.microsoft.com', 'statsfe2.ws.microsoft.com',
'telecommand.telemetry.microsoft.com', 'telecommand.telemetry.microsoft.com.nsatc.net',
'telemetry.appex.bing.net', 'telemetry.microsoft.com', 'telemetry.urs.microsoft.com',
'v10.vortex-win.data.microsoft.com', 'vortex-bn2.metron.live.com.nsatc.net',
'vortex-cy2.metron.live.com.nsatc.net', 'vortex-sandbox.data.microsoft.com',
'vortex-win.data.metron.live.com.nsatc.net', 'vortex-win.data.microsoft.com',
'vortex.data.glbdns2.microsoft.com', 'vortex.data.microsoft.com', 'watson.live.com',
'web.vortex.data.microsoft.com', 'www.msftncsi.com',
'fe2.update.microsoft.com.akadns.net', 'view.atdmt.com', 'watson.telemetry.microsoft.com',
'watson.telemetry.microsoft.com.nsatc.net', 'reports.wes.df.telemetry.microsoft.com',
'services.wes.df.telemetry.microsoft.com', 'wes.df.telemetry.microsoft.com',
'mobile.pipe.aria.microsoft.com', 'nexus.officeapps.live.com', 'nexusrules.officeapps.live.com',
'telemetry.firstpartyapps.oaspapps.com', 'v10.events.data.microsoft.com'
)
extra_domains = (
's0.2mdn.net', 'statsfe2.update.microsoft.com.akadns.net', 'survey.watson.microsoft.com',
'watson.microsoft.com', 'watson.ppe.telemetry.microsoft.com', 'ui.skype.com',
'pricelist.skype.com', 'apps.skype.com', 'm.hotmail.com', 's.gateway.messenger.live.com'
)
ip_addresses = (
'2.22.61.43', '2.22.61.66', '65.39.117.230', '65.55.108.23', '23.218.212.69', '134.170.30.202',
'137.116.81.24', '157.56.106.189', '204.79.197.200', '65.52.108.33', '64.4.54.254'
)
adblock_whitelist = (
'ad.doubleclick.net', 'clickserve.dartsearch.net', 'tc.tradetracker.net', 'googleadservices.com',
'ojrq.net', 'clkuk.tradedoubler.com', 'tracking.publicidees.com', 'clk.tradedoubler.com'
)
if '-S' in sys.argv:
silent()
sys.exit(0)
if '-H' in sys.argv:
silent_default()
sys.exit(0)
wx_app = wx.App()
frame = MainFrame()
console = ConsoleDialog(sys.stdout)
setup_logging()
sys.excepthook = exception_hook
# dwt_about.update_check(None)
frame.Show()
wx_app.MainLoop()