removed unnecesary code
This commit is contained in:
parent
52a80a6f5e
commit
e98ceea1d6
@ -178,22 +178,7 @@ class S7Exploit(ExynosDevice):
|
||||
return
|
||||
|
||||
|
||||
def usb_write(self, data):
|
||||
assert len(data) <= 0x200, "Data too big"
|
||||
transferred = ctypes.c_int()
|
||||
res = libusb1.libusb_bulk_transfer(self.handle._USBDeviceHandle__handle, ENDPOINT_BULK_OUT, data, len(data), ctypes.byref(transferred), 300)
|
||||
|
||||
assert res == 0, f"Error sending data {res}"
|
||||
assert transferred.value == len(data), f"Invalid transfered size {transferred.value} != {len(data)}"
|
||||
return transferred.value
|
||||
|
||||
|
||||
def usb_read(self, size):
|
||||
transferred = ctypes.c_int()
|
||||
buf = ctypes.c_buffer(b"", size)
|
||||
res = libusb1.libusb_bulk_transfer(self.handle._USBDeviceHandle__handle, ENDPOINT_BULK_IN, buf, len(buf), ctypes.byref(transferred), 300)
|
||||
assert res == 0, f"Error receiving data {res}"
|
||||
return buf.raw[:transferred.value]
|
||||
|
||||
|
||||
def setup_concrete_device(self, concrete_device : ConcreteDevice):
|
||||
|
@ -75,10 +75,12 @@ class ExynosDevice():
|
||||
assert len(data) <= 0x200, "Data too big"
|
||||
transferred = ctypes.c_int()
|
||||
res = libusb1.libusb_bulk_transfer(self.handle._USBDeviceHandle__handle, ENDPOINT_BULK_OUT, data, len(data), ctypes.byref(transferred), 300)
|
||||
|
||||
assert res == 0, f"Error sending data {res}"
|
||||
assert transferred.value == len(data), f"Invalid transfered size {transferred.value} != {len(data)}"
|
||||
return transferred.value
|
||||
|
||||
|
||||
def usb_read(self, size):
|
||||
transferred = ctypes.c_int()
|
||||
buf = ctypes.c_buffer(b"", size)
|
||||
|
Loading…
Reference in New Issue
Block a user