Last active
January 28, 2025 13:57
-
-
Save dnmodder/de2df973323b7c6acf45f40dc66e8db3 to your computer and use it in GitHub Desktop.
Revisions
-
dnmodder revised this gist
Sep 21, 2021 . No changes.There are no files selected for viewing
-
dnmodder revised this gist
Sep 23, 2020 . 1 changed file with 10 additions and 10 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -9,15 +9,15 @@ import usb.util except ImportError: print("First, install the pyusb module with PIP or your package manager.") else: if os.geteuid() != 0: print("You need to run this script with sudo") sys.exit() dev = usb.core.find(find_all=True) for d in dev: if d.idVendor == 0x045e and d.idProduct == 0x028e: d.ctrl_transfer(0xc1, 0x01, 0x0100, 0x00, 0x14) finally: sys.exit() -
dnmodder revised this gist
Sep 22, 2020 . 1 changed file with 15 additions and 5 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,13 +1,23 @@ #!/usr/bin/env python3 import os import sys try: import usb.core import usb.util except ImportError: print("First, install the pyusb module with PIP or your package manager.") finally: sys.exit() if os.geteuid() != 0: print("You need to run this script with sudo") sys.exit() dev = usb.core.find(find_all=True) for d in dev: if d.idVendor == 0x045e and d.idProduct == 0x028e: d.ctrl_transfer(0xc1, 0x01, 0x0100, 0x00, 0x14) -
dnmodder revised this gist
Sep 19, 2020 . 1 changed file with 10 additions and 7 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,10 +1,13 @@ #!/usr/bin/env python3 try: import usb.core import usb.util except ImportError: print("First, install the pyusb module with PIP or your package manager.") else: dev = usb.core.find(find_all=True) for d in dev: if d.idVendor == 0x045e and d.idProduct == 0x028e: d.ctrl_transfer(0xc1, 0x01, 0x0100, 0x00, 0x14) -
dnmodder revised this gist
Jul 12, 2020 . 1 changed file with 5 additions and 6 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,11 +1,10 @@ #!/usr/bin/env python3 import usb.core import usb.util dev = usb.core.find(find_all=True) for d in dev: if d.idVendor == 0x045e and d.idProduct == 0x028e: d.ctrl_transfer(0xc1, 0x01, 0x0100, 0x00, 0x14) -
dnmodder renamed this gist
Dec 2, 2018 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
dnmodder created this gist
Nov 26, 2018 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,11 @@ #!/usr/bin/env python3 import usb.core dev = usb.core.find(idVendor=0x045e, idProduct=0x028e) if dev is None: raise ValueError('Device not found') else: dev.ctrl_transfer(0xc1, 0x01, 0x0100, 0x00, 0x14)