Method: HardsploitAPI#setWiringLeds
- Defined in:
- lib/HardsploitAPI/Core/HardsploitAPI.rb
#setWiringLeds(value:) ⇒ Object
Set custom value to wiring led
value
-
64 bits (8x8 Bytes) values to represent led (PortH PortG PortF PortE PortD PortC PortB PortA)
104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 |
# File 'lib/HardsploitAPI/Core/HardsploitAPI.rb', line 104 def setWiringLeds(value:) # parametters = HardsploitAPI.checkParametters(["value"],args) # val = parametters[:value] packet = Array.new packet.push 0 #low byte of lenght of trame refresh automaticly before send by usb packet.push 0 #high byte of lenght of trame refresh automaticly before send by usb packet.push HardsploitAPI.lowByte(word:USB_COMMAND::FPGA_COMMAND) packet.push HardsploitAPI.highByte(word:USB_COMMAND::FPGA_COMMAND) packet.push 0x23 #Command SPI write wiring led packet.push HardsploitAPI.reverseBit((value & 0x00000000000000FF) >> 0) packet.push HardsploitAPI.reverseBit((value & 0x000000000000FF00) >> 8 ) packet.push HardsploitAPI.reverseBit((value & 0x0000000000FF0000) >> 16 ) packet.push HardsploitAPI.reverseBit((value & 0x00000000FF000000) >> 24 ) packet.push HardsploitAPI.reverseBit((value & 0x000000FF00000000) >> 32 ) packet.push HardsploitAPI.reverseBit((value & 0x0000FF0000000000) >> 40 ) packet.push HardsploitAPI.reverseBit((value & 0x00FF000000000000) >> 48 ) packet.push HardsploitAPI.reverseBit((value & 0xFF00000000000000) >> 56 ) return HardsploitAPI.instance.sendPacket(packet) end |