hardsploit_gui 2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (81) hide show
  1. checksums.yaml +7 -0
  2. data/README.md +22 -0
  3. data/Rakefile +1 -0
  4. data/bin/hardsploit_gui +3 -0
  5. data/lib/Firmware/FPGA/I2C/I2C_INTERACT/HARDSPLOIT_FIRMWARE_FPGA_I2C_INTERACT.rpd +0 -0
  6. data/lib/Firmware/FPGA/PARALLEL/NO_MUX_PARALLEL_MEMORY/HARDSPLOIT_FIRMWARE_FPGA_NO_MUX_PARALLEL_MEMORY.rpd +0 -0
  7. data/lib/Firmware/FPGA/SPI/SPI_INTERACT/HARDSPLOIT_FIRMWARE_FPGA_SPI_INTERACT.rpd +0 -0
  8. data/lib/Firmware/FPGA/SWD/SWD_INTERACT/HARDSPLOIT_FIRMWARE_FPGA_SWD_INTERACT.rpd +0 -0
  9. data/lib/Firmware/FPGA/TEST/TEST_INTERACT/HARDSPLOIT_FIRMWARE_FPGA_TEST_INTERACT.rpd +0 -0
  10. data/lib/Firmware/FPGA/VersionFPGA.rb +5 -0
  11. data/lib/Firmware/UC/HARDSPLOIT_FIRMWARE_UC.bin +0 -0
  12. data/lib/Firmware/UC/VersionUC.rb +12 -0
  13. data/lib/HardsploitAPI/HardsploitAPI.rb +134 -0
  14. data/lib/HardsploitAPI/HardsploitAPI_CONSTANT.rb +145 -0
  15. data/lib/HardsploitAPI/HardsploitAPI_FIRMWARE.rb +311 -0
  16. data/lib/HardsploitAPI/HardsploitAPI_I2C.rb +218 -0
  17. data/lib/HardsploitAPI/HardsploitAPI_NO_MUX_PARALLELE_MEMORY.rb +229 -0
  18. data/lib/HardsploitAPI/HardsploitAPI_SPI.rb +179 -0
  19. data/lib/HardsploitAPI/HardsploitAPI_TEST_INTERACT.rb +98 -0
  20. data/lib/HardsploitAPI/HardsploitAPI_USB_COMMUNICATION.rb +149 -0
  21. data/lib/HardsploitAPI/LICENSE.txt +674 -0
  22. data/lib/HardsploitAPI/README.md +22 -0
  23. data/lib/HardsploitAPI/SWD/HardsploitAPI_SWD.rb +249 -0
  24. data/lib/HardsploitAPI/SWD/HardsploitAPI_SWD_DEBUG.rb +102 -0
  25. data/lib/HardsploitAPI/SWD/HardsploitAPI_SWD_MEM_AP.rb +78 -0
  26. data/lib/HardsploitAPI/SWD/HardsploitAPI_SWD_STM32.rb +104 -0
  27. data/lib/HardsploitAPI/TRADEMARK +3 -0
  28. data/lib/LICENSE.txt +674 -0
  29. data/lib/README.md +22 -0
  30. data/lib/TRADEMARK +3 -0
  31. data/lib/class/Chip_editor.rb +448 -0
  32. data/lib/class/Command_editor.rb +268 -0
  33. data/lib/class/Command_table.rb +239 -0
  34. data/lib/class/Console.rb +28 -0
  35. data/lib/class/Export_manager.rb +124 -0
  36. data/lib/class/Firmware.rb +29 -0
  37. data/lib/class/Generic_commands.rb +275 -0
  38. data/lib/class/HardsploitGUI.rb +462 -0
  39. data/lib/class/I2C/I2c_command.rb +48 -0
  40. data/lib/class/I2C/I2c_export.rb +121 -0
  41. data/lib/class/I2C/I2c_import.rb +92 -0
  42. data/lib/class/I2C/I2c_settings.rb +117 -0
  43. data/lib/class/PARALLEL/Parallel_export.rb +146 -0
  44. data/lib/class/PARALLEL/Parallel_import.rb +88 -0
  45. data/lib/class/PARALLEL/Parallel_settings.rb +102 -0
  46. data/lib/class/SPI/Spi_export.rb +141 -0
  47. data/lib/class/SPI/Spi_import.rb +112 -0
  48. data/lib/class/SPI/Spi_settings.rb +90 -0
  49. data/lib/class/Wire_helper.rb +246 -0
  50. data/lib/db/associations.rb +125 -0
  51. data/lib/db/hs.db +0 -0
  52. data/lib/gui/gui_chip_editor.rb +355 -0
  53. data/lib/gui/gui_chip_management.rb +372 -0
  54. data/lib/gui/gui_command_editor.rb +218 -0
  55. data/lib/gui/gui_export_manager.rb +93 -0
  56. data/lib/gui/gui_generic_commands.rb +164 -0
  57. data/lib/gui/gui_generic_export.rb +148 -0
  58. data/lib/gui/gui_generic_import.rb +126 -0
  59. data/lib/gui/gui_i2c_command.rb +115 -0
  60. data/lib/gui/gui_i2c_settings.rb +201 -0
  61. data/lib/gui/gui_parallel_settings.rb +194 -0
  62. data/lib/gui/gui_spi_import.rb +126 -0
  63. data/lib/gui/gui_spi_settings.rb +187 -0
  64. data/lib/gui/gui_wire_helper.rb +99 -0
  65. data/lib/gui_designer/gui_chip_editor.ui +553 -0
  66. data/lib/gui_designer/gui_chip_management.ui +842 -0
  67. data/lib/gui_designer/gui_command_editor.ui +347 -0
  68. data/lib/gui_designer/gui_export_manager.ui +115 -0
  69. data/lib/gui_designer/gui_generic_commands.ui +258 -0
  70. data/lib/gui_designer/gui_generic_export.ui +179 -0
  71. data/lib/gui_designer/gui_generic_import.ui +142 -0
  72. data/lib/gui_designer/gui_i2c_command.ui +145 -0
  73. data/lib/gui_designer/gui_i2c_settings.ui +261 -0
  74. data/lib/gui_designer/gui_parallel_settings.ui +244 -0
  75. data/lib/gui_designer/gui_processing.ui +81 -0
  76. data/lib/gui_designer/gui_spi_settings.ui +321 -0
  77. data/lib/gui_designer/gui_wire_helper.ui +117 -0
  78. data/lib/hardsploit.rb +122 -0
  79. data/lib/images/search.png +0 -0
  80. data/lib/logs/error.log +0 -0
  81. metadata +236 -0
@@ -0,0 +1,126 @@
1
+ =begin
2
+ ** Form generated from reading ui file 'gui_spi_import.ui'
3
+ **
4
+ ** Created: jeu. déc. 3 15:41:11 2015
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_Spi_import
11
+ attr_reader :gridLayout
12
+ attr_reader :vl
13
+ attr_reader :hl2
14
+ attr_reader :lbl_chip
15
+ attr_reader :lbl_export
16
+ attr_reader :hs
17
+ attr_reader :fl
18
+ attr_reader :lbl_start
19
+ attr_reader :lie_start
20
+ attr_reader :btn_file
21
+ attr_reader :lbl_file
22
+ attr_reader :hl
23
+ attr_reader :btn_import
24
+
25
+ def setupUi(spi_import)
26
+ if spi_import.objectName.nil?
27
+ spi_import.objectName = "spi_import"
28
+ end
29
+ spi_import.resize(265, 137)
30
+ @gridLayout = Qt::GridLayout.new(spi_import)
31
+ @gridLayout.objectName = "gridLayout"
32
+ @vl = Qt::VBoxLayout.new()
33
+ @vl.objectName = "vl"
34
+ @hl2 = Qt::HBoxLayout.new()
35
+ @hl2.objectName = "hl2"
36
+ @lbl_chip = Qt::Label.new(spi_import)
37
+ @lbl_chip.objectName = "lbl_chip"
38
+
39
+ @hl2.addWidget(@lbl_chip)
40
+
41
+ @lbl_export = Qt::Label.new(spi_import)
42
+ @lbl_export.objectName = "lbl_export"
43
+
44
+ @hl2.addWidget(@lbl_export)
45
+
46
+ @hs = Qt::SpacerItem.new(40, 20, Qt::SizePolicy::Expanding, Qt::SizePolicy::Minimum)
47
+
48
+ @hl2.addItem(@hs)
49
+
50
+
51
+ @vl.addLayout(@hl2)
52
+
53
+ @fl = Qt::FormLayout.new()
54
+ @fl.objectName = "fl"
55
+ @lbl_start = Qt::Label.new(spi_import)
56
+ @lbl_start.objectName = "lbl_start"
57
+
58
+ @fl.setWidget(1, Qt::FormLayout::LabelRole, @lbl_start)
59
+
60
+ @lie_start = Qt::LineEdit.new(spi_import)
61
+ @lie_start.objectName = "lie_start"
62
+ @lie_start.maxLength = 20
63
+
64
+ @fl.setWidget(1, Qt::FormLayout::FieldRole, @lie_start)
65
+
66
+ @btn_file = Qt::PushButton.new(spi_import)
67
+ @btn_file.objectName = "btn_file"
68
+
69
+ @fl.setWidget(2, Qt::FormLayout::FieldRole, @btn_file)
70
+
71
+ @lbl_file = Qt::Label.new(spi_import)
72
+ @lbl_file.objectName = "lbl_file"
73
+
74
+ @fl.setWidget(2, Qt::FormLayout::LabelRole, @lbl_file)
75
+
76
+
77
+ @vl.addLayout(@fl)
78
+
79
+ @hl = Qt::HBoxLayout.new()
80
+ @hl.objectName = "hl"
81
+ @btn_import = Qt::PushButton.new(spi_import)
82
+ @btn_import.objectName = "btn_import"
83
+ @btn_import.enabled = false
84
+
85
+ @hl.addWidget(@btn_import)
86
+
87
+
88
+ @vl.addLayout(@hl)
89
+
90
+
91
+ @gridLayout.addLayout(@vl, 0, 0, 1, 1)
92
+
93
+
94
+ retranslateUi(spi_import)
95
+ Qt::Object.connect(@btn_import, SIGNAL('clicked()'), spi_import, SLOT('import()'))
96
+ Qt::Object.connect(@btn_file, SIGNAL('clicked()'), spi_import, SLOT('select_import_file()'))
97
+
98
+ Qt::MetaObject.connectSlotsByName(spi_import)
99
+ end # setupUi
100
+
101
+ def setup_ui(spi_import)
102
+ setupUi(spi_import)
103
+ end
104
+
105
+ def retranslateUi(spi_import)
106
+ spi_import.windowTitle = Qt::Application.translate("Spi_import", "Hardsploit - Import", nil, Qt::Application::UnicodeUTF8)
107
+ @lbl_chip.text = Qt::Application.translate("Spi_import", "[CHIP]", nil, Qt::Application::UnicodeUTF8)
108
+ @lbl_export.text = Qt::Application.translate("Spi_import", "Import", nil, Qt::Application::UnicodeUTF8)
109
+ @lbl_start.text = Qt::Application.translate("Spi_import", "Start address:", nil, Qt::Application::UnicodeUTF8)
110
+ @lie_start.text = Qt::Application.translate("Spi_import", "0", nil, Qt::Application::UnicodeUTF8)
111
+ @btn_file.text = Qt::Application.translate("Spi_import", "File...", nil, Qt::Application::UnicodeUTF8)
112
+ @lbl_file.text = Qt::Application.translate("Spi_import", "File:", nil, Qt::Application::UnicodeUTF8)
113
+ @btn_import.text = Qt::Application.translate("Spi_import", "Import", nil, Qt::Application::UnicodeUTF8)
114
+ end # retranslateUi
115
+
116
+ def retranslate_ui(spi_import)
117
+ retranslateUi(spi_import)
118
+ end
119
+
120
+ end
121
+
122
+ module Ui
123
+ class Spi_import < Ui_Spi_import
124
+ end
125
+ end # module Ui
126
+
@@ -0,0 +1,187 @@
1
+ =begin
2
+ ** Form generated from reading ui file 'gui_spi_settings.ui'
3
+ **
4
+ ** Created: jeu. déc. 3 15:41:20 2015
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_Spi_settings
11
+ attr_reader :gridLayout
12
+ attr_reader :hl2
13
+ attr_reader :fl
14
+ attr_reader :lbl_frequency
15
+ attr_reader :cbx_frequency
16
+ attr_reader :lbl_cmd_read
17
+ attr_reader :lie_cmd_read
18
+ attr_reader :lbl_page_size
19
+ attr_reader :lie_page_size
20
+ attr_reader :fl2
21
+ attr_reader :lbl_total_size
22
+ attr_reader :lie_total_size
23
+ attr_reader :lbl_mode
24
+ attr_reader :cbx_mode
25
+ attr_reader :btn_save
26
+ attr_reader :hl
27
+ attr_reader :lbl_chip
28
+ attr_reader :lbl_param
29
+ attr_reader :hs
30
+
31
+ def setupUi(spi_settings)
32
+ if spi_settings.objectName.nil?
33
+ spi_settings.objectName = "spi_settings"
34
+ end
35
+ spi_settings.resize(531, 125)
36
+ @gridLayout = Qt::GridLayout.new(spi_settings)
37
+ @gridLayout.objectName = "gridLayout"
38
+ @hl2 = Qt::HBoxLayout.new()
39
+ @hl2.objectName = "hl2"
40
+ @fl = Qt::FormLayout.new()
41
+ @fl.objectName = "fl"
42
+ @lbl_frequency = Qt::Label.new(spi_settings)
43
+ @lbl_frequency.objectName = "lbl_frequency"
44
+
45
+ @fl.setWidget(1, Qt::FormLayout::LabelRole, @lbl_frequency)
46
+
47
+ @cbx_frequency = Qt::ComboBox.new(spi_settings)
48
+ @cbx_frequency.objectName = "cbx_frequency"
49
+ @cbx_frequency.maximumSize = Qt::Size.new(100, 16777215)
50
+
51
+ @fl.setWidget(1, Qt::FormLayout::FieldRole, @cbx_frequency)
52
+
53
+ @lbl_cmd_read = Qt::Label.new(spi_settings)
54
+ @lbl_cmd_read.objectName = "lbl_cmd_read"
55
+
56
+ @fl.setWidget(2, Qt::FormLayout::LabelRole, @lbl_cmd_read)
57
+
58
+ @lie_cmd_read = Qt::LineEdit.new(spi_settings)
59
+ @lie_cmd_read.objectName = "lie_cmd_read"
60
+ @lie_cmd_read.maximumSize = Qt::Size.new(100, 16777215)
61
+ @lie_cmd_read.maxLength = 5
62
+
63
+ @fl.setWidget(2, Qt::FormLayout::FieldRole, @lie_cmd_read)
64
+
65
+ @lbl_page_size = Qt::Label.new(spi_settings)
66
+ @lbl_page_size.objectName = "lbl_page_size"
67
+
68
+ @fl.setWidget(0, Qt::FormLayout::LabelRole, @lbl_page_size)
69
+
70
+ @lie_page_size = Qt::LineEdit.new(spi_settings)
71
+ @lie_page_size.objectName = "lie_page_size"
72
+ @lie_page_size.maximumSize = Qt::Size.new(100, 16777215)
73
+
74
+ @fl.setWidget(0, Qt::FormLayout::FieldRole, @lie_page_size)
75
+
76
+
77
+ @hl2.addLayout(@fl)
78
+
79
+ @fl2 = Qt::FormLayout.new()
80
+ @fl2.objectName = "fl2"
81
+ @lbl_total_size = Qt::Label.new(spi_settings)
82
+ @lbl_total_size.objectName = "lbl_total_size"
83
+
84
+ @fl2.setWidget(0, Qt::FormLayout::LabelRole, @lbl_total_size)
85
+
86
+ @lie_total_size = Qt::LineEdit.new(spi_settings)
87
+ @lie_total_size.objectName = "lie_total_size"
88
+ @lie_total_size.maximumSize = Qt::Size.new(100, 16777215)
89
+ @lie_total_size.maxLength = 20
90
+
91
+ @fl2.setWidget(0, Qt::FormLayout::FieldRole, @lie_total_size)
92
+
93
+ @lbl_mode = Qt::Label.new(spi_settings)
94
+ @lbl_mode.objectName = "lbl_mode"
95
+
96
+ @fl2.setWidget(1, Qt::FormLayout::LabelRole, @lbl_mode)
97
+
98
+ @cbx_mode = Qt::ComboBox.new(spi_settings)
99
+ @cbx_mode.objectName = "cbx_mode"
100
+ @cbx_mode.maximumSize = Qt::Size.new(100, 16777215)
101
+
102
+ @fl2.setWidget(1, Qt::FormLayout::FieldRole, @cbx_mode)
103
+
104
+ @btn_save = Qt::PushButton.new(spi_settings)
105
+ @btn_save.objectName = "btn_save"
106
+ @btn_save.maximumSize = Qt::Size.new(100, 16777215)
107
+
108
+ @fl2.setWidget(2, Qt::FormLayout::FieldRole, @btn_save)
109
+
110
+
111
+ @hl2.addLayout(@fl2)
112
+
113
+
114
+ @gridLayout.addLayout(@hl2, 2, 0, 1, 1)
115
+
116
+ @hl = Qt::HBoxLayout.new()
117
+ @hl.objectName = "hl"
118
+ @lbl_chip = Qt::Label.new(spi_settings)
119
+ @lbl_chip.objectName = "lbl_chip"
120
+
121
+ @hl.addWidget(@lbl_chip)
122
+
123
+ @lbl_param = Qt::Label.new(spi_settings)
124
+ @lbl_param.objectName = "lbl_param"
125
+
126
+ @hl.addWidget(@lbl_param)
127
+
128
+ @hs = Qt::SpacerItem.new(40, 20, Qt::SizePolicy::Expanding, Qt::SizePolicy::Minimum)
129
+
130
+ @hl.addItem(@hs)
131
+
132
+
133
+ @gridLayout.addLayout(@hl, 1, 0, 1, 1)
134
+
135
+
136
+ retranslateUi(spi_settings)
137
+ Qt::Object.connect(@btn_save, SIGNAL('clicked()'), spi_settings, SLOT('save_settings()'))
138
+
139
+ Qt::MetaObject.connectSlotsByName(spi_settings)
140
+ end # setupUi
141
+
142
+ def setup_ui(spi_settings)
143
+ setupUi(spi_settings)
144
+ end
145
+
146
+ def retranslateUi(spi_settings)
147
+ spi_settings.windowTitle = Qt::Application.translate("Spi_settings", "Hardsploit - Bus settings", nil, Qt::Application::UnicodeUTF8)
148
+ @lbl_frequency.text = Qt::Application.translate("Spi_settings", "Frequency (Mhz):", nil, Qt::Application::UnicodeUTF8)
149
+ @cbx_frequency.insertItems(0, [Qt::Application.translate("Spi_settings", "25.00", nil, Qt::Application::UnicodeUTF8),
150
+ Qt::Application.translate("Spi_settings", "18.75", nil, Qt::Application::UnicodeUTF8),
151
+ Qt::Application.translate("Spi_settings", "15.00", nil, Qt::Application::UnicodeUTF8),
152
+ Qt::Application.translate("Spi_settings", "12.50", nil, Qt::Application::UnicodeUTF8),
153
+ Qt::Application.translate("Spi_settings", "10.71", nil, Qt::Application::UnicodeUTF8),
154
+ Qt::Application.translate("Spi_settings", "9.38", nil, Qt::Application::UnicodeUTF8),
155
+ Qt::Application.translate("Spi_settings", "7.50", nil, Qt::Application::UnicodeUTF8),
156
+ Qt::Application.translate("Spi_settings", "5.00", nil, Qt::Application::UnicodeUTF8),
157
+ Qt::Application.translate("Spi_settings", "3.95", nil, Qt::Application::UnicodeUTF8),
158
+ Qt::Application.translate("Spi_settings", "3.00", nil, Qt::Application::UnicodeUTF8),
159
+ Qt::Application.translate("Spi_settings", "2.03", nil, Qt::Application::UnicodeUTF8),
160
+ Qt::Application.translate("Spi_settings", "1.00", nil, Qt::Application::UnicodeUTF8),
161
+ Qt::Application.translate("Spi_settings", "0.50", nil, Qt::Application::UnicodeUTF8),
162
+ Qt::Application.translate("Spi_settings", "0.29", nil, Qt::Application::UnicodeUTF8)])
163
+ @lbl_cmd_read.text = Qt::Application.translate("Spi_settings", "SPI command read:", nil, Qt::Application::UnicodeUTF8)
164
+ @lie_cmd_read.text = Qt::Application.translate("Spi_settings", "3", nil, Qt::Application::UnicodeUTF8)
165
+ @lbl_page_size.text = Qt::Application.translate("Spi_settings", "Page size:", nil, Qt::Application::UnicodeUTF8)
166
+ @lbl_total_size.text = Qt::Application.translate("Spi_settings", "Total size (8 bits word):", nil, Qt::Application::UnicodeUTF8)
167
+ @lbl_mode.text = Qt::Application.translate("Spi_settings", "Mode:", nil, Qt::Application::UnicodeUTF8)
168
+ @cbx_mode.insertItems(0, [Qt::Application.translate("Spi_settings", "0", nil, Qt::Application::UnicodeUTF8),
169
+ Qt::Application.translate("Spi_settings", "1", nil, Qt::Application::UnicodeUTF8),
170
+ Qt::Application.translate("Spi_settings", "2", nil, Qt::Application::UnicodeUTF8),
171
+ Qt::Application.translate("Spi_settings", "3", nil, Qt::Application::UnicodeUTF8)])
172
+ @btn_save.text = Qt::Application.translate("Spi_settings", "Save", nil, Qt::Application::UnicodeUTF8)
173
+ @lbl_chip.text = Qt::Application.translate("Spi_settings", "[CHIP]", nil, Qt::Application::UnicodeUTF8)
174
+ @lbl_param.text = Qt::Application.translate("Spi_settings", "PARAMETERS", nil, Qt::Application::UnicodeUTF8)
175
+ end # retranslateUi
176
+
177
+ def retranslate_ui(spi_settings)
178
+ retranslateUi(spi_settings)
179
+ end
180
+
181
+ end
182
+
183
+ module Ui
184
+ class Spi_settings < Ui_Spi_settings
185
+ end
186
+ end # module Ui
187
+
@@ -0,0 +1,99 @@
1
+ =begin
2
+ ** Form generated from reading ui file 'gui_wire_helper.ui'
3
+ **
4
+ ** Created: mar. déc. 8 16:25:10 2015
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_Wire_helper
11
+ attr_reader :gridLayout
12
+ attr_reader :vl
13
+ attr_reader :lbl_advice
14
+ attr_reader :lbl_chip
15
+ attr_reader :gView
16
+ attr_reader :hl
17
+ attr_reader :hs
18
+ attr_reader :btn_cancel
19
+ attr_reader :btn_rotate
20
+
21
+ def setupUi(wire_helper)
22
+ if wire_helper.objectName.nil?
23
+ wire_helper.objectName = "wire_helper"
24
+ end
25
+ wire_helper.resize(581, 560)
26
+ wire_helper.styleSheet = ""
27
+ @gridLayout = Qt::GridLayout.new(wire_helper)
28
+ @gridLayout.objectName = "gridLayout"
29
+ @vl = Qt::VBoxLayout.new()
30
+ @vl.objectName = "vl"
31
+ @lbl_advice = Qt::Label.new(wire_helper)
32
+ @lbl_advice.objectName = "lbl_advice"
33
+
34
+ @vl.addWidget(@lbl_advice)
35
+
36
+ @lbl_chip = Qt::Label.new(wire_helper)
37
+ @lbl_chip.objectName = "lbl_chip"
38
+
39
+ @vl.addWidget(@lbl_chip)
40
+
41
+ @gView = Qt::GraphicsView.new(wire_helper)
42
+ @gView.objectName = "gView"
43
+ @gView.styleSheet = "Qt::GraphicsTextItem{outline: 0;}"
44
+
45
+ @vl.addWidget(@gView)
46
+
47
+ @hl = Qt::HBoxLayout.new()
48
+ @hl.objectName = "hl"
49
+ @hs = Qt::SpacerItem.new(40, 20, Qt::SizePolicy::Expanding, Qt::SizePolicy::Minimum)
50
+
51
+ @hl.addItem(@hs)
52
+
53
+ @btn_cancel = Qt::PushButton.new(wire_helper)
54
+ @btn_cancel.objectName = "btn_cancel"
55
+
56
+ @hl.addWidget(@btn_cancel)
57
+
58
+ @btn_rotate = Qt::PushButton.new(wire_helper)
59
+ @btn_rotate.objectName = "btn_rotate"
60
+
61
+ @hl.addWidget(@btn_rotate)
62
+
63
+
64
+ @vl.addLayout(@hl)
65
+
66
+
67
+ @gridLayout.addLayout(@vl, 1, 0, 1, 1)
68
+
69
+
70
+ retranslateUi(wire_helper)
71
+ Qt::Object.connect(@btn_cancel, SIGNAL('clicked()'), wire_helper, SLOT('close()'))
72
+ Qt::Object.connect(@btn_rotate, SIGNAL('clicked()'), wire_helper, SLOT('rotate_scene()'))
73
+
74
+ Qt::MetaObject.connectSlotsByName(wire_helper)
75
+ end # setupUi
76
+
77
+ def setup_ui(wire_helper)
78
+ setupUi(wire_helper)
79
+ end
80
+
81
+ def retranslateUi(wire_helper)
82
+ wire_helper.windowTitle = Qt::Application.translate("Wire_helper", "Harsploit - Wiring helper", nil, Qt::Application::UnicodeUTF8)
83
+ @lbl_advice.text = Qt::Application.translate("Wire_helper", "Click on a pin number or signal name to turn ON the corresponding LED", nil, Qt::Application::UnicodeUTF8)
84
+ @lbl_chip.text = Qt::Application.translate("Wire_helper", "Your chip:", nil, Qt::Application::UnicodeUTF8)
85
+ @btn_cancel.text = Qt::Application.translate("Wire_helper", "Close", nil, Qt::Application::UnicodeUTF8)
86
+ @btn_rotate.text = Qt::Application.translate("Wire_helper", "Rotate", nil, Qt::Application::UnicodeUTF8)
87
+ end # retranslateUi
88
+
89
+ def retranslate_ui(wire_helper)
90
+ retranslateUi(wire_helper)
91
+ end
92
+
93
+ end
94
+
95
+ module Ui
96
+ class Wire_helper < Ui_Wire_helper
97
+ end
98
+ end # module Ui
99
+
@@ -0,0 +1,553 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <ui version="4.0">
3
+ <class>Chip_editor</class>
4
+ <widget class="QWidget" name="Chip_editor">
5
+ <property name="geometry">
6
+ <rect>
7
+ <x>0</x>
8
+ <y>0</y>
9
+ <width>414</width>
10
+ <height>594</height>
11
+ </rect>
12
+ </property>
13
+ <property name="windowTitle">
14
+ <string>Hardsploit - Chip editor</string>
15
+ </property>
16
+ <layout class="QGridLayout" name="gridLayout">
17
+ <item row="1" column="0">
18
+ <widget class="QTableWidget" name="tbl_pins">
19
+ <property name="minimumSize">
20
+ <size>
21
+ <width>0</width>
22
+ <height>200</height>
23
+ </size>
24
+ </property>
25
+ <property name="maximumSize">
26
+ <size>
27
+ <width>16777215</width>
28
+ <height>16777215</height>
29
+ </size>
30
+ </property>
31
+ <attribute name="horizontalHeaderStretchLastSection">
32
+ <bool>true</bool>
33
+ </attribute>
34
+ <attribute name="verticalHeaderVisible">
35
+ <bool>false</bool>
36
+ </attribute>
37
+ <attribute name="verticalHeaderStretchLastSection">
38
+ <bool>true</bool>
39
+ </attribute>
40
+ <column>
41
+ <property name="text">
42
+ <string>Pin Number</string>
43
+ </property>
44
+ </column>
45
+ <column>
46
+ <property name="text">
47
+ <string>Bus</string>
48
+ </property>
49
+ </column>
50
+ <column>
51
+ <property name="text">
52
+ <string>Signal</string>
53
+ </property>
54
+ </column>
55
+ </widget>
56
+ </item>
57
+ <item row="2" column="0">
58
+ <widget class="QLabel" name="lbl_advice">
59
+ <property name="text">
60
+ <string>To complete this form, please report to the component datasheet.</string>
61
+ </property>
62
+ </widget>
63
+ </item>
64
+ <item row="3" column="0">
65
+ <layout class="QHBoxLayout" name="hl">
66
+ <item>
67
+ <spacer name="hs">
68
+ <property name="orientation">
69
+ <enum>Qt::Horizontal</enum>
70
+ </property>
71
+ <property name="sizeHint" stdset="0">
72
+ <size>
73
+ <width>40</width>
74
+ <height>20</height>
75
+ </size>
76
+ </property>
77
+ </spacer>
78
+ </item>
79
+ <item>
80
+ <widget class="QPushButton" name="btn_cancel">
81
+ <property name="text">
82
+ <string>Cancel</string>
83
+ </property>
84
+ </widget>
85
+ </item>
86
+ <item>
87
+ <widget class="QPushButton" name="btn_add">
88
+ <property name="text">
89
+ <string>Add</string>
90
+ </property>
91
+ </widget>
92
+ </item>
93
+ </layout>
94
+ </item>
95
+ <item row="0" column="0">
96
+ <layout class="QVBoxLayout" name="vl">
97
+ <item>
98
+ <layout class="QFormLayout" name="fl">
99
+ <item row="0" column="0">
100
+ <widget class="QLabel" name="lbl_ref">
101
+ <property name="text">
102
+ <string>Name / Reference:</string>
103
+ </property>
104
+ </widget>
105
+ </item>
106
+ <item row="7" column="0">
107
+ <widget class="QLabel" name="lbl_package">
108
+ <property name="text">
109
+ <string>Package:</string>
110
+ </property>
111
+ </widget>
112
+ </item>
113
+ <item row="7" column="1">
114
+ <layout class="QHBoxLayout" name="hl1">
115
+ <item>
116
+ <widget class="QComboBox" name="cbx_package">
117
+ <item>
118
+ <property name="text">
119
+ <string>Select...</string>
120
+ </property>
121
+ </item>
122
+ </widget>
123
+ </item>
124
+ <item>
125
+ <widget class="QPushButton" name="btn_pack_remove">
126
+ <property name="maximumSize">
127
+ <size>
128
+ <width>30</width>
129
+ <height>16777215</height>
130
+ </size>
131
+ </property>
132
+ <property name="text">
133
+ <string>X</string>
134
+ </property>
135
+ </widget>
136
+ </item>
137
+ </layout>
138
+ </item>
139
+ <item row="10" column="0">
140
+ <widget class="QLabel" name="lbl_pack_new">
141
+ <property name="text">
142
+ <string>Not in the list ? Create a new one</string>
143
+ </property>
144
+ </widget>
145
+ </item>
146
+ <item row="11" column="0">
147
+ <widget class="QLabel" name="lbl_name">
148
+ <property name="text">
149
+ <string>Package name:</string>
150
+ </property>
151
+ </widget>
152
+ </item>
153
+ <item row="11" column="1">
154
+ <widget class="QLineEdit" name="lie_pack_name">
155
+ <property name="maxLength">
156
+ <number>30</number>
157
+ </property>
158
+ <property name="placeholderText">
159
+ <string>30 chars max</string>
160
+ </property>
161
+ </widget>
162
+ </item>
163
+ <item row="12" column="0">
164
+ <widget class="QLabel" name="lbl_pack_pin">
165
+ <property name="text">
166
+ <string>Package pin number:</string>
167
+ </property>
168
+ </widget>
169
+ </item>
170
+ <item row="12" column="1">
171
+ <widget class="QLineEdit" name="lie_pack_pin">
172
+ <property name="inputMask">
173
+ <string/>
174
+ </property>
175
+ <property name="maxLength">
176
+ <number>3</number>
177
+ </property>
178
+ <property name="placeholderText">
179
+ <string>4-144</string>
180
+ </property>
181
+ </widget>
182
+ </item>
183
+ <item row="13" column="0">
184
+ <widget class="QLabel" name="lbl_pack_shape">
185
+ <property name="text">
186
+ <string>Package shape:</string>
187
+ </property>
188
+ </widget>
189
+ </item>
190
+ <item row="0" column="1">
191
+ <widget class="QLineEdit" name="lie_reference">
192
+ <property name="maxLength">
193
+ <number>30</number>
194
+ </property>
195
+ <property name="placeholderText">
196
+ <string>30 chars max</string>
197
+ </property>
198
+ </widget>
199
+ </item>
200
+ <item row="2" column="1">
201
+ <layout class="QHBoxLayout" name="hl2">
202
+ <item>
203
+ <widget class="QGroupBox" name="groupBox">
204
+ <property name="title">
205
+ <string/>
206
+ </property>
207
+ <widget class="QRadioButton" name="rbn_3v">
208
+ <property name="geometry">
209
+ <rect>
210
+ <x>10</x>
211
+ <y>0</y>
212
+ <width>70</width>
213
+ <height>21</height>
214
+ </rect>
215
+ </property>
216
+ <property name="text">
217
+ <string>3,3V</string>
218
+ </property>
219
+ <property name="checked">
220
+ <bool>true</bool>
221
+ </property>
222
+ <property name="autoExclusive">
223
+ <bool>true</bool>
224
+ </property>
225
+ </widget>
226
+ <widget class="QRadioButton" name="rbn_5v">
227
+ <property name="geometry">
228
+ <rect>
229
+ <x>90</x>
230
+ <y>0</y>
231
+ <width>109</width>
232
+ <height>21</height>
233
+ </rect>
234
+ </property>
235
+ <property name="text">
236
+ <string>5V</string>
237
+ </property>
238
+ <property name="autoExclusive">
239
+ <bool>true</bool>
240
+ </property>
241
+ </widget>
242
+ </widget>
243
+ </item>
244
+ </layout>
245
+ </item>
246
+ <item row="2" column="0">
247
+ <widget class="QLabel" name="lbl_voltage">
248
+ <property name="text">
249
+ <string>Voltage:</string>
250
+ </property>
251
+ </widget>
252
+ </item>
253
+ <item row="13" column="1">
254
+ <layout class="QHBoxLayout" name="hl3">
255
+ <item>
256
+ <widget class="QGroupBox" name="groupBox_2">
257
+ <property name="title">
258
+ <string/>
259
+ </property>
260
+ <widget class="QRadioButton" name="rbn_square">
261
+ <property name="geometry">
262
+ <rect>
263
+ <x>10</x>
264
+ <y>0</y>
265
+ <width>81</width>
266
+ <height>20</height>
267
+ </rect>
268
+ </property>
269
+ <property name="text">
270
+ <string>Square</string>
271
+ </property>
272
+ <property name="checked">
273
+ <bool>true</bool>
274
+ </property>
275
+ <property name="autoExclusive">
276
+ <bool>true</bool>
277
+ </property>
278
+ </widget>
279
+ <widget class="QRadioButton" name="rbn_rectangular">
280
+ <property name="geometry">
281
+ <rect>
282
+ <x>110</x>
283
+ <y>0</y>
284
+ <width>109</width>
285
+ <height>20</height>
286
+ </rect>
287
+ </property>
288
+ <property name="text">
289
+ <string>Rectangular</string>
290
+ </property>
291
+ <property name="checked">
292
+ <bool>false</bool>
293
+ </property>
294
+ <property name="autoExclusive">
295
+ <bool>true</bool>
296
+ </property>
297
+ </widget>
298
+ </widget>
299
+ </item>
300
+ </layout>
301
+ </item>
302
+ <item row="3" column="0">
303
+ <widget class="QLabel" name="lbl_manu">
304
+ <property name="text">
305
+ <string>Manufacturer:</string>
306
+ </property>
307
+ </widget>
308
+ </item>
309
+ <item row="4" column="1">
310
+ <widget class="QLineEdit" name="lie_manu_name">
311
+ <property name="maxLength">
312
+ <number>30</number>
313
+ </property>
314
+ <property name="placeholderText">
315
+ <string>Other...</string>
316
+ </property>
317
+ </widget>
318
+ </item>
319
+ <item row="5" column="0">
320
+ <widget class="QLabel" name="lbl_type">
321
+ <property name="text">
322
+ <string>Type:</string>
323
+ </property>
324
+ </widget>
325
+ </item>
326
+ <item row="5" column="1">
327
+ <layout class="QHBoxLayout" name="hl5">
328
+ <item>
329
+ <widget class="QComboBox" name="cbx_type">
330
+ <item>
331
+ <property name="text">
332
+ <string>Select...</string>
333
+ </property>
334
+ </item>
335
+ </widget>
336
+ </item>
337
+ <item>
338
+ <widget class="QPushButton" name="btn_type_remove">
339
+ <property name="maximumSize">
340
+ <size>
341
+ <width>30</width>
342
+ <height>16777215</height>
343
+ </size>
344
+ </property>
345
+ <property name="text">
346
+ <string>X</string>
347
+ </property>
348
+ </widget>
349
+ </item>
350
+ </layout>
351
+ </item>
352
+ <item row="6" column="1">
353
+ <widget class="QLineEdit" name="lie_type_name">
354
+ <property name="text">
355
+ <string/>
356
+ </property>
357
+ <property name="maxLength">
358
+ <number>30</number>
359
+ </property>
360
+ <property name="placeholderText">
361
+ <string>Other...</string>
362
+ </property>
363
+ </widget>
364
+ </item>
365
+ <item row="1" column="0">
366
+ <widget class="QLabel" name="lbl_description">
367
+ <property name="text">
368
+ <string>Description:</string>
369
+ </property>
370
+ </widget>
371
+ </item>
372
+ <item row="1" column="1">
373
+ <widget class="QLineEdit" name="lie_description">
374
+ <property name="maxLength">
375
+ <number>200</number>
376
+ </property>
377
+ <property name="placeholderText">
378
+ <string>200 chars max</string>
379
+ </property>
380
+ </widget>
381
+ </item>
382
+ <item row="3" column="1">
383
+ <layout class="QHBoxLayout" name="hl4">
384
+ <item>
385
+ <widget class="QComboBox" name="cbx_manufacturer">
386
+ <item>
387
+ <property name="text">
388
+ <string>Select...</string>
389
+ </property>
390
+ </item>
391
+ </widget>
392
+ </item>
393
+ <item>
394
+ <widget class="QPushButton" name="btn_manu_remove">
395
+ <property name="maximumSize">
396
+ <size>
397
+ <width>30</width>
398
+ <height>16777215</height>
399
+ </size>
400
+ </property>
401
+ <property name="text">
402
+ <string>X</string>
403
+ </property>
404
+ </widget>
405
+ </item>
406
+ </layout>
407
+ </item>
408
+ </layout>
409
+ </item>
410
+ </layout>
411
+ </item>
412
+ </layout>
413
+ </widget>
414
+ <resources/>
415
+ <connections>
416
+ <connection>
417
+ <sender>lie_pack_pin</sender>
418
+ <signal>editingFinished()</signal>
419
+ <receiver>Chip_editor</receiver>
420
+ <slot>fill_pin_table()</slot>
421
+ <hints>
422
+ <hint type="sourcelabel">
423
+ <x>393</x>
424
+ <y>300</y>
425
+ </hint>
426
+ <hint type="destinationlabel">
427
+ <x>409</x>
428
+ <y>300</y>
429
+ </hint>
430
+ </hints>
431
+ </connection>
432
+ <connection>
433
+ <sender>btn_manu_remove</sender>
434
+ <signal>clicked()</signal>
435
+ <receiver>Chip_editor</receiver>
436
+ <slot>delete_cbx_element()</slot>
437
+ <hints>
438
+ <hint type="sourcelabel">
439
+ <x>392</x>
440
+ <y>99</y>
441
+ </hint>
442
+ <hint type="destinationlabel">
443
+ <x>410</x>
444
+ <y>96</y>
445
+ </hint>
446
+ </hints>
447
+ </connection>
448
+ <connection>
449
+ <sender>btn_type_remove</sender>
450
+ <signal>clicked()</signal>
451
+ <receiver>Chip_editor</receiver>
452
+ <slot>delete_cbx_element()</slot>
453
+ <hints>
454
+ <hint type="sourcelabel">
455
+ <x>394</x>
456
+ <y>157</y>
457
+ </hint>
458
+ <hint type="destinationlabel">
459
+ <x>410</x>
460
+ <y>157</y>
461
+ </hint>
462
+ </hints>
463
+ </connection>
464
+ <connection>
465
+ <sender>btn_pack_remove</sender>
466
+ <signal>clicked()</signal>
467
+ <receiver>Chip_editor</receiver>
468
+ <slot>delete_cbx_element()</slot>
469
+ <hints>
470
+ <hint type="sourcelabel">
471
+ <x>397</x>
472
+ <y>214</y>
473
+ </hint>
474
+ <hint type="destinationlabel">
475
+ <x>409</x>
476
+ <y>214</y>
477
+ </hint>
478
+ </hints>
479
+ </connection>
480
+ <connection>
481
+ <sender>cbx_package</sender>
482
+ <signal>currentIndexChanged(int)</signal>
483
+ <receiver>Chip_editor</receiver>
484
+ <slot>select_package()</slot>
485
+ <hints>
486
+ <hint type="sourcelabel">
487
+ <x>184</x>
488
+ <y>214</y>
489
+ </hint>
490
+ <hint type="destinationlabel">
491
+ <x>8</x>
492
+ <y>191</y>
493
+ </hint>
494
+ </hints>
495
+ </connection>
496
+ <connection>
497
+ <sender>cbx_type</sender>
498
+ <signal>currentIndexChanged(int)</signal>
499
+ <receiver>Chip_editor</receiver>
500
+ <slot>select_type()</slot>
501
+ <hints>
502
+ <hint type="sourcelabel">
503
+ <x>182</x>
504
+ <y>155</y>
505
+ </hint>
506
+ <hint type="destinationlabel">
507
+ <x>2</x>
508
+ <y>160</y>
509
+ </hint>
510
+ </hints>
511
+ </connection>
512
+ <connection>
513
+ <sender>cbx_manufacturer</sender>
514
+ <signal>currentIndexChanged(int)</signal>
515
+ <receiver>Chip_editor</receiver>
516
+ <slot>select_manufacturer()</slot>
517
+ <hints>
518
+ <hint type="sourcelabel">
519
+ <x>180</x>
520
+ <y>105</y>
521
+ </hint>
522
+ <hint type="destinationlabel">
523
+ <x>2</x>
524
+ <y>109</y>
525
+ </hint>
526
+ </hints>
527
+ </connection>
528
+ <connection>
529
+ <sender>btn_cancel</sender>
530
+ <signal>clicked()</signal>
531
+ <receiver>Chip_editor</receiver>
532
+ <slot>close()</slot>
533
+ <hints>
534
+ <hint type="sourcelabel">
535
+ <x>253</x>
536
+ <y>609</y>
537
+ </hint>
538
+ <hint type="destinationlabel">
539
+ <x>411</x>
540
+ <y>575</y>
541
+ </hint>
542
+ </hints>
543
+ </connection>
544
+ </connections>
545
+ <slots>
546
+ <slot>fill_pin_table()</slot>
547
+ <slot>select_package()</slot>
548
+ <slot>select_manufacturer()</slot>
549
+ <slot>filter_cbx()</slot>
550
+ <slot>delete_cbx_element()</slot>
551
+ <slot>select_type()</slot>
552
+ </slots>
553
+ </ui>