hardsploit_gui 2.4.0 → 2.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/Hardsploit_gui.rb +4 -5
- data/lib/class/Chip_clone.rb +70 -0
- data/lib/class/Chip_editor.rb +1 -0
- data/lib/class/Chip_management.rb +73 -52
- data/lib/class/ErrorMsg.rb +1 -0
- data/lib/class/Firmware.rb +1 -1
- data/lib/class/Progress_bar.rb +1 -1
- data/lib/class/Wire_helper.rb +6 -3
- data/lib/class/{I2C → i2c}/I2c_command.rb +0 -0
- data/lib/class/{I2C/I2c_export.rb → i2c/I2c_read.rb} +15 -15
- data/lib/class/{I2C → i2c}/I2c_scanner.rb +2 -1
- data/lib/class/{I2C → i2c}/I2c_settings.rb +1 -0
- data/lib/class/{I2C/I2c_import.rb → i2c/I2c_write.rb} +13 -12
- data/lib/class/{PARALLEL/Parallel_export.rb → parallel/Parallel_read.rb} +17 -18
- data/lib/class/{PARALLEL → parallel}/Parallel_settings.rb +0 -0
- data/lib/class/{PARALLEL/Parallel_import.rb → parallel/Parallel_write.rb} +11 -10
- data/lib/class/{SPI/Spi_export.rb → spi/Spi_read.rb} +15 -15
- data/lib/class/{SPI → spi}/Spi_settings.rb +0 -0
- data/lib/class/{SPI → spi}/Spi_sniffer.rb +2 -1
- data/lib/class/{SPI/Spi_import.rb → spi/Spi_write.rb} +13 -12
- data/lib/class/swd/Swd.rb +10 -10
- data/lib/class/swd/Swd_scanner.rb +2 -1
- data/lib/class/uart/Uart_baudrate.rb +1 -1
- data/lib/class/uart/Uart_console.rb +1 -1
- data/lib/class/uart/Uart_settings.rb +1 -0
- data/lib/db/development.sqlite3 +0 -0
- data/lib/gui/gui_chip_clone.rb +87 -0
- data/lib/gui/gui_chip_editor.rb +349 -349
- data/lib/gui/gui_chip_management.rb +378 -377
- data/lib/gui/gui_command_editor.rb +219 -219
- data/lib/gui/gui_export.rb +132 -132
- data/lib/gui/gui_export_manager.rb +93 -93
- data/lib/gui/gui_generic_commands.rb +202 -202
- data/lib/gui/gui_generic_read.rb +185 -0
- data/lib/gui/gui_generic_write.rb +142 -0
- data/lib/gui/gui_i2c_command.rb +116 -116
- data/lib/gui/gui_i2c_settings.rb +242 -230
- data/lib/gui/gui_import.rb +131 -131
- data/lib/gui/gui_parallel_settings.rb +195 -195
- data/lib/gui/gui_progress_bar.rb +85 -85
- data/lib/gui/gui_signal_mapper.rb +121 -121
- data/lib/gui/gui_signal_scanner.rb +146 -146
- data/lib/gui/gui_spi_settings.rb +313 -313
- data/lib/gui/gui_spi_sniffer.rb +112 -112
- data/lib/gui/gui_swd_settings.rb +166 -166
- data/lib/gui/gui_uart_baudrate.rb +114 -114
- data/lib/gui/gui_uart_console.rb +164 -164
- data/lib/gui/gui_uart_settings.rb +243 -243
- data/lib/gui/gui_wire_helper.rb +99 -99
- data/lib/gui_designer/compile_to_ruby.sh +14 -0
- data/lib/gui_designer/gui_chip_clone.ui +96 -0
- data/lib/gui_designer/gui_chip_management.ui +25 -22
- data/lib/gui_designer/{gui_generic_export.ui → gui_generic_read.ui} +152 -72
- data/lib/gui_designer/{gui_generic_import.ui → gui_generic_write.ui} +47 -47
- data/lib/gui_designer/gui_i2c_settings.ui +68 -60
- data/lib/hardsploit-api/Examples/swdProgrammer.rb +76 -0
- data/lib/hardsploit-api/Examples/testI2C.rb +183 -0
- data/lib/hardsploit-api/Examples/testNRF24L01.rb +122 -0
- data/lib/hardsploit-api/Examples/testParralel.rb +84 -0
- data/lib/hardsploit-api/Examples/testSPI.rb +113 -0
- data/lib/hardsploit-api/Examples/testSPISniffer.rb +91 -0
- data/lib/hardsploit-api/Examples/testSWD.rb +224 -0
- data/lib/hardsploit-api/Examples/testUARTBufferOverflow.rb +113 -0
- data/lib/hardsploit-api/Examples/testUARTConsole.rb +74 -0
- data/lib/hardsploit-api/Examples/testUARTFuzzer.rb +109 -0
- data/lib/{Firmwares → hardsploit-api/Firmwares}/FPGA/I2C/I2C_INTERACT/HARDSPLOIT_FIRMWARE_FPGA_I2C_INTERACT.rpd +0 -0
- data/lib/{Firmwares → hardsploit-api/Firmwares}/FPGA/PARALLEL/NO_MUX_PARALLEL_MEMORY/HARDSPLOIT_FIRMWARE_FPGA_NO_MUX_PARALLEL_MEMORY.rpd +0 -0
- data/lib/{Firmwares → hardsploit-api/Firmwares}/FPGA/SPI/SPI_INTERACT/HARDSPLOIT_FIRMWARE_FPGA_SPI_INTERACT.rpd +0 -0
- data/lib/{Firmwares → hardsploit-api/Firmwares}/FPGA/SPI/SPI_SNIFFER/HARDSPLOIT_FIRMWARE_FPGA_SPI_SNIFFER.rpd +0 -0
- data/lib/{Firmwares → hardsploit-api/Firmwares}/FPGA/SWD/SWD_INTERACT/HARDSPLOIT_FIRMWARE_FPGA_SWD_INTERACT.rpd +0 -0
- data/lib/{Firmwares → hardsploit-api/Firmwares}/FPGA/TEST/TEST_INTERACT/HARDSPLOIT_FIRMWARE_FPGA_TEST_INTERACT.rpd +0 -0
- data/lib/{Firmwares → hardsploit-api/Firmwares}/FPGA/UART/UART_INTERACT/HARDSPLOIT_FIRMWARE_FPGA_UART_INTERACT.rpd +0 -0
- data/lib/{Firmwares → hardsploit-api/Firmwares}/FPGA/VersionFPGA.rb +0 -0
- data/lib/{Firmwares → hardsploit-api/Firmwares}/UC/HARDSPLOIT_FIRMWARE_UC.bin +0 -0
- data/lib/{Firmwares → hardsploit-api/Firmwares}/UC/VersionUC.rb +0 -0
- data/lib/{HardsploitAPI → hardsploit-api/HardsploitAPI}/Core/HardsploitAPI.rb +0 -0
- data/lib/{HardsploitAPI → hardsploit-api/HardsploitAPI}/Core/HardsploitAPI_CONSTANT.rb +0 -0
- data/lib/{HardsploitAPI → hardsploit-api/HardsploitAPI}/Core/HardsploitAPI_ERROR.rb +0 -0
- data/lib/{HardsploitAPI → hardsploit-api/HardsploitAPI}/Core/HardsploitAPI_FIRMWARE.rb +0 -0
- data/lib/{HardsploitAPI → hardsploit-api/HardsploitAPI}/Core/HardsploitAPI_PROGRESS.rb +0 -0
- data/lib/{HardsploitAPI → hardsploit-api/HardsploitAPI}/Core/HardsploitAPI_USB_COMMUNICATION.rb +0 -0
- data/lib/{HardsploitAPI → hardsploit-api/HardsploitAPI}/Modules/I2C/HardsploitAPI_I2C.rb +0 -0
- data/lib/{HardsploitAPI → hardsploit-api/HardsploitAPI}/Modules/NO_MUX_PARALLEL_MEMORY/HardsploitAPI_NO_MUX_PARALLEL_MEMORY.rb +0 -0
- data/lib/{HardsploitAPI → hardsploit-api/HardsploitAPI}/Modules/NRF24L01/HardsploitAPI_NRF24L01.rb +0 -0
- data/lib/{HardsploitAPI → hardsploit-api/HardsploitAPI}/Modules/SPI/HardsploitAPI_SPI.rb +0 -0
- data/lib/{HardsploitAPI → hardsploit-api/HardsploitAPI}/Modules/SPI_SNIFFER/HardsploitAPI_SPI_SNIFFER.rb +0 -0
- data/lib/{HardsploitAPI → hardsploit-api/HardsploitAPI}/Modules/SWD/HardsploitAPI_SWD.rb +0 -0
- data/lib/{HardsploitAPI → hardsploit-api/HardsploitAPI}/Modules/SWD/HardsploitAPI_SWD_DEBUG.rb +0 -0
- data/lib/{HardsploitAPI → hardsploit-api/HardsploitAPI}/Modules/SWD/HardsploitAPI_SWD_MEM_AP.rb +0 -0
- data/lib/{HardsploitAPI → hardsploit-api/HardsploitAPI}/Modules/SWD/HardsploitAPI_SWD_STM32.rb +0 -0
- data/lib/{HardsploitAPI → hardsploit-api/HardsploitAPI}/Modules/TEST/HardsploitAPI_TEST_INTERACT.rb +0 -0
- data/lib/{HardsploitAPI → hardsploit-api/HardsploitAPI}/Modules/UART/HardsploitAPI_UART.rb +0 -0
- data/lib/hardsploit-api/LICENSE.txt +674 -0
- data/lib/hardsploit-api/README.md +22 -0
- data/lib/hardsploit-api/TRADEMARK +3 -0
- data/lib/logs/error.log +80 -0
- metadata +65 -49
- data/lib/gui/gui_generic_export.rb +0 -164
- data/lib/gui/gui_generic_import.rb +0 -142
- data/lib/gui/gui_spi_import.rb +0 -126
@@ -0,0 +1,185 @@
|
|
1
|
+
=begin
|
2
|
+
** Form generated from reading ui file 'gui_generic_read.ui'
|
3
|
+
**
|
4
|
+
** Created: mer. mars 8 11:15:04 2017
|
5
|
+
** by: Qt User Interface Compiler version 4.8.7
|
6
|
+
**
|
7
|
+
** WARNING! All changes made in this file will be lost when recompiling ui file!
|
8
|
+
=end
|
9
|
+
|
10
|
+
class Ui_Generic_read
|
11
|
+
attr_reader :gridLayout
|
12
|
+
attr_reader :vl
|
13
|
+
attr_reader :hl2
|
14
|
+
attr_reader :lbl_read
|
15
|
+
attr_reader :lbl_chip
|
16
|
+
attr_reader :hs
|
17
|
+
attr_reader :formLayout
|
18
|
+
attr_reader :lbl_file
|
19
|
+
attr_reader :btn_file
|
20
|
+
attr_reader :lbl_selected
|
21
|
+
attr_reader :lbl_selected_file
|
22
|
+
attr_reader :lbl_type
|
23
|
+
attr_reader :rbn_full
|
24
|
+
attr_reader :rbn_range
|
25
|
+
attr_reader :lbl_start
|
26
|
+
attr_reader :lie_start
|
27
|
+
attr_reader :lbl_stop
|
28
|
+
attr_reader :lie_stop
|
29
|
+
attr_reader :hl
|
30
|
+
attr_reader :btn_read
|
31
|
+
|
32
|
+
def setupUi(generic_read)
|
33
|
+
if generic_read.objectName.nil?
|
34
|
+
generic_read.objectName = "generic_read"
|
35
|
+
end
|
36
|
+
generic_read.windowModality = Qt::ApplicationModal
|
37
|
+
generic_read.resize(280, 221)
|
38
|
+
generic_read.minimumSize = Qt::Size.new(5, 0)
|
39
|
+
generic_read.maximumSize = Qt::Size.new(16777211, 16777215)
|
40
|
+
@gridLayout = Qt::GridLayout.new(generic_read)
|
41
|
+
@gridLayout.objectName = "gridLayout"
|
42
|
+
@vl = Qt::VBoxLayout.new()
|
43
|
+
@vl.objectName = "vl"
|
44
|
+
@hl2 = Qt::HBoxLayout.new()
|
45
|
+
@hl2.objectName = "hl2"
|
46
|
+
@lbl_read = Qt::Label.new(generic_read)
|
47
|
+
@lbl_read.objectName = "lbl_read"
|
48
|
+
|
49
|
+
@hl2.addWidget(@lbl_read)
|
50
|
+
|
51
|
+
@lbl_chip = Qt::Label.new(generic_read)
|
52
|
+
@lbl_chip.objectName = "lbl_chip"
|
53
|
+
|
54
|
+
@hl2.addWidget(@lbl_chip)
|
55
|
+
|
56
|
+
@hs = Qt::SpacerItem.new(40, 20, Qt::SizePolicy::Expanding, Qt::SizePolicy::Minimum)
|
57
|
+
|
58
|
+
@hl2.addItem(@hs)
|
59
|
+
|
60
|
+
|
61
|
+
@vl.addLayout(@hl2)
|
62
|
+
|
63
|
+
@formLayout = Qt::FormLayout.new()
|
64
|
+
@formLayout.objectName = "formLayout"
|
65
|
+
@lbl_file = Qt::Label.new(generic_read)
|
66
|
+
@lbl_file.objectName = "lbl_file"
|
67
|
+
|
68
|
+
@formLayout.setWidget(0, Qt::FormLayout::LabelRole, @lbl_file)
|
69
|
+
|
70
|
+
@btn_file = Qt::PushButton.new(generic_read)
|
71
|
+
@btn_file.objectName = "btn_file"
|
72
|
+
|
73
|
+
@formLayout.setWidget(0, Qt::FormLayout::FieldRole, @btn_file)
|
74
|
+
|
75
|
+
@lbl_selected = Qt::Label.new(generic_read)
|
76
|
+
@lbl_selected.objectName = "lbl_selected"
|
77
|
+
|
78
|
+
@formLayout.setWidget(1, Qt::FormLayout::LabelRole, @lbl_selected)
|
79
|
+
|
80
|
+
@lbl_selected_file = Qt::Label.new(generic_read)
|
81
|
+
@lbl_selected_file.objectName = "lbl_selected_file"
|
82
|
+
@lbl_selected_file.maximumSize = Qt::Size.new(250, 16777215)
|
83
|
+
|
84
|
+
@formLayout.setWidget(1, Qt::FormLayout::FieldRole, @lbl_selected_file)
|
85
|
+
|
86
|
+
@lbl_type = Qt::Label.new(generic_read)
|
87
|
+
@lbl_type.objectName = "lbl_type"
|
88
|
+
|
89
|
+
@formLayout.setWidget(2, Qt::FormLayout::LabelRole, @lbl_type)
|
90
|
+
|
91
|
+
@rbn_full = Qt::RadioButton.new(generic_read)
|
92
|
+
@rbn_full.objectName = "rbn_full"
|
93
|
+
@rbn_full.checked = true
|
94
|
+
|
95
|
+
@formLayout.setWidget(2, Qt::FormLayout::FieldRole, @rbn_full)
|
96
|
+
|
97
|
+
@rbn_range = Qt::RadioButton.new(generic_read)
|
98
|
+
@rbn_range.objectName = "rbn_range"
|
99
|
+
|
100
|
+
@formLayout.setWidget(3, Qt::FormLayout::FieldRole, @rbn_range)
|
101
|
+
|
102
|
+
@lbl_start = Qt::Label.new(generic_read)
|
103
|
+
@lbl_start.objectName = "lbl_start"
|
104
|
+
|
105
|
+
@formLayout.setWidget(4, Qt::FormLayout::LabelRole, @lbl_start)
|
106
|
+
|
107
|
+
@lie_start = Qt::LineEdit.new(generic_read)
|
108
|
+
@lie_start.objectName = "lie_start"
|
109
|
+
@lie_start.enabled = false
|
110
|
+
@lie_start.maxLength = 20
|
111
|
+
|
112
|
+
@formLayout.setWidget(4, Qt::FormLayout::FieldRole, @lie_start)
|
113
|
+
|
114
|
+
@lbl_stop = Qt::Label.new(generic_read)
|
115
|
+
@lbl_stop.objectName = "lbl_stop"
|
116
|
+
|
117
|
+
@formLayout.setWidget(5, Qt::FormLayout::LabelRole, @lbl_stop)
|
118
|
+
|
119
|
+
@lie_stop = Qt::LineEdit.new(generic_read)
|
120
|
+
@lie_stop.objectName = "lie_stop"
|
121
|
+
@lie_stop.enabled = false
|
122
|
+
@lie_stop.maxLength = 20
|
123
|
+
|
124
|
+
@formLayout.setWidget(5, Qt::FormLayout::FieldRole, @lie_stop)
|
125
|
+
|
126
|
+
|
127
|
+
@vl.addLayout(@formLayout)
|
128
|
+
|
129
|
+
@hl = Qt::HBoxLayout.new()
|
130
|
+
@hl.objectName = "hl"
|
131
|
+
@btn_read = Qt::PushButton.new(generic_read)
|
132
|
+
@btn_read.objectName = "btn_read"
|
133
|
+
@btn_read.enabled = false
|
134
|
+
|
135
|
+
@hl.addWidget(@btn_read)
|
136
|
+
|
137
|
+
|
138
|
+
@vl.addLayout(@hl)
|
139
|
+
|
140
|
+
|
141
|
+
@gridLayout.addLayout(@vl, 0, 0, 1, 1)
|
142
|
+
|
143
|
+
|
144
|
+
retranslateUi(generic_read)
|
145
|
+
Qt::Object.connect(@btn_read, SIGNAL('clicked()'), generic_read, SLOT('read()'))
|
146
|
+
Qt::Object.connect(@btn_file, SIGNAL('clicked()'), generic_read, SLOT('select_read_file()'))
|
147
|
+
Qt::Object.connect(@rbn_range, SIGNAL('toggled(bool)'), @lie_start, SLOT('setEnabled(bool)'))
|
148
|
+
Qt::Object.connect(@rbn_range, SIGNAL('toggled(bool)'), @lie_stop, SLOT('setEnabled(bool)'))
|
149
|
+
Qt::Object.connect(@rbn_full, SIGNAL('toggled(bool)'), @lie_start, SLOT('setDisabled(bool)'))
|
150
|
+
Qt::Object.connect(@rbn_full, SIGNAL('toggled(bool)'), @lie_stop, SLOT('setDisabled(bool)'))
|
151
|
+
|
152
|
+
Qt::MetaObject.connectSlotsByName(generic_read)
|
153
|
+
end # setupUi
|
154
|
+
|
155
|
+
def setup_ui(generic_read)
|
156
|
+
setupUi(generic_read)
|
157
|
+
end
|
158
|
+
|
159
|
+
def retranslateUi(generic_read)
|
160
|
+
generic_read.windowTitle = Qt::Application.translate("Generic_read", "Hardsploit - Read", nil, Qt::Application::UnicodeUTF8)
|
161
|
+
@lbl_read.text = Qt::Application.translate("Generic_read", "Read from", nil, Qt::Application::UnicodeUTF8)
|
162
|
+
@lbl_chip.text = Qt::Application.translate("Generic_read", "[CHIP]", nil, Qt::Application::UnicodeUTF8)
|
163
|
+
@lbl_file.text = Qt::Application.translate("Generic_read", "Result file:", nil, Qt::Application::UnicodeUTF8)
|
164
|
+
@btn_file.text = Qt::Application.translate("Generic_read", "File...", nil, Qt::Application::UnicodeUTF8)
|
165
|
+
@lbl_selected.text = Qt::Application.translate("Generic_read", "Selected file:", nil, Qt::Application::UnicodeUTF8)
|
166
|
+
@lbl_selected_file.text = Qt::Application.translate("Generic_read", "None", nil, Qt::Application::UnicodeUTF8)
|
167
|
+
@lbl_type.text = Qt::Application.translate("Generic_read", "Type:", nil, Qt::Application::UnicodeUTF8)
|
168
|
+
@rbn_full.text = Qt::Application.translate("Generic_read", "Full read", nil, Qt::Application::UnicodeUTF8)
|
169
|
+
@rbn_range.text = Qt::Application.translate("Generic_read", "Range", nil, Qt::Application::UnicodeUTF8)
|
170
|
+
@lbl_start.text = Qt::Application.translate("Generic_read", "Start address:", nil, Qt::Application::UnicodeUTF8)
|
171
|
+
@lbl_stop.text = Qt::Application.translate("Generic_read", "Stop address:", nil, Qt::Application::UnicodeUTF8)
|
172
|
+
@btn_read.text = Qt::Application.translate("Generic_read", "Read", nil, Qt::Application::UnicodeUTF8)
|
173
|
+
end # retranslateUi
|
174
|
+
|
175
|
+
def retranslate_ui(generic_read)
|
176
|
+
retranslateUi(generic_read)
|
177
|
+
end
|
178
|
+
|
179
|
+
end
|
180
|
+
|
181
|
+
module Ui
|
182
|
+
class Generic_read < Ui_Generic_read
|
183
|
+
end
|
184
|
+
end # module Ui
|
185
|
+
|
@@ -0,0 +1,142 @@
|
|
1
|
+
=begin
|
2
|
+
** Form generated from reading ui file 'gui_generic_write.ui'
|
3
|
+
**
|
4
|
+
** Created: mer. mars 8 11:15:05 2017
|
5
|
+
** by: Qt User Interface Compiler version 4.8.7
|
6
|
+
**
|
7
|
+
** WARNING! All changes made in this file will be lost when recompiling ui file!
|
8
|
+
=end
|
9
|
+
|
10
|
+
class Ui_Generic_write
|
11
|
+
attr_reader :gridLayout
|
12
|
+
attr_reader :vl
|
13
|
+
attr_reader :hl2
|
14
|
+
attr_reader :lbl_write
|
15
|
+
attr_reader :lbl_chip
|
16
|
+
attr_reader :hs
|
17
|
+
attr_reader :formLayout
|
18
|
+
attr_reader :lbl_file
|
19
|
+
attr_reader :btn_file
|
20
|
+
attr_reader :lbl_selected
|
21
|
+
attr_reader :lbl_selected_file
|
22
|
+
attr_reader :lbl_start
|
23
|
+
attr_reader :lie_start
|
24
|
+
attr_reader :hl
|
25
|
+
attr_reader :btn_write
|
26
|
+
|
27
|
+
def setupUi(generic_write)
|
28
|
+
if generic_write.objectName.nil?
|
29
|
+
generic_write.objectName = "generic_write"
|
30
|
+
end
|
31
|
+
generic_write.windowModality = Qt::ApplicationModal
|
32
|
+
generic_write.resize(241, 155)
|
33
|
+
@gridLayout = Qt::GridLayout.new(generic_write)
|
34
|
+
@gridLayout.objectName = "gridLayout"
|
35
|
+
@vl = Qt::VBoxLayout.new()
|
36
|
+
@vl.objectName = "vl"
|
37
|
+
@hl2 = Qt::HBoxLayout.new()
|
38
|
+
@hl2.objectName = "hl2"
|
39
|
+
@lbl_write = Qt::Label.new(generic_write)
|
40
|
+
@lbl_write.objectName = "lbl_write"
|
41
|
+
|
42
|
+
@hl2.addWidget(@lbl_write)
|
43
|
+
|
44
|
+
@lbl_chip = Qt::Label.new(generic_write)
|
45
|
+
@lbl_chip.objectName = "lbl_chip"
|
46
|
+
|
47
|
+
@hl2.addWidget(@lbl_chip)
|
48
|
+
|
49
|
+
@hs = Qt::SpacerItem.new(40, 20, Qt::SizePolicy::Expanding, Qt::SizePolicy::Minimum)
|
50
|
+
|
51
|
+
@hl2.addItem(@hs)
|
52
|
+
|
53
|
+
|
54
|
+
@vl.addLayout(@hl2)
|
55
|
+
|
56
|
+
@formLayout = Qt::FormLayout.new()
|
57
|
+
@formLayout.objectName = "formLayout"
|
58
|
+
@lbl_file = Qt::Label.new(generic_write)
|
59
|
+
@lbl_file.objectName = "lbl_file"
|
60
|
+
|
61
|
+
@formLayout.setWidget(0, Qt::FormLayout::LabelRole, @lbl_file)
|
62
|
+
|
63
|
+
@btn_file = Qt::PushButton.new(generic_write)
|
64
|
+
@btn_file.objectName = "btn_file"
|
65
|
+
|
66
|
+
@formLayout.setWidget(0, Qt::FormLayout::FieldRole, @btn_file)
|
67
|
+
|
68
|
+
@lbl_selected = Qt::Label.new(generic_write)
|
69
|
+
@lbl_selected.objectName = "lbl_selected"
|
70
|
+
|
71
|
+
@formLayout.setWidget(1, Qt::FormLayout::LabelRole, @lbl_selected)
|
72
|
+
|
73
|
+
@lbl_selected_file = Qt::Label.new(generic_write)
|
74
|
+
@lbl_selected_file.objectName = "lbl_selected_file"
|
75
|
+
@lbl_selected_file.maximumSize = Qt::Size.new(250, 16777215)
|
76
|
+
|
77
|
+
@formLayout.setWidget(1, Qt::FormLayout::FieldRole, @lbl_selected_file)
|
78
|
+
|
79
|
+
@lbl_start = Qt::Label.new(generic_write)
|
80
|
+
@lbl_start.objectName = "lbl_start"
|
81
|
+
|
82
|
+
@formLayout.setWidget(2, Qt::FormLayout::LabelRole, @lbl_start)
|
83
|
+
|
84
|
+
@lie_start = Qt::LineEdit.new(generic_write)
|
85
|
+
@lie_start.objectName = "lie_start"
|
86
|
+
@lie_start.maxLength = 20
|
87
|
+
|
88
|
+
@formLayout.setWidget(2, Qt::FormLayout::FieldRole, @lie_start)
|
89
|
+
|
90
|
+
|
91
|
+
@vl.addLayout(@formLayout)
|
92
|
+
|
93
|
+
@hl = Qt::HBoxLayout.new()
|
94
|
+
@hl.objectName = "hl"
|
95
|
+
@btn_write = Qt::PushButton.new(generic_write)
|
96
|
+
@btn_write.objectName = "btn_write"
|
97
|
+
@btn_write.enabled = false
|
98
|
+
|
99
|
+
@hl.addWidget(@btn_write)
|
100
|
+
|
101
|
+
|
102
|
+
@vl.addLayout(@hl)
|
103
|
+
|
104
|
+
|
105
|
+
@gridLayout.addLayout(@vl, 0, 0, 1, 1)
|
106
|
+
|
107
|
+
|
108
|
+
retranslateUi(generic_write)
|
109
|
+
Qt::Object.connect(@btn_write, SIGNAL('clicked()'), generic_write, SLOT('write()'))
|
110
|
+
Qt::Object.connect(@btn_file, SIGNAL('clicked()'), generic_write, SLOT('select_write_file()'))
|
111
|
+
|
112
|
+
Qt::MetaObject.connectSlotsByName(generic_write)
|
113
|
+
end # setupUi
|
114
|
+
|
115
|
+
def setup_ui(generic_write)
|
116
|
+
setupUi(generic_write)
|
117
|
+
end
|
118
|
+
|
119
|
+
def retranslateUi(generic_write)
|
120
|
+
generic_write.windowTitle = Qt::Application.translate("Generic_write", "Hardsploit - Write", nil, Qt::Application::UnicodeUTF8)
|
121
|
+
@lbl_write.text = Qt::Application.translate("Generic_write", "Write in", nil, Qt::Application::UnicodeUTF8)
|
122
|
+
@lbl_chip.text = Qt::Application.translate("Generic_write", "[CHIP]", nil, Qt::Application::UnicodeUTF8)
|
123
|
+
@lbl_file.text = Qt::Application.translate("Generic_write", "Content to write:", nil, Qt::Application::UnicodeUTF8)
|
124
|
+
@btn_file.text = Qt::Application.translate("Generic_write", "File...", nil, Qt::Application::UnicodeUTF8)
|
125
|
+
@lbl_selected.text = Qt::Application.translate("Generic_write", "Selected file:", nil, Qt::Application::UnicodeUTF8)
|
126
|
+
@lbl_selected_file.text = Qt::Application.translate("Generic_write", "None", nil, Qt::Application::UnicodeUTF8)
|
127
|
+
@lbl_start.text = Qt::Application.translate("Generic_write", "Start address:", nil, Qt::Application::UnicodeUTF8)
|
128
|
+
@lie_start.text = Qt::Application.translate("Generic_write", "0", nil, Qt::Application::UnicodeUTF8)
|
129
|
+
@btn_write.text = Qt::Application.translate("Generic_write", "Write", nil, Qt::Application::UnicodeUTF8)
|
130
|
+
end # retranslateUi
|
131
|
+
|
132
|
+
def retranslate_ui(generic_write)
|
133
|
+
retranslateUi(generic_write)
|
134
|
+
end
|
135
|
+
|
136
|
+
end
|
137
|
+
|
138
|
+
module Ui
|
139
|
+
class Generic_write < Ui_Generic_write
|
140
|
+
end
|
141
|
+
end # module Ui
|
142
|
+
|
data/lib/gui/gui_i2c_command.rb
CHANGED
@@ -1,116 +1,116 @@
|
|
1
|
-
=begin
|
2
|
-
** Form generated from reading ui file 'gui_i2c_command.ui'
|
3
|
-
**
|
4
|
-
** Created:
|
5
|
-
** by: Qt User Interface Compiler version 4.8.
|
6
|
-
**
|
7
|
-
** WARNING! All changes made in this file will be lost when recompiling ui file!
|
8
|
-
=end
|
9
|
-
|
10
|
-
class Ui_I2c_command
|
11
|
-
attr_reader :gridLayout
|
12
|
-
attr_reader :fl
|
13
|
-
attr_reader :lbl_size
|
14
|
-
attr_reader :lie_size
|
15
|
-
attr_reader :lbl_type_cmd
|
16
|
-
attr_reader :groupBox
|
17
|
-
attr_reader :rbn_read
|
18
|
-
attr_reader :rbn_write
|
19
|
-
attr_reader :hl
|
20
|
-
attr_reader :hs
|
21
|
-
attr_reader :btn_cancel
|
22
|
-
attr_reader :bnt_new_cmd
|
23
|
-
|
24
|
-
def setupUi(i2c_command)
|
25
|
-
if i2c_command.objectName.nil?
|
26
|
-
i2c_command.objectName = "i2c_command"
|
27
|
-
end
|
28
|
-
i2c_command.windowModality = Qt::ApplicationModal
|
29
|
-
i2c_command.resize(287, 103)
|
30
|
-
@gridLayout = Qt::GridLayout.new(i2c_command)
|
31
|
-
@gridLayout.objectName = "gridLayout"
|
32
|
-
@fl = Qt::FormLayout.new()
|
33
|
-
@fl.objectName = "fl"
|
34
|
-
@lbl_size = Qt::Label.new(i2c_command)
|
35
|
-
@lbl_size.objectName = "lbl_size"
|
36
|
-
|
37
|
-
@fl.setWidget(0, Qt::FormLayout::LabelRole, @lbl_size)
|
38
|
-
|
39
|
-
@lie_size = Qt::LineEdit.new(i2c_command)
|
40
|
-
@lie_size.objectName = "lie_size"
|
41
|
-
|
42
|
-
@fl.setWidget(0, Qt::FormLayout::FieldRole, @lie_size)
|
43
|
-
|
44
|
-
@lbl_type_cmd = Qt::Label.new(i2c_command)
|
45
|
-
@lbl_type_cmd.objectName = "lbl_type_cmd"
|
46
|
-
|
47
|
-
@fl.setWidget(1, Qt::FormLayout::LabelRole, @lbl_type_cmd)
|
48
|
-
|
49
|
-
@groupBox = Qt::GroupBox.new(i2c_command)
|
50
|
-
@groupBox.objectName = "groupBox"
|
51
|
-
@rbn_read = Qt::RadioButton.new(@groupBox)
|
52
|
-
@rbn_read.objectName = "rbn_read"
|
53
|
-
@rbn_read.geometry = Qt::Rect.new(10, -4, 61, 31)
|
54
|
-
@rbn_read.checked = true
|
55
|
-
@rbn_write = Qt::RadioButton.new(@groupBox)
|
56
|
-
@rbn_write.objectName = "rbn_write"
|
57
|
-
@rbn_write.geometry = Qt::Rect.new(90, 0, 61, 21)
|
58
|
-
|
59
|
-
@fl.setWidget(1, Qt::FormLayout::FieldRole, @groupBox)
|
60
|
-
|
61
|
-
|
62
|
-
@gridLayout.addLayout(@fl, 1, 0, 1, 1)
|
63
|
-
|
64
|
-
@hl = Qt::HBoxLayout.new()
|
65
|
-
@hl.objectName = "hl"
|
66
|
-
@hs = Qt::SpacerItem.new(40, 20, Qt::SizePolicy::Expanding, Qt::SizePolicy::Minimum)
|
67
|
-
|
68
|
-
@hl.addItem(@hs)
|
69
|
-
|
70
|
-
@btn_cancel = Qt::PushButton.new(i2c_command)
|
71
|
-
@btn_cancel.objectName = "btn_cancel"
|
72
|
-
|
73
|
-
@hl.addWidget(@btn_cancel)
|
74
|
-
|
75
|
-
@bnt_new_cmd = Qt::PushButton.new(i2c_command)
|
76
|
-
@bnt_new_cmd.objectName = "bnt_new_cmd"
|
77
|
-
|
78
|
-
@hl.addWidget(@bnt_new_cmd)
|
79
|
-
|
80
|
-
|
81
|
-
@gridLayout.addLayout(@hl, 2, 0, 1, 1)
|
82
|
-
|
83
|
-
|
84
|
-
retranslateUi(i2c_command)
|
85
|
-
Qt::Object.connect(@btn_cancel, SIGNAL('clicked()'), i2c_command, SLOT('close()'))
|
86
|
-
Qt::Object.connect(@bnt_new_cmd, SIGNAL('clicked()'), i2c_command, SLOT('open_generic_cmd()'))
|
87
|
-
|
88
|
-
Qt::MetaObject.connectSlotsByName(i2c_command)
|
89
|
-
end # setupUi
|
90
|
-
|
91
|
-
def setup_ui(i2c_command)
|
92
|
-
setupUi(i2c_command)
|
93
|
-
end
|
94
|
-
|
95
|
-
def retranslateUi(i2c_command)
|
96
|
-
i2c_command.windowTitle = Qt::Application.translate("I2c_command", "Hardsploit - I2C Command", nil, Qt::Application::UnicodeUTF8)
|
97
|
-
@lbl_size.text = Qt::Application.translate("I2c_command", "Payload size:", nil, Qt::Application::UnicodeUTF8)
|
98
|
-
@lbl_type_cmd.text = Qt::Application.translate("I2c_command", "Command type:", nil, Qt::Application::UnicodeUTF8)
|
99
|
-
@groupBox.title = ''
|
100
|
-
@rbn_read.text = Qt::Application.translate("I2c_command", "Read", nil, Qt::Application::UnicodeUTF8)
|
101
|
-
@rbn_write.text = Qt::Application.translate("I2c_command", "Write", nil, Qt::Application::UnicodeUTF8)
|
102
|
-
@btn_cancel.text = Qt::Application.translate("I2c_command", "Cancel", nil, Qt::Application::UnicodeUTF8)
|
103
|
-
@bnt_new_cmd.text = Qt::Application.translate("I2c_command", "Open", nil, Qt::Application::UnicodeUTF8)
|
104
|
-
end # retranslateUi
|
105
|
-
|
106
|
-
def retranslate_ui(i2c_command)
|
107
|
-
retranslateUi(i2c_command)
|
108
|
-
end
|
109
|
-
|
110
|
-
end
|
111
|
-
|
112
|
-
module Ui
|
113
|
-
class I2c_command < Ui_I2c_command
|
114
|
-
end
|
115
|
-
end # module Ui
|
116
|
-
|
1
|
+
=begin
|
2
|
+
** Form generated from reading ui file 'gui_i2c_command.ui'
|
3
|
+
**
|
4
|
+
** Created: mer. mars 8 11:15:05 2017
|
5
|
+
** by: Qt User Interface Compiler version 4.8.7
|
6
|
+
**
|
7
|
+
** WARNING! All changes made in this file will be lost when recompiling ui file!
|
8
|
+
=end
|
9
|
+
|
10
|
+
class Ui_I2c_command
|
11
|
+
attr_reader :gridLayout
|
12
|
+
attr_reader :fl
|
13
|
+
attr_reader :lbl_size
|
14
|
+
attr_reader :lie_size
|
15
|
+
attr_reader :lbl_type_cmd
|
16
|
+
attr_reader :groupBox
|
17
|
+
attr_reader :rbn_read
|
18
|
+
attr_reader :rbn_write
|
19
|
+
attr_reader :hl
|
20
|
+
attr_reader :hs
|
21
|
+
attr_reader :btn_cancel
|
22
|
+
attr_reader :bnt_new_cmd
|
23
|
+
|
24
|
+
def setupUi(i2c_command)
|
25
|
+
if i2c_command.objectName.nil?
|
26
|
+
i2c_command.objectName = "i2c_command"
|
27
|
+
end
|
28
|
+
i2c_command.windowModality = Qt::ApplicationModal
|
29
|
+
i2c_command.resize(287, 103)
|
30
|
+
@gridLayout = Qt::GridLayout.new(i2c_command)
|
31
|
+
@gridLayout.objectName = "gridLayout"
|
32
|
+
@fl = Qt::FormLayout.new()
|
33
|
+
@fl.objectName = "fl"
|
34
|
+
@lbl_size = Qt::Label.new(i2c_command)
|
35
|
+
@lbl_size.objectName = "lbl_size"
|
36
|
+
|
37
|
+
@fl.setWidget(0, Qt::FormLayout::LabelRole, @lbl_size)
|
38
|
+
|
39
|
+
@lie_size = Qt::LineEdit.new(i2c_command)
|
40
|
+
@lie_size.objectName = "lie_size"
|
41
|
+
|
42
|
+
@fl.setWidget(0, Qt::FormLayout::FieldRole, @lie_size)
|
43
|
+
|
44
|
+
@lbl_type_cmd = Qt::Label.new(i2c_command)
|
45
|
+
@lbl_type_cmd.objectName = "lbl_type_cmd"
|
46
|
+
|
47
|
+
@fl.setWidget(1, Qt::FormLayout::LabelRole, @lbl_type_cmd)
|
48
|
+
|
49
|
+
@groupBox = Qt::GroupBox.new(i2c_command)
|
50
|
+
@groupBox.objectName = "groupBox"
|
51
|
+
@rbn_read = Qt::RadioButton.new(@groupBox)
|
52
|
+
@rbn_read.objectName = "rbn_read"
|
53
|
+
@rbn_read.geometry = Qt::Rect.new(10, -4, 61, 31)
|
54
|
+
@rbn_read.checked = true
|
55
|
+
@rbn_write = Qt::RadioButton.new(@groupBox)
|
56
|
+
@rbn_write.objectName = "rbn_write"
|
57
|
+
@rbn_write.geometry = Qt::Rect.new(90, 0, 61, 21)
|
58
|
+
|
59
|
+
@fl.setWidget(1, Qt::FormLayout::FieldRole, @groupBox)
|
60
|
+
|
61
|
+
|
62
|
+
@gridLayout.addLayout(@fl, 1, 0, 1, 1)
|
63
|
+
|
64
|
+
@hl = Qt::HBoxLayout.new()
|
65
|
+
@hl.objectName = "hl"
|
66
|
+
@hs = Qt::SpacerItem.new(40, 20, Qt::SizePolicy::Expanding, Qt::SizePolicy::Minimum)
|
67
|
+
|
68
|
+
@hl.addItem(@hs)
|
69
|
+
|
70
|
+
@btn_cancel = Qt::PushButton.new(i2c_command)
|
71
|
+
@btn_cancel.objectName = "btn_cancel"
|
72
|
+
|
73
|
+
@hl.addWidget(@btn_cancel)
|
74
|
+
|
75
|
+
@bnt_new_cmd = Qt::PushButton.new(i2c_command)
|
76
|
+
@bnt_new_cmd.objectName = "bnt_new_cmd"
|
77
|
+
|
78
|
+
@hl.addWidget(@bnt_new_cmd)
|
79
|
+
|
80
|
+
|
81
|
+
@gridLayout.addLayout(@hl, 2, 0, 1, 1)
|
82
|
+
|
83
|
+
|
84
|
+
retranslateUi(i2c_command)
|
85
|
+
Qt::Object.connect(@btn_cancel, SIGNAL('clicked()'), i2c_command, SLOT('close()'))
|
86
|
+
Qt::Object.connect(@bnt_new_cmd, SIGNAL('clicked()'), i2c_command, SLOT('open_generic_cmd()'))
|
87
|
+
|
88
|
+
Qt::MetaObject.connectSlotsByName(i2c_command)
|
89
|
+
end # setupUi
|
90
|
+
|
91
|
+
def setup_ui(i2c_command)
|
92
|
+
setupUi(i2c_command)
|
93
|
+
end
|
94
|
+
|
95
|
+
def retranslateUi(i2c_command)
|
96
|
+
i2c_command.windowTitle = Qt::Application.translate("I2c_command", "Hardsploit - I2C Command", nil, Qt::Application::UnicodeUTF8)
|
97
|
+
@lbl_size.text = Qt::Application.translate("I2c_command", "Payload size:", nil, Qt::Application::UnicodeUTF8)
|
98
|
+
@lbl_type_cmd.text = Qt::Application.translate("I2c_command", "Command type:", nil, Qt::Application::UnicodeUTF8)
|
99
|
+
@groupBox.title = ''
|
100
|
+
@rbn_read.text = Qt::Application.translate("I2c_command", "Read", nil, Qt::Application::UnicodeUTF8)
|
101
|
+
@rbn_write.text = Qt::Application.translate("I2c_command", "Write", nil, Qt::Application::UnicodeUTF8)
|
102
|
+
@btn_cancel.text = Qt::Application.translate("I2c_command", "Cancel", nil, Qt::Application::UnicodeUTF8)
|
103
|
+
@bnt_new_cmd.text = Qt::Application.translate("I2c_command", "Open", nil, Qt::Application::UnicodeUTF8)
|
104
|
+
end # retranslateUi
|
105
|
+
|
106
|
+
def retranslate_ui(i2c_command)
|
107
|
+
retranslateUi(i2c_command)
|
108
|
+
end
|
109
|
+
|
110
|
+
end
|
111
|
+
|
112
|
+
module Ui
|
113
|
+
class I2c_command < Ui_I2c_command
|
114
|
+
end
|
115
|
+
end # module Ui
|
116
|
+
|