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
data/lib/gui/gui_i2c_settings.rb
CHANGED
@@ -1,230 +1,242 @@
|
|
1
|
-
=begin
|
2
|
-
** Form generated from reading ui file 'gui_i2c_settings.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_settings
|
11
|
-
attr_reader :gridLayout
|
12
|
-
attr_reader :vl
|
13
|
-
attr_reader :hl2
|
14
|
-
attr_reader :lbl_chip
|
15
|
-
attr_reader :lbl_parameters
|
16
|
-
attr_reader :hs2
|
17
|
-
attr_reader :
|
18
|
-
attr_reader :lbl_address_w
|
19
|
-
attr_reader :lie_address_w
|
20
|
-
attr_reader :lbl_address_r
|
21
|
-
attr_reader :lie_address_r
|
22
|
-
attr_reader :
|
23
|
-
attr_reader :
|
24
|
-
attr_reader :
|
25
|
-
attr_reader :
|
26
|
-
attr_reader :
|
27
|
-
attr_reader :
|
28
|
-
attr_reader :
|
29
|
-
attr_reader :
|
30
|
-
attr_reader :
|
31
|
-
attr_reader :
|
32
|
-
attr_reader :
|
33
|
-
attr_reader :
|
34
|
-
attr_reader :
|
35
|
-
attr_reader :
|
36
|
-
attr_reader :
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
@
|
46
|
-
@
|
47
|
-
@
|
48
|
-
@
|
49
|
-
@
|
50
|
-
@
|
51
|
-
|
52
|
-
@
|
53
|
-
|
54
|
-
@
|
55
|
-
|
56
|
-
|
57
|
-
@
|
58
|
-
|
59
|
-
@
|
60
|
-
|
61
|
-
@
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
@
|
67
|
-
|
68
|
-
@
|
69
|
-
@
|
70
|
-
|
71
|
-
@
|
72
|
-
|
73
|
-
@
|
74
|
-
|
75
|
-
@lie_address_w
|
76
|
-
|
77
|
-
@
|
78
|
-
|
79
|
-
@
|
80
|
-
|
81
|
-
|
82
|
-
@
|
83
|
-
|
84
|
-
@
|
85
|
-
|
86
|
-
@lie_address_r
|
87
|
-
|
88
|
-
@
|
89
|
-
|
90
|
-
@
|
91
|
-
|
92
|
-
|
93
|
-
@
|
94
|
-
|
95
|
-
@
|
96
|
-
@
|
97
|
-
|
98
|
-
@
|
99
|
-
|
100
|
-
@
|
101
|
-
|
102
|
-
|
103
|
-
@
|
104
|
-
|
105
|
-
@
|
106
|
-
|
107
|
-
|
108
|
-
@
|
109
|
-
|
110
|
-
@
|
111
|
-
@
|
112
|
-
|
113
|
-
@
|
114
|
-
|
115
|
-
@
|
116
|
-
@
|
117
|
-
|
118
|
-
@
|
119
|
-
|
120
|
-
@
|
121
|
-
|
122
|
-
|
123
|
-
@
|
124
|
-
|
125
|
-
@
|
126
|
-
|
127
|
-
|
128
|
-
@
|
129
|
-
|
130
|
-
@
|
131
|
-
|
132
|
-
|
133
|
-
@
|
134
|
-
|
135
|
-
@
|
136
|
-
|
137
|
-
|
138
|
-
@
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
@
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
@
|
149
|
-
|
150
|
-
@
|
151
|
-
|
152
|
-
@
|
153
|
-
|
154
|
-
|
155
|
-
@
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
@
|
161
|
-
@
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
@
|
167
|
-
|
168
|
-
|
169
|
-
@
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
Qt::
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
@
|
199
|
-
@
|
200
|
-
@
|
201
|
-
@
|
202
|
-
@
|
203
|
-
@
|
204
|
-
@
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
__colItem
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
__colItem1
|
215
|
-
|
216
|
-
@
|
217
|
-
@
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
1
|
+
=begin
|
2
|
+
** Form generated from reading ui file 'gui_i2c_settings.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_settings
|
11
|
+
attr_reader :gridLayout
|
12
|
+
attr_reader :vl
|
13
|
+
attr_reader :hl2
|
14
|
+
attr_reader :lbl_chip
|
15
|
+
attr_reader :lbl_parameters
|
16
|
+
attr_reader :hs2
|
17
|
+
attr_reader :formLayout_2
|
18
|
+
attr_reader :lbl_address_w
|
19
|
+
attr_reader :lie_address_w
|
20
|
+
attr_reader :lbl_address_r
|
21
|
+
attr_reader :lie_address_r
|
22
|
+
attr_reader :horizontalLayout
|
23
|
+
attr_reader :label
|
24
|
+
attr_reader :btn_bus_scan
|
25
|
+
attr_reader :tbl_bus_scan
|
26
|
+
attr_reader :formLayout
|
27
|
+
attr_reader :lbl_frequency
|
28
|
+
attr_reader :cbx_frequency
|
29
|
+
attr_reader :lbl_write_page_latency
|
30
|
+
attr_reader :lie_write_page_latency
|
31
|
+
attr_reader :lbl_page_size
|
32
|
+
attr_reader :lbl_full_size
|
33
|
+
attr_reader :lie_page_size
|
34
|
+
attr_reader :lie_total_size
|
35
|
+
attr_reader :hl
|
36
|
+
attr_reader :hs
|
37
|
+
attr_reader :btn_cancel
|
38
|
+
attr_reader :btn_save
|
39
|
+
|
40
|
+
def setupUi(i2c_settings)
|
41
|
+
if i2c_settings.objectName.nil?
|
42
|
+
i2c_settings.objectName = "i2c_settings"
|
43
|
+
end
|
44
|
+
i2c_settings.resize(339, 504)
|
45
|
+
@gridLayout = Qt::GridLayout.new(i2c_settings)
|
46
|
+
@gridLayout.objectName = "gridLayout"
|
47
|
+
@vl = Qt::VBoxLayout.new()
|
48
|
+
@vl.objectName = "vl"
|
49
|
+
@hl2 = Qt::HBoxLayout.new()
|
50
|
+
@hl2.objectName = "hl2"
|
51
|
+
@lbl_chip = Qt::Label.new(i2c_settings)
|
52
|
+
@lbl_chip.objectName = "lbl_chip"
|
53
|
+
|
54
|
+
@hl2.addWidget(@lbl_chip)
|
55
|
+
|
56
|
+
@lbl_parameters = Qt::Label.new(i2c_settings)
|
57
|
+
@lbl_parameters.objectName = "lbl_parameters"
|
58
|
+
|
59
|
+
@hl2.addWidget(@lbl_parameters)
|
60
|
+
|
61
|
+
@hs2 = Qt::SpacerItem.new(40, 20, Qt::SizePolicy::Expanding, Qt::SizePolicy::Minimum)
|
62
|
+
|
63
|
+
@hl2.addItem(@hs2)
|
64
|
+
|
65
|
+
|
66
|
+
@vl.addLayout(@hl2)
|
67
|
+
|
68
|
+
@formLayout_2 = Qt::FormLayout.new()
|
69
|
+
@formLayout_2.objectName = "formLayout_2"
|
70
|
+
@lbl_address_w = Qt::Label.new(i2c_settings)
|
71
|
+
@lbl_address_w.objectName = "lbl_address_w"
|
72
|
+
|
73
|
+
@formLayout_2.setWidget(0, Qt::FormLayout::LabelRole, @lbl_address_w)
|
74
|
+
|
75
|
+
@lie_address_w = Qt::LineEdit.new(i2c_settings)
|
76
|
+
@lie_address_w.objectName = "lie_address_w"
|
77
|
+
@lie_address_w.maxLength = 2
|
78
|
+
|
79
|
+
@formLayout_2.setWidget(0, Qt::FormLayout::FieldRole, @lie_address_w)
|
80
|
+
|
81
|
+
@lbl_address_r = Qt::Label.new(i2c_settings)
|
82
|
+
@lbl_address_r.objectName = "lbl_address_r"
|
83
|
+
|
84
|
+
@formLayout_2.setWidget(1, Qt::FormLayout::LabelRole, @lbl_address_r)
|
85
|
+
|
86
|
+
@lie_address_r = Qt::LineEdit.new(i2c_settings)
|
87
|
+
@lie_address_r.objectName = "lie_address_r"
|
88
|
+
@lie_address_r.maxLength = 2
|
89
|
+
|
90
|
+
@formLayout_2.setWidget(1, Qt::FormLayout::FieldRole, @lie_address_r)
|
91
|
+
|
92
|
+
|
93
|
+
@vl.addLayout(@formLayout_2)
|
94
|
+
|
95
|
+
@horizontalLayout = Qt::HBoxLayout.new()
|
96
|
+
@horizontalLayout.objectName = "horizontalLayout"
|
97
|
+
@label = Qt::Label.new(i2c_settings)
|
98
|
+
@label.objectName = "label"
|
99
|
+
|
100
|
+
@horizontalLayout.addWidget(@label)
|
101
|
+
|
102
|
+
@btn_bus_scan = Qt::PushButton.new(i2c_settings)
|
103
|
+
@btn_bus_scan.objectName = "btn_bus_scan"
|
104
|
+
|
105
|
+
@horizontalLayout.addWidget(@btn_bus_scan)
|
106
|
+
|
107
|
+
|
108
|
+
@vl.addLayout(@horizontalLayout)
|
109
|
+
|
110
|
+
@tbl_bus_scan = Qt::TableWidget.new(i2c_settings)
|
111
|
+
@tbl_bus_scan.objectName = "tbl_bus_scan"
|
112
|
+
|
113
|
+
@vl.addWidget(@tbl_bus_scan)
|
114
|
+
|
115
|
+
@formLayout = Qt::FormLayout.new()
|
116
|
+
@formLayout.objectName = "formLayout"
|
117
|
+
@lbl_frequency = Qt::Label.new(i2c_settings)
|
118
|
+
@lbl_frequency.objectName = "lbl_frequency"
|
119
|
+
|
120
|
+
@formLayout.setWidget(3, Qt::FormLayout::LabelRole, @lbl_frequency)
|
121
|
+
|
122
|
+
@cbx_frequency = Qt::ComboBox.new(i2c_settings)
|
123
|
+
@cbx_frequency.objectName = "cbx_frequency"
|
124
|
+
|
125
|
+
@formLayout.setWidget(3, Qt::FormLayout::FieldRole, @cbx_frequency)
|
126
|
+
|
127
|
+
@lbl_write_page_latency = Qt::Label.new(i2c_settings)
|
128
|
+
@lbl_write_page_latency.objectName = "lbl_write_page_latency"
|
129
|
+
|
130
|
+
@formLayout.setWidget(2, Qt::FormLayout::LabelRole, @lbl_write_page_latency)
|
131
|
+
|
132
|
+
@lie_write_page_latency = Qt::LineEdit.new(i2c_settings)
|
133
|
+
@lie_write_page_latency.objectName = "lie_write_page_latency"
|
134
|
+
|
135
|
+
@formLayout.setWidget(2, Qt::FormLayout::FieldRole, @lie_write_page_latency)
|
136
|
+
|
137
|
+
@lbl_page_size = Qt::Label.new(i2c_settings)
|
138
|
+
@lbl_page_size.objectName = "lbl_page_size"
|
139
|
+
|
140
|
+
@formLayout.setWidget(1, Qt::FormLayout::LabelRole, @lbl_page_size)
|
141
|
+
|
142
|
+
@lbl_full_size = Qt::Label.new(i2c_settings)
|
143
|
+
@lbl_full_size.objectName = "lbl_full_size"
|
144
|
+
|
145
|
+
@formLayout.setWidget(0, Qt::FormLayout::LabelRole, @lbl_full_size)
|
146
|
+
|
147
|
+
@lie_page_size = Qt::LineEdit.new(i2c_settings)
|
148
|
+
@lie_page_size.objectName = "lie_page_size"
|
149
|
+
|
150
|
+
@formLayout.setWidget(1, Qt::FormLayout::FieldRole, @lie_page_size)
|
151
|
+
|
152
|
+
@lie_total_size = Qt::LineEdit.new(i2c_settings)
|
153
|
+
@lie_total_size.objectName = "lie_total_size"
|
154
|
+
|
155
|
+
@formLayout.setWidget(0, Qt::FormLayout::FieldRole, @lie_total_size)
|
156
|
+
|
157
|
+
|
158
|
+
@vl.addLayout(@formLayout)
|
159
|
+
|
160
|
+
@hl = Qt::HBoxLayout.new()
|
161
|
+
@hl.objectName = "hl"
|
162
|
+
@hs = Qt::SpacerItem.new(40, 20, Qt::SizePolicy::Expanding, Qt::SizePolicy::Minimum)
|
163
|
+
|
164
|
+
@hl.addItem(@hs)
|
165
|
+
|
166
|
+
@btn_cancel = Qt::PushButton.new(i2c_settings)
|
167
|
+
@btn_cancel.objectName = "btn_cancel"
|
168
|
+
|
169
|
+
@hl.addWidget(@btn_cancel)
|
170
|
+
|
171
|
+
@btn_save = Qt::PushButton.new(i2c_settings)
|
172
|
+
@btn_save.objectName = "btn_save"
|
173
|
+
@btn_save.maximumSize = Qt::Size.new(16777215, 16777215)
|
174
|
+
|
175
|
+
@hl.addWidget(@btn_save)
|
176
|
+
|
177
|
+
|
178
|
+
@vl.addLayout(@hl)
|
179
|
+
|
180
|
+
|
181
|
+
@gridLayout.addLayout(@vl, 0, 0, 1, 1)
|
182
|
+
|
183
|
+
|
184
|
+
retranslateUi(i2c_settings)
|
185
|
+
Qt::Object.connect(@btn_cancel, SIGNAL('clicked()'), i2c_settings, SLOT('close()'))
|
186
|
+
Qt::Object.connect(@btn_save, SIGNAL('clicked()'), i2c_settings, SLOT('save_settings()'))
|
187
|
+
Qt::Object.connect(@btn_bus_scan, SIGNAL('clicked()'), i2c_settings, SLOT('bus_scan()'))
|
188
|
+
|
189
|
+
Qt::MetaObject.connectSlotsByName(i2c_settings)
|
190
|
+
end # setupUi
|
191
|
+
|
192
|
+
def setup_ui(i2c_settings)
|
193
|
+
setupUi(i2c_settings)
|
194
|
+
end
|
195
|
+
|
196
|
+
def retranslateUi(i2c_settings)
|
197
|
+
i2c_settings.windowTitle = Qt::Application.translate("I2c_settings", "Hardsploit - I\302\262C settings", nil, Qt::Application::UnicodeUTF8)
|
198
|
+
@lbl_chip.text = Qt::Application.translate("I2c_settings", "[CHIP]", nil, Qt::Application::UnicodeUTF8)
|
199
|
+
@lbl_parameters.text = Qt::Application.translate("I2c_settings", "PARAMETERS", nil, Qt::Application::UnicodeUTF8)
|
200
|
+
@lbl_address_w.text = Qt::Application.translate("I2c_settings", "Base address (W):", nil, Qt::Application::UnicodeUTF8)
|
201
|
+
@lie_address_w.placeholderText = Qt::Application.translate("I2c_settings", "in hexadecimal", nil, Qt::Application::UnicodeUTF8)
|
202
|
+
@lbl_address_r.text = Qt::Application.translate("I2c_settings", "Base address (R):", nil, Qt::Application::UnicodeUTF8)
|
203
|
+
@lie_address_r.placeholderText = Qt::Application.translate("I2c_settings", "in hexadecimal", nil, Qt::Application::UnicodeUTF8)
|
204
|
+
@label.text = Qt::Application.translate("I2c_settings", "You don't know the addresses? Try a scan:", nil, Qt::Application::UnicodeUTF8)
|
205
|
+
@btn_bus_scan.text = Qt::Application.translate("I2c_settings", "Launch", nil, Qt::Application::UnicodeUTF8)
|
206
|
+
if @tbl_bus_scan.columnCount < 2
|
207
|
+
@tbl_bus_scan.columnCount = 2
|
208
|
+
end
|
209
|
+
|
210
|
+
__colItem = Qt::TableWidgetItem.new
|
211
|
+
__colItem.setText(Qt::Application.translate("I2c_settings", "Address", nil, Qt::Application::UnicodeUTF8))
|
212
|
+
@tbl_bus_scan.setHorizontalHeaderItem(0, __colItem)
|
213
|
+
|
214
|
+
__colItem1 = Qt::TableWidgetItem.new
|
215
|
+
__colItem1.setText(Qt::Application.translate("I2c_settings", "R/W", nil, Qt::Application::UnicodeUTF8))
|
216
|
+
@tbl_bus_scan.setHorizontalHeaderItem(1, __colItem1)
|
217
|
+
@lbl_frequency.text = Qt::Application.translate("I2c_settings", "Frequency (Khz):", nil, Qt::Application::UnicodeUTF8)
|
218
|
+
@cbx_frequency.insertItems(0, [Qt::Application.translate("I2c_settings", "100", nil, Qt::Application::UnicodeUTF8),
|
219
|
+
Qt::Application.translate("I2c_settings", "400", nil, Qt::Application::UnicodeUTF8),
|
220
|
+
Qt::Application.translate("I2c_settings", "1000", nil, Qt::Application::UnicodeUTF8)])
|
221
|
+
@lbl_write_page_latency.text = Qt::Application.translate("I2c_settings", "Write page latency:", nil, Qt::Application::UnicodeUTF8)
|
222
|
+
@lie_write_page_latency.placeholderText = Qt::Application.translate("I2c_settings", "in miliseconds", nil, Qt::Application::UnicodeUTF8)
|
223
|
+
@lbl_page_size.text = Qt::Application.translate("I2c_settings", "Page size:", nil, Qt::Application::UnicodeUTF8)
|
224
|
+
@lbl_full_size.text = Qt::Application.translate("I2c_settings", "Total size:", nil, Qt::Application::UnicodeUTF8)
|
225
|
+
@lie_page_size.text = ''
|
226
|
+
@lie_page_size.placeholderText = Qt::Application.translate("I2c_settings", "in byte", nil, Qt::Application::UnicodeUTF8)
|
227
|
+
@lie_total_size.placeholderText = Qt::Application.translate("I2c_settings", "in byte, to a maximum of 4Go", nil, Qt::Application::UnicodeUTF8)
|
228
|
+
@btn_cancel.text = Qt::Application.translate("I2c_settings", "Close", nil, Qt::Application::UnicodeUTF8)
|
229
|
+
@btn_save.text = Qt::Application.translate("I2c_settings", "Save", nil, Qt::Application::UnicodeUTF8)
|
230
|
+
end # retranslateUi
|
231
|
+
|
232
|
+
def retranslate_ui(i2c_settings)
|
233
|
+
retranslateUi(i2c_settings)
|
234
|
+
end
|
235
|
+
|
236
|
+
end
|
237
|
+
|
238
|
+
module Ui
|
239
|
+
class I2c_settings < Ui_I2c_settings
|
240
|
+
end
|
241
|
+
end # module Ui
|
242
|
+
|