Beispiel #1
0
    def __init__(self, maxusb_app, disk_image, verbose=0):
        self.disk_image = disk_image

        interface = USBMassStorageInterface(self.disk_image, verbose=verbose)

        config = USBConfiguration(
                1,                                          # index
                "Maxim umass config",                       # string desc
                [ interface ]                               # interfaces
        )

        USBDevice.__init__(
                self,
                maxusb_app,
                0,                      # device class
                0,                      # device subclass
                0,                      # protocol release number
                64,                     # max packet size for endpoint 0
                0x8107,                 # vendor id: Sandisk
                0x5051,                 # product id: SDCZ2 Cruzer Mini Flash Drive (thin)
                0x0003,                 # device revision
                "Maxim",                # manufacturer string
                "MAX3420E Enum Code",   # product string
                "S/N3420E",             # serial number string
                [ config ],
                verbose=verbose
        )
Beispiel #2
0
    def __init__(self, maxusb_app, verbose=0):
        interface = USBSerialInterface(verbose=verbose)

        config = USBConfiguration(
                1,                                          # index
                "Serial config",                              # string desc
                [ interface ]                               # interfaces
        )

        USBDevice.__init__(
                self,
                maxusb_app,
                0,                      # device class
                0,                      # device subclass
                0,                      # protocol release number
                64,                     # max packet size for endpoint 0
                0x03f0,                 # vendor id: HP
                0x0121,                 # product id: HP50G
                0x0001,                 # device revision
                "GoodFET",              # manufacturer string
                "HP4X Emulator",        # product string
                "12345",                # serial number string
                [ config ],
                verbose=verbose
        )

        self.device_vendor = USBSerialVendor()
        self.device_vendor.set_device(self)
Beispiel #3
0
    def __init__(self, maxusb_app, verbose=0):
        interface = USBFtdiInterface(verbose=verbose)

        config = USBConfiguration(
                1,                                          # index
                "FTDI config",                              # string desc
                [ interface ]                               # interfaces
        )

        USBDevice.__init__(
                self,
                maxusb_app,
                0,                      # device class
                0,                      # device subclass
                0,                      # protocol release number
                64,                     # max packet size for endpoint 0
                0x0403,                 # vendor id: FTDI
                0x6001,                 # product id: FT232 USB-Serial (UART) IC
                0x0001,                 # device revision
                "GoodFET",              # manufacturer string
                "FTDI Emulator",        # product string
                "S/N3420E",             # serial number string
                [ config ],
                verbose=verbose
        )

        self.device_vendor = USBFtdiVendor()
        self.device_vendor.set_device(self)
Beispiel #4
0
    def __init__(self, maxusb_app, spi_flash, verbose=0):
        self._tas_interface = USBProControllerInterface(spi_flash)
        config = USBConfiguration(
            1,  # index
            0,  # string desc
            [self._tas_interface],  # interfaces
            0xa0,  # attributes
            250  # power
        )

        USBDevice.__init__(
            self,
            maxusb_app,
            0,  # device class
            0,  # device subclass
            0,  # protocol release number
            64,  # max packet size for endpoint 0
            0x057e,  # vendor id
            0x2009,  # product id
            0x0200,  # device revision
            "Nintendo Co., Ltd",  # manufacturer string
            "Pro Controller",  # product string
            "000000000001",  # serial number string
            [config],
            verbose=verbose)
Beispiel #5
0
    def __init__(self, maxusb_app, verbose=0):

        #z ultra c 6833 msm8974_23_4_aid_4
        #hash = bytearray.fromhex("49109A8016C239CD8F76540FE4D5138C87B2297E49C6B30EC31852330BDDB177")
        #hwid = 0x04000100E1007B00
        #serial = 0x01678739
        #sblversion = 0x00000000

        #oneplus one 3t
        hash = bytearray.fromhex(
            "c0c66e278fe81226585252b851370eabf8d4192f0f335576c3028190d49d14d4")
        serial = 0x8d3e01ed
        hwid = bytearray.fromhex("B93D702AE1F00500")
        sblversion = 0x00000002

        #Unfused hash:
        #hash = bytearray.fromhex("CC3153A80293939B90D02D3BF8B23E0292E452FEF662C74998421ADAD42A380F"
        #hash = bytearray.fromhex("1801000F43240892D02F0DC96313C81351B40FD5029ED98FF9EC7074DDAE8B05CDC8E1")
        #hash = bytearray.fromhex("5A93232B8EF5567752D0CB5554835215D1C473502E6F1052A78A6715B8B659AA")

        interface = USBSaharaInterface(hash,
                                       serial,
                                       hwid,
                                       sblversion,
                                       verbose=verbose)

        config = USBConfiguration(
            1,  # index
            "Sahara",  # string desc
            [interface]  # interfaces
        )

        USBDevice.__init__(
            self,
            maxusb_app,
            0,  # device class
            0,  # device subclass
            0,  # protocol release number
            64,  # max packet size for endpoint 0
            0x05C6,  # vendor id: HP
            0x9008,  # product id: HP50G
            0x0100,  # device revision
            "Qualcomm CDMA Technologies MSM",  # manufacturer string
            "QHUSB__BULK",  # product string
            "",  # serial number string
            [config],
            verbose=verbose)

        self.device_vendor = USBSaharaVendor()
        self.device_vendor.set_device(self)
Beispiel #6
0
    def __init__(self, maxusb_app, verbose=0):
        config = USBConfiguration(
            1,  # index
            "Emulated Keyboard",  # string desc
            [USBKeyboardInterface()]  # interfaces
        )

        USBDevice.__init__(
            self,
            maxusb_app,
            0,  # device class
            0,  # device subclass
            0,  # protocol release number
            64,  # max packet size for endpoint 0
            0x610b,  # vendor id
            0x4653,  # product id
            0x3412,  # device revision
            "Maxim",  # manufacturer string
            "MAX3420E Enum Code",  # product string
            "S/N3420E",  # serial number string
            [config],
            verbose=verbose)
    def __init__(self, maxusb_app, verbose=0):
        """
        Set up the emulated USB device.
        """

        # Create an instance of the interface class defined above...
        interface = DevicePrimaryInterface(verbose=verbose)

        # .. wrap it in a new Configuration object.
        config = USBConfiguration(
                1,                                          # index
                "Target device",                            # string desc
                [ interface ]                               # interfaces
        )

        # Set up the USB device desctiptor.
        USBDevice.__init__(
                self,
                maxusb_app,
                0,                      # device class
                0,                      # device subclass
                0,                      # protocol release number
                64,                     # max packet size for endpoint 0
                0x1d50,                 # vendor id: OpenMoko
                0x1337,                 # product id: 1337 thing
                0x0001,                 # device revision
                "GreatFET",             # manufacturer string
                "Emulated Device",      # product string
                "NONE",                 # serial number string
                [ config ],
                verbose=verbose
        )

        # Attach our vendor request handlers to the device.
        self.device_vendor = VendorRequestHandler()
        self.device_vendor.set_device(self)
Beispiel #8
0
    def __init__(self, maxusb_app, verbose=0):
        config = USBConfiguration(
            1,  # index
            None,  # string desc
            [USBSwitchTASInterface()],  # interfaces
            0x80,  # attributes
            250  # power
        )

        USBDevice.__init__(
            self,
            maxusb_app,
            0,  # device class
            0,  # device subclass
            0,  # protocol release number
            64,  # max packet size for endpoint 0
            0x0f0d,  # vendor id
            0x00c1,  # product id
            0x0572,  # device revision
            "HORI CO.,LTD.",  # manufacturer string
            "HORIPAD S",  # product string
            None,  # serial number string
            [config],
            verbose=verbose)