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.
Files changed (101) hide show
  1. checksums.yaml +4 -4
  2. data/lib/Hardsploit_gui.rb +4 -5
  3. data/lib/class/Chip_clone.rb +70 -0
  4. data/lib/class/Chip_editor.rb +1 -0
  5. data/lib/class/Chip_management.rb +73 -52
  6. data/lib/class/ErrorMsg.rb +1 -0
  7. data/lib/class/Firmware.rb +1 -1
  8. data/lib/class/Progress_bar.rb +1 -1
  9. data/lib/class/Wire_helper.rb +6 -3
  10. data/lib/class/{I2C → i2c}/I2c_command.rb +0 -0
  11. data/lib/class/{I2C/I2c_export.rb → i2c/I2c_read.rb} +15 -15
  12. data/lib/class/{I2C → i2c}/I2c_scanner.rb +2 -1
  13. data/lib/class/{I2C → i2c}/I2c_settings.rb +1 -0
  14. data/lib/class/{I2C/I2c_import.rb → i2c/I2c_write.rb} +13 -12
  15. data/lib/class/{PARALLEL/Parallel_export.rb → parallel/Parallel_read.rb} +17 -18
  16. data/lib/class/{PARALLEL → parallel}/Parallel_settings.rb +0 -0
  17. data/lib/class/{PARALLEL/Parallel_import.rb → parallel/Parallel_write.rb} +11 -10
  18. data/lib/class/{SPI/Spi_export.rb → spi/Spi_read.rb} +15 -15
  19. data/lib/class/{SPI → spi}/Spi_settings.rb +0 -0
  20. data/lib/class/{SPI → spi}/Spi_sniffer.rb +2 -1
  21. data/lib/class/{SPI/Spi_import.rb → spi/Spi_write.rb} +13 -12
  22. data/lib/class/swd/Swd.rb +10 -10
  23. data/lib/class/swd/Swd_scanner.rb +2 -1
  24. data/lib/class/uart/Uart_baudrate.rb +1 -1
  25. data/lib/class/uart/Uart_console.rb +1 -1
  26. data/lib/class/uart/Uart_settings.rb +1 -0
  27. data/lib/db/development.sqlite3 +0 -0
  28. data/lib/gui/gui_chip_clone.rb +87 -0
  29. data/lib/gui/gui_chip_editor.rb +349 -349
  30. data/lib/gui/gui_chip_management.rb +378 -377
  31. data/lib/gui/gui_command_editor.rb +219 -219
  32. data/lib/gui/gui_export.rb +132 -132
  33. data/lib/gui/gui_export_manager.rb +93 -93
  34. data/lib/gui/gui_generic_commands.rb +202 -202
  35. data/lib/gui/gui_generic_read.rb +185 -0
  36. data/lib/gui/gui_generic_write.rb +142 -0
  37. data/lib/gui/gui_i2c_command.rb +116 -116
  38. data/lib/gui/gui_i2c_settings.rb +242 -230
  39. data/lib/gui/gui_import.rb +131 -131
  40. data/lib/gui/gui_parallel_settings.rb +195 -195
  41. data/lib/gui/gui_progress_bar.rb +85 -85
  42. data/lib/gui/gui_signal_mapper.rb +121 -121
  43. data/lib/gui/gui_signal_scanner.rb +146 -146
  44. data/lib/gui/gui_spi_settings.rb +313 -313
  45. data/lib/gui/gui_spi_sniffer.rb +112 -112
  46. data/lib/gui/gui_swd_settings.rb +166 -166
  47. data/lib/gui/gui_uart_baudrate.rb +114 -114
  48. data/lib/gui/gui_uart_console.rb +164 -164
  49. data/lib/gui/gui_uart_settings.rb +243 -243
  50. data/lib/gui/gui_wire_helper.rb +99 -99
  51. data/lib/gui_designer/compile_to_ruby.sh +14 -0
  52. data/lib/gui_designer/gui_chip_clone.ui +96 -0
  53. data/lib/gui_designer/gui_chip_management.ui +25 -22
  54. data/lib/gui_designer/{gui_generic_export.ui → gui_generic_read.ui} +152 -72
  55. data/lib/gui_designer/{gui_generic_import.ui → gui_generic_write.ui} +47 -47
  56. data/lib/gui_designer/gui_i2c_settings.ui +68 -60
  57. data/lib/hardsploit-api/Examples/swdProgrammer.rb +76 -0
  58. data/lib/hardsploit-api/Examples/testI2C.rb +183 -0
  59. data/lib/hardsploit-api/Examples/testNRF24L01.rb +122 -0
  60. data/lib/hardsploit-api/Examples/testParralel.rb +84 -0
  61. data/lib/hardsploit-api/Examples/testSPI.rb +113 -0
  62. data/lib/hardsploit-api/Examples/testSPISniffer.rb +91 -0
  63. data/lib/hardsploit-api/Examples/testSWD.rb +224 -0
  64. data/lib/hardsploit-api/Examples/testUARTBufferOverflow.rb +113 -0
  65. data/lib/hardsploit-api/Examples/testUARTConsole.rb +74 -0
  66. data/lib/hardsploit-api/Examples/testUARTFuzzer.rb +109 -0
  67. data/lib/{Firmwares → hardsploit-api/Firmwares}/FPGA/I2C/I2C_INTERACT/HARDSPLOIT_FIRMWARE_FPGA_I2C_INTERACT.rpd +0 -0
  68. data/lib/{Firmwares → hardsploit-api/Firmwares}/FPGA/PARALLEL/NO_MUX_PARALLEL_MEMORY/HARDSPLOIT_FIRMWARE_FPGA_NO_MUX_PARALLEL_MEMORY.rpd +0 -0
  69. data/lib/{Firmwares → hardsploit-api/Firmwares}/FPGA/SPI/SPI_INTERACT/HARDSPLOIT_FIRMWARE_FPGA_SPI_INTERACT.rpd +0 -0
  70. data/lib/{Firmwares → hardsploit-api/Firmwares}/FPGA/SPI/SPI_SNIFFER/HARDSPLOIT_FIRMWARE_FPGA_SPI_SNIFFER.rpd +0 -0
  71. data/lib/{Firmwares → hardsploit-api/Firmwares}/FPGA/SWD/SWD_INTERACT/HARDSPLOIT_FIRMWARE_FPGA_SWD_INTERACT.rpd +0 -0
  72. data/lib/{Firmwares → hardsploit-api/Firmwares}/FPGA/TEST/TEST_INTERACT/HARDSPLOIT_FIRMWARE_FPGA_TEST_INTERACT.rpd +0 -0
  73. data/lib/{Firmwares → hardsploit-api/Firmwares}/FPGA/UART/UART_INTERACT/HARDSPLOIT_FIRMWARE_FPGA_UART_INTERACT.rpd +0 -0
  74. data/lib/{Firmwares → hardsploit-api/Firmwares}/FPGA/VersionFPGA.rb +0 -0
  75. data/lib/{Firmwares → hardsploit-api/Firmwares}/UC/HARDSPLOIT_FIRMWARE_UC.bin +0 -0
  76. data/lib/{Firmwares → hardsploit-api/Firmwares}/UC/VersionUC.rb +0 -0
  77. data/lib/{HardsploitAPI → hardsploit-api/HardsploitAPI}/Core/HardsploitAPI.rb +0 -0
  78. data/lib/{HardsploitAPI → hardsploit-api/HardsploitAPI}/Core/HardsploitAPI_CONSTANT.rb +0 -0
  79. data/lib/{HardsploitAPI → hardsploit-api/HardsploitAPI}/Core/HardsploitAPI_ERROR.rb +0 -0
  80. data/lib/{HardsploitAPI → hardsploit-api/HardsploitAPI}/Core/HardsploitAPI_FIRMWARE.rb +0 -0
  81. data/lib/{HardsploitAPI → hardsploit-api/HardsploitAPI}/Core/HardsploitAPI_PROGRESS.rb +0 -0
  82. data/lib/{HardsploitAPI → hardsploit-api/HardsploitAPI}/Core/HardsploitAPI_USB_COMMUNICATION.rb +0 -0
  83. data/lib/{HardsploitAPI → hardsploit-api/HardsploitAPI}/Modules/I2C/HardsploitAPI_I2C.rb +0 -0
  84. data/lib/{HardsploitAPI → hardsploit-api/HardsploitAPI}/Modules/NO_MUX_PARALLEL_MEMORY/HardsploitAPI_NO_MUX_PARALLEL_MEMORY.rb +0 -0
  85. data/lib/{HardsploitAPI → hardsploit-api/HardsploitAPI}/Modules/NRF24L01/HardsploitAPI_NRF24L01.rb +0 -0
  86. data/lib/{HardsploitAPI → hardsploit-api/HardsploitAPI}/Modules/SPI/HardsploitAPI_SPI.rb +0 -0
  87. data/lib/{HardsploitAPI → hardsploit-api/HardsploitAPI}/Modules/SPI_SNIFFER/HardsploitAPI_SPI_SNIFFER.rb +0 -0
  88. data/lib/{HardsploitAPI → hardsploit-api/HardsploitAPI}/Modules/SWD/HardsploitAPI_SWD.rb +0 -0
  89. data/lib/{HardsploitAPI → hardsploit-api/HardsploitAPI}/Modules/SWD/HardsploitAPI_SWD_DEBUG.rb +0 -0
  90. data/lib/{HardsploitAPI → hardsploit-api/HardsploitAPI}/Modules/SWD/HardsploitAPI_SWD_MEM_AP.rb +0 -0
  91. data/lib/{HardsploitAPI → hardsploit-api/HardsploitAPI}/Modules/SWD/HardsploitAPI_SWD_STM32.rb +0 -0
  92. data/lib/{HardsploitAPI → hardsploit-api/HardsploitAPI}/Modules/TEST/HardsploitAPI_TEST_INTERACT.rb +0 -0
  93. data/lib/{HardsploitAPI → hardsploit-api/HardsploitAPI}/Modules/UART/HardsploitAPI_UART.rb +0 -0
  94. data/lib/hardsploit-api/LICENSE.txt +674 -0
  95. data/lib/hardsploit-api/README.md +22 -0
  96. data/lib/hardsploit-api/TRADEMARK +3 -0
  97. data/lib/logs/error.log +80 -0
  98. metadata +65 -49
  99. data/lib/gui/gui_generic_export.rb +0 -164
  100. data/lib/gui/gui_generic_import.rb +0 -142
  101. data/lib/gui/gui_spi_import.rb +0 -126
@@ -1,230 +1,242 @@
1
- =begin
2
- ** Form generated from reading ui file 'gui_i2c_settings.ui'
3
- **
4
- ** Created: ven. févr. 12 11:41:41 2016
5
- ** by: Qt User Interface Compiler version 4.8.6
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 :fl
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 :lbl_frequency
23
- attr_reader :cbx_frequency
24
- attr_reader :lbl_full_size
25
- attr_reader :lie_total_size
26
- attr_reader :lbl_bus_scan
27
- attr_reader :btn_bus_scan
28
- attr_reader :lie_page_size
29
- attr_reader :lbl_page_size
30
- attr_reader :lbl_write_page_latency
31
- attr_reader :lie_write_page_latency
32
- attr_reader :tbl_bus_scan
33
- attr_reader :hl
34
- attr_reader :hs
35
- attr_reader :btn_cancel
36
- attr_reader :btn_save
37
-
38
- def setupUi(i2c_settings)
39
- if i2c_settings.objectName.nil?
40
- i2c_settings.objectName = "i2c_settings"
41
- end
42
- i2c_settings.resize(358, 396)
43
- @gridLayout = Qt::GridLayout.new(i2c_settings)
44
- @gridLayout.objectName = "gridLayout"
45
- @vl = Qt::VBoxLayout.new()
46
- @vl.objectName = "vl"
47
- @hl2 = Qt::HBoxLayout.new()
48
- @hl2.objectName = "hl2"
49
- @lbl_chip = Qt::Label.new(i2c_settings)
50
- @lbl_chip.objectName = "lbl_chip"
51
-
52
- @hl2.addWidget(@lbl_chip)
53
-
54
- @lbl_parameters = Qt::Label.new(i2c_settings)
55
- @lbl_parameters.objectName = "lbl_parameters"
56
-
57
- @hl2.addWidget(@lbl_parameters)
58
-
59
- @hs2 = Qt::SpacerItem.new(40, 20, Qt::SizePolicy::Expanding, Qt::SizePolicy::Minimum)
60
-
61
- @hl2.addItem(@hs2)
62
-
63
-
64
- @vl.addLayout(@hl2)
65
-
66
- @fl = Qt::FormLayout.new()
67
- @fl.objectName = "fl"
68
- @lbl_address_w = Qt::Label.new(i2c_settings)
69
- @lbl_address_w.objectName = "lbl_address_w"
70
-
71
- @fl.setWidget(1, Qt::FormLayout::LabelRole, @lbl_address_w)
72
-
73
- @lie_address_w = Qt::LineEdit.new(i2c_settings)
74
- @lie_address_w.objectName = "lie_address_w"
75
- @lie_address_w.maxLength = 2
76
-
77
- @fl.setWidget(1, Qt::FormLayout::FieldRole, @lie_address_w)
78
-
79
- @lbl_address_r = Qt::Label.new(i2c_settings)
80
- @lbl_address_r.objectName = "lbl_address_r"
81
-
82
- @fl.setWidget(2, Qt::FormLayout::LabelRole, @lbl_address_r)
83
-
84
- @lie_address_r = Qt::LineEdit.new(i2c_settings)
85
- @lie_address_r.objectName = "lie_address_r"
86
- @lie_address_r.maxLength = 2
87
-
88
- @fl.setWidget(2, Qt::FormLayout::FieldRole, @lie_address_r)
89
-
90
- @lbl_frequency = Qt::Label.new(i2c_settings)
91
- @lbl_frequency.objectName = "lbl_frequency"
92
-
93
- @fl.setWidget(3, Qt::FormLayout::LabelRole, @lbl_frequency)
94
-
95
- @cbx_frequency = Qt::ComboBox.new(i2c_settings)
96
- @cbx_frequency.objectName = "cbx_frequency"
97
-
98
- @fl.setWidget(3, Qt::FormLayout::FieldRole, @cbx_frequency)
99
-
100
- @lbl_full_size = Qt::Label.new(i2c_settings)
101
- @lbl_full_size.objectName = "lbl_full_size"
102
-
103
- @fl.setWidget(6, Qt::FormLayout::LabelRole, @lbl_full_size)
104
-
105
- @lie_total_size = Qt::LineEdit.new(i2c_settings)
106
- @lie_total_size.objectName = "lie_total_size"
107
-
108
- @fl.setWidget(6, Qt::FormLayout::FieldRole, @lie_total_size)
109
-
110
- @lbl_bus_scan = Qt::Label.new(i2c_settings)
111
- @lbl_bus_scan.objectName = "lbl_bus_scan"
112
-
113
- @fl.setWidget(7, Qt::FormLayout::LabelRole, @lbl_bus_scan)
114
-
115
- @btn_bus_scan = Qt::PushButton.new(i2c_settings)
116
- @btn_bus_scan.objectName = "btn_bus_scan"
117
-
118
- @fl.setWidget(7, Qt::FormLayout::FieldRole, @btn_bus_scan)
119
-
120
- @lie_page_size = Qt::LineEdit.new(i2c_settings)
121
- @lie_page_size.objectName = "lie_page_size"
122
-
123
- @fl.setWidget(5, Qt::FormLayout::FieldRole, @lie_page_size)
124
-
125
- @lbl_page_size = Qt::Label.new(i2c_settings)
126
- @lbl_page_size.objectName = "lbl_page_size"
127
-
128
- @fl.setWidget(5, Qt::FormLayout::LabelRole, @lbl_page_size)
129
-
130
- @lbl_write_page_latency = Qt::Label.new(i2c_settings)
131
- @lbl_write_page_latency.objectName = "lbl_write_page_latency"
132
-
133
- @fl.setWidget(4, Qt::FormLayout::LabelRole, @lbl_write_page_latency)
134
-
135
- @lie_write_page_latency = Qt::LineEdit.new(i2c_settings)
136
- @lie_write_page_latency.objectName = "lie_write_page_latency"
137
-
138
- @fl.setWidget(4, Qt::FormLayout::FieldRole, @lie_write_page_latency)
139
-
140
-
141
- @vl.addLayout(@fl)
142
-
143
- @tbl_bus_scan = Qt::TableWidget.new(i2c_settings)
144
- @tbl_bus_scan.objectName = "tbl_bus_scan"
145
-
146
- @vl.addWidget(@tbl_bus_scan)
147
-
148
- @hl = Qt::HBoxLayout.new()
149
- @hl.objectName = "hl"
150
- @hs = Qt::SpacerItem.new(40, 20, Qt::SizePolicy::Expanding, Qt::SizePolicy::Minimum)
151
-
152
- @hl.addItem(@hs)
153
-
154
- @btn_cancel = Qt::PushButton.new(i2c_settings)
155
- @btn_cancel.objectName = "btn_cancel"
156
-
157
- @hl.addWidget(@btn_cancel)
158
-
159
- @btn_save = Qt::PushButton.new(i2c_settings)
160
- @btn_save.objectName = "btn_save"
161
- @btn_save.maximumSize = Qt::Size.new(16777215, 16777215)
162
-
163
- @hl.addWidget(@btn_save)
164
-
165
-
166
- @vl.addLayout(@hl)
167
-
168
-
169
- @gridLayout.addLayout(@vl, 0, 0, 1, 1)
170
-
171
-
172
- retranslateUi(i2c_settings)
173
- Qt::Object.connect(@btn_cancel, SIGNAL('clicked()'), i2c_settings, SLOT('close()'))
174
- Qt::Object.connect(@btn_save, SIGNAL('clicked()'), i2c_settings, SLOT('save_settings()'))
175
- Qt::Object.connect(@btn_bus_scan, SIGNAL('clicked()'), i2c_settings, SLOT('bus_scan()'))
176
-
177
- Qt::MetaObject.connectSlotsByName(i2c_settings)
178
- end # setupUi
179
-
180
- def setup_ui(i2c_settings)
181
- setupUi(i2c_settings)
182
- end
183
-
184
- def retranslateUi(i2c_settings)
185
- i2c_settings.windowTitle = Qt::Application.translate("I2c_settings", "Hardsploit - I\302\262C settings", nil, Qt::Application::UnicodeUTF8)
186
- @lbl_chip.text = Qt::Application.translate("I2c_settings", "[CHIP]", nil, Qt::Application::UnicodeUTF8)
187
- @lbl_parameters.text = Qt::Application.translate("I2c_settings", "PARAMETERS", nil, Qt::Application::UnicodeUTF8)
188
- @lbl_address_w.text = Qt::Application.translate("I2c_settings", "Base address (W):", nil, Qt::Application::UnicodeUTF8)
189
- @lie_address_w.placeholderText = Qt::Application.translate("I2c_settings", "in hexadecimal", nil, Qt::Application::UnicodeUTF8)
190
- @lbl_address_r.text = Qt::Application.translate("I2c_settings", "Base address (R):", nil, Qt::Application::UnicodeUTF8)
191
- @lie_address_r.placeholderText = Qt::Application.translate("I2c_settings", "in hexadecimal", nil, Qt::Application::UnicodeUTF8)
192
- @lbl_frequency.text = Qt::Application.translate("I2c_settings", "Frequency (Khz):", nil, Qt::Application::UnicodeUTF8)
193
- @cbx_frequency.insertItems(0, [Qt::Application.translate("I2c_settings", "100", nil, Qt::Application::UnicodeUTF8),
194
- Qt::Application.translate("I2c_settings", "400", nil, Qt::Application::UnicodeUTF8),
195
- Qt::Application.translate("I2c_settings", "1000", nil, Qt::Application::UnicodeUTF8)])
196
- @lbl_full_size.text = Qt::Application.translate("I2c_settings", "Total size:", nil, Qt::Application::UnicodeUTF8)
197
- @lie_total_size.placeholderText = Qt::Application.translate("I2c_settings", "in byte, to a maximum of 4Go", nil, Qt::Application::UnicodeUTF8)
198
- @lbl_bus_scan.text = Qt::Application.translate("I2c_settings", "Bus scan:", nil, Qt::Application::UnicodeUTF8)
199
- @btn_bus_scan.text = Qt::Application.translate("I2c_settings", "Launch", nil, Qt::Application::UnicodeUTF8)
200
- @lie_page_size.text = ''
201
- @lie_page_size.placeholderText = Qt::Application.translate("I2c_settings", "in byte", nil, Qt::Application::UnicodeUTF8)
202
- @lbl_page_size.text = Qt::Application.translate("I2c_settings", "Page size:", nil, Qt::Application::UnicodeUTF8)
203
- @lbl_write_page_latency.text = Qt::Application.translate("I2c_settings", "Write page latency:", nil, Qt::Application::UnicodeUTF8)
204
- @lie_write_page_latency.placeholderText = Qt::Application.translate("I2c_settings", "in miliseconds", nil, Qt::Application::UnicodeUTF8)
205
- if @tbl_bus_scan.columnCount < 2
206
- @tbl_bus_scan.columnCount = 2
207
- end
208
-
209
- __colItem = Qt::TableWidgetItem.new
210
- __colItem.setText(Qt::Application.translate("I2c_settings", "Address", nil, Qt::Application::UnicodeUTF8))
211
- @tbl_bus_scan.setHorizontalHeaderItem(0, __colItem)
212
-
213
- __colItem1 = Qt::TableWidgetItem.new
214
- __colItem1.setText(Qt::Application.translate("I2c_settings", "R/W", nil, Qt::Application::UnicodeUTF8))
215
- @tbl_bus_scan.setHorizontalHeaderItem(1, __colItem1)
216
- @btn_cancel.text = Qt::Application.translate("I2c_settings", "Close", nil, Qt::Application::UnicodeUTF8)
217
- @btn_save.text = Qt::Application.translate("I2c_settings", "Save", nil, Qt::Application::UnicodeUTF8)
218
- end # retranslateUi
219
-
220
- def retranslate_ui(i2c_settings)
221
- retranslateUi(i2c_settings)
222
- end
223
-
224
- end
225
-
226
- module Ui
227
- class I2c_settings < Ui_I2c_settings
228
- end
229
- end # module Ui
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
+