Method: HardsploitAPI#setCrossWiring

Defined in:
lib/HardsploitAPI/Core/HardsploitAPI.rb

#setCrossWiring(value:) ⇒ Object

Set cross wiring

  • value

    64*8 bits to represent wiring



158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
# File 'lib/HardsploitAPI/Core/HardsploitAPI.rb', line 158

def setCrossWiring(value:)
  if not value.size == 64 then
    raise HardsploitAPI::ERROR::API_CROSS_WIRING
  end

  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 0x75 #Cross wiring command
  packet.push *value
  @@crossWiringValue = value
  return self.sendPacket(packet)
end