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
@@ -1,7 +1,7 @@
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
2
2
|
<ui version="4.0">
|
3
|
-
<class>
|
4
|
-
<widget class="QWidget" name="
|
3
|
+
<class>Generic_write</class>
|
4
|
+
<widget class="QWidget" name="Generic_write">
|
5
5
|
<property name="windowModality">
|
6
6
|
<enum>Qt::ApplicationModal</enum>
|
7
7
|
</property>
|
@@ -9,12 +9,12 @@
|
|
9
9
|
<rect>
|
10
10
|
<x>0</x>
|
11
11
|
<y>0</y>
|
12
|
-
<width>
|
12
|
+
<width>241</width>
|
13
13
|
<height>155</height>
|
14
14
|
</rect>
|
15
15
|
</property>
|
16
16
|
<property name="windowTitle">
|
17
|
-
<string>Hardsploit -
|
17
|
+
<string>Hardsploit - Write</string>
|
18
18
|
</property>
|
19
19
|
<layout class="QGridLayout" name="gridLayout">
|
20
20
|
<item row="0" column="0">
|
@@ -22,16 +22,16 @@
|
|
22
22
|
<item>
|
23
23
|
<layout class="QHBoxLayout" name="hl2">
|
24
24
|
<item>
|
25
|
-
<widget class="QLabel" name="
|
25
|
+
<widget class="QLabel" name="lbl_write">
|
26
26
|
<property name="text">
|
27
|
-
<string>
|
27
|
+
<string>Write in</string>
|
28
28
|
</property>
|
29
29
|
</widget>
|
30
30
|
</item>
|
31
31
|
<item>
|
32
|
-
<widget class="QLabel" name="
|
32
|
+
<widget class="QLabel" name="lbl_chip">
|
33
33
|
<property name="text">
|
34
|
-
<string>
|
34
|
+
<string>[CHIP]</string>
|
35
35
|
</property>
|
36
36
|
</widget>
|
37
37
|
</item>
|
@@ -51,46 +51,29 @@
|
|
51
51
|
</layout>
|
52
52
|
</item>
|
53
53
|
<item>
|
54
|
-
<layout class="QFormLayout" name="
|
55
|
-
<item row="
|
56
|
-
<widget class="QLabel" name="
|
57
|
-
<property name="text">
|
58
|
-
<string>Start address:</string>
|
59
|
-
</property>
|
60
|
-
</widget>
|
61
|
-
</item>
|
62
|
-
<item row="1" column="1">
|
63
|
-
<widget class="QLineEdit" name="lie_start">
|
54
|
+
<layout class="QFormLayout" name="formLayout">
|
55
|
+
<item row="0" column="0">
|
56
|
+
<widget class="QLabel" name="lbl_file">
|
64
57
|
<property name="text">
|
65
|
-
<string>
|
66
|
-
</property>
|
67
|
-
<property name="maxLength">
|
68
|
-
<number>20</number>
|
58
|
+
<string>Content to write:</string>
|
69
59
|
</property>
|
70
60
|
</widget>
|
71
61
|
</item>
|
72
|
-
<item row="
|
62
|
+
<item row="0" column="1">
|
73
63
|
<widget class="QPushButton" name="btn_file">
|
74
64
|
<property name="text">
|
75
65
|
<string>File...</string>
|
76
66
|
</property>
|
77
67
|
</widget>
|
78
68
|
</item>
|
79
|
-
<item row="
|
80
|
-
<widget class="QLabel" name="lbl_file">
|
81
|
-
<property name="text">
|
82
|
-
<string>File:</string>
|
83
|
-
</property>
|
84
|
-
</widget>
|
85
|
-
</item>
|
86
|
-
<item row="3" column="0">
|
69
|
+
<item row="1" column="0">
|
87
70
|
<widget class="QLabel" name="lbl_selected">
|
88
71
|
<property name="text">
|
89
72
|
<string>Selected file:</string>
|
90
73
|
</property>
|
91
74
|
</widget>
|
92
75
|
</item>
|
93
|
-
<item row="
|
76
|
+
<item row="1" column="1">
|
94
77
|
<widget class="QLabel" name="lbl_selected_file">
|
95
78
|
<property name="maximumSize">
|
96
79
|
<size>
|
@@ -103,17 +86,34 @@
|
|
103
86
|
</property>
|
104
87
|
</widget>
|
105
88
|
</item>
|
89
|
+
<item row="2" column="0">
|
90
|
+
<widget class="QLabel" name="lbl_start">
|
91
|
+
<property name="text">
|
92
|
+
<string>Start address:</string>
|
93
|
+
</property>
|
94
|
+
</widget>
|
95
|
+
</item>
|
96
|
+
<item row="2" column="1">
|
97
|
+
<widget class="QLineEdit" name="lie_start">
|
98
|
+
<property name="text">
|
99
|
+
<string>0</string>
|
100
|
+
</property>
|
101
|
+
<property name="maxLength">
|
102
|
+
<number>20</number>
|
103
|
+
</property>
|
104
|
+
</widget>
|
105
|
+
</item>
|
106
106
|
</layout>
|
107
107
|
</item>
|
108
108
|
<item>
|
109
109
|
<layout class="QHBoxLayout" name="hl">
|
110
110
|
<item>
|
111
|
-
<widget class="QPushButton" name="
|
111
|
+
<widget class="QPushButton" name="btn_write">
|
112
112
|
<property name="enabled">
|
113
113
|
<bool>false</bool>
|
114
114
|
</property>
|
115
115
|
<property name="text">
|
116
|
-
<string>
|
116
|
+
<string>Write</string>
|
117
117
|
</property>
|
118
118
|
</widget>
|
119
119
|
</item>
|
@@ -126,17 +126,17 @@
|
|
126
126
|
<resources/>
|
127
127
|
<connections>
|
128
128
|
<connection>
|
129
|
-
<sender>
|
129
|
+
<sender>btn_write</sender>
|
130
130
|
<signal>clicked()</signal>
|
131
|
-
<receiver>
|
132
|
-
<slot>
|
131
|
+
<receiver>Generic_write</receiver>
|
132
|
+
<slot>write()</slot>
|
133
133
|
<hints>
|
134
134
|
<hint type="sourcelabel">
|
135
|
-
<x>
|
136
|
-
<y>
|
135
|
+
<x>162</x>
|
136
|
+
<y>142</y>
|
137
137
|
</hint>
|
138
138
|
<hint type="destinationlabel">
|
139
|
-
<x>
|
139
|
+
<x>240</x>
|
140
140
|
<y>111</y>
|
141
141
|
</hint>
|
142
142
|
</hints>
|
@@ -144,22 +144,22 @@
|
|
144
144
|
<connection>
|
145
145
|
<sender>btn_file</sender>
|
146
146
|
<signal>clicked()</signal>
|
147
|
-
<receiver>
|
148
|
-
<slot>
|
147
|
+
<receiver>Generic_write</receiver>
|
148
|
+
<slot>select_write_file()</slot>
|
149
149
|
<hints>
|
150
150
|
<hint type="sourcelabel">
|
151
|
-
<x>
|
152
|
-
<y>
|
151
|
+
<x>229</x>
|
152
|
+
<y>66</y>
|
153
153
|
</hint>
|
154
154
|
<hint type="destinationlabel">
|
155
|
-
<x>
|
155
|
+
<x>240</x>
|
156
156
|
<y>80</y>
|
157
157
|
</hint>
|
158
158
|
</hints>
|
159
159
|
</connection>
|
160
160
|
</connections>
|
161
161
|
<slots>
|
162
|
-
<slot>
|
163
|
-
<slot>
|
162
|
+
<slot>write()</slot>
|
163
|
+
<slot>select_write_file()</slot>
|
164
164
|
</slots>
|
165
165
|
</ui>
|
@@ -6,8 +6,8 @@
|
|
6
6
|
<rect>
|
7
7
|
<x>0</x>
|
8
8
|
<y>0</y>
|
9
|
-
<width>
|
10
|
-
<height>
|
9
|
+
<width>339</width>
|
10
|
+
<height>504</height>
|
11
11
|
</rect>
|
12
12
|
</property>
|
13
13
|
<property name="windowTitle">
|
@@ -48,15 +48,15 @@
|
|
48
48
|
</layout>
|
49
49
|
</item>
|
50
50
|
<item>
|
51
|
-
<layout class="QFormLayout" name="
|
52
|
-
<item row="
|
51
|
+
<layout class="QFormLayout" name="formLayout_2">
|
52
|
+
<item row="0" column="0">
|
53
53
|
<widget class="QLabel" name="lbl_address_w">
|
54
54
|
<property name="text">
|
55
55
|
<string>Base address (W):</string>
|
56
56
|
</property>
|
57
57
|
</widget>
|
58
58
|
</item>
|
59
|
-
<item row="
|
59
|
+
<item row="0" column="1">
|
60
60
|
<widget class="QLineEdit" name="lie_address_w">
|
61
61
|
<property name="maxLength">
|
62
62
|
<number>2</number>
|
@@ -66,14 +66,14 @@
|
|
66
66
|
</property>
|
67
67
|
</widget>
|
68
68
|
</item>
|
69
|
-
<item row="
|
69
|
+
<item row="1" column="0">
|
70
70
|
<widget class="QLabel" name="lbl_address_r">
|
71
71
|
<property name="text">
|
72
72
|
<string>Base address (R):</string>
|
73
73
|
</property>
|
74
74
|
</widget>
|
75
75
|
</item>
|
76
|
-
<item row="
|
76
|
+
<item row="1" column="1">
|
77
77
|
<widget class="QLineEdit" name="lie_address_r">
|
78
78
|
<property name="maxLength">
|
79
79
|
<number>2</number>
|
@@ -83,6 +83,51 @@
|
|
83
83
|
</property>
|
84
84
|
</widget>
|
85
85
|
</item>
|
86
|
+
</layout>
|
87
|
+
</item>
|
88
|
+
<item>
|
89
|
+
<layout class="QHBoxLayout" name="horizontalLayout">
|
90
|
+
<item>
|
91
|
+
<widget class="QLabel" name="label">
|
92
|
+
<property name="text">
|
93
|
+
<string>You don't know the addresses? Try a scan:</string>
|
94
|
+
</property>
|
95
|
+
</widget>
|
96
|
+
</item>
|
97
|
+
<item>
|
98
|
+
<widget class="QPushButton" name="btn_bus_scan">
|
99
|
+
<property name="text">
|
100
|
+
<string>Launch</string>
|
101
|
+
</property>
|
102
|
+
</widget>
|
103
|
+
</item>
|
104
|
+
</layout>
|
105
|
+
</item>
|
106
|
+
<item>
|
107
|
+
<widget class="QTableWidget" name="tbl_bus_scan">
|
108
|
+
<attribute name="horizontalHeaderDefaultSectionSize">
|
109
|
+
<number>85</number>
|
110
|
+
</attribute>
|
111
|
+
<attribute name="horizontalHeaderStretchLastSection">
|
112
|
+
<bool>true</bool>
|
113
|
+
</attribute>
|
114
|
+
<attribute name="verticalHeaderVisible">
|
115
|
+
<bool>false</bool>
|
116
|
+
</attribute>
|
117
|
+
<column>
|
118
|
+
<property name="text">
|
119
|
+
<string>Address</string>
|
120
|
+
</property>
|
121
|
+
</column>
|
122
|
+
<column>
|
123
|
+
<property name="text">
|
124
|
+
<string>R/W</string>
|
125
|
+
</property>
|
126
|
+
</column>
|
127
|
+
</widget>
|
128
|
+
</item>
|
129
|
+
<item>
|
130
|
+
<layout class="QFormLayout" name="formLayout">
|
86
131
|
<item row="3" column="0">
|
87
132
|
<widget class="QLabel" name="lbl_frequency">
|
88
133
|
<property name="text">
|
@@ -109,35 +154,35 @@
|
|
109
154
|
</item>
|
110
155
|
</widget>
|
111
156
|
</item>
|
112
|
-
<item row="
|
113
|
-
<widget class="QLabel" name="
|
157
|
+
<item row="2" column="0">
|
158
|
+
<widget class="QLabel" name="lbl_write_page_latency">
|
114
159
|
<property name="text">
|
115
|
-
<string>
|
160
|
+
<string>Write page latency:</string>
|
116
161
|
</property>
|
117
162
|
</widget>
|
118
163
|
</item>
|
119
|
-
<item row="
|
120
|
-
<widget class="QLineEdit" name="
|
164
|
+
<item row="2" column="1">
|
165
|
+
<widget class="QLineEdit" name="lie_write_page_latency">
|
121
166
|
<property name="placeholderText">
|
122
|
-
<string>in
|
167
|
+
<string>in miliseconds</string>
|
123
168
|
</property>
|
124
169
|
</widget>
|
125
170
|
</item>
|
126
|
-
<item row="
|
127
|
-
<widget class="QLabel" name="
|
171
|
+
<item row="1" column="0">
|
172
|
+
<widget class="QLabel" name="lbl_page_size">
|
128
173
|
<property name="text">
|
129
|
-
<string>
|
174
|
+
<string>Page size:</string>
|
130
175
|
</property>
|
131
176
|
</widget>
|
132
177
|
</item>
|
133
|
-
<item row="
|
134
|
-
<widget class="
|
178
|
+
<item row="0" column="0">
|
179
|
+
<widget class="QLabel" name="lbl_full_size">
|
135
180
|
<property name="text">
|
136
|
-
<string>
|
181
|
+
<string>Total size:</string>
|
137
182
|
</property>
|
138
183
|
</widget>
|
139
184
|
</item>
|
140
|
-
<item row="
|
185
|
+
<item row="1" column="1">
|
141
186
|
<widget class="QLineEdit" name="lie_page_size">
|
142
187
|
<property name="text">
|
143
188
|
<string/>
|
@@ -147,52 +192,15 @@
|
|
147
192
|
</property>
|
148
193
|
</widget>
|
149
194
|
</item>
|
150
|
-
<item row="
|
151
|
-
<widget class="
|
152
|
-
<property name="text">
|
153
|
-
<string>Page size:</string>
|
154
|
-
</property>
|
155
|
-
</widget>
|
156
|
-
</item>
|
157
|
-
<item row="4" column="0">
|
158
|
-
<widget class="QLabel" name="lbl_write_page_latency">
|
159
|
-
<property name="text">
|
160
|
-
<string>Write page latency:</string>
|
161
|
-
</property>
|
162
|
-
</widget>
|
163
|
-
</item>
|
164
|
-
<item row="4" column="1">
|
165
|
-
<widget class="QLineEdit" name="lie_write_page_latency">
|
195
|
+
<item row="0" column="1">
|
196
|
+
<widget class="QLineEdit" name="lie_total_size">
|
166
197
|
<property name="placeholderText">
|
167
|
-
<string>in
|
198
|
+
<string>in byte, to a maximum of 4Go</string>
|
168
199
|
</property>
|
169
200
|
</widget>
|
170
201
|
</item>
|
171
202
|
</layout>
|
172
203
|
</item>
|
173
|
-
<item>
|
174
|
-
<widget class="QTableWidget" name="tbl_bus_scan">
|
175
|
-
<attribute name="horizontalHeaderDefaultSectionSize">
|
176
|
-
<number>85</number>
|
177
|
-
</attribute>
|
178
|
-
<attribute name="horizontalHeaderStretchLastSection">
|
179
|
-
<bool>true</bool>
|
180
|
-
</attribute>
|
181
|
-
<attribute name="verticalHeaderVisible">
|
182
|
-
<bool>false</bool>
|
183
|
-
</attribute>
|
184
|
-
<column>
|
185
|
-
<property name="text">
|
186
|
-
<string>Address</string>
|
187
|
-
</property>
|
188
|
-
</column>
|
189
|
-
<column>
|
190
|
-
<property name="text">
|
191
|
-
<string>R/W</string>
|
192
|
-
</property>
|
193
|
-
</column>
|
194
|
-
</widget>
|
195
|
-
</item>
|
196
204
|
<item>
|
197
205
|
<layout class="QHBoxLayout" name="hl">
|
198
206
|
<item>
|
@@ -0,0 +1,76 @@
|
|
1
|
+
#!/usr/local/bin/ruby
|
2
|
+
#===================================================
|
3
|
+
# Hardsploit API - By Opale Security
|
4
|
+
# www.opale-security.com || www.hardsploit.io
|
5
|
+
# License: GNU General Public License v3
|
6
|
+
# License URI: http://www.gnu.org/licenses/gpl.txt
|
7
|
+
#===================================================
|
8
|
+
|
9
|
+
require 'io/console'
|
10
|
+
require_relative '../HardsploitAPI/Core/HardsploitAPI'
|
11
|
+
require_relative '../HardsploitAPI/Modules/SWD/HardsploitAPI_SWD'
|
12
|
+
|
13
|
+
def callbackInfo(receiveData)
|
14
|
+
#print receiveData + "\n"
|
15
|
+
end
|
16
|
+
|
17
|
+
def callbackData(receiveData)
|
18
|
+
if receiveData != nil then
|
19
|
+
puts "received #{receiveData.size}"
|
20
|
+
p receiveData
|
21
|
+
else
|
22
|
+
puts "ISSUE BECAUSE DATA IS NIL"
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
def callbackSpeedOfTransfert(receiveData)
|
27
|
+
#puts "Speed : #{receiveData}"
|
28
|
+
end
|
29
|
+
|
30
|
+
def callbackProgress(percent:,startTime:,endTime:)
|
31
|
+
print "\r\e[#{31}mUpload of FPGA firmware in progress : #{percent}%\e[0m"
|
32
|
+
#puts "Progress : #{percent}% Start@ #{startTime} Stop@ #{endTime}"
|
33
|
+
#puts "Elasped time #{(endTime-startTime).round(4)} sec"
|
34
|
+
end
|
35
|
+
|
36
|
+
#puts "Number of hardsploit detected :#{HardsploitAPI.getNumberOfBoardAvailable}"
|
37
|
+
|
38
|
+
HardsploitAPI.callbackInfo = method(:callbackInfo)
|
39
|
+
HardsploitAPI.callbackData = method(:callbackData)
|
40
|
+
HardsploitAPI.callbackSpeedOfTransfert = method(:callbackSpeedOfTransfert)
|
41
|
+
HardsploitAPI.callbackProgress = method(:callbackProgress)
|
42
|
+
HardsploitAPI.id = 0 # id of hardsploit 0 for the first one, 1 for the second etc
|
43
|
+
|
44
|
+
HardsploitAPI.instance.getAllVersions
|
45
|
+
|
46
|
+
if ARGV[1] != "nofirmware" then
|
47
|
+
HardsploitAPI.instance.loadFirmware("SWD")
|
48
|
+
end
|
49
|
+
|
50
|
+
begin
|
51
|
+
swd = HardsploitAPI_SWD.new(
|
52
|
+
memory_start_address: "0x08000000",
|
53
|
+
memory_size_address: "0x1FFFF7E0",
|
54
|
+
cpu_id_address: "0xE000ED00",
|
55
|
+
device_id_address: "0x1FFFF7E8"
|
56
|
+
)
|
57
|
+
|
58
|
+
#TO OBTAIN ID CODE
|
59
|
+
code = swd.obtainCodes
|
60
|
+
puts "DP.IDCODE: #{code[:DebugPortId].to_s(16)} "
|
61
|
+
puts "AP.IDCODE: #{code[:AccessPortId].to_s(16)} "
|
62
|
+
|
63
|
+
if ARGV[0] == nil
|
64
|
+
puts "Write firmware command but path of file not founded"
|
65
|
+
else
|
66
|
+
# ERASE FLASH !!!!!!!!!! AND WRITE THE CONTENT OF THE FILE ON THE FLASH
|
67
|
+
puts "Begin of write"
|
68
|
+
swd.writeFlash(ARGV[0])
|
69
|
+
puts "Write finished"
|
70
|
+
end
|
71
|
+
|
72
|
+
rescue HardsploitAPI::ERROR::HARDSPLOIT_NOT_FOUND
|
73
|
+
puts "Hardsploit not found"
|
74
|
+
rescue HardsploitAPI::ERROR::USB_ERROR
|
75
|
+
puts "USB ERRROR"
|
76
|
+
end
|