Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/10se1ucgo/DisableWinTracking.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuined1 <ruined1@gmail.com>2015-09-06 13:22:05 +0300
committerRuined1 <ruined1@gmail.com>2015-09-06 13:22:05 +0300
commitd403bc95a2cd2e2f6bdc0283df01335e92db84d9 (patch)
tree9d3ba694e9fc7632e587cc4e4e9c25aaf507f142
parent8618866c0a71f936f6eaba2123ba5cb0c9f69ed3 (diff)
Fixed/Changed/Disabled MANY things2.4.2
-rw-r--r--run.py80
1 files changed, 52 insertions, 28 deletions
diff --git a/run.py b/run.py
index 2118a7a..8f24197 100644
--- a/run.py
+++ b/run.py
@@ -11,6 +11,9 @@ import wx
import wx.lib.wordwrap
import pywintypes
+#Global Variables
+Version = "2.4.2"
+
# Configure the Logging module
logging.basicConfig(filename='DisableWinTracking.log', level=logging.DEBUG,
format='\n%(asctime)s %(levelname)s: %(message)s', datefmt='%H:%M:%S')
@@ -50,7 +53,7 @@ class ConsoleFrame(wx.Frame):
class MainFrame(wx.Frame):
def __init__(self):
- wx.Frame.__init__(self, parent=None, title='Disable Windows 10 Tracking', size=[375, 190],
+ wx.Frame.__init__(self, parent=None, title='Disable Windows 10 Tracking', size=[375, 205],
style=wx.DEFAULT_FRAME_STYLE ^ wx.RESIZE_BORDER ^ wx.MAXIMIZE_BOX)
panel = wx.Panel(self) # Frame panel
@@ -77,46 +80,57 @@ class MainFrame(wx.Frame):
self.SetMenuBar(menubar)
self.Bind(wx.EVT_MENU, self.about, aboutitem)
+ # Notify Label
+ self.notelbl = wx.StaticText(panel, label="Pre-Release Version: {0} - Some things are disabled intentionally."
+ .format(Version), pos=(10, 5))
+
# Service checkbox
- self.servicebox = wx.CheckBox(panel, label="Services", pos=(10, 10))
+ self.servicebox = wx.CheckBox(panel, label="Services", pos=(10, 25))
self.servicebox.SetToolTip(wx.ToolTip("Disables or Deletes tracking services. Choose option in Service Method"))
self.Bind(wx.EVT_CHECKBOX, self.serviceradioboxcheck, self.servicebox)
+ # Only SYSTEM has access to the File we need, so even ADMINISTRATOR prompt won't gain access to it
+ # Image: http://i.imgur.com/asktUGl.png
+ # Tricky tricky Micro$oft, we'll disable it for now.
+ #
# DiagTrack checkbox
- self.diagtrackbox = wx.CheckBox(panel, label="Clear DiagTrack log", pos=(10, 25))
+ self.diagtrackbox = wx.CheckBox(panel, label="Clear DiagTrack log", pos=(10, 40))
+ self.diagtrackbox.Disable()
self.diagtrackbox.SetToolTip(wx.ToolTip("Clears Diagnostic Tracking log and prevents modification to it. "
"This cannot be undone without doing it manually."))
# Telemetry checkbox
- self.telemetrybox = wx.CheckBox(panel, label="Telemetry", pos=(10, 40))
+ self.telemetrybox = wx.CheckBox(panel, label="Telemetry", pos=(10, 55))
self.telemetrybox.SetToolTip(
wx.ToolTip("Sets \'AllowTelemetry\' to 0. On non-Enterprise OS editions, requires HOSTS file modification"))
self.Bind(wx.EVT_CHECKBOX, self.telemetryhostcheck, self.telemetrybox)
# HOSTS file checkbox
- self.hostbox = wx.CheckBox(panel, label="Block tracking domains", pos=(10, 55))
+ self.hostbox = wx.CheckBox(panel, label="Block tracking domains", pos=(10, 70))
+ self.hostbox.Disable()
self.hostbox.SetToolTip(wx.ToolTip("Add known tracking domains to HOSTS file. Required to disable Telemetry"))
# Extra HOSTS checkbox
- self.extrahostbox = wx.CheckBox(panel, label="Block even more tracking domains", pos=(10, 70))
+ self.extrahostbox = wx.CheckBox(panel, label="Block even more tracking domains", pos=(10, 85))
+ self.extrahostbox.Disable()
self.extrahostbox.SetToolTip(wx.ToolTip("For the paranoid. Adds extra domains to the HOSTS file. WARNING: Some "
"things like Dr. Watson and Error Reporting may be turned off by this"))
# IP block checkbox
- self.ipbox = wx.CheckBox(panel, label="Block tracking IP addresses", pos=(10, 85))
+ self.ipbox = wx.CheckBox(panel, label="Block tracking IP addresses", pos=(10, 100))
self.ipbox.SetToolTip(wx.ToolTip("Blocks known tracking IP addresses with Windows Firewall."))
# Windows Defender/Wifisense
- self.defendwifibox = wx.CheckBox(panel, label="Stop Defender/Wifisense Data Collection", pos=(10, 100))
+ self.defendwifibox = wx.CheckBox(panel, label="Stop Defender/Wifisense Data Collection", pos=(10, 115))
self.defendwifibox.SetToolTip(wx.ToolTip("Modifies registry to stop Windows Defender and WifiSense from "
"Data Collecting."))
# OneDrive uninstall checkbox
- self.onedrivedbox = wx.CheckBox(panel, label="Uninstall OneDrive", pos=(10, 115))
+ self.onedrivedbox = wx.CheckBox(panel, label="Uninstall OneDrive", pos=(10, 130))
self.onedrivedbox.SetToolTip(wx.ToolTip("Uninstalls OneDrive from your computer and removes it from Explorer."))
# Service radio box
- self.serviceradbox = wx.RadioBox(panel, label="Service Method", pos=(135, 5), choices=["Disable", "Delete"])
+ self.serviceradbox = wx.RadioBox(panel, label="Service Method", pos=(135, 20), choices=["Disable", "Delete"])
self.serviceradbox.Disable()
# OK button
@@ -129,6 +143,7 @@ class MainFrame(wx.Frame):
self.revertbutton.SetToolTip(wx.ToolTip("I wanna go back! :("))
self.Bind(wx.EVT_BUTTON, self.revert, self.revertbutton)
+ # Fix Button
self.fixbutton = wx.Button(panel, wx.ID_ANY, label="Fix Skype/Mail", pos=(266, 75))
self.fixbutton.SetToolTip(wx.ToolTip("Press this if you're having issues with Skype or the Mail app"))
self.Bind(wx.EVT_BUTTON, self.fix, self.fixbutton)
@@ -157,7 +172,7 @@ class MainFrame(wx.Frame):
aboutpg = wx.AboutDialogInfo()
aboutpg.Name = "Windows 10 Tracking Disable Tool"
- aboutpg.Version = "v2.4"
+ aboutpg.Version = Version
aboutpg.Copyright = "(c) 2015 10se1ucgo"
aboutpg.Description = "A tool to disable nasty tracking in Windows 10"
aboutpg.WebSite = ("https://github.com/10se1ucgo/DisableWinTracking", "GitHub Project Page")
@@ -170,6 +185,7 @@ class MainFrame(wx.Frame):
self.revertbutton.Disable()
self.fixbutton.Enable()
self.cluttercontrol() # If we don't do this, the hosts file and firewall will become a mess after some time.
+ logging.info("DisableWinTracking Version: {0}".format(Version))
try:
if self.servicebox.IsChecked():
modifyserviceregs(startval=0x0000004)
@@ -182,7 +198,7 @@ class MainFrame(wx.Frame):
if self.diagtrackbox.IsChecked():
cleardiagtracklog()
if self.telemetrybox.IsChecked():
- modifytelemetryregs(telemetryval="0")
+ modifytelemetryregs(telemetryval=0)
if self.hostbox.IsChecked():
domainblock(extra=False, undo=False)
if self.extrahostbox.IsChecked():
@@ -216,6 +232,7 @@ class MainFrame(wx.Frame):
self.okbutton.Disable()
self.revertbutton.Disable()
self.fixbutton.Disable()
+ logging.info("DisableWinTracking Version: {0}".format(Version))
try:
if self.servicebox.IsChecked():
modifyserviceregs(startval=0x0000003)
@@ -243,6 +260,7 @@ class MainFrame(wx.Frame):
self.okbutton.Disable()
self.revertbutton.Disable()
self.fixbutton.Disable()
+ logging.info("DisableWinTracking Version: {0}".format(Version))
try:
skypemailfix()
finally:
@@ -295,12 +313,12 @@ def domainblock(extra, undo):
if not undo:
if not extra:
modifyhostfile(undo=False, domainlist=normallist, name="Domain block")
- elif extra:
+ else:
modifyhostfile(undo=False, domainlist=extralist, name="Extra domain block")
- if undo:
+ else:
if not extra:
modifyhostfile(undo=True, domainlist=normallist, name="Domain block")
- elif extra:
+ else:
modifyhostfile(undo=True, domainlist=extralist, name="Extra domain block")
@@ -413,28 +431,33 @@ def stopdefendwifi(defendersenseval):
r'SOFTWARE\Microsoft\Windows Defender\Spynet',
'SubmitSamplesConsent', _winreg.REG_DWORD, defendersenseval]}
- if platform.machine().endswith('64'):
- modifyregistry(wdwfsdict, name="WifiSense/Defender", bit=64)
- else:
- modifyregistry(wdwfsdict, name="WifiSense/Defender")
+ #if platform.machine().endswith('64'):
+ # modifyregistry(wdwfsdict, name="WifiSense/Defender", bit=64)
+ #else:
+ modifyregistry(wdwfsdict, name="WifiSense/Defender")
def modifyonedrive(function, filesyncval):
# OneDrive shellext regkey paths
- listpindict = {'OneDrive FileSync NGSC': [_winreg.HKEY_LOCAL_MACHINE,
+ ngscdict = {'OneDrive FileSync NGSC': [_winreg.HKEY_LOCAL_MACHINE,
r'SOFTWARE\Wow6432Node\Policies\Microsoft\Windows\OneDrive',
- 'DisableFileSyncNGSC', _winreg.REG_DWORD, filesyncval],
+ 'DisableFileSyncNGSC', _winreg.REG_DWORD, filesyncval]}
- # If reverting, users can add this back to explorer themselves, without any registry trickery.
- 'OneDrive 32bit List Pin': [_winreg.HKEY_CLASSES_ROOT,
+ # We should be making it as convenient as possible for the end user, so this will work until something
+ # more optimized replaces it. This will flip the value for the list pin entries to coincide with NGSC
+ filesyncval = 1 if filesyncval == 0 else 0
+
+ listpindict = {'OneDrive 32bit List Pin': [_winreg.HKEY_CLASSES_ROOT,
r'CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}',
- 'System.IsPinnedToNameSpaceTree', _winreg.REG_DWORD, 0],
+ 'System.IsPinnedToNameSpaceTree', _winreg.REG_DWORD, filesyncval],
'OneDrive 64bit List Pin': [_winreg.HKEY_CLASSES_ROOT,
r'Wow6432Node\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}',
- 'System.IsPinnedToNameSpaceTree', _winreg.REG_DWORD, 0]}
-
- modifyregistry(regdict=listpindict, name="OneDrive")
+ 'System.IsPinnedToNameSpaceTree', _winreg.REG_DWORD, filesyncval]}
+
+ #We specifically need to CREATE the FileSync NGSC key, List Pin already exists
+ modifyregistry(regdict=ngscdict, name="OneDrive FileSync")
+ modifyregistry(regdict=listpindict, name="OneDrive List Pin")
onedrivesetup = os.path.join(os.environ['SYSTEMROOT'], "SysWOW64/OneDriveSetup.exe")
if os.path.isfile(onedrivesetup):
@@ -473,7 +496,8 @@ def modifyregistry(regdict, name, bit=32):
for title, registry in regdict.viewitems():
try:
- modreg = _winreg.OpenKey(registry[0], registry[1], 0, accessmask)
+ # Using CreateKeyEx, which will open or create a key as necessary
+ modreg = _winreg.CreateKeyEx(registry[0], registry[1], 0, accessmask)
_winreg.SetValueEx(modreg, registry[2], 0, registry[3], registry[4])
_winreg.CloseKey(modreg)
print "{1}: {0} key successfully modified.".format(title, name)